@@ -134,6 +134,15 @@ struct PidDiHadron {
134134 kUseVertexITSTPC ,
135135 kUseTVXinTRD
136136 };
137+ enum {
138+ kCharged = 0 ,
139+ kPions ,
140+ kKaons ,
141+ kProtons ,
142+ kK0 ,
143+ kLambda ,
144+ kPhi
145+ };
137146
138147 O2_DEFINE_CONFIGURABLE (cfgCutVertex, float , 10 .0f , " Accepted z-vertex range" )
139148 O2_DEFINE_CONFIGURABLE (cfgCutPtPOIMin, float , 0 .2f , " minimum accepted track pT" )
@@ -280,11 +289,11 @@ struct PidDiHadron {
280289
281290 // Creating mass axis depending on particle - 4 = kshort, 5 = lambda, 6 = phi
282291 AxisSpec massAxisReso = {10 , 0 , 1 , " mass" };
283- if (cfgPIDParticle == 4 )
292+ if (cfgPIDParticle == kK0 )
284293 massAxisReso = {resoSwitchVals[K0][kMassBins ], resoCutVals[K0][kMassMin ], resoCutVals[K0][kMassMax ], " M_{#pi^{+}#pi^{-}} (GeV/c^{2})" };
285- if (cfgPIDParticle == 5 )
294+ if (cfgPIDParticle == kLambda )
286295 massAxisReso = {resoSwitchVals[LAMBDA][kMassBins ], resoCutVals[LAMBDA][kMassMin ], resoCutVals[LAMBDA][kMassMax ], " M_{p#pi^{-}} (GeV/c^{2})" };
287- if (cfgPIDParticle == 6 )
296+ if (cfgPIDParticle == kPhi )
288297 massAxisReso = {resoSwitchVals[PHI][kMassBins ], resoCutVals[PHI][kMassMin ], resoCutVals[PHI][kMassMax ], " M_{K^{+}K^{-}} (GeV/c^{2})" };
289298
290299 // Event Counter
@@ -307,7 +316,7 @@ struct PidDiHadron {
307316 histos.get <TH1>(HIST (" hEventCount" ))->GetXaxis ()->SetBinLabel (kUseTVXinTRD + 1 , " kTVXinTRD" );
308317 }
309318
310- if (cfgPIDParticle == 4 ) { // For K0
319+ if (cfgPIDParticle == kK0 ) { // For K0
311320 histos.add (" PiPlusTPC_K0" , " " , {HistType::kTH2D , {{axisPt, axisNsigmaTPC}}});
312321 histos.add (" PiMinusTPC_K0" , " " , {HistType::kTH2D , {{axisPt, axisNsigmaTPC}}});
313322 histos.add (" PiPlusTOF_K0" , " " , {HistType::kTH2D , {{axisPt, axisNsigmaTOF}}});
@@ -327,7 +336,7 @@ struct PidDiHadron {
327336 histos.get <TH1>(HIST (" hK0Count" ))->GetXaxis ()->SetBinLabel (9 , " Proper lifetime" );
328337 histos.get <TH1>(HIST (" hK0Count" ))->GetXaxis ()->SetBinLabel (10 , " Daughter track selection" );
329338 }
330- if (cfgPIDParticle == 5 ) { // For Lambda
339+ if (cfgPIDParticle == kLambda ) { // For Lambda
331340 histos.add (" PrPlusTPC_L" , " " , {HistType::kTH2D , {{axisPt, axisNsigmaTPC}}});
332341 histos.add (" PiMinusTPC_L" , " " , {HistType::kTH2D , {{axisPt, axisNsigmaTPC}}});
333342 histos.add (" PrPlusTOF_L" , " " , {HistType::kTH2D , {{axisPt, axisNsigmaTOF}}});
@@ -347,7 +356,7 @@ struct PidDiHadron {
347356 histos.get <TH1>(HIST (" hLambdaCount" ))->GetXaxis ()->SetBinLabel (9 , " Proper lifetime" );
348357 histos.get <TH1>(HIST (" hLambdaCount" ))->GetXaxis ()->SetBinLabel (10 , " Daughter track selection" );
349358 }
350- if (cfgPIDParticle == 6 ) { // For Phi
359+ if (cfgPIDParticle == kPhi ) { // For Phi
351360 histos.add (" KaPlusTPC" , " " , {HistType::kTH2D , {{axisPt, axisNsigmaTPC}}});
352361 histos.add (" KaMinusTPC" , " " , {HistType::kTH2D , {{axisPt, axisNsigmaTPC}}});
353362 histos.add (" KaPlusTOF" , " " , {HistType::kTH2D , {{axisPt, axisNsigmaTOF}}});
@@ -394,7 +403,7 @@ struct PidDiHadron {
394403 histos.add (" zVtx" , " zVtx" , {HistType::kTH1D , {axisVertex}});
395404 histos.add (" zVtx_used" , " zVtx_used" , {HistType::kTH1D , {axisVertex}});
396405
397- if (cfgPIDParticle == 0 || cfgPIDParticle == 1 || cfgPIDParticle == 2 || cfgPIDParticle == 3 ) {
406+ if (cfgPIDParticle == kCharged || cfgPIDParticle == kPions || cfgPIDParticle == kKaons || cfgPIDParticle == kProtons ) {
398407 histos.add (" Phi" , " Phi" , {HistType::kTH1D , {axisPhi}});
399408 histos.add (" Eta" , " Eta" , {HistType::kTH1D , {axisEta}});
400409 histos.add (" EtaCorrected" , " EtaCorrected" , {HistType::kTH1D , {axisEta}});
@@ -403,7 +412,7 @@ struct PidDiHadron {
403412 histos.add (" Trig_hist" , " " , {HistType::kTHnSparseF , {{axisSample, axisVertex, axisPtTrigger}}});
404413 }
405414
406- if (cfgPIDParticle == 4 || cfgPIDParticle == 5 || cfgPIDParticle == 6 ) {
415+ if (cfgPIDParticle == kK0 || cfgPIDParticle == kLambda || cfgPIDParticle == kPhi ) {
407416 histos.add (" Trig_histReso" , " " , {HistType::kTHnSparseF , {{axisSample, axisVertex, axisPtTrigger, massAxisReso}}});
408417 }
409418 }
@@ -434,12 +443,12 @@ struct PidDiHadron {
434443 };
435444 std::vector<AxisSpec> userAxis;
436445
437- if (cfgPIDParticle == 0 || cfgPIDParticle == 1 || cfgPIDParticle == 2 || cfgPIDParticle == 3 ) {
446+ if (cfgPIDParticle == kCharged || cfgPIDParticle == kPions || cfgPIDParticle == kKaons || cfgPIDParticle == kProtons ) {
438447 same.setObject (new CorrelationContainer (" sameEvent" , " sameEvent" , corrAxis, effAxis, userAxis));
439448 mixed.setObject (new CorrelationContainer (" mixedEvent" , " mixedEvent" , corrAxis, effAxis, userAxis));
440449 }
441450
442- if (cfgPIDParticle == 4 || cfgPIDParticle == 5 || cfgPIDParticle == 6 ) {
451+ if (cfgPIDParticle == kK0 || cfgPIDParticle == kLambda || cfgPIDParticle == kPhi ) {
443452 sameReso.setObject (new CorrelationContainer (" sameEvent" , " sameEvent" , corrAxisReso, effAxis, userAxis));
444453 mixedReso.setObject (new CorrelationContainer (" mixedEvent" , " mixedEvent" , corrAxisReso, effAxis, userAxis));
445454 }
@@ -762,14 +771,14 @@ struct PidDiHadron {
762771 double resoMass = -1 ;
763772
764773 // 4 = kshort, 5 = lambda, 6 = phi
765- if (cfgPIDParticle == 4 ) {
774+ if (cfgPIDParticle == kK0 ) {
766775 if (!selectionK0 (track1, posZ, posY, posX))
767776 continue ; // Reject if called for K0 but V0 is not K0
768777
769778 resoMass = track1.mK0Short ();
770779 }
771780
772- if (cfgPIDParticle == 5 ) {
781+ if (cfgPIDParticle == kLambda ) {
773782 if (!selectionLambda (track1, posZ, posY, posX))
774783 continue ; // Reject if called for Lambda but V0 is not lambda
775784
@@ -784,7 +793,7 @@ struct PidDiHadron {
784793
785794 if (!trackSelected (track2))
786795 continue ;
787- if (track2.pt () < 0.2 || track2.pt () > 3.0 ) // Select associated particles in the pt range 0.2 - 3.0 GeV/c
796+ if (track2.pt () < cfgCutPtMin || track2.pt () > cfgCutPtMax ) // Select associated particles in the pt range 0.2 - 3.0 GeV/c
788797 continue ;
789798 if (mEfficiency ) {
790799 associatedWeight = efficiencyAssociatedCache[track2.filteredIndex ()];
0 commit comments