@@ -69,6 +69,12 @@ enum Modes {
6969 kPPbar
7070};
7171
72+ enum Origin {
73+ kPrimary = 0 ,
74+ kWeakDecay ,
75+ kMaterial
76+ };
77+
7278struct HadronNucleiCorrelation {
7379
7480 static constexpr int betahasTOFthr = -100 ;
@@ -86,7 +92,6 @@ struct HadronNucleiCorrelation {
8692 Configurable<bool > doCorrection{" doCorrection" , false , " do efficiency correction" };
8793 Configurable<bool > removeSameBunchPileup{" removeSameBunchPileup" , false , " remove Same Bunch Pileup" };
8894
89-
9095 Configurable<std::string> fCorrectionPath {" fCorrectionPath" , " " , " Correction path to file" };
9196 Configurable<std::string> fCorrectionHisto {" fCorrectionHisto" , " " , " Correction histogram" };
9297 Configurable<std::string> cfgUrl{" cfgUrl" , " http://alice-ccdb.cern.ch" , " url of the ccdb repository" };
@@ -124,6 +129,7 @@ struct HadronNucleiCorrelation {
124129 Configurable<float > radiusTPC{" radiusTPC" , 1.2 , " TPC radius to calculate phi_star for" };
125130 Configurable<float > dEta{" dEta" , 0.01 , " minimum allowed difference in eta between two tracks in a pair" };
126131 Configurable<float > dPhi{" dPhi" , 0.01 , " minimum allowed difference in phi_star between two tracks in a pair" };
132+ Configurable<float > rap{" rap" , 0.5 , " rapidity" };
127133
128134 // Mixing parameters
129135 ConfigurableAxis confMultBins{" confMultBins" , {VARIABLE_WIDTH , 0 .0f , 4 .0f , 8 .0f , 12 .0f , 16 .0f , 20 .0f , 24 .0f , 28 .0f , 50 .0f , 100 .0f , 99999 .f }, " Mixing bins - multiplicity" };
@@ -584,35 +590,35 @@ struct HadronNucleiCorrelation {
584590
585591 if (doCorrection) { // Apply corrections
586592 switch (mode) {
587- case 0 :
593+ case kDbarPbar :
588594 corr0 = hEffpTEta_antideuteron->Interpolate (part0.pt (), part0.eta ());
589595 corr1 = hEffpTEta_antiproton->Interpolate (part1.pt (), part1.eta ());
590596 break ;
591- case 1 :
597+ case kDP :
592598 corr0 = hEffpTEta_deuteron->Interpolate (part0.pt (), part0.eta ());
593599 corr1 = hEffpTEta_proton->Interpolate (part1.pt (), part1.eta ());
594600 break ;
595- case 2 :
601+ case kDbarP :
596602 corr0 = hEffpTEta_antideuteron->Interpolate (part0.pt (), part0.eta ());
597603 corr1 = hEffpTEta_proton->Interpolate (part1.pt (), part1.eta ());
598604 break ;
599- case 3 :
605+ case kDPbar :
600606 corr0 = hEffpTEta_deuteron->Interpolate (part0.pt (), part0.eta ());
601607 corr1 = hEffpTEta_antiproton->Interpolate (part1.pt (), part1.eta ());
602608 break ;
603- case 4 :
609+ case kPbarP :
604610 corr0 = hEffpTEta_antiproton->Interpolate (part0.pt (), part0.eta ());
605611 corr1 = hEffpTEta_proton->Interpolate (part1.pt (), part1.eta ());
606612 break ;
607- case 5 :
613+ case kPbarPbar :
608614 corr0 = hEffpTEta_antiproton->Interpolate (part0.pt (), part0.eta ());
609615 corr1 = hEffpTEta_antiproton->Interpolate (part1.pt (), part1.eta ());
610616 break ;
611- case 6 :
617+ case kPP :
612618 corr0 = hEffpTEta_proton->Interpolate (part0.pt (), part0.eta ());
613619 corr1 = hEffpTEta_proton->Interpolate (part1.pt (), part1.eta ());
614620 break ;
615- case 7 :
621+ case kPPbar :
616622 corr0 = hEffpTEta_proton->Interpolate (part0.pt (), part0.eta ());
617623 corr1 = hEffpTEta_antiproton->Interpolate (part1.pt (), part1.eta ());
618624 break ;
@@ -1032,38 +1038,38 @@ struct HadronNucleiCorrelation {
10321038
10331039 if (IsProton (track, +1 ) && track.pdgCode () == PDG_t::kProton ) {
10341040 registry.fill (HIST (" hPrDCAxy" ), track.dcaXY (), track.pt ());
1035- if (track.origin () == 0 )
1041+ if (track.origin () == kPrimary )
10361042 registry.fill (HIST (" hPrimPrDCAxy" ), track.dcaXY (), track.pt ());
1037- if (track.origin () == 1 )
1043+ if (track.origin () == kWeakDecay )
10381044 registry.fill (HIST (" hSecWeakPrDCAxy" ), track.dcaXY (), track.pt ());
1039- if (track.origin () == 2 )
1045+ if (track.origin () == kMaterial )
10401046 registry.fill (HIST (" hSecMatPrDCAxy" ), track.dcaXY (), track.pt ());
10411047 }
10421048 if (IsProton (track, -1 ) && track.pdgCode () == -PDG_t::kProton ) {
10431049 registry.fill (HIST (" hAntiPrDCAxy" ), track.dcaXY (), track.pt ());
1044- if (track.origin () == 0 )
1050+ if (track.origin () == kPrimary )
10451051 registry.fill (HIST (" hPrimAntiPrDCAxy" ), track.dcaXY (), track.pt ());
1046- if (track.origin () == 1 )
1052+ if (track.origin () == kWeakDecay )
10471053 registry.fill (HIST (" hSecWeakAntiPrDCAxy" ), track.dcaXY (), track.pt ());
1048- if (track.origin () == 2 )
1054+ if (track.origin () == kMaterial )
10491055 registry.fill (HIST (" hSecMatAntiPrDCAxy" ), track.dcaXY (), track.pt ());
10501056 }
10511057 if (IsDeuteron (track, +1 ) && track.pdgCode () == o2::constants::physics::Pdg::kDeuteron ) {
10521058 registry.fill (HIST (" hDeDCAxy" ), track.dcaXY (), track.pt ());
1053- if (track.origin () == 0 )
1059+ if (track.origin () == kPrimary )
10541060 registry.fill (HIST (" hPrimDeDCAxy" ), track.dcaXY (), track.pt ());
1055- if (track.origin () == 1 )
1061+ if (track.origin () == kWeakDecay )
10561062 registry.fill (HIST (" hSecWeakDeDCAxy" ), track.dcaXY (), track.pt ());
1057- if (track.origin () == 2 )
1063+ if (track.origin () == kMaterial )
10581064 registry.fill (HIST (" hSecMatDeDCAxy" ), track.dcaXY (), track.pt ());
10591065 }
10601066 if (IsDeuteron (track, -1 ) && track.pdgCode () == -o2::constants::physics::Pdg::kDeuteron ) {
10611067 registry.fill (HIST (" hAntiDeDCAxy" ), track.dcaXY (), track.pt ());
1062- if (track.origin () == 0 )
1068+ if (track.origin () == kPrimary )
10631069 registry.fill (HIST (" hPrimAntiDeDCAxy" ), track.dcaXY (), track.pt ());
1064- if (track.origin () == 1 )
1070+ if (track.origin () == kWeakDecay )
10651071 registry.fill (HIST (" hSecWeakAntiDeDCAxy" ), track.dcaXY (), track.pt ());
1066- if (track.origin () == 2 )
1072+ if (track.origin () == kMaterial )
10671073 registry.fill (HIST (" hSecMatAntiDeDCAxy" ), track.dcaXY (), track.pt ());
10681074 }
10691075
@@ -1097,13 +1103,13 @@ struct HadronNucleiCorrelation {
10971103
10981104 if (isPr) {
10991105 registry.fill (HIST (" hPrimSec_EtaPhiPt_Proton" ), track.eta (), track.phi (), track.pt () * +1 );
1100- if (track.origin () == 1 || track.origin () == 2 ) { // secondaries
1106+ if (track.origin () == kWeakDecay || track.origin () == kMaterial ) { // secondaries
11011107 registry.fill (HIST (" hSec_EtaPhiPt_Proton" ), track.eta (), track.phi (), track.pt () * +1 );
11021108 }
11031109 }
11041110 if (isAntiPr) {
11051111 registry.fill (HIST (" hPrimSec_EtaPhiPt_Proton" ), track.eta (), track.phi (), track.pt () * -1 );
1106- if (track.origin () == 1 || track.origin () == 2 ) {
1112+ if (track.origin () == kWeakDecay || track.origin () == kMaterial ) {
11071113 registry.fill (HIST (" hSec_EtaPhiPt_Proton" ), track.eta (), track.phi (), track.pt () * -1 );
11081114 }
11091115 }
@@ -1409,10 +1415,10 @@ struct HadronNucleiCorrelation {
14091415 registry.fill (HIST (" Generated/hQADeuterons" ), 1.5 );
14101416 }
14111417
1412- if (particle.pdgCode () == o2::constants::physics::Pdg::kDeuteron && std::abs (particle.y ()) < 0.5 ) {
1418+ if (particle.pdgCode () == o2::constants::physics::Pdg::kDeuteron && std::abs (particle.y ()) < rap ) {
14131419 registry.fill (HIST (" Generated/hDeuteronsVsPt" ), particle.pt ());
14141420 }
1415- if (particle.pdgCode () == -o2::constants::physics::Pdg::kDeuteron && std::abs (particle.y ()) < 0.5 ) {
1421+ if (particle.pdgCode () == -o2::constants::physics::Pdg::kDeuteron && std::abs (particle.y ()) < rap ) {
14161422 registry.fill (HIST (" Generated/hAntiDeuteronsVsPt" ), particle.pt ());
14171423 }
14181424
0 commit comments