Skip to content

Commit d93d3b6

Browse files
committed
fix magic numbers
1 parent 553218e commit d93d3b6

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

PWGCF/GenericFramework/Tasks/flowGenericFramework.cxx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ struct FlowGenericFramework {
100100
O2_DEFINE_CONFIGURABLE(cfgEta, float, 0.8, "eta cut");
101101
O2_DEFINE_CONFIGURABLE(cfgEtaPtPt, float, 0.4, "eta cut for pt-pt correlations");
102102
O2_DEFINE_CONFIGURABLE(cfgVtxZ, float, 10, "vertex cut (cm)");
103-
O2_DEFINE_CONFIGURABLE(cfgOccupancySelection, int, -999, "Max occupancy selection, -999 to disable");
103+
O2_DEFINE_CONFIGURABLE(cfgOccupancySelection, int, 2000, "Max occupancy selection, -999 to disable");
104104
O2_DEFINE_CONFIGURABLE(cfgNoSameBunchPileupCut, bool, true, "kNoSameBunchPileupCut");
105105
O2_DEFINE_CONFIGURABLE(cfgIsGoodZvtxFT0vsPV, bool, true, "kIsGoodZvtxFT0vsPV");
106106
O2_DEFINE_CONFIGURABLE(cfgIsGoodITSLayersAll, bool, true, "kIsGoodITSLayersAll");
@@ -493,7 +493,8 @@ struct FlowGenericFramework {
493493
return -1;
494494

495495
// Select particle with the lowest nsigma
496-
for (int i = 0; i < 3; ++i) {
496+
const int nspecies = 3;
497+
for (int i = 0; i < nspecies; ++i) {
497498
if (std::abs(nSigmaToUse[i]) < nsigma) {
498499
pid = i;
499500
nsigma = std::abs(nSigmaToUse[i]);
@@ -568,7 +569,8 @@ struct FlowGenericFramework {
568569
if (collision.numContrib() > 1) {
569570
vtxz = collision.posZ();
570571
float zRes = std::sqrt(collision.covZZ());
571-
if (zRes > 0.25 && collision.numContrib() < 20)
572+
float minZRes = 0.25;
573+
if (zRes > minZRes && collision.numContrib() < 20)
572574
vtxz = -999;
573575
}
574576
// auto multV0A = collision.multFV0A();
@@ -984,7 +986,7 @@ struct FlowGenericFramework {
984986
}
985987

986988
o2::framework::expressions::Filter collisionFilter = nabs(aod::collision::posZ) < cfgVtxZ;
987-
o2::framework::expressions::Filter trackFilter = nabs(aod::track::eta) < cfgEta && aod::track::pt > cfgPtmin&& aod::track::pt < cfgPtmax && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)) && nabs(aod::track::dcaXY) < cfgDCAxy&& nabs(aod::track::dcaZ) < cfgDCAz;
989+
o2::framework::expressions::Filter trackFilter = nabs(aod::track::eta) < cfgEta && aod::track::pt > cfgPtmin&& aod::track::pt < cfgPtmax && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && nabs(aod::track::dcaXY) < cfgDCAxy&& nabs(aod::track::dcaZ) < cfgDCAz;
988990
using GFWTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TrackSelection, aod::TracksDCA, aod::pidTOFPi, aod::pidTPCPi, aod::pidTOFKa, aod::pidTPCKa, aod::pidTOFPr, aod::pidTPCPr>>;
989991

990992
void processData(soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::CentFT0Cs, aod::CentFT0CVariant1s, aod::CentFT0Ms, aod::CentFV0As>>::iterator const& collision, aod::BCsWithTimestamps const&, GFWTracks const& tracks)
@@ -1016,7 +1018,7 @@ struct FlowGenericFramework {
10161018
registry.fill(HIST("eventQA/eventSel"), 1.5);
10171019
if (cfgRunByRun)
10181020
th1sList[run][hEventSel]->Fill(1.5);
1019-
if (cfgOccupancySelection != -999) {
1021+
if (cfgDoOccupancySel) {
10201022
int occupancy = collision.trackOccupancyInTimeRange();
10211023
if (occupancy < 0 || occupancy > cfgOccupancySelection)
10221024
return;

0 commit comments

Comments
 (0)