You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: DPG/Tasks/AOTTrack/qaEfficiency.cxx
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -201,6 +201,7 @@ struct QaEfficiency {
201
201
Configurable<bool> numSameCollision{"numSameCollision", false, "Flag to ask that the numerator is in the same collision as the denominator"};
202
202
Configurable<bool> noFakesHits{"noFakesHits", false, "Flag to reject tracks that have fake hits"};
203
203
Configurable<bool> skipEventsWithoutTPCTracks{"skipEventsWithoutTPCTracks", false, "Flag to reject events that have no tracks reconstructed in the TPC"};
204
+
Configurable<bool> skipParticlesFromBackgroundEvents{"skipParticlesFromBackgroundEvents", false, "Flag to reject particles from background events (for embedded MC)"};
204
205
Configurable<float> maxProdRadius{"maxProdRadius", 9999.f, "Maximum production radius of the particle under study"};
205
206
Configurable<float> nsigmaTPCDe{"nsigmaTPCDe", 3.f, "Value of the Nsigma TPC cut for deuterons PID"};
206
207
// Charge selection
@@ -1548,6 +1549,9 @@ struct QaEfficiency {
1548
1549
histos.fill(countingHisto, trkCutIdxHasMcPart); // Tracks with particles (i.e. no fakes)
1549
1550
}
1550
1551
constauto mcParticle = track.mcParticle();
1552
+
if (skipParticlesFromBackgroundEvents && mcParticle.fromBackgroundEvent()) {
1553
+
returnfalse;
1554
+
}
1551
1555
if (!isInAcceptance<true, doFillHisto>(mcParticle, countingHisto, trkCutIdxHasMcPart)) {
1552
1556
// 3: pt cut 4: eta cut 5: phi cut 6: y cut
1553
1557
returnfalse;
@@ -1913,6 +1917,9 @@ struct QaEfficiency {
1913
1917
1914
1918
/// only to fill denominator of ITS-TPC matched primary tracks only in MC events with at least 1 reco. vtx
1915
1919
for (constauto& particle : groupedMcParticles) { // Particle loop
1920
+
if (skipParticlesFromBackgroundEvents && particle.fromBackgroundEvent()) {
1921
+
continue;
1922
+
}
1916
1923
1917
1924
/// require generated particle in acceptance
1918
1925
if (!isInAcceptance<true, false>(particle, nullptr)) {
@@ -1968,6 +1975,9 @@ struct QaEfficiency {
1968
1975
// Loop on particles to fill the denominator
1969
1976
float dNdEta = 0; // Multiplicity
1970
1977
for (constauto& mcParticle : groupedMcParticles) {
1978
+
if (skipParticlesFromBackgroundEvents && mcParticle.fromBackgroundEvent()) {
1979
+
continue;
1980
+
}
1971
1981
if (TMath::Abs(mcParticle.eta()) <= 2.f && !mcParticle.has_daughters()) {
0 commit comments