@@ -550,7 +550,7 @@ struct HfCorrelatorLcScHadrons {
550550 return y;
551551 }
552552
553- template <typename TCollision, typename V0 >
553+ template <typename TCollision, typename V0 >
554554 bool selectionV0 (TCollision const & collision, V0 const & candidate)
555555 {
556556 if (candidate.v0radius () < cfgV0.cfgV0radiusMin ) {
@@ -810,11 +810,11 @@ struct HfCorrelatorLcScHadrons {
810810
811811 // Correlate Lc with all Lambda V0 in the same event
812812 for (const auto & v0 : v0s) {
813-
813+
814814 const int v0Lambda = 1 ;
815815 const int v0AntiLambda = -1 ;
816816
817- if (!selectionV0 (collision, v0)){
817+ if (!selectionV0 (collision, v0)) {
818818 continue ;
819819 }
820820
@@ -1000,89 +1000,87 @@ struct HfCorrelatorLcScHadrons {
10001000
10011001 if (passV0Sel && v0Mc.pdgCode () == kLambda0 ) {
10021002 if (isSelectedV0Daughter (trackV0Pos, v0, kProton ) && isSelectedV0Daughter (trackV0Neg, v0, kPiMinus )) {
1003- registry.fill (HIST (" hV0LambdaMcRec" ), v0.mLambda (), v0.pt (), partV0Pos.pt ());
1004- registry.fill (HIST (" hV0LambdaReflMcRec" ), v0.mAntiLambda (), v0.pt (), partV0Neg.pt ());
1005- if (cfgV0.calEffV0 && v0Mc.isPhysicalPrimary () && v0Mc.producedByGenerator ()) {
1006- registry.fill (HIST (" hV0PrimLambdaMcRec" ), v0.mLambda (), v0.pt (), partV0Pos.pt ());
1007- registry.fill (HIST (" hV0PrimLambdaReflMcRec" ), v0.mAntiLambda (), v0.pt (), partV0Neg.pt ());
1008- }
1003+ registry.fill (HIST (" hV0LambdaMcRec" ), v0.mLambda (), v0.pt (), partV0Pos.pt ());
1004+ registry.fill (HIST (" hV0LambdaReflMcRec" ), v0.mAntiLambda (), v0.pt (), partV0Neg.pt ());
1005+ if (cfgV0.calEffV0 && v0Mc.isPhysicalPrimary () && v0Mc.producedByGenerator ()) {
1006+ registry.fill (HIST (" hV0PrimLambdaMcRec" ), v0.mLambda (), v0.pt (), partV0Pos.pt ());
1007+ registry.fill (HIST (" hV0PrimLambdaReflMcRec" ), v0.mAntiLambda (), v0.pt (), partV0Neg.pt ());
1008+ }
10091009
1010- if (passPIDSelection (trackV0Pos, cfgCharmCand.trkPIDspecies , cfgCharmCand.pidTPCMax , cfgCharmCand.pidTOFMax , cfgCharmCand.tofPIDThreshold , cfgCharmCand.forceTOF )) {
1011- registry.fill (HIST (" hV0LambdaPiKRejMcRec" ), v0.mLambda (), v0.pt (), partV0Pos.pt ());
1012- registry.fill (HIST (" hV0LambdaReflPiKRejMcRec" ), v0.mAntiLambda (), v0.pt (), partV0Neg.pt ());
1010+ if (passPIDSelection (trackV0Pos, cfgCharmCand.trkPIDspecies , cfgCharmCand.pidTPCMax , cfgCharmCand.pidTOFMax , cfgCharmCand.tofPIDThreshold , cfgCharmCand.forceTOF )) {
1011+ registry.fill (HIST (" hV0LambdaPiKRejMcRec" ), v0.mLambda (), v0.pt (), partV0Pos.pt ());
1012+ registry.fill (HIST (" hV0LambdaReflPiKRejMcRec" ), v0.mAntiLambda (), v0.pt (), partV0Neg.pt ());
1013+ }
10131014 }
10141015 }
1015- }
10161016 if (passV0Sel && v0Mc.pdgCode () == kLambda0Bar ) {
1017- if (isSelectedV0Daughter (trackV0Neg, v0, kProtonBar ) && isSelectedV0Daughter (trackV0Pos, v0, kPiPlus )) {
1018- registry.fill (HIST (" hV0LambdaMcRec" ), v0.mAntiLambda (), v0.pt (), partV0Neg.pt ());
1019- registry.fill (HIST (" hV0LambdaReflMcRec" ), v0.mLambda (), v0.pt (), partV0Pos.pt ());
1017+ if (isSelectedV0Daughter (trackV0Neg, v0, kProtonBar ) && isSelectedV0Daughter (trackV0Pos, v0, kPiPlus )) {
1018+ registry.fill (HIST (" hV0LambdaMcRec" ), v0.mAntiLambda (), v0.pt (), partV0Neg.pt ());
1019+ registry.fill (HIST (" hV0LambdaReflMcRec" ), v0.mLambda (), v0.pt (), partV0Pos.pt ());
10201020
1021- if (cfgV0.calEffV0 && v0Mc.isPhysicalPrimary () && v0Mc.producedByGenerator ()) {
1022- registry.fill (HIST (" hV0PrimLambdaMcRec" ), v0.mAntiLambda (), v0.pt (), partV0Neg.pt ());
1023- registry.fill (HIST (" hV0PrimLambdaReflMcRec" ), v0.mLambda (), v0.pt (), partV0Pos.pt ());
1024- }
1025- if (passPIDSelection (trackV0Neg, cfgCharmCand.trkPIDspecies , cfgCharmCand.pidTPCMax , cfgCharmCand.pidTOFMax , cfgCharmCand.tofPIDThreshold , cfgCharmCand.forceTOF )) {
1026- registry.fill (HIST (" hV0LambdaPiKRejMcRec" ), v0.mAntiLambda (), v0.pt (), partV0Neg.pt ());
1027- registry.fill (HIST (" hV0LambdaReflPiKRejMcRec" ), v0.mLambda (), v0.pt (), partV0Pos.pt ());
1021+ if (cfgV0.calEffV0 && v0Mc.isPhysicalPrimary () && v0Mc.producedByGenerator ()) {
1022+ registry.fill (HIST (" hV0PrimLambdaMcRec" ), v0.mAntiLambda (), v0.pt (), partV0Neg.pt ());
1023+ registry.fill (HIST (" hV0PrimLambdaReflMcRec" ), v0.mLambda (), v0.pt (), partV0Pos.pt ());
1024+ }
1025+ if (passPIDSelection (trackV0Neg, cfgCharmCand.trkPIDspecies , cfgCharmCand.pidTPCMax , cfgCharmCand.pidTOFMax , cfgCharmCand.tofPIDThreshold , cfgCharmCand.forceTOF )) {
1026+ registry.fill (HIST (" hV0LambdaPiKRejMcRec" ), v0.mAntiLambda (), v0.pt (), partV0Neg.pt ());
1027+ registry.fill (HIST (" hV0LambdaReflPiKRejMcRec" ), v0.mLambda (), v0.pt (), partV0Pos.pt ());
1028+ }
10281029 }
10291030 }
1030- }
1031- if (cfgV0.calEffV0 && countV0 == 1 ) {
1031+ if (cfgV0.calEffV0 && countV0 == 1 ) {
10321032 auto genPart = mcParticles.sliceBy (perTrueCollision, v0Mc.mcCollisionId ());
10331033
1034- for (const auto & particle : genPart) {
1035-
1036- if (std::abs (particle.pdgCode ()) != kLambda0 ) {
1037- continue ;
1038- }
1039-
1040- if (std::abs (particle.y ()) > cfgCharmCand.yCandMax ) {
1041- continue ;
1042- }
1043- if (!particle.isPhysicalPrimary () || !particle.producedByGenerator ()) {
1044- continue ;
1045- }
1034+ for (const auto & particle : genPart) {
10461035
1047- auto daughterParts = particle.template daughters_as <aod::McParticles>();
1048- const int8_t nDaughtersV0 = 2 ;
1036+ if (std::abs (particle.pdgCode ()) != kLambda0 ) {
1037+ continue ;
1038+ }
10491039
1050- if (daughterParts.size () != nDaughtersV0) {
1051- continue ;
1052- }
1040+ if (std::abs (particle.y ()) > cfgCharmCand.yCandMax ) {
1041+ continue ;
1042+ }
1043+ if (!particle.isPhysicalPrimary () || !particle.producedByGenerator ()) {
1044+ continue ;
1045+ }
10531046
1054- int8_t countPassedDaughter = 0 ;
1055- for ( const auto & currentDaughter : daughterParts) {
1047+ auto daughterParts = particle. template daughters_as <aod::McParticles>() ;
1048+ const int8_t nDaughtersV0 = 2 ;
10561049
1057- if (std::abs (currentDaughter. eta ()) > cfgCharmCand. etaTrackMax ) {
1050+ if (daughterParts. size () != nDaughtersV0 ) {
10581051 continue ;
10591052 }
10601053
1061- if (std::abs (currentDaughter.pdgCode ()) == kProton ) {
1054+ int8_t countPassedDaughter = 0 ;
1055+ for (const auto & currentDaughter : daughterParts) {
10621056
1063- if (currentDaughter.pt () > cfgV0. cfgV0DaughPrPtMax || currentDaughter. pt () < cfgV0. cfgV0DaughPrPtMin ) {
1057+ if (std::abs ( currentDaughter.eta ()) > cfgCharmCand. etaTrackMax ) {
10641058 continue ;
10651059 }
10661060
1067- } else if (std::abs (currentDaughter.pdgCode ()) == kPiPlus ) {
1068- if (currentDaughter.pt () > cfgV0.cfgV0DaughPiPtMax || currentDaughter.pt () < cfgV0.cfgV0DaughPiPtMin ) {
1061+ if (std::abs (currentDaughter.pdgCode ()) == kProton ) {
1062+
1063+ if (currentDaughter.pt () > cfgV0.cfgV0DaughPrPtMax || currentDaughter.pt () < cfgV0.cfgV0DaughPrPtMin ) {
1064+ continue ;
1065+ }
1066+
1067+ } else if (std::abs (currentDaughter.pdgCode ()) == kPiPlus ) {
1068+ if (currentDaughter.pt () > cfgV0.cfgV0DaughPiPtMax || currentDaughter.pt () < cfgV0.cfgV0DaughPiPtMin ) {
1069+ continue ;
1070+ }
1071+
1072+ } else {
10691073 continue ;
10701074 }
1071-
1072- } else {
1073- continue ;
1075+ countPassedDaughter++;
1076+ }
1077+ if (countPassedDaughter == nDaughtersV0) {
1078+ registry.fill (HIST (" hV0PtPrimLambdaMcGen" ), particle.pt ());
10741079 }
1075- countPassedDaughter++;
1076- }
1077- if (countPassedDaughter == nDaughtersV0) {
1078- registry.fill (HIST (" hV0PtPrimLambdaMcGen" ), particle.pt ());
10791080 }
10801081 }
1081- }
10821082 countV0++;
1083-
10841083 }
1085-
10861084 }
10871085 }
10881086
0 commit comments