Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions PWGUD/Tasks/upcRhoAnalysis.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,12 @@ namespace reco_tree
// event info
DECLARE_SOA_COLUMN(RecoSetting, recoSetting, uint16_t);
DECLARE_SOA_COLUMN(RunNumber, runNumber, int32_t);
DECLARE_SOA_COLUMN(PosX, posX, float);
DECLARE_SOA_COLUMN(PosY, posY, float);
DECLARE_SOA_COLUMN(PosZ, posZ, float);
DECLARE_SOA_COLUMN(OccupancyInTime, occupancyInTime, float);
DECLARE_SOA_COLUMN(HadronicRate, hadronicRate, float);
DECLARE_SOA_COLUMN(LocalBC, localBC, int);
// FIT info
DECLARE_SOA_COLUMN(TotalFT0AmplitudeA, totalFT0AmplitudeA, float);
DECLARE_SOA_COLUMN(TotalFT0AmplitudeC, totalFT0AmplitudeC, float);
Expand Down Expand Up @@ -88,7 +91,7 @@ DECLARE_SOA_COLUMN(LeadingTrackPrPID, leadingTrackPrPID, float);
DECLARE_SOA_COLUMN(SubleadingTrackPrPID, subleadingTrackPrPID, float);
} // namespace reco_tree
DECLARE_SOA_TABLE(RecoTree, "AOD", "RECOTREE",
reco_tree::RecoSetting, reco_tree::RunNumber, reco_tree::PosZ, reco_tree::OccupancyInTime, reco_tree::HadronicRate,
reco_tree::RecoSetting, reco_tree::RunNumber, reco_tree::PosX, reco_tree::PosY, reco_tree::PosZ, reco_tree::OccupancyInTime, reco_tree::HadronicRate, reco_tree::LocalBC,
reco_tree::TotalFT0AmplitudeA, reco_tree::TotalFT0AmplitudeC, reco_tree::TotalFV0AmplitudeA, reco_tree::TotalFDDAmplitudeA, reco_tree::TotalFDDAmplitudeC,
reco_tree::TimeFT0A, reco_tree::TimeFT0C, reco_tree::TimeFV0A, reco_tree::TimeFDDA, reco_tree::TimeFDDC,
reco_tree::EnergyCommonZNA, reco_tree::EnergyCommonZNC, reco_tree::TimeZNA, reco_tree::TimeZNC, reco_tree::NeutronClass,
Expand All @@ -105,7 +108,10 @@ namespace mc_tree
{
// misc event info
DECLARE_SOA_COLUMN(RunNumber, runNumber, int);
DECLARE_SOA_COLUMN(PosX, posX, float);
DECLARE_SOA_COLUMN(PosY, posY, float);
DECLARE_SOA_COLUMN(PosZ, posZ, float);
DECLARE_SOA_COLUMN(LocalBC, localBC, int);
// tracks
DECLARE_SOA_COLUMN(LeadingTrackSign, leadingTrackSign, int);
DECLARE_SOA_COLUMN(SubleadingTrackSign, subleadingTrackSign, int);
Expand All @@ -117,7 +123,7 @@ DECLARE_SOA_COLUMN(LeadingTrackPhi, leadingTrackPhi, float);
DECLARE_SOA_COLUMN(SubleadingTrackPhi, subleadingTrackPhi, float);
} // namespace mc_tree
DECLARE_SOA_TABLE(McTree, "AOD", "MCTREE",
mc_tree::RunNumber, mc_tree::PosZ,
mc_tree::RunNumber, mc_tree::PosX, mc_tree::PosY, mc_tree::PosZ, mc_tree::LocalBC,
mc_tree::LeadingTrackSign, mc_tree::SubleadingTrackSign,
mc_tree::LeadingTrackPt, mc_tree::SubleadingTrackPt,
mc_tree::LeadingTrackEta, mc_tree::SubleadingTrackEta,
Expand All @@ -131,6 +137,7 @@ struct UpcRhoAnalysis {
SGSelector sgSelector;

const float pcEtaCut = 0.9; // physics coordination recommendation
const int nPions = 2; // only study dipion final states
const std::vector<int> runNumbers = {544013, 544028, 544032, 544091, 544095, 544098, 544116, 544121, 544122, 544123, 544124, 544184, 544185, 544389, 544390, 544391, 544392, 544451, 544454, 544474, 544475, 544476, 544477, 544490, 544491, 544492, 544508, 544510, 544511, 544512, 544514, 544515, 544518, 544548, 544549, 544550, 544551, 544564, 544565, 544567, 544568, 544580, 544582, 544583, 544585, 544614, 544640, 544652, 544653, 544672, 544674, 544692, 544693, 544694, 544696, 544739, 544742, 544754, 544767, 544794, 544795, 544797, 544813, 544868, 544886, 544887, 544896, 544911, 544913, 544914, 544917, 544931, 544947, 544961, 544963, 544964, 544968, 544991, 544992, 545004, 545008, 545009, 545041, 545042, 545044, 545047, 545060, 545062, 545063, 545064, 545066, 545086, 545103, 545117, 545171, 545184, 545185, 545210, 545222, 545223, 545246, 545249, 545262, 545289, 545291, 545294, 545295, 545296, 545311, 545312, 545332, 545345, 545367};
AxisSpec runNumberAxis = {static_cast<int>(runNumbers.size()), 0.5, static_cast<double>(runNumbers.size()) + 0.5, "run number"};

Expand Down Expand Up @@ -459,9 +466,9 @@ struct UpcRhoAnalysis {
{
std::vector<std::pair<int8_t, std::array<uint8_t, 3>>> requiredITSHits{};
requiredITSHits.push_back(std::make_pair(1, std::array<uint8_t, 3>{0, 1, 2})); // at least one hit in the innermost layer
constexpr uint8_t kBit = 1;
constexpr uint8_t KnBit = 1;
for (const auto& itsRequirement : requiredITSHits) {
auto hits = std::count_if(itsRequirement.second.begin(), itsRequirement.second.end(), [&](auto&& requiredLayer) { return itsClusterMap & (kBit << requiredLayer); });
auto hits = std::count_if(itsRequirement.second.begin(), itsRequirement.second.end(), [&](auto&& requiredLayer) { return itsClusterMap & (KnBit << requiredLayer); });

if ((itsRequirement.first == -1) && (hits > 0)) {
return false; // no hits were required in specified layers
Expand Down Expand Up @@ -788,9 +795,9 @@ struct UpcRhoAnalysis {
}
rQC.fill(HIST("QC/tracks/trackSelections/hRemainingTracks"), cutTracks.size());

if (static_cast<int>(cutTracks.size()) != 2) // further consider only two pion systems
if (static_cast<int>(cutTracks.size()) != nPions) // further consider only two pion systems
return;
for (int i = 0; i < 2; i++) {
for (int i = 0; i < nPions; i++) {
rQC.fill(HIST("QC/tracks/hSelectionCounter"), 15);
rQC.fill(HIST("QC/tracks/hSelectionCounterPerRun"), 15, runIndex);
}
Expand Down Expand Up @@ -819,7 +826,7 @@ struct UpcRhoAnalysis {
float phiCharge = getPhiCharge(cutTracks, cutTracksLVs);

// fill recoTree
recoTree(collision.flags(), collision.runNumber(), collision.posZ(), collision.occupancyInTime(), collision.hadronicRate(),
recoTree(collision.flags(), collision.runNumber(), collision.posX(), collision.posY(), collision.posZ(), collision.occupancyInTime(), collision.hadronicRate(), collision.globalBC() % o2::constants::lhc::LHCMaxBunches,
collision.totalFT0AmplitudeA(), collision.totalFT0AmplitudeC(), collision.totalFV0AmplitudeA(), collision.totalFDDAmplitudeA(), collision.totalFDDAmplitudeC(),
collision.timeFT0A(), collision.timeFT0C(), collision.timeFV0A(), collision.timeFDDA(), collision.timeFDDC(),
energyCommonZNA, energyCommonZNC, timeZNA, timeZNC, neutronClass,
Expand Down Expand Up @@ -1020,7 +1027,7 @@ struct UpcRhoAnalysis {
}

// fill mcTree
mcTree(runNumber, mcCollision.posZ(),
mcTree(runNumber, mcCollision.posX(), mcCollision.posY(), mcCollision.posZ(), mcCollision.globalBC() % o2::constants::lhc::LHCMaxBunches,
leadingPion.pdgCode() / std::abs(leadingPion.pdgCode()), subleadingPion.pdgCode() / std::abs(subleadingPion.pdgCode()),
pt(leadingPion.px(), leadingPion.py()), pt(subleadingPion.px(), subleadingPion.py()),
eta(leadingPion.px(), leadingPion.py(), leadingPion.pz()), eta(subleadingPion.px(), subleadingPion.py(), subleadingPion.pz()),
Expand Down
Loading