Skip to content
Closed
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
17 changes: 8 additions & 9 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 @@ -1269,20 +1269,19 @@
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> 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};
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> 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};
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
102 changes: 51 additions & 51 deletions PWGDQ/Tasks/dqEfficiency_withAssoc_direct.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1500,39 +1500,39 @@ struct AnalysisSameEventPairing {

for (auto& sig : fGenMCSignals) {
if (sig->GetNProngs() == 1) {
histNames += Form("MCTruthGen_%s;", sig->GetName()); // TODO: Add these names to a std::vector to avoid using Form in the process function
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) {
if (fConfigOptions.fConfigMCtruthQA.value) {
histNames += Form("MCTruthGenPairSel_%s;", sig->GetName()); // after event selection
}
if (fConfigOptions.fConfigPseudoQA.value) {
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.fConfigTruthPbPbMIDYHE.value) {
histNames += Form("MCTruthGenPseudoPolPairSel_%s;", sig->GetName());
}
if (fConfigOptions.fConfigTruthPbPbMIDYCS.value) {
histNames += Form("MCTruthGenPseudoPolPairSel_%s;", sig->GetName());
}
fHasTwoProngGenMCsignals = true;
}
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) {
if (fConfigOptions.fConfigMCtruthQA.value) {
histNames += Form("MCTruthGenPairSel_%s_%s;", sig->GetName(), cut->GetName()); // after event selection and MCgenAcc cut
}
if (fConfigOptions.fConfigPseudoQA.value) {
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());
}
}
}
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 @@ -2186,35 +2186,35 @@ struct AnalysisSameEventPairing {
VarManager::FillTrackCollisionMC<TPairType>(motherMCParticle_t1, collVtxPos, pdgDB->Mass(motherMCParticle_t1.pdgCode()));
}
}
if (fConfigOptions.fConfigMCtruthQA.value) {
fHistMan->FillHistClass(Form("MCTruthGenPairSel_%s", sig->GetName()), VarManager::fgValues);
}
if (fConfigOptions.fConfigPseudoQA.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) {
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)) {
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);
}
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 @@ -3221,7 +3221,7 @@ void DefineHistograms(HistogramManager* histMan, TString histClasses, const char
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);
}
Expand Down
Loading