@@ -104,12 +104,22 @@ struct Kstarqa {
104104 Configurable<float > cfgTPCChi2NCl{" cfgTPCChi2NCl" , 4.0 , " TPC Chi2/NCl" };
105105
106106 // Other fixed variables
107- float lowpTcutinpTdepPID = 0.5 ;
108- std::array< int , 6 > numbers = { 0 , 1 , 2 , 3 , 4 , 5 } ;
107+ float lowPtCutPID = 0.5 ;
108+ int noOfDaughters = 2 ;
109109 float rapidityMotherData = 0.5 ;
110110
111111 } selectionConfig;
112112
113+ enum MultEstimator {
114+ kFT0M ,
115+ kFT0A ,
116+ kFT0C ,
117+ kFV0A ,
118+ kFV0C ,
119+ kFV0M ,
120+ kNEstimators // useful if you want to iterate or size things
121+ };
122+
113123 // Histograms are defined with HistogramRegistry
114124 HistogramRegistry rEventSelection{" eventSelection" , {}, OutputObjHandlingPolicy::AnalysisObject, true , true };
115125 HistogramRegistry hInvMass{" hInvMass" , {}, OutputObjHandlingPolicy::AnalysisObject, true , true };
@@ -498,23 +508,23 @@ struct Kstarqa {
498508 bool selectionPIDNew (const T& candidate, int PID)
499509 {
500510 if (PID == 0 ) {
501- if (candidate.pt () < selectionConfig.lowpTcutinpTdepPID && std::abs (candidate.tpcNSigmaPi ()) < nsigmaCutTPCPi) {
511+ if (candidate.pt () < selectionConfig.lowPtCutPID && std::abs (candidate.tpcNSigmaPi ()) < nsigmaCutTPCPi) {
502512 return true ;
503513 }
504- if (candidate.pt () >= selectionConfig.lowpTcutinpTdepPID && std::abs (candidate.tpcNSigmaPi ()) < nsigmaCutTPCPi && candidate.hasTOF () && std::abs (candidate.tofNSigmaPi ()) < nsigmaCutTOFPi) {
514+ if (candidate.pt () >= selectionConfig.lowPtCutPID && std::abs (candidate.tpcNSigmaPi ()) < nsigmaCutTPCPi && candidate.hasTOF () && std::abs (candidate.tofNSigmaPi ()) < nsigmaCutTOFPi) {
505515 return true ;
506516 }
507- if (candidate.pt () >= selectionConfig.lowpTcutinpTdepPID && std::abs (candidate.tpcNSigmaPi ()) < nsigmaCutTPCPi && !candidate.hasTOF ()) {
517+ if (candidate.pt () >= selectionConfig.lowPtCutPID && std::abs (candidate.tpcNSigmaPi ()) < nsigmaCutTPCPi && !candidate.hasTOF ()) {
508518 return true ;
509519 }
510520 } else if (PID == 1 ) {
511- if (candidate.pt () < selectionConfig.lowpTcutinpTdepPID && std::abs (candidate.tpcNSigmaKa ()) < nsigmaCutTPCKa) {
521+ if (candidate.pt () < selectionConfig.lowPtCutPID && std::abs (candidate.tpcNSigmaKa ()) < nsigmaCutTPCKa) {
512522 return true ;
513523 }
514- if (candidate.pt () >= selectionConfig.lowpTcutinpTdepPID && std::abs (candidate.tpcNSigmaKa ()) < nsigmaCutTPCKa && candidate.hasTOF () && std::abs (candidate.tofNSigmaKa ()) < nsigmaCutTOFKa) {
524+ if (candidate.pt () >= selectionConfig.lowPtCutPID && std::abs (candidate.tpcNSigmaKa ()) < nsigmaCutTPCKa && candidate.hasTOF () && std::abs (candidate.tofNSigmaKa ()) < nsigmaCutTOFKa) {
515525 return true ;
516526 }
517- if (candidate.pt () >= selectionConfig.lowpTcutinpTdepPID && std::abs (candidate.tpcNSigmaKa ()) < nsigmaCutTPCKa && !candidate.hasTOF ()) {
527+ if (candidate.pt () >= selectionConfig.lowPtCutPID && std::abs (candidate.tpcNSigmaKa ()) < nsigmaCutTPCKa && !candidate.hasTOF ()) {
518528 return true ;
519529 }
520530 }
@@ -799,17 +809,18 @@ struct Kstarqa {
799809
800810 multiplicity = -1 ;
801811
802- if (cSelectMultEstimator == selectionConfig. numbers [ 0 ] ) { // FT0M
812+ if (cSelectMultEstimator == kFT0M ) {
803813 multiplicity = collision.centFT0M ();
804- } else if (cSelectMultEstimator == selectionConfig. numbers [ 1 ] ) {
814+ } else if (cSelectMultEstimator == kFT0A ) {
805815 multiplicity = collision.centFT0A ();
806- } else if (cSelectMultEstimator == selectionConfig. numbers [ 2 ] ) {
816+ } else if (cSelectMultEstimator == kFT0C ) {
807817 multiplicity = collision.centFT0C ();
808- } else if (cSelectMultEstimator == selectionConfig. numbers [ 3 ] ) {
818+ } else if (cSelectMultEstimator == kFV0A ) {
809819 multiplicity = collision.centFV0A ();
810820 } else {
811- multiplicity = collision.centFT0M ();
821+ multiplicity = collision.centFT0M (); // default
812822 }
823+
813824 /* else if (cSelectMultEstimator == 4) {
814825 multiplicity = collision.centMFT();
815826 } */
@@ -998,13 +1009,13 @@ struct Kstarqa {
9981009 };
9991010
10001011 // Call mixing based on selected estimator
1001- if (cSelectMultEstimator == selectionConfig. numbers [ 0 ] ) { // FT0M
1012+ if (cSelectMultEstimator == kFT0M ) {
10021013 runMixing (pair1, [](const auto & c) { return c.centFT0M (); });
1003- } else if (cSelectMultEstimator == selectionConfig. numbers [ 1 ] ) {
1014+ } else if (cSelectMultEstimator == kFT0A ) {
10041015 runMixing (pair2, [](const auto & c) { return c.centFT0A (); });
1005- } else if (cSelectMultEstimator == selectionConfig. numbers [ 2 ] ) {
1016+ } else if (cSelectMultEstimator == kFT0C ) {
10061017 runMixing (pair3, [](const auto & c) { return c.centFT0C (); });
1007- } else if (cSelectMultEstimator == selectionConfig. numbers [ 3 ] ) {
1018+ } else if (cSelectMultEstimator == kFV0A ) {
10081019 runMixing (pair4, [](const auto & c) { return c.centFV0A (); });
10091020 }
10101021 }
@@ -1099,7 +1110,7 @@ struct Kstarqa {
10991110 hInvMass.fill (HIST (" hAllKstarGenCollisisons1Rec" ), multiplicity, mcParticle.pt ());
11001111
11011112 auto kDaughters = mcParticle.daughters_as <aod::McParticles>();
1102- if (kDaughters .size () != selectionConfig.numbers [ 2 ] ) {
1113+ if (kDaughters .size () != selectionConfig.noOfDaughters ) {
11031114 continue ;
11041115 }
11051116
0 commit comments