Skip to content

Commit a3fd837

Browse files
committed
Only use one reconstructed collision per generated collision in eff. calculation
1 parent 605567c commit a3fd837

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

PWGCF/TwoParticleCorrelations/Tasks/twoParticleCorrelationsMpi.cxx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ struct TwoParticleCorrelationsMpi {
9999
;
100100
Configurable<int> cfgLocalEfficiency{"cfgLocalEfficiency", 0, "0 = OFF and 1 = ON for local efficiency"};
101101
Configurable<bool> cfgDropStepRECO{"cfgDropStepRECO", false, "choice to drop step RECO if efficiency correction is used"};
102-
Configurable<int> cfgCentBinsForMC{"cfgCentBinsForMC", 0, "0 = OFF and 1 = ON for data like multiplicity/centrality bins for MC steps"};
102+
Configurable<int> cfgCentBinsForMC{"cfgCentBinsForMC", 0, "0 = generated multiplicity; 1 = reconstructed multiplicity and all associated collisions; 2 = reconstructed multiplicity and first associated collision only in processMCEfficiency"};
103103
Configurable<uint16_t> cfgTrackBitMask{"cfgTrackBitMask", 0, "BitMask for track selection systematics; refer to the enum TrackSelectionCuts in filtering task"};
104104
Configurable<uint16_t> cfgMultCorrelationsMask{"cfgMultCorrelationsMask", 0, "Selection bitmask for the multiplicity correlations. This should match the filter selection cfgEstimatorBitMask."};
105105
Configurable<std::string> cfgMultCutFormula{"cfgMultCutFormula", "", "Multiplicity correlations cut formula. A result greater than zero results in accepted event. Parameters: [cFT0C] FT0C centrality, [mFV0A] V0A multiplicity, [mGlob] global track multiplicity, [mPV] PV track multiplicity, [cFT0M] FT0M centrality"};
@@ -291,6 +291,9 @@ struct TwoParticleCorrelationsMpi {
291291
if (cfgUserAxis < NoUserAxis || cfgUserAxis > EventSeedAxis) {
292292
LOGF(fatal, "Unsupported cfgUserAxis=%d; use 0 (off), 1 (invariant mass), or 2 (event seed)", cfgUserAxis.value);
293293
}
294+
if (cfgCentBinsForMC < 0 || cfgCentBinsForMC > 2) {
295+
LOGF(fatal, "Unsupported cfgCentBinsForMC=%d; use 0 (generated multiplicity), 1 (all reconstructed collisions), or 2 (first reconstructed collision only for efficiency)", cfgCentBinsForMC.value);
296+
}
294297
if (doprocessMCSameDerived && (doprocessSameDerived || doprocessSameDerivedMultSet)) {
295298
LOGF(fatal, "processMCSameDerived is mutually exclusive with the reconstructed derived same-event processes because it also fills those outputs");
296299
}
@@ -1926,12 +1929,17 @@ struct TwoParticleCorrelationsMpi {
19261929
}
19271930

19281931
auto multiplicity = mcCollision.multiplicity();
1932+
const bool useSingleRecoCollision = cfgCentBinsForMC == 2;
19291933
if (cfgCentBinsForMC > 0) {
19301934
if (collisions.size() == 0) {
19311935
return;
19321936
}
1933-
for (const auto& collision : collisions) {
1934-
multiplicity = collision.multiplicity();
1937+
if (useSingleRecoCollision) {
1938+
multiplicity = collisions.begin().multiplicity();
1939+
} else {
1940+
for (const auto& collision : collisions) {
1941+
multiplicity = collision.multiplicity();
1942+
}
19351943
}
19361944
}
19371945
// Primaries
@@ -1941,6 +1949,9 @@ struct TwoParticleCorrelationsMpi {
19411949
}
19421950
}
19431951
for (const auto& collision : collisions) {
1952+
if (useSingleRecoCollision && collision.globalIndex() != collisions.begin().globalIndex()) {
1953+
continue;
1954+
}
19441955
auto groupedTracks = tracks.sliceBy(perCollision, collision.globalIndex());
19451956
if (cfgVerbosity > 0) {
19461957
LOGF(info, " Reconstructed collision at vtx-z = %f", collision.posZ());

0 commit comments

Comments
 (0)