1+
12// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
23// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
34// All rights not expressly granted are reserved.
910// granted to it by virtue of its status as an Intergovernmental Organization
1011// or submit itself to any jurisdiction.
1112
12- // /
1313// / \file lambda1520analysisinpp.cxx
1414// / \brief This standalone task reconstructs track-track decay of lambda(1520) resonance candidate
1515// / \author Hirak Kumar Koley <hirak.koley@cern.ch>
16- // /
17-
18- // 1. Own header (doesn't exist)
1916
20- // 2. C system headers (none)
21-
22- // 3. C++ system headers
23- #include < string>
24- #include < vector>
25-
26- // 4. Other includes: O2 framework, ROOT, etc.
2717#include " PWGLF/Utils/collisionCuts.h"
2818
2919#include " Common/DataModel/Centrality.h"
4030#include " TPDGCode.h"
4131#include " TRandom.h"
4232
33+ #include < string>
34+ #include < vector>
35+
4336using namespace o2 ;
4437using namespace o2 ::soa;
4538using namespace o2 ::aod;
@@ -68,6 +61,20 @@ enum {
6861 kAllCutsINELg010 ,
6962};
7063
64+ enum TrackSelectionType {
65+ kAllTracks = 0 ,
66+ kGlobalTracks ,
67+ kGlobalTracksWoPtEta ,
68+ kGlobalTracksWoDCA ,
69+ kQualityTracks ,
70+ kInAcceptanceTracks ,
71+ };
72+
73+ enum PIDCutType {
74+ kSquareType = 1 ,
75+ kCircularType ,
76+ };
77+
7178struct Lambda1520analysisinpp {
7279 // Define slice per Resocollision
7380 SliceCache cache;
@@ -196,12 +203,13 @@ struct Lambda1520analysisinpp {
196203
197204 Filter tofPIDFilter = aod::track::tofExpMom < 0 .f || ((aod::track::tofExpMom > 0 .f) && (/* (nabs(aod::pidtof::tofNSigmaPi) < configPID.pidnSigmaPreSelectionCut) || */ (nabs(aod::pidtof::tofNSigmaKa) < configPID.pidnSigmaPreSelectionCut) || (nabs(aod::pidtof::tofNSigmaPr) < configPID.pidnSigmaPreSelectionCut))); // TOF
198205 Filter tpcPIDFilter = /* nabs(aod::pidtpc::tpcNSigmaPi) < configPID.pidnSigmaPreSelectionCut || */ nabs(aod::pidtpc::tpcNSigmaKa) < configPID.pidnSigmaPreSelectionCut || nabs(aod::pidtpc::tpcNSigmaPr) < configPID.pidnSigmaPreSelectionCut; // TPC
199- Filter trackFilter = (configTracks.trackSelection == static_cast <int >(0 )) ||
200- ((configTracks.trackSelection == static_cast <int >(1 )) && requireGlobalTrackInFilter()) ||
201- ((configTracks.trackSelection == static_cast <int >(2 )) && requireGlobalTrackWoPtEtaInFilter()) ||
202- ((configTracks.trackSelection == static_cast <int >(3 )) && requireGlobalTrackWoDCAInFilter()) ||
203- ((configTracks.trackSelection == static_cast <int >(4 )) && requireQualityTracksInFilter()) ||
204- ((configTracks.trackSelection == static_cast <int >(5 )) && requireTrackCutInFilter(TrackSelectionFlags::kInAcceptanceTracks ));
206+ Filter trackFilter = (configTracks.trackSelection == kAllTracks ) ||
207+ ((configTracks.trackSelection == kGlobalTracks ) && requireGlobalTrackInFilter()) ||
208+ ((configTracks.trackSelection == kGlobalTracksWoPtEta ) && requireGlobalTrackWoPtEtaInFilter()) ||
209+ ((configTracks.trackSelection == kGlobalTracksWoDCA ) && requireGlobalTrackWoDCAInFilter()) ||
210+ ((configTracks.trackSelection == kQualityTracks ) && requireQualityTracksInFilter()) ||
211+ ((configTracks.trackSelection == kInAcceptanceTracks ) && requireTrackCutInFilter(TrackSelectionFlags::kInAcceptanceTracks ));
212+
205213 Filter acceptanceFilter = (nabs(aod::track::eta) < configTracks.cfgCutEta && nabs(aod::track::pt) > configTracks.cMinPtcut);
206214 // Filter DCAcutFilter = (nabs(aod::track::dcaXY) < configTracks.cfgCutDCAxy) && (nabs(aod::track::dcaZ) < configTracks.cfgCutDCAz);
207215 // Filter primarytrackFilter = requirePVContributor() && requirePrimaryTrack() && requireGlobalTrackWoDCA();
@@ -419,8 +427,6 @@ struct Lambda1520analysisinpp {
419427
420428 float massKa = MassKaonCharged;
421429 float massPr = MassProton;
422- double pi = o2::constants::math::PI;
423- double twopi = o2::constants::math::TwoPI;
424430
425431 int kLambda1520PDG = static_cast <int >(102134 ); // PDG code for Lambda(1520)
426432
@@ -455,8 +461,8 @@ struct Lambda1520analysisinpp {
455461 continue ;
456462 auto p = pdg->GetParticle (mcparticle.pdgCode ());
457463 if (p != nullptr ) {
458- if (std::abs (p->Charge ()) >= static_cast < int >( 3 ) ) {
459- if (std::abs (mcparticle.eta ()) < static_cast < float >( 1.0 ) )
464+ if (std::abs (p->Charge ()) >= 3 ) {
465+ if (std::abs (mcparticle.eta ()) < 1.0 )
460466 return true ;
461467 }
462468 }
@@ -547,7 +553,7 @@ struct Lambda1520analysisinpp {
547553
548554 // Case 3: Has TOF → use TPC + TOF (square or circular)
549555 if (candidate.hasTOF ()) {
550- if (configPID.cPIDcutType == 1 ) {
556+ if (configPID.cPIDcutType == kSquareType ) {
551557 // Rectangular cut
552558 for (size_t i = 0 ; i < vProtonTOFPIDpTintv.size (); ++i) {
553559 if (pt < vProtonTOFPIDpTintv[i]) {
@@ -556,7 +562,7 @@ struct Lambda1520analysisinpp {
556562 return true ;
557563 }
558564 }
559- } else if (configPID.cPIDcutType == static_cast < int >( 2 ) ) {
565+ } else if (configPID.cPIDcutType == kCircularType ) {
560566 // Circular cut
561567 for (size_t i = 0 ; i < vProtonTPCTOFCombinedpTintv.size (); ++i) {
562568 if (pt < vProtonTPCTOFCombinedpTintv[i]) {
@@ -618,7 +624,7 @@ struct Lambda1520analysisinpp {
618624
619625 // Case 3: TOF is available → apply TPC+TOF PID logic
620626 if (candidate.hasTOF ()) {
621- if (configPID.cPIDcutType == 1 ) {
627+ if (configPID.cPIDcutType == kSquareType ) {
622628 // Rectangular cut
623629 for (size_t i = 0 ; i < vKaonTOFPIDpTintv.size (); ++i) {
624630 if (pt < vKaonTOFPIDpTintv[i]) {
@@ -628,7 +634,7 @@ struct Lambda1520analysisinpp {
628634 }
629635 }
630636 }
631- } else if (configPID.cPIDcutType == static_cast < int >( 2 ) ) {
637+ } else if (configPID.cPIDcutType == kCircularType ) {
632638 // Circular cut
633639 for (size_t i = 0 ; i < vKaonTPCTOFCombinedpTintv.size (); ++i) {
634640 if (pt < vKaonTPCTOFCombinedpTintv[i]) {
@@ -712,7 +718,7 @@ struct Lambda1520analysisinpp {
712718 if (cfgUseDeltaEtaPhiCuts) {
713719 deltaEta = std::abs (trk1etaPr - trk2etaKa);
714720 deltaPhi = std::abs (trk1phiPr - trk2phiKa);
715- deltaPhi = (deltaPhi > pi ) ? (twopi - deltaPhi) : deltaPhi;
721+ deltaPhi = (deltaPhi > o2::constants::math::PI ) ? (o2::constants::math::TwoPI - deltaPhi) : deltaPhi;
716722 if (deltaEta >= cMaxDeltaEtaCut)
717723 continue ;
718724 if (deltaPhi >= cMaxDeltaPhiCut)
@@ -844,7 +850,7 @@ struct Lambda1520analysisinpp {
844850 if (trk1.sign () * trk2.sign () < 0 ) {
845851 if constexpr (IsRot) {
846852 for (int i = 0 ; i < configBkg.cNofRotations ; i++) {
847- float theta = rn->Uniform (pi - pi / configBkg.rotationalcut , pi + pi / configBkg.rotationalcut );
853+ float theta = rn->Uniform (o2::constants::math::PI - o2::constants::math::PI / configBkg.rotationalcut , o2::constants::math::PI + o2::constants::math::PI / configBkg.rotationalcut );
848854 if (configBkg.cfgRotPr ) {
849855 ldaughterRot = LorentzVectorPtEtaPhiMass (trk1ptPr, trk1etaPr, trk1phiPr + theta, massPr);
850856 lResonanceRot = ldaughterRot + lDecayDaughter2;
0 commit comments