Skip to content
Merged
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
42 changes: 21 additions & 21 deletions PWGUD/TableProducer/tauEventTableProducer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
Configurable<bool> useNumContribs{"useNumContribs", false, {"Use coll.numContribs as event cut"}};
Configurable<int> cutRecoFlag{"cutRecoFlag", 1, {"0 = std mode, 1 = upc mode"}};
Configurable<bool> useRecoFlag{"useRecoFlag", false, {"Use coll.flags as event cut"}};
Configurable<int> cutRCTflag{"cutRCTflag", 0, {"0 = off, 1 = CBT, 2 = CBT+ZDC, 3 = CBThadron, 4 = CBThadron+ZDC"}};
Configurable<int> cutRCTflag{"cutRCTflag", 0, {"0 = off, 1 = CBT, 2 = CBT+ZDC, 3 = CBThadron, 4 = CBThadron+ZDC"}};
Configurable<float> cutTrueGapSideFV0{"cutTrueGapSideFV0", 180000, "FV0A threshold for SG selector"};
Configurable<float> cutTrueGapSideFT0A{"cutTrueGapSideFT0A", 150., "FT0A threshold for SG selector"};
Configurable<float> cutTrueGapSideFT0C{"cutTrueGapSideFT0C", 50., "FT0C threshold for SG selector"};
Expand Down Expand Up @@ -144,32 +144,32 @@
{

// FTOA
if ((std::abs(coll.timeFT0A()) > maxFITtime) && coll.timeFT0A() > -998.)

Check failure on line 147 in PWGUD/TableProducer/tauEventTableProducer.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.
return false;

// FTOC
if ((std::abs(coll.timeFT0C()) > maxFITtime) && coll.timeFT0C() > -998.)

Check failure on line 151 in PWGUD/TableProducer/tauEventTableProducer.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.
return false;

return true;
}

template <typename C>
bool isGoodRCTflag(C const& coll)
{
switch (cutSample.cutRCTflag) {
case 1:
return sgSelector.isCBTOk(coll);
case 2:
return sgSelector.isCBTZdcOk(coll);
case 3:
return sgSelector.isCBTHadronOk(coll);
case 4:
return sgSelector.isCBTHadronZdcOk(coll);
default:
return true;
}
}
template <typename C>
bool isGoodRCTflag(C const& coll)
{
switch (cutSample.cutRCTflag) {
case 1:
return sgSelector.isCBTOk(coll);
case 2:
return sgSelector.isCBTZdcOk(coll);
case 3:
return sgSelector.isCBTHadronOk(coll);
case 4:
return sgSelector.isCBTHadronZdcOk(coll);
default:
return true;
}
}

