Skip to content

Commit 30965cd

Browse files
authored
Merge pull request #1 from lcernusa/Added-config-dihadron
Added configurable to skip filling primary only object in MC
2 parents 5c7dfda + add6420 commit 30965cd

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

PWGCF/TwoParticleCorrelations/Tasks/diHadronCor.cxx

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ struct DiHadronCor {
100100
O2_DEFINE_CONFIGURABLE(cfgUseEventWeights, bool, false, "Use event weights for mixed event")
101101
O2_DEFINE_CONFIGURABLE(cfgUsePtOrder, bool, true, "enable trigger pT < associated pT cut")
102102
O2_DEFINE_CONFIGURABLE(cfgUsePtOrderInMixEvent, bool, true, "enable trigger pT < associated pT cut in mixed event")
103+
O2_DEFINE_CONFIGURABLE(cfgUseCFStepAll, bool, true, "Filling kCFStepAll")
103104
O2_DEFINE_CONFIGURABLE(cfgSoloPtTrack, bool, false, "Skip trigger tracks that are alone in their pT bin for same process")
104105
O2_DEFINE_CONFIGURABLE(cfgSingleSoloPtTrack, bool, false, "Skip associated tracks that are alone in their pT bin for same process, works only if cfgSoloPtTrack is enabled")
105106
struct : ConfigurableGroup {
@@ -1061,8 +1062,10 @@ struct DiHadronCor {
10611062
}
10621063
}
10631064

1064-
same->fillEvent(mcParticles.size(), CorrelationContainer::kCFStepAll);
1065-
fillMCCorrelations<CorrelationContainer::kCFStepAll>(mcParticles, mcParticles, mcCollision.posZ(), SameEvent, 1.0f);
1065+
if (cfgUseCFStepAll) {
1066+
same->fillEvent(mcParticles.size(), CorrelationContainer::kCFStepAll);
1067+
fillMCCorrelations<CorrelationContainer::kCFStepAll>(mcParticles, mcParticles, mcCollision.posZ(), SameEvent, 1.0f);
1068+
}
10661069

10671070
if (collisions.size() == 0) {
10681071
return;
@@ -1117,7 +1120,8 @@ struct DiHadronCor {
11171120
eventWeight = 1.0f / it.currentWindowNeighbours();
11181121
}
11191122

1120-
fillMCCorrelations<CorrelationContainer::kCFStepAll>(tracks1, tracks2, collision1.posZ(), MixedEvent, eventWeight);
1123+
if (cfgUseCFStepAll)
1124+
fillMCCorrelations<CorrelationContainer::kCFStepAll>(tracks1, tracks2, collision1.posZ(), MixedEvent, eventWeight);
11211125

11221126
if (groupedCollisions.size() == 0) {
11231127
continue;
@@ -1150,8 +1154,10 @@ struct DiHadronCor {
11501154
}
11511155
}
11521156

1153-
same->fillEvent(mcParticles.size(), CorrelationContainer::kCFStepAll);
1154-
fillMCCorrelations<CorrelationContainer::kCFStepAll>(mcParticles, mcParticles, mcCollision.posZ(), SameEvent, 1.0f);
1157+
if (cfgUseCFStepAll) {
1158+
same->fillEvent(mcParticles.size(), CorrelationContainer::kCFStepAll);
1159+
fillMCCorrelations<CorrelationContainer::kCFStepAll>(mcParticles, mcParticles, mcCollision.posZ(), SameEvent, 1.0f);
1160+
}
11551161

11561162
same->fillEvent(mcParticles.size(), CorrelationContainer::kCFStepTrackedOnlyPrim);
11571163
fillMCCorrelations<CorrelationContainer::kCFStepTrackedOnlyPrim>(mcParticles, mcParticles, mcCollision.posZ(), SameEvent, 1.0f);
@@ -1186,8 +1192,9 @@ struct DiHadronCor {
11861192
if (cfgUseEventWeights) {
11871193
eventWeight = 1.0f / it.currentWindowNeighbours();
11881194
}
1189-
1190-
fillMCCorrelations<CorrelationContainer::kCFStepAll>(tracks1, tracks2, collision1.posZ(), MixedEvent, eventWeight);
1195+
1196+
if (cfgUseCFStepAll)
1197+
fillMCCorrelations<CorrelationContainer::kCFStepAll>(tracks1, tracks2, collision1.posZ(), MixedEvent, eventWeight);
11911198

11921199
fillMCCorrelations<CorrelationContainer::kCFStepTrackedOnlyPrim>(tracks1, tracks2, collision1.posZ(), MixedEvent, eventWeight);
11931200
}

0 commit comments

Comments
 (0)