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
24 changes: 24 additions & 0 deletions PWGDQ/Core/CutsLibrary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include <RtypesCore.h>

#include <iostream>

Check failure on line 23 in PWGDQ/Core/CutsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <set>
#include <string>
#include <vector>
Expand Down Expand Up @@ -1169,7 +1169,7 @@
return cut;
}

for (int iCut = 0; iCut < 10; iCut++) {

Check failure on line 1172 in PWGDQ/Core/CutsLibrary.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.
if (!nameStr.compare(Form("jpsiEleSel%d_ionut", iCut))) {
cut->AddCut(GetAnalysisCut("kineJpsiEle_ionut"));
cut->AddCut(GetAnalysisCut("dcaCut1_ionut"));
Expand Down Expand Up @@ -1469,7 +1469,7 @@
return cut;
}

for (int i = 1; i <= 8; i++) {

Check failure on line 1472 in PWGDQ/Core/CutsLibrary.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.
if (!nameStr.compare(Form("dalitzSelected%d", i))) {
cut->AddCut(GetAnalysisCut(Form("dalitzLeg%d", i)));
return cut;
Expand Down Expand Up @@ -1943,7 +1943,7 @@
return cut;
}

for (unsigned int i = 0; i < 30; i++) {

Check failure on line 1946 in PWGDQ/Core/CutsLibrary.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.
if (!nameStr.compare(Form("ElSelCutVar%s%i", vecPIDcase.at(icase).Data(), i))) {
cut->AddCut(GetAnalysisCut("lmeeStandardKine"));
cut->AddCut(GetAnalysisCut(Form("lmeeCutVarTrackCuts%i", i)));
Expand Down Expand Up @@ -2713,7 +2713,7 @@
return cut;
}

for (int i = 1; i <= 8; i++) {

Check failure on line 2716 in PWGDQ/Core/CutsLibrary.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.
if (!nameStr.compare(Form("lmee%s_pp502TeV_PID%s_UsePrefilter%d", vecTypetrackWithPID.at(jcase).Data(), vecPIDcase.at(icase).Data(), i))) {
cut->AddCut(GetAnalysisCut(Form("notDalitzLeg%d", i)));
cut->AddCut(GetAnalysisCut("lmeeStandardKine"));
Expand Down Expand Up @@ -2770,7 +2770,7 @@
return cut;
}

for (int i = 1; i <= 8; i++) {

Check failure on line 2773 in PWGDQ/Core/CutsLibrary.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.
if (!nameStr.compare(Form("lmee%s_eNSigmaRun3%s_UsePrefilter%d", vecTypetrackWithPID.at(jcase).Data(), vecPIDcase.at(icase).Data(), i))) {
cut->AddCut(GetAnalysisCut(Form("notDalitzLeg%d", i)));
cut->AddCut(GetAnalysisCut("lmeeStandardKine"));
Expand Down Expand Up @@ -4090,6 +4090,30 @@
return cutAorC;
}

if (!nameStr.compare("eventXn0nTime")) {
cut->AddCut(VarManager::kTimeZNA, -2.0, 2.0);
cut->AddCut(VarManager::kTimeZNC, -2.0, 2.0, true);
return cut;
}

if (!nameStr.compare("event0nXnTime")) {
cut->AddCut(VarManager::kTimeZNA, -2.0, 2.0, true);
cut->AddCut(VarManager::kTimeZNC, -2.0, 2.0);
return cut;
}

if (!nameStr.compare("event0n0nTime")) {
cut->AddCut(VarManager::kTimeZNA, -2.0, 2.0, true);
cut->AddCut(VarManager::kTimeZNC, -2.0, 2.0, true);
return cut;
}

if (!nameStr.compare("eventXnXnTime")) {
cut->AddCut(VarManager::kTimeZNA, -2.0, 2.0);
cut->AddCut(VarManager::kTimeZNC, -2.0, 2.0);
return cut;
}

// Event cuts based on centrality
if (!nameStr.compare("eventStandardNoINT7Cent090")) {
cut->AddCut(VarManager::kVtxZ, -10.0, 10.0);
Expand Down Expand Up @@ -4494,7 +4518,7 @@
cut->AddCut(VarManager::kITSncls, 6.5, 7.5);
cut->AddCut(VarManager::kTPCnclsCR, 80.0, 161.);
cut->AddCut(VarManager::kTPCncls, 90.0, 170.);
} else if (icase == 2) {

Check failure on line 4521 in PWGDQ/Core/CutsLibrary.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.
cut->AddCut(VarManager::kIsSPDfirst, 0.5, 1.5);
cut->AddCut(VarManager::kITSchi2, 0.0, 5.0);
cut->AddCut(VarManager::kITSncls, 4.5, 7.5);
Expand Down Expand Up @@ -7238,11 +7262,11 @@
labelsFlatBin.push_back(Form("%s_cent%.0f_%.0f_pt%.1f_%.1f", cent.c_str(), centMin, centMax, ptMin, ptMax));
LOG(info) << "Added cut for " << Form("%s_cent%.0f_%.0f_pt%.1f_%.1f", cent.c_str(), centMin, centMax, ptMin, ptMax) << " with cuts: [";
for (size_t i = 0; i < binCuts.size(); ++i) {
std::cout << binCuts[i];

Check failure on line 7265 in PWGDQ/Core/CutsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
if (i != binCuts.size() - 1)
std::cout << ", ";

Check failure on line 7267 in PWGDQ/Core/CutsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
}
std::cout << "] and direction: " << (exclude ? "CutGreater" : "CutSmaller") << std::endl;

Check failure on line 7269 in PWGDQ/Core/CutsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
}
}

Expand Down
3 changes: 2 additions & 1 deletion PWGDQ/Core/HistogramsLibrary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,11 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
hm->AddHistogram(histClass, "Profile_R2EP_Im_TPCFT0C_CentFT0C", "Profile_R2EP_Im_TPCFT0C_CentFT0C", true, 90, 0.0, 90.0, VarManager::kCentFT0C, 500, 0.0, 5.0, VarManager::kR2EP_AC_Im, 0, 0, 0, -1, "", "", "", -1, VarManager::kWR2EP_AC_Im);
hm->AddHistogram(histClass, "Profile_R2EP_Im_FT0AFT0C_CentFT0C", "Profile_R2EP_Im_FT0AFT0C_CentFT0C", true, 90, 0.0, 90.0, VarManager::kCentFT0C, 500, 0.0, 5.0, VarManager::kR2EP_BC_Im, 0, 0, 0, -1, "", "", "", -1, VarManager::kWR2EP_BC_Im);
}
if (subGroupStr.Contains("filter")) {
if (subGroupStr.Contains("rapidity-gap")) {
hm->AddHistogram(histClass, "IsDoubleGap", "Is double gap", false, 2, -0.5, 1.5, VarManager::kIsDoubleGap);
hm->AddHistogram(histClass, "IsSingleGapA", "Is single gap on side A", false, 2, -0.5, 1.5, VarManager::kIsSingleGapA);
hm->AddHistogram(histClass, "IsSingleGapC", "Is single gap on side C", false, 2, -0.5, 1.5, VarManager::kIsSingleGapC);
hm->AddHistogram(histClass, "IsNoGap", "Is no gap event", false, 2, -0.5, 1.5, VarManager::kIsNoGap);
hm->AddHistogram(histClass, "IsITSUPCMode", "UPC settings used", false, 2, -0.5, 1.5, VarManager::kIsITSUPCMode);
hm->AddHistogram(histClass, "IsITSUPCMode_IsSingleGap", "UPC settings used vs Is single gap", false, 2, -0.5, 1.5, VarManager::kIsITSUPCMode, 2, -0.5, 1.5, VarManager::kIsSingleGap);
}
Expand Down
3 changes: 3 additions & 0 deletions PWGDQ/Core/VarManager.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1308,6 +1308,8 @@ void VarManager::SetDefaultVarNames()
fgVariableUnits[kIsSingleGapC] = "";
fgVariableNames[kIsSingleGap] = "is single gap event";
fgVariableUnits[kIsSingleGap] = "";
fgVariableNames[kIsNoGap] = "is no gap event";
fgVariableUnits[kIsNoGap] = "";
fgVariableNames[kIsITSUPCMode] = "UPC settings used";
fgVariableUnits[kIsITSUPCMode] = "";
fgVariableNames[kQuadMass] = "mass quadruplet";
Expand Down Expand Up @@ -1619,6 +1621,7 @@ void VarManager::SetDefaultVarNames()
fgVarNamesMap["kIsSingleGapA"] = kIsSingleGapA;
fgVarNamesMap["kIsSingleGapC"] = kIsSingleGapC;
fgVarNamesMap["kIsSingleGap"] = kIsSingleGap;
fgVarNamesMap["kIsNoGap"] = kIsNoGap;
fgVarNamesMap["kIsITSUPCMode"] = kIsITSUPCMode;
fgVarNamesMap["kTwoEvPosZ1"] = kTwoEvPosZ1;
fgVarNamesMap["kTwoEvPosZ2"] = kTwoEvPosZ2;
Expand Down
7 changes: 4 additions & 3 deletions PWGDQ/Core/VarManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ class VarManager : public TObject
kIsSingleGapA, // Rapidity gap on side A
kIsSingleGapC, // Rapidity gap on side C
kIsSingleGap, // Rapidity gap on either side
kIsNoGap, // No rapidity gap
kIsITSUPCMode, // UPC mode used for event
kTwoEvPosZ1, // vtx-z for collision 1 in two events correlations
kTwoEvPosZ2, // vtx-z for collision 2 in two events correlations
Expand Down Expand Up @@ -1848,13 +1849,12 @@ void VarManager::FillEvent(T const& event, float* values)
values[kVtxY] = event.posY();
values[kVtxZ] = event.posZ();
values[kVtxNcontrib] = event.numContrib();
if (fgUsedVars[kIsDoubleGap]) {
if (fgUsedVars[kIsDoubleGap] || fgUsedVars[kIsSingleGap] || fgUsedVars[kIsSingleGapA] || fgUsedVars[kIsSingleGapC] || fgUsedVars[kIsNoGap]) {
values[kIsDoubleGap] = (event.tag_bit(56 + kDoubleGap) > 0);
}
if (fgUsedVars[kIsSingleGap] || fgUsedVars[kIsSingleGapA] || fgUsedVars[kIsSingleGapC]) {
values[kIsSingleGapA] = (event.tag_bit(56 + kSingleGapA) > 0);
values[kIsSingleGapC] = (event.tag_bit(56 + kSingleGapC) > 0);
values[kIsSingleGap] = values[kIsSingleGapA] || values[kIsSingleGapC];
values[kIsNoGap] = !values[kIsDoubleGap] && !values[kIsSingleGap];
}
if (fgUsedVars[kIsITSUPCMode]) {
values[kIsITSUPCMode] = (event.tag_bit(56 + kITSUPCMode) > 0);
Expand Down Expand Up @@ -2136,6 +2136,7 @@ void VarManager::FillEvent(T const& event, float* values)
values[kIsSingleGapA] = (event.eventFilter() & (static_cast<uint64_t>(1) << kSingleGapA)) > 0;
values[kIsSingleGapC] = (event.eventFilter() & (static_cast<uint64_t>(1) << kSingleGapC)) > 0;
values[kIsSingleGap] = values[kIsSingleGapA] || values[kIsSingleGapC];
values[kIsNoGap] = !values[kIsDoubleGap] && !values[kIsSingleGap];
values[kIsITSUPCMode] = (event.eventFilter() & (static_cast<uint64_t>(1) << kITSUPCMode)) > 0;
}

Expand Down
Loading