@@ -143,6 +143,9 @@ struct LambdaJetpolarization {
143143 Configurable<bool > hasTOF1Leg{" hasTOF1Leg" , 0 , " hasTOF1Leg" };
144144 Configurable<bool > isMC{" isMC" , 1 , " fill MC histograms" };
145145 Configurable<int > pdgLmbda{" pdgLmbda" , 3122 , " pdgLmbda" };
146+ Configurable<int > pdgkZeroShort{" pdgkZeroShort" , 310 , " pdgkZeroShort" };
147+ Configurable<int > pdgProton{" pdgProton" , 2212 , " pdgProton" };
148+ Configurable<int > pdgPion{" pdgPion" , 211 , " pdgPion" };
146149
147150 void init (InitContext const &)
148151 {
@@ -2326,16 +2329,16 @@ struct LambdaJetpolarization {
23262329 int lPDG = 0 ;
23272330 bool isDauLambda = false , isDauAntiLambda = false ;
23282331 bool isprimary = false ;
2329- if (std::abs (v0mcparticle.pdgCode ()) == 310 || std::abs (v0mcparticle.pdgCode ()) == pdgLmbda) { // K0S or Lambda
2332+ if (std::abs (v0mcparticle.pdgCode ()) == pdgkZeroShort || std::abs (v0mcparticle.pdgCode ()) == pdgLmbda) { // K0S or Lambda
23302333 lPDG = v0mcparticle.pdgCode ();
23312334 isprimary = v0mcparticle.isPhysicalPrimary ();
23322335 }
23332336 for (const auto & mcparticleDaughter0 : v0mcparticle.daughters_as <aod::McParticles>()) {
23342337 for (const auto & mcparticleDaughter1 : v0mcparticle.daughters_as <aod::McParticles>()) {
2335- if (mcparticleDaughter0.pdgCode () == -211 && mcparticleDaughter1.pdgCode () == 2212 ) { // proton + pion^{-}
2338+ if (mcparticleDaughter0.pdgCode () == -pdgPion && mcparticleDaughter1.pdgCode () == pdgProton ) { // proton + pion^{-}
23362339 isDauLambda = true ;
23372340 }
2338- if (mcparticleDaughter0.pdgCode () == 211 && mcparticleDaughter1.pdgCode () == -2212 ) { // antiproton + pion^{+}
2341+ if (mcparticleDaughter0.pdgCode () == pdgPion && mcparticleDaughter1.pdgCode () == -pdgProton ) { // antiproton + pion^{+}
23392342 isDauAntiLambda = true ;
23402343 }
23412344 }
@@ -2405,16 +2408,16 @@ struct LambdaJetpolarization {
24052408 int lPDG = 0 ;
24062409 bool isDauLambda = false , isDauAntiLambda = false ;
24072410 bool isprimary = false ;
2408- if (std::abs (v0mcparticle.pdgCode ()) == 310 || std::abs (v0mcparticle.pdgCode ()) == pdgLmbda) { // K0S or Lambda
2411+ if (std::abs (v0mcparticle.pdgCode ()) == pdgkZeroShort || std::abs (v0mcparticle.pdgCode ()) == pdgLmbda) { // K0S or Lambda
24092412 lPDG = v0mcparticle.pdgCode ();
24102413 isprimary = v0mcparticle.isPhysicalPrimary ();
24112414 }
24122415 for (const auto & mcparticleDaughter0 : v0mcparticle.daughters_as <aod::McParticles>()) {
24132416 for (const auto & mcparticleDaughter1 : v0mcparticle.daughters_as <aod::McParticles>()) {
2414- if (mcparticleDaughter0.pdgCode () == -211 && mcparticleDaughter1.pdgCode () == 2212 ) { // proton + pion^{-}
2417+ if (mcparticleDaughter0.pdgCode () == -pdgPion && mcparticleDaughter1.pdgCode () == pdgProton ) { // proton + pion^{-}
24152418 isDauLambda = true ;
24162419 }
2417- if (mcparticleDaughter0.pdgCode () == 211 && mcparticleDaughter1.pdgCode () == -2212 ) { // antiproton + pion^{+}
2420+ if (mcparticleDaughter0.pdgCode () == pdgPion && mcparticleDaughter1.pdgCode () == -pdgProton ) { // antiproton + pion^{+}
24182421 isDauAntiLambda = true ;
24192422 }
24202423 }
@@ -2564,12 +2567,12 @@ struct LambdaJetpolarizationMCcount {
25642567 if (!mcparticle.has_daughters ()) {
25652568 continue ;
25662569 }
2567- if (mcparticle.pdgCode () == 310 ) {
2570+ if (mcparticle.pdgCode () == pdgkZeroShort ) {
25682571 registry.fill (HIST (" hK0ShortCount" ), 0.5 );
25692572 registry.fill (HIST (" hK0ShortCount_PtDiff" ), mcparticle.pt ());
25702573 for (const auto & mcparticleDaughter0 : mcparticle.daughters_as <aod::McParticles>()) {
25712574 for (const auto & mcparticleDaughter1 : mcparticle.daughters_as <aod::McParticles>()) {
2572- if (mcparticleDaughter0.pdgCode () == 211 && mcparticleDaughter1.pdgCode () == -211 ) {
2575+ if (mcparticleDaughter0.pdgCode () == pdgPion && mcparticleDaughter1.pdgCode () == -pdgPion ) {
25732576 registry.fill (HIST (" hK0ShortCount" ), 1.5 );
25742577 }
25752578 }
@@ -2580,7 +2583,7 @@ struct LambdaJetpolarizationMCcount {
25802583 registry.fill (HIST (" hLambdaCount_PtDiff" ), mcparticle.pt ());
25812584 for (const auto & mcparticleDaughter0 : mcparticle.daughters_as <aod::McParticles>()) {
25822585 for (const auto & mcparticleDaughter1 : mcparticle.daughters_as <aod::McParticles>()) {
2583- if (mcparticleDaughter0.pdgCode () == -211 && mcparticleDaughter1.pdgCode () == 2212 ) {
2586+ if (mcparticleDaughter0.pdgCode () == -pdgPion && mcparticleDaughter1.pdgCode () == pdgProton ) {
25842587 registry.fill (HIST (" hLambdaCount" ), 1.5 );
25852588 }
25862589 }
@@ -2591,7 +2594,7 @@ struct LambdaJetpolarizationMCcount {
25912594 registry.fill (HIST (" hAntiLambdaCount_PtDiff" ), mcparticle.pt ());
25922595 for (const auto & mcparticleDaughter0 : mcparticle.daughters_as <aod::McParticles>()) {
25932596 for (const auto & mcparticleDaughter1 : mcparticle.daughters_as <aod::McParticles>()) {
2594- if (mcparticleDaughter0.pdgCode () == 211 && mcparticleDaughter1.pdgCode () == -2212 ) {
2597+ if (mcparticleDaughter0.pdgCode () == pdgPion && mcparticleDaughter1.pdgCode () == -pdgProton ) {
25952598 registry.fill (HIST (" hAntiLambdaCount" ), 1.5 );
25962599 }
25972600 }
0 commit comments