Skip to content
Open
Show file tree
Hide file tree
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
14 changes: 14 additions & 0 deletions PWGDQ/Core/HistogramsLibrary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -744,22 +744,22 @@
if (subGroupStr.Contains("tpcpid_fine")) {
// fine binning for pIN: steps in 10 MeV/c from 0 to 1 GeV/c and 100 MeV/c up to 10 GeV/c
std::array<double, 281> pIN_bins{};
for (int i = 0; i <= 200; i++) {

Check failure on line 747 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
pIN_bins[i] = 0.01 * i;
}
for (int i = 1; i <= 80; i++) {

Check failure on line 750 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
pIN_bins[200 + i] = 2. + 0.1 * i;
}
int nbins_pIN = static_cast<int>(pIN_bins.size()) - 1;

std::array<double, 201> TPCdEdx_bins{};
for (int i = 0; i <= 200; i++) {

Check failure on line 756 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
TPCdEdx_bins[i] = i;
}
int nbins_TPCdEdx = static_cast<int>(TPCdEdx_bins.size()) - 1;

std::array<double, 101> nSigma_bins{};
for (int i = 0; i <= 100; i++) {

Check failure on line 762 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
nSigma_bins[i] = -5. + 0.1 * i;
}
int nbins_nSigma = static_cast<int>(nSigma_bins.size()) - 1;
Expand Down Expand Up @@ -882,22 +882,22 @@
if (subGroupStr.Contains("tofpid_fine")) {
// fine binning for pIN: steps in 10 MeV/c from 0 to 1 GeV/c and 100 MeV/c up to 10 GeV/c
std::array<double, 281> pIN_bins{};
for (int i = 0; i <= 200; i++) {

Check failure on line 885 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
pIN_bins[i] = 0.01 * i;
}
for (int i = 1; i <= 80; i++) {

Check failure on line 888 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
pIN_bins[200 + i] = 2. + 0.1 * i;
}
int nbins_pIN = static_cast<int>(pIN_bins.size()) - 1;

std::array<double, 241> TOFbeta_bins{};
for (int i = 0; i <= 240; i++) {

Check failure on line 894 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
TOFbeta_bins[i] = 0.005 * i;
}
int nbins_TOFbeta = static_cast<int>(TOFbeta_bins.size()) - 1;

std::array<double, 101> nSigma_bins{};
for (int i = 0; i <= 100; i++) {

Check failure on line 900 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
nSigma_bins[i] = -5. + 0.1 * i;
}
int nbins_nSigma = static_cast<int>(nSigma_bins.size()) - 1;
Expand All @@ -919,10 +919,10 @@
const int kNvarsPID = 3;
const int kNbins_pIN = 169;
std::array<double, kNbins_pIN + 1> pIN_bins{};
for (int i = 0; i <= 140; i++) {

Check failure on line 922 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
pIN_bins[i] = 0.01 * i + 0.1;
}
for (int i = 1; i <= 15; i++) {

Check failure on line 925 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
pIN_bins[140 + i] = 1.5 + 0.1 * i;
}
for (int i = 1; i <= 14; i++) {
Expand Down Expand Up @@ -1268,6 +1268,20 @@
hm->AddHistogram(histClass, "Mass_Pt_cosThetaCS_Tauxy", "", 4, varspTCS.data(), bins.data(), xmin.data(), xmax.data(), nullptr, -1, kFALSE);
hm->AddHistogram(histClass, "Mass_Pt_cosThetaRM_Tauxy", "", 4, varspTRM.data(), bins.data(), xmin.data(), xmax.data(), nullptr, -1, kFALSE);
}
if (groupStr.CompareTo("polarization-dielectron-pbpb-midy-he-gen") == 0) {
std::array<int, 5> varspTHE = {VarManager::kMCMass, VarManager::kMCPt, VarManager::kMCEventCentrFT0C, VarManager::kMCCosThetaHE, VarManager::kMCPhiHE};
std::array<int, 5> bins = {50, 30, 10, 20, 10};
std::array<double, 5> xmin = {2., 0., 0, -1., 0.0};
std::array<double, 5> xmax = {4., 3., 100, 1., 6.28};
hm->AddHistogram(histClass, "MC_Dielectron_Mass_Pt_Cent_cosThetaHE", "", 5, varspTHE.data(), bins.data(), xmin.data(), xmax.data(), 0, -1, kFALSE);
}
if (groupStr.CompareTo("polarization-dielectron-pbpb-midy-cs-gen") == 0) {
std::array<int, 5> varspTCS = {VarManager::kMCMass, VarManager::kMCPt, VarManager::kMCEventCentrFT0C, VarManager::kMCCosThetaCS, VarManager::kMCPhiCS};
std::array<int, 5> bins = {50, 30, 10, 20, 10};
std::array<double, 5> xmin = {2., 0., 0, -1., 0.0};
std::array<double, 5> xmax = {4., 3., 100, 1., 6.28};
hm->AddHistogram(histClass, "MC_Dielectron_Mass_Pt_Cent_cosThetaCS", "", 5, varspTCS.data(), bins.data(), xmin.data(), xmax.data(), 0, -1, kFALSE);
}
if (groupStr.CompareTo("pair") == 0) {
if (subGroupStr.Contains("cepf")) {
hm->AddHistogram(histClass, "Mass", "", false, 300, 0.0, 12.0, VarManager::kMass);
Expand Down
1 change: 1 addition & 0 deletions PWGDQ/Core/VarManager.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2400,6 +2400,7 @@ void VarManager::SetDefaultVarNames()
fgVarNamesMap["kMCPhi"] = kMCPhi;
fgVarNamesMap["kMCEta"] = kMCEta;
fgVarNamesMap["kMCY"] = kMCY;
fgVarNamesMap["kMCMass"] = kMCMass;
fgVarNamesMap["kMCCosThetaHE"] = kMCCosThetaHE;
fgVarNamesMap["kMCPhiHE"] = kMCPhiHE;
fgVarNamesMap["kMCPhiTildeHE"] = kMCPhiTildeHE;
Expand Down
55 changes: 49 additions & 6 deletions PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,10 @@ struct AnalysisSameEventPairing {
Configurable<std::string> muon{"cfgMuonCuts", "", "Comma separated list of muon cuts"};
Configurable<std::string> pair{"cfgPairCuts", "", "Comma separated list of pair cuts, !!! Use only if you know what you are doing, otherwise leave empty"};
Configurable<bool> fConfigQA{"cfgQA", false, "If true, fill QA histograms"};
Configurable<bool> fConfigPseudoQA{"cfgPseudoQA", false, "If true, fill QA histograms with pseudo-proper decay length"};
Configurable<bool> fConfigMCtruthQA{"cfgMCtruthQA", false, "If true, fill QA histograms with default"};
Configurable<bool> fConfigPseudoQA{"cfgPseudoQA", false, "If true, fill QA histograms with pseudo-proper decay length analysis with polarization"};
Configurable<bool> fConfigTruthPbPbMIDYHE{"cfgTruthPbPbmidyHE", false, "If true, fill QA histograms with dielectron pairs in helicity frame"};
Configurable<bool> fConfigTruthPbPbMIDYCS{"cfgTruthPbPbmidyCS", false, "If true, fill QA histograms with dielectron pairs in collion-soper frame"};
Configurable<std::string> fConfigAddSEPHistogram{"cfgAddSEPHistogram", "", "Comma separated list of histograms"};
Configurable<std::string> fConfigAddJSONHistograms{"cfgAddJSONHistograms", "", "Histograms in JSON format"};
Configurable<bool> useRemoteField{"cfgUseRemoteField", false, "Chose whether to fetch the magnetic field from ccdb or set it manually"};
Expand Down Expand Up @@ -1500,19 +1503,35 @@ struct AnalysisSameEventPairing {
histNames += Form("MCTruthGen_%s;", sig->GetName()); // TODO: Add these names to a std::vector to avoid using Form in the process function
histNames += Form("MCTruthGenSel_%s;", sig->GetName());
} else if (sig->GetNProngs() == 2) {
histNames += Form("MCTruthGenPairSel_%s;", sig->GetName()); // after event selection
if (fConfigOptions.fConfigMCtruthQA.value) {
histNames += Form("MCTruthGenPairSel_%s;", sig->GetName()); // after event selection
}
if (fConfigOptions.fConfigPseudoQA.value) {
histNames += Form("MCTruthGenPseudoPolPairSel_%s;", sig->GetName());
}
if (fConfigOptions.fConfigTruthPbPbMIDYHE.value) {
histNames += Form("MCTruthGenPseudoPolPairSel_%s;", sig->GetName());
}
if (fConfigOptions.fConfigTruthPbPbMIDYCS.value) {
histNames += Form("MCTruthGenPseudoPolPairSel_%s;", sig->GetName());
}
fHasTwoProngGenMCsignals = true;
}
// for these pair level signals, also add histograms for each MCgenAcc cut if specified
if (fUseMCGenAccCut) {
for (auto& cut : fMCGenAccCuts) {
histNames += Form("MCTruthGenPairSel_%s_%s;", sig->GetName(), cut->GetName()); // after event selection and MCgenAcc cut
if (fConfigOptions.fConfigMCtruthQA.value) {
histNames += Form("MCTruthGenPairSel_%s_%s;", sig->GetName(), cut->GetName()); // after event selection and MCgenAcc cut
}
if (fConfigOptions.fConfigPseudoQA.value) {
histNames += Form("MCTruthGenPseudoPolPairSel_%s_%s;", sig->GetName(), cut->GetName());
}
if (fConfigOptions.fConfigTruthPbPbMIDYHE.value) {
histNames += Form("MCTruthGenPoldielectronPbPbPairHESel_%s;", sig->GetName(), cut->GetName());
}
if (fConfigOptions.fConfigTruthPbPbMIDYCS.value) {
histNames += Form("MCTruthGenPseudoPolPairCSSel_%s_%s;", sig->GetName(), cut->GetName());
}
}
}
}
Expand Down Expand Up @@ -2167,17 +2186,35 @@ struct AnalysisSameEventPairing {
VarManager::FillTrackCollisionMC<TPairType>(motherMCParticle_t1, collVtxPos, pdgDB->Mass(motherMCParticle_t1.pdgCode()));
}
}
fHistMan->FillHistClass(Form("MCTruthGenPairSel_%s", sig->GetName()), VarManager::fgValues);
if (fConfigOptions.fConfigQA.value) {
if (fConfigOptions.fConfigMCtruthQA.value) {
fHistMan->FillHistClass(Form("MCTruthGenPairSel_%s", sig->GetName()), VarManager::fgValues);
}
if (fConfigOptions.fConfigPseudoQA.value) {
fHistMan->FillHistClass(Form("MCTruthGenPseudoPolPairSel_%s", sig->GetName()), VarManager::fgValues);
}
if (fConfigOptions.fConfigTruthPbPbMIDYHE.value) {
fHistMan->FillHistClass(Form("MCTruthGenPoldielectronPbPbPairHESel_%s", sig->GetName()), VarManager::fgValues);
}
if (fConfigOptions.fConfigTruthPbPbMIDYCS.value) {
fHistMan->FillHistClass(Form("MCTruthGenPoldielectronPbPbPairCSSel_%s", sig->GetName()), VarManager::fgValues);
}

if (fUseMCGenAccCut) {
for (auto& cut : fMCGenAccCuts) {
if (cut->IsSelected(VarManager::fgValues)) {
fHistMan->FillHistClass(Form("MCTruthGenPairSel_%s_%s", sig->GetName(), cut->GetName()), VarManager::fgValues);
if (fConfigOptions.fConfigMCtruthQA.value) {
fHistMan->FillHistClass(Form("MCTruthGenPairSel_%s_%s", sig->GetName(), cut->GetName()), VarManager::fgValues);
}
if (fConfigOptions.fConfigPseudoQA.value) {
fHistMan->FillHistClass(Form("MCTruthGenPseudoPolPairSel_%s_%s", sig->GetName(), cut->GetName()), VarManager::fgValues);
}

if (fConfigOptions.fConfigTruthPbPbMIDYHE.value) {
fHistMan->FillHistClass(Form("MCTruthGenPoldielectronPbPbPairHESel_%s", sig->GetName(), cut->GetName()), VarManager::fgValues);
}
if (fConfigOptions.fConfigTruthPbPbMIDYCS.value) {
fHistMan->FillHistClass(Form("MCTruthGenPoldielectronPbPbPairCSSel_%s", sig->GetName(), cut->GetName()), VarManager::fgValues);
}
}
}
}
Expand Down Expand Up @@ -3181,7 +3218,13 @@ void DefineHistograms(HistogramManager* histMan, TString histClasses, const char
if (classStr.Contains("MCTruthGenPseudoPolPair")) {
dqhistograms::DefineHistograms(histMan, objArray->At(iclass)->GetName(), "polarization-pseudoproper-gen", histName);
}
if (classStr.Contains("MCTruthGenPoldielectronPbPbPairHE")) {
dqhistograms::DefineHistograms(histMan, objArray->At(iclass)->GetName(), "polarization-dielectron-pbpb-midy-he-gen", histName);
}

if (classStr.Contains("MCTruthGenPoldielectronPbPbPairCS")) {
dqhistograms::DefineHistograms(histMan, objArray->At(iclass)->GetName(), "polarization-dielectron-pbpb-midy-cs-gen", histName);
}
if (classStr.Contains("MCTruthGenSelBR")) {
dqhistograms::DefineHistograms(histMan, objArray->At(iclass)->GetName(), "mctruth_triple");
} else if (classStr.Contains("MCTruthGen")) {
Expand Down
Loading