3232#include < string>
3333#include < vector>
3434
35-
36-
3735namespace o2 ::analysis::femtoDream // o2-linter: disable=name/namespace (Previously defined namespace)
3836{
3937
40- namespace femto_dream_v0_selection
38+ namespace femto_dream_v0_selection
4139{
4240// / The different selections this task is capable of doing
4341enum V0Sel {
@@ -68,11 +66,11 @@ enum V0ContainerPosition {
6866// / \class FemtoDreamV0Selection
6967// / \brief Cut class to contain and execute all cuts applied to V0s
7068class FemtoDreamV0Selection
71- : public FemtoDreamObjectSelection<float , femto_dream_v0_selection::V0Sel>
69+ : public FemtoDreamObjectSelection<float , femto_dream_v0_selection::V0Sel>
7270{
7371 public:
7472 FemtoDreamV0Selection ()
75- : nPtV0MinSel(0 ), nPtV0MaxSel(0 ), nEtaV0MaxSel(0 ), nDCAV0DaughMax(0 ), nCPAV0Min(0 ), nTranRadV0Min(0 ), nTranRadV0Max(0 ), nDecVtxMax(0 ), pTV0Min(9999999 .), pTV0Max(-9999999 .), etaV0Max(-9999999 .), dCAV0DaughMax(-9999999 .), cPAV0Min(9999999 .),tranRadV0Min(9999999 .), tranRadV0Max(-9999999 .), decVtxMax(-9999999 .), fInvMassLowLimit (1.05 ), fInvMassUpLimit (1.3 ), fRejectKaon (false ), fRejectLambda (false ), fInvMassKaonLowLimit (0.48 ), fInvMassKaonUpLimit (0.515 ), nSigmaPIDOffsetTPC(0 .), fMotherIsLambda (true ) {}
73+ : nPtV0MinSel(0 ), nPtV0MaxSel(0 ), nEtaV0MaxSel(0 ), nDCAV0DaughMax(0 ), nCPAV0Min(0 ), nTranRadV0Min(0 ), nTranRadV0Max(0 ), nDecVtxMax(0 ), pTV0Min(9999999 .), pTV0Max(-9999999 .), etaV0Max(-9999999 .), dCAV0DaughMax(-9999999 .), cPAV0Min(9999999 .), tranRadV0Min(9999999 .), tranRadV0Max(-9999999 .), decVtxMax(-9999999 .), fInvMassLowLimit (1.05 ), fInvMassUpLimit (1.3 ), fRejectKaon (false ), fRejectLambda (false ), fInvMassKaonLowLimit (0.48 ), fInvMassKaonUpLimit (0.515 ), nSigmaPIDOffsetTPC(0 .), fMotherIsLambda (true ) {}
7674 // / Initializes histograms for the task
7775 template <o2::aod::femtodreamparticle::ParticleType part,
7876 o2::aod::femtodreamparticle::ParticleType daugh,
@@ -100,31 +98,31 @@ class FemtoDreamV0Selection
10098 void fillQA (C const & col, V const & v0, T const & posTrack, T const & negTrack);
10199
102100 template <typename T1 , typename T2 >
103- void setChildCuts ( femto_dream_v0_selection::ChildTrackType child, T1 selVal,
101+ void setChildCuts (femto_dream_v0_selection::ChildTrackType child, T1 selVal,
104102 T2 selVar, femtoDreamSelection::SelectionType selType)
105103 {
106- if (child == femto_dream_v0_selection::kPosTrack ) {
107- posDaughTrack.setSelection (selVal, selVar, selType);
108- } else if (child == femto_dream_v0_selection::kNegTrack ) {
109- negDaughTrack.setSelection (selVal, selVar, selType);
104+ if (child == femto_dream_v0_selection::kPosTrack ) {
105+ posDaughTrack.setSelection (selVal, selVar, selType);
106+ } else if (child == femto_dream_v0_selection::kNegTrack ) {
107+ negDaughTrack.setSelection (selVal, selVar, selType);
110108 }
111109 }
112110 template <typename T>
113- void setChildPIDSpecies ( femto_dream_v0_selection::ChildTrackType child,
111+ void setChildPIDSpecies (femto_dream_v0_selection::ChildTrackType child,
114112 T& pids)
115113 {
116- if (child == femto_dream_v0_selection::kPosTrack ) {
117- posDaughTrack.setPIDSpecies (pids);
118- } else if (child == femto_dream_v0_selection::kNegTrack ) {
119- negDaughTrack.setPIDSpecies (pids);
114+ if (child == femto_dream_v0_selection::kPosTrack ) {
115+ posDaughTrack.setPIDSpecies (pids);
116+ } else if (child == femto_dream_v0_selection::kNegTrack ) {
117+ negDaughTrack.setPIDSpecies (pids);
120118 }
121119 }
122120
123121 // / Helper function to obtain the name of a given selection criterion for consistent naming of the configurables
124122 // / \param iSel Track selection variable to be examined
125123 // / \param prefix Additional prefix for the name of the configurable
126124 // / \param suffix Additional suffix for the name of the configurable
127- static std::string getSelectionName ( femto_dream_v0_selection::V0Sel iSel,
125+ static std::string getSelectionName (femto_dream_v0_selection::V0Sel iSel,
128126 std::string_view prefix = " " ,
129127 std::string_view suffix = " " )
130128 {
@@ -153,8 +151,8 @@ class FemtoDreamV0Selection
153151
154152 // / Helper function to obtain the type of a given selection variable for consistent naming of the configurables
155153 // / \param iSel V0 selection variable whose type is returned
156- static femtoDreamSelection::SelectionType // o2-linter: disable=name/function-variable (defined with UpperCamelCase in femtoDreamSelection)
157- getSelectionType ( femto_dream_v0_selection::V0Sel iSel)
154+ static femtoDreamSelection::SelectionType // o2-linter: disable=name/function-variable (defined with UpperCamelCase in femtoDreamSelection)
155+ getSelectionType (femto_dream_v0_selection::V0Sel iSel)
158156 {
159157 return kSelectionTypes [iSel];
160158 }
@@ -163,7 +161,7 @@ class FemtoDreamV0Selection
163161 // / for consistent description of the configurables
164162 // / \param iSel Track selection variable to be examined
165163 // / \param prefix Additional prefix for the output of the configurable
166- static std::string getSelectionHelper ( femto_dream_v0_selection::V0Sel iSel,
164+ static std::string getSelectionHelper (femto_dream_v0_selection::V0Sel iSel,
167165 std::string_view prefix = " " )
168166 {
169167 std::string outString = static_cast <std::string>(prefix);
@@ -195,21 +193,21 @@ class FemtoDreamV0Selection
195193 nSigmaPIDOffsetTPC = offsetTPC;
196194 }
197195
198- void setChildRejectNotPropagatedTracks ( femto_dream_v0_selection::ChildTrackType child, bool reject)
196+ void setChildRejectNotPropagatedTracks (femto_dream_v0_selection::ChildTrackType child, bool reject)
199197 {
200- if (child == femto_dream_v0_selection::kPosTrack ) {
201- posDaughTrack.setRejectNotPropagatedTracks (reject);
202- } else if (child == femto_dream_v0_selection::kNegTrack ) {
203- negDaughTrack.setRejectNotPropagatedTracks (reject);
198+ if (child == femto_dream_v0_selection::kPosTrack ) {
199+ posDaughTrack.setRejectNotPropagatedTracks (reject);
200+ } else if (child == femto_dream_v0_selection::kNegTrack ) {
201+ negDaughTrack.setRejectNotPropagatedTracks (reject);
204202 }
205203 }
206204
207- void setChildnSigmaPIDOffset ( femto_dream_v0_selection::ChildTrackType child, float offsetTPC, float offsetTOF)
205+ void setChildnSigmaPIDOffset (femto_dream_v0_selection::ChildTrackType child, float offsetTPC, float offsetTOF)
208206 {
209- if (child == femto_dream_v0_selection::kPosTrack ) {
210- posDaughTrack.setnSigmaPIDOffset (offsetTPC, offsetTOF);
211- } else if (child == femto_dream_v0_selection::kNegTrack ) {
212- negDaughTrack.setnSigmaPIDOffset (offsetTPC, offsetTOF);
207+ if (child == femto_dream_v0_selection::kPosTrack ) {
208+ posDaughTrack.setnSigmaPIDOffset (offsetTPC, offsetTOF);
209+ } else if (child == femto_dream_v0_selection::kNegTrack ) {
210+ negDaughTrack.setnSigmaPIDOffset (offsetTPC, offsetTOF);
213211 }
214212 }
215213
@@ -253,12 +251,12 @@ class FemtoDreamV0Selection
253251
254252 bool fMotherIsLambda ;
255253
256- FemtoDreamTrackSelection posDaughTrack;
257- FemtoDreamTrackSelection negDaughTrack;
254+ FemtoDreamTrackSelection posDaughTrack;
255+ FemtoDreamTrackSelection negDaughTrack;
258256
259257 static constexpr int kNv0Selection = 9 ;
260258
261- static constexpr std::string_view kSelectionNames [kNv0Selection ] = {
259+ static constexpr std::string_view kSelectionNames [kNv0Selection ] = {
262260 " Sign" , " PtMin" , " PtMax" , " EtaMax" , " DCAdaughMax" , " CPAMin" ,
263261 " TranRadMin" , " TranRadMax" , " DecVecMax" }; // /< Name of the different
264262 // /< selections
@@ -276,7 +274,7 @@ class FemtoDreamV0Selection
276274 femtoDreamSelection::kUpperLimit }; // /< Map to match a variable with
277275 // /< its type
278276
279- static constexpr std::string_view kSelectionHelper [kNv0Selection ] = {
277+ static constexpr std::string_view kSelectionHelper [kNv0Selection ] = {
280278 " +1 for lambda, -1 for antilambda" ,
281279 " Minimum pT (GeV/c)" ,
282280 " Maximum pT (GeV/c)" ,
@@ -351,11 +349,11 @@ void FemtoDreamV0Selection::init(HistogramRegistry* QAregistry, HistogramRegistr
351349 mQAHistogramRegistry ->add ((folderName + " /hInvMassLambdaAntiLambda" ).c_str (),
352350 " " , kTH2F , {massAxisLambda, massAxisAntiLambda});
353351
354- posDaughTrack.init <aod::femtodreamparticle::ParticleType::kV0Child ,
352+ posDaughTrack.init <aod::femtodreamparticle::ParticleType::kV0Child ,
355353 aod::femtodreamparticle::TrackType::kPosChild ,
356354 aod::femtodreamparticle::cutContainerType>(
357355 mQAHistogramRegistry , mHistogramRegistry );
358- negDaughTrack.init <aod::femtodreamparticle::ParticleType::kV0Child ,
356+ negDaughTrack.init <aod::femtodreamparticle::ParticleType::kV0Child ,
359357 aod::femtodreamparticle::TrackType::kNegChild ,
360358 aod::femtodreamparticle::cutContainerType>(
361359 mQAHistogramRegistry , mHistogramRegistry );
@@ -387,30 +385,30 @@ void FemtoDreamV0Selection::init(HistogramRegistry* QAregistry, HistogramRegistr
387385
388386 // / check whether the most open cuts are fulfilled - most of this should have
389387 // / already be done by the filters
390- nPtV0MinSel = getNSelections ( femto_dream_v0_selection::kV0pTMin );
391- nPtV0MaxSel = getNSelections ( femto_dream_v0_selection::kV0pTMax );
392- nEtaV0MaxSel = getNSelections ( femto_dream_v0_selection::kV0etaMax );
393- nDCAV0DaughMax = getNSelections ( femto_dream_v0_selection::kV0DCADaughMax );
394- nCPAV0Min = getNSelections ( femto_dream_v0_selection::kV0CPAMin );
395- nTranRadV0Min = getNSelections ( femto_dream_v0_selection::kV0TranRadMin );
396- nTranRadV0Max = getNSelections ( femto_dream_v0_selection::kV0TranRadMax );
397- nDecVtxMax = getNSelections ( femto_dream_v0_selection::kV0DecVtxMax );
398-
399- pTV0Min = getMinimalSelection ( femto_dream_v0_selection::kV0pTMin ,
388+ nPtV0MinSel = getNSelections (femto_dream_v0_selection::kV0pTMin );
389+ nPtV0MaxSel = getNSelections (femto_dream_v0_selection::kV0pTMax );
390+ nEtaV0MaxSel = getNSelections (femto_dream_v0_selection::kV0etaMax );
391+ nDCAV0DaughMax = getNSelections (femto_dream_v0_selection::kV0DCADaughMax );
392+ nCPAV0Min = getNSelections (femto_dream_v0_selection::kV0CPAMin );
393+ nTranRadV0Min = getNSelections (femto_dream_v0_selection::kV0TranRadMin );
394+ nTranRadV0Max = getNSelections (femto_dream_v0_selection::kV0TranRadMax );
395+ nDecVtxMax = getNSelections (femto_dream_v0_selection::kV0DecVtxMax );
396+
397+ pTV0Min = getMinimalSelection (femto_dream_v0_selection::kV0pTMin ,
400398 femtoDreamSelection::kLowerLimit );
401- pTV0Max = getMinimalSelection ( femto_dream_v0_selection::kV0pTMax ,
399+ pTV0Max = getMinimalSelection (femto_dream_v0_selection::kV0pTMax ,
402400 femtoDreamSelection::kUpperLimit );
403- etaV0Max = getMinimalSelection ( femto_dream_v0_selection::kV0etaMax ,
401+ etaV0Max = getMinimalSelection (femto_dream_v0_selection::kV0etaMax ,
404402 femtoDreamSelection::kAbsUpperLimit );
405- dCAV0DaughMax = getMinimalSelection ( femto_dream_v0_selection::kV0DCADaughMax ,
403+ dCAV0DaughMax = getMinimalSelection (femto_dream_v0_selection::kV0DCADaughMax ,
406404 femtoDreamSelection::kUpperLimit );
407- cPAV0Min = getMinimalSelection ( femto_dream_v0_selection::kV0CPAMin ,
405+ cPAV0Min = getMinimalSelection (femto_dream_v0_selection::kV0CPAMin ,
408406 femtoDreamSelection::kLowerLimit );
409- tranRadV0Min = getMinimalSelection ( femto_dream_v0_selection::kV0TranRadMin ,
407+ tranRadV0Min = getMinimalSelection (femto_dream_v0_selection::kV0TranRadMin ,
410408 femtoDreamSelection::kLowerLimit );
411- tranRadV0Max = getMinimalSelection ( femto_dream_v0_selection::kV0TranRadMax ,
409+ tranRadV0Max = getMinimalSelection (femto_dream_v0_selection::kV0TranRadMax ,
412410 femtoDreamSelection::kUpperLimit );
413- decVtxMax = getMinimalSelection ( femto_dream_v0_selection::kV0DecVtxMax ,
411+ decVtxMax = getMinimalSelection (femto_dream_v0_selection::kV0DecVtxMax ,
414412 femtoDreamSelection::kAbsUpperLimit );
415413}
416414
@@ -479,14 +477,14 @@ bool FemtoDreamV0Selection::isSelectedMinimal(C const& /*col*/, V const& v0,
479477 if (nCPAV0Min > 0 && cpav0 < cPAV0Min) {
480478 return false ;
481479 }
482- if (nTranRadV0Min > 0 && tranRad <tranRadV0Min) {
480+ if (nTranRadV0Min > 0 && tranRad < tranRadV0Min) {
483481 return false ;
484482 }
485- if (nTranRadV0Max > 0 && tranRad > tranRadV0Max) {
483+ if (nTranRadV0Max > 0 && tranRad > tranRadV0Max) {
486484 return false ;
487485 }
488486 for (size_t i = 0 ; i < decVtx.size (); i++) {
489- if (nDecVtxMax > 0 && decVtx.at (i) > decVtxMax) {
487+ if (nDecVtxMax > 0 && decVtx.at (i) > decVtxMax) {
490488 return false ;
491489 }
492490 }
@@ -498,7 +496,7 @@ bool FemtoDreamV0Selection::isSelectedMinimal(C const& /*col*/, V const& v0,
498496 }
499497
500498 // check that track combinations for V0 or antiV0 would be fulfilling PID
501- int nSigmaPIDMax = posDaughTrack.getSigmaPIDMax ();
499+ int nSigmaPIDMax = posDaughTrack.getSigmaPIDMax ();
502500 if (fMotherIsLambda ) { // / Lambda
503501 // antiV0
504502 auto nSigmaPrNeg = negTrack.tpcNSigmaPr ();
@@ -584,17 +582,17 @@ void FemtoDreamV0Selection::fillLambdaQA(C const& /*col*/, V const& v0,
584582 if (cpav0 > cPAV0Min) {
585583 mQAHistogramRegistry ->fill (HIST (" LambdaQA/hInvMassLambdaCPA" ), fillMass);
586584 }
587- if (tranRad >tranRadV0Min) {
585+ if (tranRad > tranRadV0Min) {
588586 mQAHistogramRegistry ->fill (HIST (" LambdaQA/hInvMassLambdaTranRadMin" ),
589587 fillMass);
590588 }
591- if (tranRad < tranRadV0Max) {
589+ if (tranRad < tranRadV0Max) {
592590 mQAHistogramRegistry ->fill (HIST (" LambdaQA/hInvMassLambdaTranRadMax" ),
593591 fillMass);
594592 }
595593 bool write = true ;
596594 for (size_t i = 0 ; i < decVtx.size (); i++) {
597- write = write && (decVtx.at (i) < decVtxMax);
595+ write = write && (decVtx.at (i) < decVtxMax);
598596 }
599597 if (write) {
600598 mQAHistogramRegistry ->fill (HIST (" LambdaQA/hInvMassLambdaDecVtxMax" ),
@@ -608,8 +606,8 @@ template <typename cutContainerType, typename C, typename V, typename T>
608606std::array<cutContainerType, 5 >
609607 FemtoDreamV0Selection::getCutContainer (C const & /* col*/ , V const & v0, T const & posTrack, T const & negTrack)
610608{
611- auto outputPosTrack = posDaughTrack.getCutContainer <false , cutContainerType>(posTrack, v0.positivept (), v0.positiveeta (), v0.dcapostopv ());
612- auto outputNegTrack = negDaughTrack.getCutContainer <false , cutContainerType>(negTrack, v0.negativept (), v0.negativeeta (), v0.dcanegtopv ());
609+ auto outputPosTrack = posDaughTrack.getCutContainer <false , cutContainerType>(posTrack, v0.positivept (), v0.positiveeta (), v0.dcapostopv ());
610+ auto outputNegTrack = negDaughTrack.getCutContainer <false , cutContainerType>(negTrack, v0.negativept (), v0.negativeeta (), v0.dcanegtopv ());
613611 cutContainerType output = 0 ;
614612 size_t counter = 0 ;
615613
@@ -622,7 +620,7 @@ std::array<cutContainerType, 5>
622620 auto diffLambda = std::abs (lambdaMassNominal - lambdaMassHypothesis);
623621 auto diffAntiLambda = std::abs (antiLambdaMassHypothesis - lambdaMassHypothesis);
624622
625- int nSigmaPIDMax = posDaughTrack.getSigmaPIDMax ();
623+ int nSigmaPIDMax = posDaughTrack.getSigmaPIDMax ();
626624 auto nSigmaPrNeg = negTrack.tpcNSigmaPr ();
627625 auto nSigmaPiPos = posTrack.tpcNSigmaPi ();
628626 auto nSigmaPiNeg = negTrack.tpcNSigmaPi ();
@@ -652,40 +650,40 @@ std::array<cutContainerType, 5>
652650 const std::vector<float > decVtx = {v0.x (), v0.y (), v0.z ()};
653651
654652 float observable = 0 .;
655- for ( auto & sel : mSelections ) { // o2-linter: disable=const-ref-in-for-loop (femtoDreamObjectSelection has no const getter)
653+ for (auto & sel : mSelections ) { // o2-linter: disable=const-ref-in-for-loop (femtoDreamObjectSelection has no const getter)
656654 const auto selVariable = sel.getSelectionVariable ();
657- if (selVariable == femto_dream_v0_selection::kV0DecVtxMax ) {
655+ if (selVariable == femto_dream_v0_selection::kV0DecVtxMax ) {
658656 for (size_t i = 0 ; i < decVtx.size (); ++i) {
659657 auto decVtxValue = decVtx.at (i);
660658 sel.checkSelectionSetBit (decVtxValue, output, counter, nullptr );
661659 }
662660 } else {
663661 switch (selVariable) {
664- case ( femto_dream_v0_selection::kV0Sign ):
662+ case (femto_dream_v0_selection::kV0Sign ):
665663 observable = sign;
666664 break ;
667- case ( femto_dream_v0_selection::kV0pTMin ):
665+ case (femto_dream_v0_selection::kV0pTMin ):
668666 observable = pT;
669667 break ;
670- case ( femto_dream_v0_selection::kV0pTMax ):
668+ case (femto_dream_v0_selection::kV0pTMax ):
671669 observable = pT;
672670 break ;
673- case ( femto_dream_v0_selection::kV0etaMax ):
671+ case (femto_dream_v0_selection::kV0etaMax ):
674672 observable = eta;
675673 break ;
676- case ( femto_dream_v0_selection::kV0DCADaughMax ):
674+ case (femto_dream_v0_selection::kV0DCADaughMax ):
677675 observable = dcaDaughv0;
678676 break ;
679- case ( femto_dream_v0_selection::kV0CPAMin ):
677+ case (femto_dream_v0_selection::kV0CPAMin ):
680678 observable = cpav0;
681679 break ;
682- case ( femto_dream_v0_selection::kV0TranRadMin ):
680+ case (femto_dream_v0_selection::kV0TranRadMin ):
683681 observable = tranRad;
684682 break ;
685- case ( femto_dream_v0_selection::kV0TranRadMax ):
683+ case (femto_dream_v0_selection::kV0TranRadMax ):
686684 observable = tranRad;
687685 break ;
688- case ( femto_dream_v0_selection::kV0DecVtxMax ):
686+ case (femto_dream_v0_selection::kV0DecVtxMax ):
689687 break ;
690688 }
691689 sel.checkSelectionSetBit (observable, output, counter, nullptr );
@@ -768,9 +766,9 @@ void FemtoDreamV0Selection::fillQA(C const& /*col*/, V const& v0, T const& posTr
768766 }
769767 }
770768
771- posDaughTrack.fillQA <aod::femtodreamparticle::ParticleType::kV0Child ,
769+ posDaughTrack.fillQA <aod::femtodreamparticle::ParticleType::kV0Child ,
772770 aod::femtodreamparticle::TrackType::kPosChild >(posTrack);
773- negDaughTrack.fillQA <aod::femtodreamparticle::ParticleType::kV0Child ,
771+ negDaughTrack.fillQA <aod::femtodreamparticle::ParticleType::kV0Child ,
774772 aod::femtodreamparticle::TrackType::kNegChild >(negTrack);
775773}
776774
0 commit comments