Skip to content

Commit 6665737

Browse files
committed
PWGDQ: Add MC truth information and configurable tag
1 parent a08c4af commit 6665737

3 files changed

Lines changed: 77 additions & 18 deletions

File tree

PWGDQ/Core/HistogramsLibrary.cxx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,6 +1268,21 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
12681268
hm->AddHistogram(histClass, "Mass_Pt_cosThetaCS_Tauxy", "", 4, varspTCS.data(), bins.data(), xmin.data(), xmax.data(), nullptr, -1, kFALSE);
12691269
hm->AddHistogram(histClass, "Mass_Pt_cosThetaRM_Tauxy", "", 4, varspTRM.data(), bins.data(), xmin.data(), xmax.data(), nullptr, -1, kFALSE);
12701270
}
1271+
if (groupStr.CompareTo("polarization-dielectron-pbpb-midy-he-gen") == 0) {
1272+
std::array<int, 5> varspTHE = {VarManager::kMCMass, VarManager::kMCPt,VarManager::kMCEventCentrFT0C, VarManager::kMCCosThetaHE,VarManager::kMCPhiHE};
1273+
std::array<int, 5> bins = {50, 30, 10, 20, 10};
1274+
std::array<double, 5> xmin = {2., 0.,0, -1., 0.0};
1275+
std::array<double, 5> xmax = {4., 3.,100, 1., 6.28};
1276+
hm->AddHistogram(histClass, "MC_Dielectron_Mass_Pt_Cent_cosThetaHE", "", 5, varspTHE.data(), bins.data(), xmin.data(), xmax.data(), 0, -1, kFALSE);
1277+
1278+
}
1279+
if (groupStr.CompareTo("polarization-dielectron-pbpb-midy-cs-gen") == 0) {
1280+
std::array<int, 5> varspTCS = {VarManager::kMCMass, VarManager::kMCPt,VarManager::kMCEventCentrFT0C, VarManager::kMCCosThetaCS,VarManager::kMCPhiCS};
1281+
std::array<int, 5> bins = {50, 30, 10, 20, 10};
1282+
std::array<double, 5> xmin = {2., 0.,0, -1., 0.0};
1283+
std::array<double, 5> xmax = {4., 3.,100, 1., 6.28};
1284+
hm->AddHistogram(histClass, "MC_Dielectron_Mass_Pt_Cent_cosThetaCS", "", 5, varspTCS.data(), bins.data(), xmin.data(), xmax.data(), 0, -1, kFALSE);
1285+
}
12711286
if (groupStr.CompareTo("pair") == 0) {
12721287
if (subGroupStr.Contains("cepf")) {
12731288
hm->AddHistogram(histClass, "Mass", "", false, 300, 0.0, 12.0, VarManager::kMass);

PWGDQ/Core/VarManager.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2400,6 +2400,7 @@ void VarManager::SetDefaultVarNames()
24002400
fgVarNamesMap["kMCPhi"] = kMCPhi;
24012401
fgVarNamesMap["kMCEta"] = kMCEta;
24022402
fgVarNamesMap["kMCY"] = kMCY;
2403+
fgVarNamesMap["kMCMass"] = kMCMass;
24032404
fgVarNamesMap["kMCCosThetaHE"] = kMCCosThetaHE;
24042405
fgVarNamesMap["kMCPhiHE"] = kMCPhiHE;
24052406
fgVarNamesMap["kMCPhiTildeHE"] = kMCPhiTildeHE;

PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx

Lines changed: 61 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,7 +1140,10 @@ struct AnalysisSameEventPairing {
11401140
Configurable<std::string> muon{"cfgMuonCuts", "", "Comma separated list of muon cuts"};
11411141
Configurable<std::string> pair{"cfgPairCuts", "", "Comma separated list of pair cuts, !!! Use only if you know what you are doing, otherwise leave empty"};
11421142
Configurable<bool> fConfigQA{"cfgQA", false, "If true, fill QA histograms"};
1143-
Configurable<bool> fConfigPseudoQA{"cfgPseudoQA", false, "If true, fill QA histograms with pseudo-proper decay length"};
1143+
Configurable<bool> fConfigMCtruthQA{"cfgMCtruthQA", false, "If true, fill QA histograms with default"};
1144+
Configurable<bool> fConfigPseudoQA{"cfgPseudoQA", false, "If true, fill QA histograms with pseudo-proper decay length analysis with polarization"};
1145+
Configurable<bool> fConfigTruthPbPbMIDYHE{"cfgTruthPbPbmidyHE", false, "If true, fill QA histograms with dielectron pairs in helicity frame"};
1146+
Configurable<bool> fConfigTruthPbPbMIDYCS{"cfgTruthPbPbmidyCS", false, "If true, fill QA histograms with dielectron pairs in collion-soper frame"};
11441147
Configurable<std::string> fConfigAddSEPHistogram{"cfgAddSEPHistogram", "", "Comma separated list of histograms"};
11451148
Configurable<std::string> fConfigAddJSONHistograms{"cfgAddJSONHistograms", "", "Histograms in JSON format"};
11461149
Configurable<bool> useRemoteField{"cfgUseRemoteField", false, "Chose whether to fetch the magnetic field from ccdb or set it manually"};
@@ -1497,23 +1500,39 @@ struct AnalysisSameEventPairing {
14971500

14981501
for (auto& sig : fGenMCSignals) {
14991502
if (sig->GetNProngs() == 1) {
1500-
histNames += Form("MCTruthGen_%s;", sig->GetName()); // TODO: Add these names to a std::vector to avoid using Form in the process function
1503+
histNames += Form("MCTruthGen_%s;", sig->GetName()); // TODO: Add these names to a std::vector to avoid using Form in the process function
15011504
histNames += Form("MCTruthGenSel_%s;", sig->GetName());
15021505
} else if (sig->GetNProngs() == 2) {
1503-
histNames += Form("MCTruthGenPairSel_%s;", sig->GetName()); // after event selection
1504-
if (fConfigOptions.fConfigPseudoQA.value) {
1506+
if (fConfigOptions.fConfigMCtruthQA.value) {
1507+
histNames += Form("MCTruthGenPairSel_%s;", sig->GetName()); // after event selection
1508+
}
1509+
if (fConfigOptions.fConfigPseudoQA.value) {
15051510
histNames += Form("MCTruthGenPseudoPolPairSel_%s;", sig->GetName());
1506-
}
1507-
fHasTwoProngGenMCsignals = true;
1511+
}
1512+
if (fConfigOptions.fConfigTruthPbPbMIDYHE.value) {
1513+
histNames += Form("MCTruthGenPseudoPolPairSel_%s;", sig->GetName());
1514+
}
1515+
if (fConfigOptions.fConfigTruthPbPbMIDYCS.value) {
1516+
histNames += Form("MCTruthGenPseudoPolPairSel_%s;", sig->GetName());
1517+
}
1518+
fHasTwoProngGenMCsignals = true;
15081519
}
15091520
// for these pair level signals, also add histograms for each MCgenAcc cut if specified
15101521
if (fUseMCGenAccCut) {
15111522
for (auto& cut : fMCGenAccCuts) {
1512-
histNames += Form("MCTruthGenPairSel_%s_%s;", sig->GetName(), cut->GetName()); // after event selection and MCgenAcc cut
1513-
if (fConfigOptions.fConfigPseudoQA.value) {
1523+
if (fConfigOptions.fConfigMCtruthQA.value) {
1524+
histNames += Form("MCTruthGenPairSel_%s_%s;", sig->GetName(), cut->GetName()); // after event selection and MCgenAcc cut
1525+
}
1526+
if (fConfigOptions.fConfigPseudoQA.value) {
15141527
histNames += Form("MCTruthGenPseudoPolPairSel_%s_%s;", sig->GetName(), cut->GetName());
1515-
}
1516-
}
1528+
}
1529+
if (fConfigOptions.fConfigTruthPbPbMIDYHE.value) {
1530+
histNames += Form("MCTruthGenPoldielectronPbPbPairHESel_%s;", sig->GetName(), cut->GetName());
1531+
}
1532+
if (fConfigOptions.fConfigTruthPbPbMIDYCS.value) {
1533+
histNames += Form("MCTruthGenPseudoPolPairCSSel_%s_%s;", sig->GetName(), cut->GetName());
1534+
}
1535+
}
15171536
}
15181537
}
15191538

@@ -2167,17 +2186,35 @@ struct AnalysisSameEventPairing {
21672186
VarManager::FillTrackCollisionMC<TPairType>(motherMCParticle_t1, collVtxPos, pdgDB->Mass(motherMCParticle_t1.pdgCode()));
21682187
}
21692188
}
2170-
fHistMan->FillHistClass(Form("MCTruthGenPairSel_%s", sig->GetName()), VarManager::fgValues);
2171-
if (fConfigOptions.fConfigQA.value) {
2189+
if (fConfigOptions.fConfigMCtruthQA.value) {
2190+
fHistMan->FillHistClass(Form("MCTruthGenPairSel_%s", sig->GetName()), VarManager::fgValues);
2191+
}
2192+
if (fConfigOptions.fConfigPseudoQA.value) {
21722193
fHistMan->FillHistClass(Form("MCTruthGenPseudoPolPairSel_%s", sig->GetName()), VarManager::fgValues);
21732194
}
2174-
if (fUseMCGenAccCut) {
2195+
if (fConfigOptions.fConfigTruthPbPbMIDYHE.value) {
2196+
fHistMan->FillHistClass(Form("MCTruthGenPoldielectronPbPbPairHESel_%s", sig->GetName()), VarManager::fgValues);
2197+
}
2198+
if (fConfigOptions.fConfigTruthPbPbMIDYCS.value) {
2199+
fHistMan->FillHistClass(Form("MCTruthGenPoldielectronPbPbPairCSSel_%s", sig->GetName()), VarManager::fgValues);
2200+
}
2201+
2202+
if (fUseMCGenAccCut) {
21752203
for (auto& cut : fMCGenAccCuts) {
21762204
if (cut->IsSelected(VarManager::fgValues)) {
2177-
fHistMan->FillHistClass(Form("MCTruthGenPairSel_%s_%s", sig->GetName(), cut->GetName()), VarManager::fgValues);
2178-
if (fConfigOptions.fConfigPseudoQA.value) {
2179-
fHistMan->FillHistClass(Form("MCTruthGenPseudoPolPairSel_%s_%s", sig->GetName(), cut->GetName()), VarManager::fgValues);
2180-
}
2205+
if (fConfigOptions.fConfigMCtruthQA.value) {
2206+
fHistMan->FillHistClass(Form("MCTruthGenPairSel_%s_%s", sig->GetName(), cut->GetName()), VarManager::fgValues);
2207+
}
2208+
if (fConfigOptions.fConfigPseudoQA.value) {
2209+
fHistMan->FillHistClass(Form("MCTruthGenPseudoPolPairSel_%s_%s", sig->GetName(), cut->GetName()), VarManager::fgValues); }
2210+
2211+
if (fConfigOptions.fConfigTruthPbPbMIDYHE.value) {
2212+
fHistMan->FillHistClass(Form("MCTruthGenPoldielectronPbPbPairHESel_%s", sig->GetName(), cut->GetName()), VarManager::fgValues);
2213+
2214+
}
2215+
if (fConfigOptions.fConfigTruthPbPbMIDYCS.value) {
2216+
fHistMan->FillHistClass(Form("MCTruthGenPoldielectronPbPbPairCSSel_%s", sig->GetName(), cut->GetName()), VarManager::fgValues);
2217+
}
21812218
}
21822219
}
21832220
}
@@ -3181,7 +3218,13 @@ void DefineHistograms(HistogramManager* histMan, TString histClasses, const char
31813218
if (classStr.Contains("MCTruthGenPseudoPolPair")) {
31823219
dqhistograms::DefineHistograms(histMan, objArray->At(iclass)->GetName(), "polarization-pseudoproper-gen", histName);
31833220
}
3184-
3221+
if (classStr.Contains("MCTruthGenPoldielectronPbPbPairHE")) {
3222+
dqhistograms::DefineHistograms(histMan, objArray->At(iclass)->GetName(), "polarization-dielectron-pbpb-midy-he-gen", histName);
3223+
}
3224+
3225+
if (classStr.Contains("MCTruthGenPoldielectronPbPbPairCS")) {
3226+
dqhistograms::DefineHistograms(histMan, objArray->At(iclass)->GetName(), "polarization-dielectron-pbpb-midy-cs-gen", histName);
3227+
}
31853228
if (classStr.Contains("MCTruthGenSelBR")) {
31863229
dqhistograms::DefineHistograms(histMan, objArray->At(iclass)->GetName(), "mctruth_triple");
31873230
} else if (classStr.Contains("MCTruthGen")) {

0 commit comments

Comments
 (0)