Skip to content

Commit

Permalink
[PWGEM]: adding histograms and cuts to check subGenerators
Browse files Browse the repository at this point in the history
  • Loading branch information
feisenhu committed Aug 28, 2024
1 parent 46523a2 commit bd5b817
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions PWGDQ/Core/CutsLibrary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3202,6 +3202,10 @@ AnalysisCut* o2::aod::dqcuts::GetAnalysisCut(const char* cutName)
std::string nameStr = cutName;
// ---------------------------------------------------------------
// Event cuts
if (!nameStr.compare("noEventCut")) {
return cut;
}

if (!nameStr.compare("eventNoTFBorder")) {
cut->AddCut(VarManager::kIsNoTFBorder, 0.5, 1.5);
return cut;
Expand Down
3 changes: 3 additions & 0 deletions PWGDQ/Core/HistogramsLibrary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
hm->AddHistogram(histClass, "MCVtxX_VtxY", "Vtx X vs Vtx Y", false, 200, 15.0, 15.0, VarManager::kMCVtxZ, 200, -0.2, 0.2, VarManager::kMCVtxY);
hm->AddHistogram(histClass, "MCImpPar", "MC impact param", false, 20, 0.0, 20.0, VarManager::kMCEventImpParam);
}
if (subGroupStr.Contains("subgen")) {
hm->AddHistogram(histClass, "SubGenID", "SubGenerator ID", false, 11, -0.5, 10.5, VarManager::kMCEventSubGeneratorId);
}
if (subGroupStr.Contains("qvector")) {
int varZNA[3] = {VarManager::kQ1ZNAX, VarManager::kQ1ZNAY, VarManager::kCentFT0C};
int varZNC[3] = {VarManager::kQ1ZNCX, VarManager::kQ1ZNCY, VarManager::kCentFT0C};
Expand Down
2 changes: 2 additions & 0 deletions PWGDQ/Core/VarManager.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -293,13 +293,15 @@ void VarManager::SetDefaultVarNames()
fgVariableNames[kCentFT0C] = "Centrality FT0C";
fgVariableUnits[kCentFT0C] = "%";
fgVariableNames[kMCEventGeneratorId] = "MC Generator ID";
fgVariableNames[kMCEventSubGeneratorId] = "MC SubGenerator ID";
fgVariableNames[kMCVtxX] = "MC Vtx X";
fgVariableNames[kMCVtxY] = "MC Vtx Y";
fgVariableNames[kMCVtxZ] = "MC Vtx Z";
fgVariableNames[kMCEventTime] = "MC event time";
fgVariableNames[kMCEventWeight] = "MC event weight";
fgVariableNames[kMCEventImpParam] = "MC impact parameter";
fgVariableUnits[kMCEventGeneratorId] = "";
fgVariableUnits[kMCEventSubGeneratorId] = "";
fgVariableUnits[kMCVtxX] = "cm";
fgVariableUnits[kMCVtxY] = "cm";
fgVariableUnits[kMCVtxZ] = "cm";
Expand Down
3 changes: 3 additions & 0 deletions PWGDQ/Core/VarManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ class VarManager : public TObject
kNTPCtracksInPast,
kNTPCtracksInFuture,
kMCEventGeneratorId,
kMCEventSubGeneratorId,
kMCVtxX,
kMCVtxY,
kMCVtxZ,
Expand Down Expand Up @@ -1626,6 +1627,7 @@ void VarManager::FillEvent(T const& event, float* values)

if constexpr ((fillMap & CollisionMC) > 0) {
values[kMCEventGeneratorId] = event.generatorsID();
values[kMCEventSubGeneratorId] = event.getSubGeneratorId();
values[kMCVtxX] = event.posX();
values[kMCVtxY] = event.posY();
values[kMCVtxZ] = event.posZ();
Expand All @@ -1636,6 +1638,7 @@ void VarManager::FillEvent(T const& event, float* values)

if constexpr ((fillMap & ReducedEventMC) > 0) {
values[kMCEventGeneratorId] = event.generatorsID();
values[kMCEventGeneratorId] = -999; // to be added in reduced events
values[kMCVtxX] = event.mcPosX();
values[kMCVtxY] = event.mcPosY();
values[kMCVtxZ] = event.mcPosZ();
Expand Down

0 comments on commit bd5b817

Please sign in to comment.