Skip to content
16 changes: 13 additions & 3 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 @@ -1257,15 +1257,25 @@
hm->AddHistogram(histClass, "Coschi", "", false, 25, coschiBins.data(), VarManager::kMCCosChi, 0, nullptr, -1, 0, nullptr, -1, "", "", "", -1, VarManager::kMCWeight);
}

if (groupStr.CompareTo("polarization-pseudoproper-gen") == 0) {
if (groupStr.CompareTo("polarization-pseudoproper-midy-he-gen") == 0) {
std::array<int, 4> varspTHE = {VarManager::kMCMass, VarManager::kMCPt, VarManager::kMCCosThetaHE, VarManager::kMCVertexingTauxyProjected};
std::array<int, 4> varspTCS = {VarManager::kMCMass, VarManager::kMCPt, VarManager::kMCCosThetaCS, VarManager::kMCVertexingTauxyProjected};
std::array<int, 4> varspTRM = {VarManager::kMCMass, VarManager::kMCPt, VarManager::kMCCosThetaRM, VarManager::kMCVertexingTauxyProjected};
std::array<int, 4> bins = {50, 20, 20, 1000};
std::array<double, 4> xmin = {2., 0., -1., -0.5};
std::array<double, 4> xmax = {4., 20., 1., 0.5};
hm->AddHistogram(histClass, "Mass_Pt_cosThetaHE_Tauxy", "", 4, varspTHE.data(), bins.data(), xmin.data(), xmax.data(), nullptr, -1, kFALSE);
}
if (groupStr.CompareTo("polarization-pseudoproper-midy-cs-gen") == 0) {
std::array<int, 4> varspTCS = {VarManager::kMCMass, VarManager::kMCPt, VarManager::kMCCosThetaCS, VarManager::kMCVertexingTauxyProjected};
std::array<int, 4> bins = {50, 20, 20, 1000};
std::array<double, 4> xmin = {2., 0., -1., -0.5};
std::array<double, 4> xmax = {4., 20., 1., 0.5};
hm->AddHistogram(histClass, "Mass_Pt_cosThetaCS_Tauxy", "", 4, varspTCS.data(), bins.data(), xmin.data(), xmax.data(), nullptr, -1, kFALSE);
}
if (groupStr.CompareTo("polarization-pseudoproper-midy-rand-gen") == 0) {
std::array<int, 4> varspTRM = {VarManager::kMCMass, VarManager::kMCPt, VarManager::kMCCosThetaRM, VarManager::kMCVertexingTauxyProjected};
std::array<int, 4> bins = {50, 20, 20, 1000};
std::array<double, 4> xmin = {2., 0., -1., -0.5};
std::array<double, 4> xmax = {4., 20., 1., 0.5};
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) {
Expand Down
62 changes: 47 additions & 15 deletions PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ struct AnalysisEventSelection {

HistogramManager* fHistMan = nullptr;

AnalysisCompositeCut* fEventCut;
AnalysisCompositeCut* fEventCut = nullptr;

Service<o2::ccdb::BasicCCDBManager> fCCDB;
o2::ccdb::CcdbApi fCCDBApi;
Expand Down Expand Up @@ -1141,7 +1141,9 @@ struct AnalysisSameEventPairing {
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> 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> fConfigPseudoHEQA{"cfgPseudoHEQA", false, "If true, fill QA histograms with pseudo-proper decay length analysis with polarization HE"};
Configurable<bool> fConfigPseudoCSQA{"cfgPseudoCSQA", false, "If true, fill QA histograms with pseudo-proper decay length analysis with polarization CS"};
Configurable<bool> fConfigPseudoRMQA{"cfgPseudoRMQA", false, "If true, fill QA histograms with pseudo-proper decay length analysis with polarization RM"};
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"};
Expand Down Expand Up @@ -1506,14 +1508,20 @@ struct AnalysisSameEventPairing {
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.fConfigPseudoHEQA.value) {
histNames += Form("MCTruthGenPseudoPolPairHESel_%s;", sig->GetName());
}
if (fConfigOptions.fConfigPseudoCSQA.value) {
histNames += Form("MCTruthGenPseudoPolPairCSSel_%s;", sig->GetName());
}
if (fConfigOptions.fConfigPseudoRMQA.value) {
histNames += Form("MCTruthGenPseudoPolPairRMSel_%s;", sig->GetName());
}
if (fConfigOptions.fConfigTruthPbPbMIDYHE.value) {
histNames += Form("MCTruthGenPseudoPolPairSel_%s;", sig->GetName());
histNames += Form("MCTruthGenPoldielectronPbPbPairHESel_%s;", sig->GetName());
}
if (fConfigOptions.fConfigTruthPbPbMIDYCS.value) {
histNames += Form("MCTruthGenPseudoPolPairSel_%s;", sig->GetName());
histNames += Form("MCTruthGenPoldielectronPbPbPairCSSel_%s;", sig->GetName());
}
fHasTwoProngGenMCsignals = true;
}
Expand All @@ -1523,14 +1531,20 @@ struct AnalysisSameEventPairing {
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.fConfigPseudoHEQA.value) {
histNames += Form("MCTruthGenPseudoPolPairHESel_%s_%s;", sig->GetName(), cut->GetName());
}
if (fConfigOptions.fConfigPseudoCSQA.value) {
histNames += Form("MCTruthGenPseudoPolPairCSSel_%s_%s;", sig->GetName(), cut->GetName());
}
if (fConfigOptions.fConfigPseudoRMQA.value) {
histNames += Form("MCTruthGenPseudoPolPairRMSel_%s_%s;", sig->GetName(), cut->GetName());
}
if (fConfigOptions.fConfigTruthPbPbMIDYHE.value) {
histNames += Form("MCTruthGenPoldielectronPbPbPairHESel_%s_%s;", sig->GetName(), cut->GetName());
}
if (fConfigOptions.fConfigTruthPbPbMIDYCS.value) {
histNames += Form("MCTruthGenPseudoPolPairCSSel_%s_%s;", sig->GetName(), cut->GetName());
histNames += Form("MCTruthGenPoldielectronPbPbPairCSSel_%s_%s;", sig->GetName(), cut->GetName());
}
}
}
Expand Down Expand Up @@ -2189,8 +2203,14 @@ struct AnalysisSameEventPairing {
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.fConfigPseudoHEQA.value) {
fHistMan->FillHistClass(Form("MCTruthGenPseudoPolPairHESel_%s", sig->GetName()), VarManager::fgValues);
}
if (fConfigOptions.fConfigPseudoCSQA.value) {
fHistMan->FillHistClass(Form("MCTruthGenPseudoPolPairCSSel_%s", sig->GetName()), VarManager::fgValues);
}
if (fConfigOptions.fConfigPseudoRMQA.value) {
fHistMan->FillHistClass(Form("MCTruthGenPseudoPolPairRMSel_%s", sig->GetName()), VarManager::fgValues);
}
if (fConfigOptions.fConfigTruthPbPbMIDYHE.value) {
fHistMan->FillHistClass(Form("MCTruthGenPoldielectronPbPbPairHESel_%s", sig->GetName()), VarManager::fgValues);
Expand All @@ -2205,8 +2225,14 @@ struct AnalysisSameEventPairing {
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.fConfigPseudoHEQA.value) {
fHistMan->FillHistClass(Form("MCTruthGenPseudoPolPairHESel_%s_%s", sig->GetName(), cut->GetName()), VarManager::fgValues);
}
if (fConfigOptions.fConfigPseudoCSQA.value) {
fHistMan->FillHistClass(Form("MCTruthGenPseudoPolPairCSSel_%s_%s", sig->GetName(), cut->GetName()), VarManager::fgValues);
}
if (fConfigOptions.fConfigPseudoRMQA.value) {
fHistMan->FillHistClass(Form("MCTruthGenPseudoPolPairRMSel_%s_%s", sig->GetName(), cut->GetName()), VarManager::fgValues);
}

if (fConfigOptions.fConfigTruthPbPbMIDYHE.value) {
Expand Down Expand Up @@ -3215,8 +3241,14 @@ void DefineHistograms(HistogramManager* histMan, TString histClasses, const char
if (classStr.Contains("MCTruthGenPair")) {
dqhistograms::DefineHistograms(histMan, objArray->At(iclass)->GetName(), "mctruth_pair", histName);
}
if (classStr.Contains("MCTruthGenPseudoPolPair")) {
dqhistograms::DefineHistograms(histMan, objArray->At(iclass)->GetName(), "polarization-pseudoproper-gen", histName);
if (classStr.Contains("MCTruthGenPseudoPolPairHE")) {
dqhistograms::DefineHistograms(histMan, objArray->At(iclass)->GetName(), "polarization-pseudoproper-midy-he-gen", histName);
}
if (classStr.Contains("MCTruthGenPseudoPolPairCS")) {
dqhistograms::DefineHistograms(histMan, objArray->At(iclass)->GetName(), "polarization-pseudoproper-midy-cs-gen", histName);
}
if (classStr.Contains("MCTruthGenPseudoPolPairRM")) {
dqhistograms::DefineHistograms(histMan, objArray->At(iclass)->GetName(), "polarization-pseudoproper-midy-rand-gen", histName);
}
if (classStr.Contains("MCTruthGenPoldielectronPbPbPairHE")) {
dqhistograms::DefineHistograms(histMan, objArray->At(iclass)->GetName(), "polarization-dielectron-pbpb-midy-he-gen", histName);
Expand Down
Loading