|
25 | 25 | #include "Common/Core/Zorro.h" |
26 | 26 | #include "Common/Core/ZorroSummary.h" |
27 | 27 | #include "Common/DataModel/Centrality.h" |
| 28 | +#include "Common/DataModel/CollisionAssociationTables.h" |
28 | 29 | #include "Common/DataModel/EventSelection.h" |
29 | 30 | #include "Common/DataModel/Multiplicity.h" |
30 | 31 | #include "Common/DataModel/PIDResponseTOF.h" |
@@ -82,6 +83,7 @@ struct HStrangeCorrelationFilter { |
82 | 83 | Configurable<float> strangedEdxNSigmaTight{"strangedEdxNSigmaTight", 3, "Nsigmas for strange decay daughters"}; |
83 | 84 | Configurable<std::string> zorroMask{"zorroMask", "", "zorro trigger class to select on (empty: none)"}; |
84 | 85 | Configurable<float> nSigmaNearXiMassCenter{"nSigmaNearXiMassCenter", 0, "for Oemga analysis only, to check if candidate mass is around Xi"}; |
| 86 | + Configurable<bool> rejectAmbiguousTracks{"rejectAmbiguousTracks", false, "reject tracks compatible with more than one collision (requires track-to-collision-associator with fillTableOfCollIdsPerTrack)"}; |
85 | 87 |
|
86 | 88 | // used for event selections in Pb-Pb |
87 | 89 | Configurable<int> cfgCutOccupancyHigh{"cfgCutOccupancyHigh", 3000, "High cut on TPC occupancy"}; |
@@ -210,8 +212,8 @@ struct HStrangeCorrelationFilter { |
210 | 212 |
|
211 | 213 | // using V0LinkedTagged = soa::Join<aod::V0sLinked, aod::V0Tags>; |
212 | 214 | // using CascadesLinkedTagged = soa::Join<aod::CascadesLinked, aod::CascTags>; |
213 | | - using FullTracks = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA>; |
214 | | - using FullTracksMC = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::McTrackLabels>; |
| 215 | + using FullTracks = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::TrackCompColls>; |
| 216 | + using FullTracksMC = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::McTrackLabels, aod::TrackCompColls>; |
215 | 217 | using DauTracks = soa::Join<aod::Tracks, aod::TracksExtra, aod::pidTPCFullPi, aod::pidTPCFullKa, aod::pidTPCFullPr, aod::TracksDCA>; |
216 | 218 | using DauTracksMC = soa::Join<aod::Tracks, aod::TracksExtra, aod::pidTPCFullPi, aod::pidTPCFullKa, aod::pidTPCFullPr, aod::TracksDCA, aod::McTrackLabels>; |
217 | 219 | // using IDTracks= soa::Join<aod::Tracks, aod::TracksExtra, aod::pidTPCFullPi, aod::pidTOFFullPi, aod::pidBayesPi, aod::pidBayesKa, aod::pidBayesPr, aod::TOFSignal>; // prepared for Bayesian PID |
@@ -300,6 +302,9 @@ struct HStrangeCorrelationFilter { |
300 | 302 | histos.add("h3dMassLambda", "h3dMassLambda", kTH3F, {axesConfigurations.axisPtQA, axesConfigurations.axisLambdaMass, axesConfigurations.axisMult}); |
301 | 303 | histos.add("h3dMassAntiLambda", "h3dMassAntiLambda", kTH3F, {axesConfigurations.axisPtQA, axesConfigurations.axisLambdaMass, axesConfigurations.axisMult}); |
302 | 304 | } |
| 305 | + if (rejectAmbiguousTracks && (doprocessTriggers || doprocessTriggersMC)) { |
| 306 | + histos.add("hAmbiguousTriggerPt", "hAmbiguousTriggerPt", kTH1F, {axesConfigurations.axisPtQA}); |
| 307 | + } |
303 | 308 | if (doprocessCascades || doprocessCascadesMC) { |
304 | 309 | histos.add("h3dMassXiMinus", "h3dMassXiMinus", kTH3F, {axesConfigurations.axisPtQA, axesConfigurations.axisXiMass, axesConfigurations.axisMult}); |
305 | 310 | histos.add("h3dMassXiPlus", "h3dMassXiPlus", kTH3F, {axesConfigurations.axisPtQA, axesConfigurations.axisXiMass, axesConfigurations.axisMult}); |
@@ -410,6 +415,20 @@ struct HStrangeCorrelationFilter { |
410 | 415 | return true; |
411 | 416 | } |
412 | 417 |
|
| 418 | + // ambiguous track check: the track is compatible with more than one collision, |
| 419 | + // or with a collision different from the one it is assigned to (see PWGCF/TableProducer/dptDptFilter.cxx) |
| 420 | + template <class TTrack> |
| 421 | + bool isAmbiguousTrack(TTrack const& track) |
| 422 | + { |
| 423 | + if (track.compatibleCollIds().size() == 0) { |
| 424 | + return false; // no collision association information: not ambiguous |
| 425 | + } |
| 426 | + if (track.compatibleCollIds().size() == 1) { |
| 427 | + return track.collisionId() != track.compatibleCollIds()[0]; |
| 428 | + } |
| 429 | + return true; // associated to more than one collision |
| 430 | + } |
| 431 | + |
413 | 432 | // reco-level trigger quality checks (N.B.: DCA is filtered, not selected) |
414 | 433 | template <class TTrack> |
415 | 434 | bool isValidTrigger(TTrack const& track) |
@@ -593,6 +612,10 @@ struct HStrangeCorrelationFilter { |
593 | 612 | if (!isValidTrigger(track)) { |
594 | 613 | continue; |
595 | 614 | } |
| 615 | + if (rejectAmbiguousTracks && isAmbiguousTrack(track)) { |
| 616 | + histos.fill(HIST("hAmbiguousTriggerPt"), track.pt()); |
| 617 | + continue; |
| 618 | + } |
596 | 619 | TriggCandidate thisTrigg{}; |
597 | 620 | thisTrigg.pt = track.pt(); |
598 | 621 | thisTrigg.trackId = track.globalIndex(); |
@@ -634,6 +657,10 @@ struct HStrangeCorrelationFilter { |
634 | 657 | if (!isValidTrigger(track)) { |
635 | 658 | continue; |
636 | 659 | } |
| 660 | + if (rejectAmbiguousTracks && isAmbiguousTrack(track)) { |
| 661 | + histos.fill(HIST("hAmbiguousTriggerPt"), track.pt()); |
| 662 | + continue; |
| 663 | + } |
637 | 664 | TriggCandidate thisTrigg{}; |
638 | 665 | thisTrigg.pt = track.pt(); |
639 | 666 | thisTrigg.trackId = track.globalIndex(); |
|
0 commit comments