Skip to content

Commit c44c99d

Browse files
mfagginMattia Faggin
andauthored
[DPG] Add flag to select events based on subGenId for HF MC. (AliceO2Group#16788)
Co-authored-by: Mattia Faggin <mfaggin@cern.ch>
1 parent 212a6e1 commit c44c99d

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

DPG/Tasks/AOTTrack/qaImpPar.cxx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ struct QaImpactPar {
116116
Configurable<int> nCustomMinITShits{"n_customMinITShits", 0, "Minimum number of layers crossed by a track among those in \"customITShitmap\""};
117117
Configurable<bool> customForceITSTPCmatching{"custom_forceITSTPCmatching", false, "Consider or not only ITS-TPC macthed tracks when using custom ITS hitmap"};
118118
Configurable<float> downsamplingFraction{"downsamplingFraction", 1.1, "Fraction of tracks to be used to fill the output objects"};
119+
Configurable<int> eventGeneratorHF{"eventGeneratorHF", -1, "If positive, enable event selection using subGeneratorId information (HF). The value indicates which events to keep (0 = MB, 4 = charm triggered, 5 = beauty triggered)"};
119120

120121
/// Custom cut selection objects
121122
TrackSelection selector_ITShitmap;
@@ -201,6 +202,12 @@ struct QaImpactPar {
201202
const o2::aod::McCollisions&,
202203
o2::aod::BCsWithTimestamps const&)
203204
{
205+
/// SubgeneratorID check for HF MC
206+
/// Useful to select MB gap events in HF-dedicated MC productions
207+
if (eventGeneratorHF >= 0 && collision.mcCollision().getSubGeneratorId() != eventGeneratorHF) {
208+
return;
209+
}
210+
204211
/// here call the template processReco function
205212
auto bc = collision.bc_as<o2::aod::BCsWithTimestamps>();
206213
processReco<true, false>(collision, tracksUnfiltered, tracks, tracksIU, mcParticles, bc);
@@ -216,6 +223,12 @@ struct QaImpactPar {
216223
const o2::aod::McCollisions&,
217224
o2::aod::BCsWithTimestamps const&)
218225
{
226+
/// SubgeneratorID check for HF MC
227+
/// Useful to select MB gap events in HF-dedicated MC productions
228+
if (eventGeneratorHF >= 0 && collision.mcCollision().getSubGeneratorId() != eventGeneratorHF) {
229+
return;
230+
}
231+
219232
/// here call the template processReco function
220233
auto bc = collision.bc_as<o2::aod::BCsWithTimestamps>();
221234
processReco<true, true>(collision, tracksUnfiltered, tracks, tracksIU, mcParticles, bc);

0 commit comments

Comments
 (0)