@@ -2512,22 +2512,25 @@ struct Kstarqa {
25122512 rEventSelection.fill (HIST (" recMCparticles" ), 16.5 );
25132513
25142514 oldindex = mothertrack1.globalIndex ();
2515- if (track1.sign () * track2.sign () < 0 ) {
2515+ if (track1PDG == PDG_t::kPiPlus ) {
2516+ daughter1 = ROOT::Math::PxPyPzMVector (track1.px (), track1.py (), track1.pz (), massPi);
2517+ daughter2 = ROOT::Math::PxPyPzMVector (track2.px (), track2.py (), track2.pz (), massKa);
2518+ } else if (track1PDG == PDG_t::kKPlus ) {
25162519 daughter1 = ROOT::Math::PxPyPzMVector (track1.px (), track1.py (), track1.pz (), massKa);
25172520 daughter2 = ROOT::Math::PxPyPzMVector (track2.px (), track2.py (), track2.pz (), massPi);
2518- mother = daughter1 + daughter2; // Kstar meson
2519-
2520- hInvMass.fill (HIST (" h2KstarRecpt2" ), mothertrack1.pt (), multiplicity, std::sqrt (mothertrack1.e () * mothertrack1.e () - mothertrack1.p () * mothertrack1.p ()));
2521- hInvMass.fill (HIST (" h2KstarRecptCalib2" ), mothertrack1.pt (), multiplicityRec, std::sqrt (mothertrack1.e () * mothertrack1.e () - mothertrack1.p () * mothertrack1.p ()));
2521+ }
2522+ mother = daughter1 + daughter2; // Kstar meson
25222523
2523- if (applyRecMotherRapidity && mother.Rapidity () >= selectionConfig.rapidityMotherData ) {
2524- continue ;
2525- }
2524+ hInvMass.fill (HIST (" h2KstarRecpt2" ), mothertrack1.pt (), multiplicity, std::sqrt (mothertrack1.e () * mothertrack1.e () - mothertrack1.p () * mothertrack1.p ()));
2525+ hInvMass.fill (HIST (" h2KstarRecptCalib2" ), mothertrack1.pt (), multiplicityRec, std::sqrt (mothertrack1.e () * mothertrack1.e () - mothertrack1.p () * mothertrack1.p ()));
25262526
2527- hInvMass.fill (HIST (" h1KstarRecMass" ), mother.M ());
2528- hInvMass.fill (HIST (" h2KstarRecpt1" ), mother.Pt (), multiplicity, mother.M ());
2529- hInvMass.fill (HIST (" h2KstarRecptCalib1" ), mother.Pt (), multiplicityRec, mother.M ());
2527+ if (applyRecMotherRapidity && mother.Rapidity () >= selectionConfig.rapidityMotherData ) {
2528+ continue ;
25302529 }
2530+
2531+ hInvMass.fill (HIST (" h1KstarRecMass" ), mother.M ());
2532+ hInvMass.fill (HIST (" h2KstarRecpt1" ), mother.Pt (), multiplicity, mother.M ());
2533+ hInvMass.fill (HIST (" h2KstarRecptCalib1" ), mother.Pt (), multiplicityRec, mother.M ());
25312534 }
25322535 }
25332536 }
0 commit comments