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
31 changes: 20 additions & 11 deletions Tutorials/src/multiProcess.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,26 @@ inline auto normalize(float a)

// Analysis task with several process functions with different signatures
struct MultipleProcessExample {
HistogramRegistry registry{
"registry",
{
{"etaDiff", ";#eta_{MC} - #eta_{Rec}", {HistType::kTH1F, {{100, -2, 2}}}},
{"phiDiff", ";#phi_{MC} - #phi_{Rec}", {HistType::kTH1F, {{100, -M_PI, M_PI}}}},
{"etaRec", ";#eta_{Rec}", {HistType::kTH1F, {{100, -2, 2}}}},
{"phiRec", ";#phi_{Rec}", {HistType::kTH1F, {{100, 0, 2 * M_PI}}}},
{"etaMC", ";#eta_{MC}", {HistType::kTH1F, {{100, -2, 2}}}},
{"phiMC", ";#phi_{MC}", {HistType::kTH1F, {{100, 0, 2 * M_PI}}}} ///
} ///
};
HistogramRegistry registry;

void init(InitContext const&)
{
// do + processRec can be checked as a bool to veryfy if the process function is enabled
if (doprocessRec) { // Check if the process function for processRec is enabled
registry.add("etaRec", ";#eta_{Rec}", HistType::kTH1F, {{100, -2, 2}});
registry.add("phiRec", ";#phi_{Rec}", HistType::kTH1F, {{100, 0, 2 * M_PI}});
}
// do + processGen can be checked as a bool to veryfy if the process function is enabled
if (doprocessGen) { // Check if the process function for processGen is enabled
registry.add("etaMC", ";#eta_{MC}", HistType::kTH1F, {{100, -2, 2}});
registry.add("phiMC", ";#phi_{MC}", HistType::kTH1F, {{100, 0, 2 * M_PI}});
}
// do + processResolution can be checked as a bool to veryfy if the process function is enabled
if (doprocessResolution) { // Check if the process function for processResolution is enabled
registry.add("etaDiff", ";#eta_{MC} - #eta_{Rec}", HistType::kTH1F, {{100, -2, 2}});
registry.add("phiDiff", ";#phi_{MC} - #phi_{Rec}", HistType::kTH1F, {{100, -M_PI, M_PI}});
}
}

Filter RecColVtxZ = nabs(aod::collision::posZ) < 10.f;
Filter GenColVtxZ = nabs(aod::mccollision::posZ) < 10.f;
Expand Down