Skip to content

Commit 828370d

Browse files
fcolamarmfaggin
andauthored
[DPG] Add option to check generator type in qaEfficiency task (#9854)
Co-authored-by: Mattia Faggin <mattia.faggin@cern.ch>
1 parent 06d7d22 commit 828370d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

DPG/Tasks/AOTTrack/qaEfficiency.cxx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ struct QaEfficiency {
203203
Configurable<bool> checkForMothers{"checkForMothers", false, "Flag to use the array of mothers to check if the particle of interest come from any of those particles"};
204204
Configurable<std::vector<int>> mothersPDGs{"mothersPDGs", std::vector<int>{3312, -3312}, "PDGs of origin of the particle under study"};
205205
Configurable<bool> keepOnlyHfParticles{"keepOnlyHfParticles", false, "Flag to decide wheter to consider only HF particles"};
206+
Configurable<int> eventGeneratorType{"eventGeneratorType", -1, "Flag to check specific event generator (for HF): -1 -> no check, 0 -> MB events, 4 -> charm triggered, 5 -> beauty triggered"};
206207
// Track only selection, options to select only specific tracks
207208
Configurable<bool> trackSelection{"trackSelection", true, "Local track selection"};
208209
Configurable<int> globalTrackSelection{"globalTrackSelection", 0, "Global track selection: 0 -> No Cut, 1 -> kGlobalTrack, 2 -> kGlobalTrackWoPtEta, 3 -> kGlobalTrackWoDCA, 4 -> kQualityTracks, 5 -> kInAcceptanceTracks, 6 -> custom track cuts via Configurable"};
@@ -1778,6 +1779,11 @@ struct QaEfficiency {
17781779
}
17791780
histos.fill(HIST("MC/generatedCollisions"), 3);
17801781

1782+
if (eventGeneratorType >= 0 && mcCollision.getSubGeneratorId() != eventGeneratorType) {
1783+
LOG(debug) << "Skipping event with different type of generator than the one requested";
1784+
continue;
1785+
}
1786+
17811787
/// loop over reconstructed collisions
17821788
for (const auto& collision : groupedCollisions) {
17831789
histos.fill(HIST("MC/generatedCollisions"), 4);

0 commit comments

Comments
 (0)