@@ -191,7 +191,7 @@ struct Chk892pp {
191191
192192 // / PID Selections, pion
193193 struct : ConfigurableGroup {
194- Configurable<bool > cfgTPConly{" cfgTPConly" , true , " Use only TPC for PID" }; // bool
194+ Configurable<bool > cfgTPConly{" cfgTPConly" , true , " Use only TPC for PID" }; // bool
195195 Configurable<float > cfgMaxTPCnSigmaPion{" cfgMaxTPCnSigmaPion" , 5.0 , " TPC nSigma cut for Pion" }; // TPC
196196 Configurable<float > cfgMaxTOFnSigmaPion{" cfgMaxTOFnSigmaPion" , 5.0 , " TOF nSigma cut for Pion" }; // TOF
197197 Configurable<float > cfgNsigmaCutCombinedPion{" cfgNsigmaCutCombinedPion" , -999 , " Combined nSigma cut for Pion" }; // Combined
@@ -275,7 +275,7 @@ struct Chk892pp {
275275 int kPDGK0 = kK0 ;
276276 int kKstarPlus = o2::constants::physics::Pdg::kKPlusStar892 ;
277277 // int kPiPlus = 211;
278- double fMaxPosPV = 1e-2 ;
278+ double fMaxPosPV = 1e-2 ;
279279
280280 void init (o2::framework::InitContext&)
281281 {
@@ -550,8 +550,8 @@ struct Chk892pp {
550550 if (std::abs (track.dcaXY ()) > TrackCuts.cfgMaxbDCArToPVcut )
551551 return false ;
552552 }
553- if (TrackCuts.cfgpTdepDCAzCut ) {
554- // Tuned on the LHC22f anchored MC LHC23d1d on primary pions. 7 Sigmas of the resolution
553+ if (TrackCuts.cfgpTdepDCAzCut ) {
554+ // Tuned on the LHC22f anchored MC LHC23d1d on primary pions. 7 Sigmas of the resolution
555555 if (std::abs (track.dcaZ ()) > (0.004 + (0.013 / track.pt ())))
556556 return false ;
557557 } else {
@@ -918,7 +918,6 @@ struct Chk892pp {
918918 return true ;
919919 } // matchRecoToTruthKstar
920920
921-
922921 void effKstarProcessGen (soa::Join<MCTrueEventCandidates, aod::McCentFT0Ms> const &, MCTrueTrackCandidates const & mcparts)
923922 {
924923 for (const auto & part : mcparts) {
@@ -929,44 +928,37 @@ struct Chk892pp {
929928 if (std::abs (part.y ()) > KstarCuts.cfgKstarMaxRap )
930929 continue ;
931930
931+ const int pionWanted = (part.pdgCode () > 0 ) ? +kPiPlus : -kPiPlus ;
932+ bool hasRightPion = false ;
933+ bool hasK0sToPipi = false ;
934+
935+ for (const auto & d1 : part.template daughters_as <MCTrueTrackCandidates>()) {
936+ const int pdg1 = d1.pdgCode ();
937+ if (pdg1 == pionWanted) {
938+ hasRightPion = true ;
939+ } else if (std::abs (pdg1) == kPDGK0 ) {
940+ for (const auto & d2 : d1.template daughters_as <MCTrueTrackCandidates>()) {
941+ if (std::abs (d2.pdgCode ()) == kPDGK0s ) {
942+ bool seenPip = false , seenPim = false ;
943+ for (const auto & d3 : d2.template daughters_as <MCTrueTrackCandidates>()) {
944+ if (d3.pdgCode () == +kPiPlus )
945+ seenPip = true ;
946+ else if (d3.pdgCode () == -kPiPlus )
947+ seenPim = true ;
948+ }
949+ if (seenPip && seenPim) {
950+ hasK0sToPipi = true ;
951+ break ;
952+ }
953+ }
954+ }
955+ }
956+ if (hasRightPion && hasK0sToPipi)
957+ break ;
958+ }
932959
933- const int pionWanted = (part.pdgCode () > 0 ) ? +kPiPlus : -kPiPlus ;
934- bool hasRightPion = false ;
935- bool hasK0sToPipi = false ;
936-
937- for (const auto & d1 : part.template daughters_as <MCTrueTrackCandidates>()) {
938- const int pdg1 = d1.pdgCode ();
939- if (pdg1 == pionWanted)
940- {
941- hasRightPion = true ;
942- } else if (std::abs (pdg1) == kPDGK0 )
943- {
944- for (const auto & d2 : d1.template daughters_as <MCTrueTrackCandidates>())
945- {
946- if (std::abs (d2.pdgCode ()) == kPDGK0s )
947- {
948- bool seenPip = false , seenPim = false ;
949- for (const auto & d3 : d2.template daughters_as <MCTrueTrackCandidates>())
950- {
951- if (d3.pdgCode () == +kPiPlus )
952- seenPip = true ;
953- else if (d3.pdgCode () == -kPiPlus )
954- seenPim = true ;
955- }
956- if (seenPip && seenPim)
957- {
958- hasK0sToPipi = true ;
959- break ;
960- }
961- }
962- }
963- }
964- if (hasRightPion && hasK0sToPipi) break ;
965- }
966-
967- if (!(hasRightPion && hasK0sToPipi))
968- continue ;
969-
960+ if (!(hasRightPion && hasK0sToPipi))
961+ continue ;
970962
971963 const auto mcid = part.mcCollisionId ();
972964 if (allowedMcIds.count (mcid) == 0 )
@@ -977,28 +969,26 @@ struct Chk892pp {
977969 continue ;
978970
979971 const float lCentrality = iter->second ;
980-
972+
981973 histos.fill (HIST (" EffKstar/genKstar" ), part.pt (), lCentrality);
982974
983- if (part.vt () == 0 )
984- {
985- histos.fill (HIST (" EffKstar/genKstar_pri" ), part.pt (), lCentrality);
986- }
975+ if (part.vt () == 0 ) {
976+ histos.fill (HIST (" EffKstar/genKstar_pri" ), part.pt (), lCentrality);
977+ }
987978
988- const auto mcc = part.mcCollision_as <soa::Join<MCTrueEventCandidates, aod::McCentFT0Ms>>();
979+ const auto mcc = part.mcCollision_as <soa::Join<MCTrueEventCandidates, aod::McCentFT0Ms>>();
989980
990- const float dx = part.vx () - mcc.posX ();
991- const float dy = part.vy () - mcc.posY ();
992- const float dz = part.vz () - mcc.posZ ();
981+ const float dx = part.vx () - mcc.posX ();
982+ const float dy = part.vy () - mcc.posY ();
983+ const float dz = part.vz () - mcc.posZ ();
993984
994- const float distanceFromPV = std::sqrt (dx* dx + dy* dy + dz* dz);
985+ const float distanceFromPV = std::sqrt (dx * dx + dy * dy + dz * dz);
995986
996- if (distanceFromPV < fMaxPosPV )
997- {
998- histos.fill (HIST (" EffKstar/genKstar_pri_pos" ), part.pt (), lCentrality);
999- }
987+ if (distanceFromPV < fMaxPosPV ) {
988+ histos.fill (HIST (" EffKstar/genKstar_pri_pos" ), part.pt (), lCentrality);
989+ }
1000990 }
1001- } // effKstarProcessGen
991+ } // effKstarProcessGen
1002992
1003993 template <typename V0RangeT, typename TrkRangeT>
1004994 void effKstarProcessReco (V0RangeT const & v0s, TrkRangeT const & tracks)
@@ -1085,23 +1075,21 @@ struct Chk892pp {
10851075 const float lCentrality = iter->second ;
10861076
10871077 histos.fill (HIST (" Correction/sigLoss_num" ), part.pt (), lCentrality);
1088- if (part.vt () == 0 )
1089- {
1090- histos.fill (HIST (" Correction/sigLoss_num_pri" ), part.pt (), lCentrality);
1091- }
1078+ if (part.vt () == 0 ) {
1079+ histos.fill (HIST (" Correction/sigLoss_num_pri" ), part.pt (), lCentrality);
1080+ }
10921081
1093- const auto mcc = part.mcCollision_as <soa::Join<MCTrueEventCandidates, aod::McCentFT0Ms>>();
1082+ const auto mcc = part.mcCollision_as <soa::Join<MCTrueEventCandidates, aod::McCentFT0Ms>>();
10941083
1095- const float dx = part.vx () - mcc.posX ();
1096- const float dy = part.vy () - mcc.posY ();
1097- const float dz = part.vz () - mcc.posZ ();
1084+ const float dx = part.vx () - mcc.posX ();
1085+ const float dy = part.vy () - mcc.posY ();
1086+ const float dz = part.vz () - mcc.posZ ();
10981087
1099- const float distanceFromPV = std::sqrt (dx* dx + dy* dy + dz* dz);
1088+ const float distanceFromPV = std::sqrt (dx * dx + dy * dy + dz * dz);
11001089
1101- if (distanceFromPV < fMaxPosPV )
1102- {
1103- histos.fill (HIST (" Correction/sigLoss_num_pri_pos" ), part.pt (), lCentrality);
1104- }
1090+ if (distanceFromPV < fMaxPosPV ) {
1091+ histos.fill (HIST (" Correction/sigLoss_num_pri_pos" ), part.pt (), lCentrality);
1092+ }
11051093 }
11061094 } // fillSigLossNum
11071095
@@ -1126,24 +1114,21 @@ struct Chk892pp {
11261114 const float lCentrality = iter->second ;
11271115
11281116 histos.fill (HIST (" Correction/sigLoss_den" ), part.pt (), lCentrality);
1129- if (part.vt () == 0 )
1130- {
1131- histos.fill (HIST (" Correction/sigLoss_den_pri" ), part.pt (), lCentrality);
1132- }
1133-
1134- const auto mcc = part.mcCollision_as <soa::Join<MCTrueEventCandidates, aod::McCentFT0Ms>>();
1117+ if (part.vt () == 0 ) {
1118+ histos.fill (HIST (" Correction/sigLoss_den_pri" ), part.pt (), lCentrality);
1119+ }
11351120
1136- const float dx = part.vx () - mcc.posX ();
1137- const float dy = part.vy () - mcc.posY ();
1138- const float dz = part.vz () - mcc.posZ ();
1121+ const auto mcc = part.mcCollision_as <soa::Join<MCTrueEventCandidates, aod::McCentFT0Ms>>();
11391122
1140- const float distanceFromPV = std::sqrt (dx*dx + dy*dy + dz*dz);
1123+ const float dx = part.vx () - mcc.posX ();
1124+ const float dy = part.vy () - mcc.posY ();
1125+ const float dz = part.vz () - mcc.posZ ();
11411126
1142- if (distanceFromPV < fMaxPosPV )
1143- {
1144- histos.fill (HIST (" Correction/sigLoss_den_pri_pos" ), part.pt (), lCentrality);
1145- }
1127+ const float distanceFromPV = std::sqrt (dx * dx + dy * dy + dz * dz);
11461128
1129+ if (distanceFromPV < fMaxPosPV ) {
1130+ histos.fill (HIST (" Correction/sigLoss_den_pri_pos" ), part.pt (), lCentrality);
1131+ }
11471132 }
11481133 } // fillSigLossDen
11491134
0 commit comments