template <typename C>
bool isGoodROFtime(C const& coll)
Expand Down Expand Up @@ -342,11 +342,11 @@
FullUDTracks const& tracks)
{

if (!isGoodRCTflag(collision))
return;
if (!isGoodRCTflag(collision))
return;

if (!isGoodROFtime(collision))
return;
if (!isGoodROFtime(collision))
return;

int gapSide = collision.gapSide();
int trueGapSide = sgSelector.trueGap(collision, cutSample.cutTrueGapSideFV0, cutSample.cutTrueGapSideFT0A, cutSample.cutTrueGapSideFT0C, cutSample.cutTrueGapSideZDC);
Expand Down Expand Up @@ -384,7 +384,7 @@
// Apply weak condition on track PID
int countPVGTel = 0;
int countPVGTmupi = 0;
if (countGoodPVtracks == 2) {

Check failure on line 387 in PWGUD/TableProducer/tauEventTableProducer.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.
for (const auto& vecMember : vecTrkIdx) {
const auto& thisTrk = tracks.iteratorAt(vecMember);
if (isElectronCandidate(thisTrk)) {
Expand All @@ -397,7 +397,7 @@
}
}

if (cutPreselect.preselUseTrackPID ? ((countPVGTel == 2 && countPVGTmupi == 0) || (countPVGTel == 1 && countPVGTmupi == 1)) : countGoodPVtracks == cutPreselect.preselNgoodPVtracs) {

Check failure on line 400 in PWGUD/TableProducer/tauEventTableProducer.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.
const auto& trk1 = tracks.iteratorAt(vecTrkIdx[0]);
const auto& trk2 = tracks.iteratorAt(vecTrkIdx[1]);

Expand Down Expand Up @@ -569,7 +569,7 @@
continue;
countMothers++;
// check the generated collision does not have more than 2 tauons
if (countMothers > 2) {

Check failure on line 572 in PWGUD/TableProducer/tauEventTableProducer.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 (verboseInfo)
printLargeMessage("Truth collision has more than 2 no mother particles. Breaking the particle loop.");
histos.get<TH1>(HIST("Truth/hTroubles"))->Fill(2);
Expand Down Expand Up @@ -653,7 +653,7 @@
continue;
countMothers++;
// check the generated collision does not have more than 2 tauons
if (countMothers > 2) {

Check failure on line 656 in PWGUD/TableProducer/tauEventTableProducer.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 (verboseInfo)
printLargeMessage("Truth collision has more than 2 no mother particles. Breaking the particle loop.");
histos.get<TH1>(HIST("Truth/hTroubles"))->Fill(12);
Expand Down
42 changes: 21 additions & 21 deletions PWGUD/TableProducer/twoTracksEventTableProducer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
Configurable<bool> useNumContribs{"useNumContribs", true, {"Use coll.numContribs as event cut"}};
Configurable<int> cutRecoFlag{"cutRecoFlag", 1, {"0 = std mode, 1 = upc mode"}};
Configurable<bool> useRecoFlag{"useRecoFlag", false, {"Use coll.flags as event cut"}};
Configurable<int> cutRCTflag{"cutRCTflag", 0, {"0 = off, 1 = CBT, 2 = CBT+ZDC, 3 = CBThadron, 4 = CBThadron+ZDC"}};
Configurable<int> cutRCTflag{"cutRCTflag", 0, {"0 = off, 1 = CBT, 2 = CBT+ZDC, 3 = CBThadron, 4 = CBThadron+ZDC"}};
Configurable<float> cutTrueGapSideFV0{"cutTrueGapSideFV0", 180000, "FV0A threshold for SG selector"};
Configurable<float> cutTrueGapSideFT0A{"cutTrueGapSideFT0A", 150., "FT0A threshold for SG selector"};
Configurable<float> cutTrueGapSideFT0C{"cutTrueGapSideFT0C", 50., "FT0C threshold for SG selector"};
Expand Down Expand Up @@ -148,13 +148,13 @@
{

// FTOA
if ((std::abs(coll.timeFT0A()) > maxFITtime) && coll.timeFT0A() > -998.)

Check failure on line 151 in PWGUD/TableProducer/twoTracksEventTableProducer.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.
return false;
histos.get<TH1>(HIST("Reco/hSelections"))->Fill(nSelection);
nSelection++;

// FTOC
if ((std::abs(coll.timeFT0C()) > maxFITtime) && coll.timeFT0C() > -998.)

Check failure on line 157 in PWGUD/TableProducer/twoTracksEventTableProducer.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.
return false;
histos.get<TH1>(HIST("Reco/hSelections"))->Fill(nSelection);
nSelection++;
Expand All @@ -162,22 +162,22 @@
return true;
}

template <typename C>
bool isGoodRCTflag(C const& coll)
{
switch (cutSample.cutRCTflag) {
case 1:
return sgSelector.isCBTOk(coll);
case 2:
return sgSelector.isCBTZdcOk(coll);
case 3:
return sgSelector.isCBTHadronOk(coll);
case 4:
return sgSelector.isCBTHadronZdcOk(coll);
default:
return true;
}
}
template <typename C>
bool isGoodRCTflag(C const& coll)
{
switch (cutSample.cutRCTflag) {
case 1:
return sgSelector.isCBTOk(coll);
case 2:
return sgSelector.isCBTZdcOk(coll);
case 3:
return sgSelector.isCBTHadronOk(coll);
case 4:
return sgSelector.isCBTHadronZdcOk(coll);
default:
return true;
}
}

template <typename C>
bool isGoodROFtime(C const& coll)
Expand Down Expand Up @@ -364,10 +364,10 @@
histos.get<TH1>(HIST("Reco/hSelections"))->Fill(nSelection);
nSelection++;

if (!isGoodRCTflag(collision))
return;
histos.get<TH1>(HIST("Reco/hSelections"))->Fill(nSelection);
nSelection++;
if (!isGoodRCTflag(collision))
return;
histos.get<TH1>(HIST("Reco/hSelections"))->Fill(nSelection);
nSelection++;

if (!isGoodROFtime(collision))
return;
Expand Down Expand Up @@ -412,7 +412,7 @@
} // Loop over tracks with selections

// Critical selection, without it the rest of the process function will fail
if (countGoodPVtracks != 2)

Check failure on line 415 in PWGUD/TableProducer/twoTracksEventTableProducer.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.
return;
histos.get<TH1>(HIST("Reco/hSelections"))->Fill(nSelection);
nSelection++;
Expand Down Expand Up @@ -626,7 +626,7 @@
continue;
countMothers++;
// check the generated collision does not have more than 2 mothers
if (countMothers > 2) {

Check failure on line 629 in PWGUD/TableProducer/twoTracksEventTableProducer.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 (verboseInfo)
printLargeMessage("Truth collision has more than 2 no mother particles. Breaking the particle loop.");
histos.get<TH1>(HIST("Truth/hTroubles"))->Fill(2);
Expand Down
42 changes: 21 additions & 21 deletions PWGUD/Tasks/upcTauRl.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ struct UpcTauRl {
Configurable<bool> useNumContribs{"useNumContribs", true, {"Use coll.numContribs as event cut"}};
Configurable<int> cutRecoFlag{"cutRecoFlag", 1, {"0 = std mode, 1 = upc mode"}};
Configurable<bool> useRecoFlag{"useRecoFlag", false, {"Use coll.flags as event cut"}};
Configurable<int> cutRCTflag{"cutRCTflag", 0, {"0 = off, 1 = CBT, 2 = CBT+ZDC, 3 = CBThadron, 4 = CBThadron+ZDC"}};
Configurable<int> cutRCTflag{"cutRCTflag", 0, {"0 = off, 1 = CBT, 2 = CBT+ZDC, 3 = CBThadron, 4 = CBThadron+ZDC"}};
Configurable<float> cutTrueGapSideFV0{"cutTrueGapSideFV0", -1, "FV0A threshold for SG selector"};
Configurable<float> cutTrueGapSideFT0A{"cutTrueGapSideFT0A", 150., "FT0A threshold for SG selector"};
Configurable<float> cutTrueGapSideFT0C{"cutTrueGapSideFT0C", 50., "FT0C threshold for SG selector"};
Expand Down Expand Up @@ -864,22 +864,22 @@ struct UpcTauRl {
return true;
}

template <typename C>
bool isGoodRCTflag(C const& coll)
{
switch (cutSample.cutRCTflag) {
case 1:
return sgSelector.isCBTOk(coll);
case 2:
return sgSelector.isCBTZdcOk(coll);
case 3:
return sgSelector.isCBTHadronOk(coll);
case 4:
return sgSelector.isCBTHadronZdcOk(coll);
default:
return true;
}
}
template <typename C>
bool isGoodRCTflag(C const& coll)
{
switch (cutSample.cutRCTflag) {
case 1:
return sgSelector.isCBTOk(coll);
case 2:
return sgSelector.isCBTZdcOk(coll);
case 3:
return sgSelector.isCBTHadronOk(coll);
case 4:
return sgSelector.isCBTHadronZdcOk(coll);
default:
return true;
}
}

template <typename C>
bool isGoodROFtime(C const& coll)
Expand Down Expand Up @@ -2298,8 +2298,8 @@ struct UpcTauRl {
fillRejectionReasonDG(reconstructedCollision);
outputGlobalRejectionHistogram();

if (!isGoodRCTflag(reconstructedCollision))
return;
if (!isGoodRCTflag(reconstructedCollision))
return;

if (!isGoodROFtime(reconstructedCollision))
return;
Expand Down Expand Up @@ -2334,8 +2334,8 @@ struct UpcTauRl {
fillRejectionReasonSG(reconstructedCollision);
outputGlobalRejectionHistogram();

if (!isGoodRCTflag(reconstructedCollision))
return;
if (!isGoodRCTflag(reconstructedCollision))
return;

int gapSide = reconstructedCollision.gapSide();
int trueGapSide = sgSelector.trueGap(reconstructedCollision, cutSample.cutTrueGapSideFV0, cutSample.cutTrueGapSideFT0A, cutSample.cutTrueGapSideFT0C, cutSample.cutTrueGapSideZDC);
Expand Down
Loading