@@ -140,7 +140,7 @@ struct lambdaAnalysis_pb {
140140 Configurable<bool > cEvtMCVtxIn10{" cEvtMCVtxIn10" , false , " MC event sel: isVtxIn10" };
141141 Configurable<bool > cEvtMCTriggerTVX{" cEvtMCTriggerTVX" , false , " MC event sel: isTriggerTVX" };
142142 Configurable<bool > cEvtMCRecINELgt0{" cEvtMCRecINELgt0" , false , " MC event sel: isRecINELgt0" };
143- // Histogram Registry.
143+ // Histogram Registry.
144144 HistogramRegistry histos{" histos" , {}, OutputObjHandlingPolicy::AnalysisObject};
145145
146146 void init (InitContext const &)
@@ -239,6 +239,24 @@ struct lambdaAnalysis_pb {
239239 histos.add (" Analysis/h3d_reso_lstar_PM" , " Resolution #Lambda(1520) p_{T}" , kTHnSparseF , {{200 , -0.05 , 0.05 }, axisPt, axisCent});
240240 histos.add (" Analysis/h3d_reso_lstar_MP" , " Resolution #bar{#Lambda}(1520) p_{T}" , kTHnSparseF , {{200 , -0.05 , 0.05 }, axisPt, axisCent});
241241 }
242+
243+ if (doprocessMCGen) {
244+ histos.add (" SignalLoss/hMCEventCutflow" , " MC Event Cutflow" , kTH1F , {{7 , 0 , 7 }});
245+ histos.add (" SignalLoss/hGen_mT_scaled_Proton" , " mT Scaled #Lambda(1520) from Proton" , kTHnSparseF , {axisPt, axisCent});
246+ histos.add (" SignalLoss/hGen_mT_scaled_AntiProton" , " mT Scaled #bar{#Lambda}(1520) from AntiProton" , kTHnSparseF , {axisPt, axisCent});
247+
248+ histos.add (" SignalLoss/hGen_mT_scaled_Lambda0" , " mT Scaled #Lambda(1520) from Lambda0" , kTHnSparseF , {axisPt, axisCent});
249+ histos.add (" SignalLoss/hGen_mT_scaled_AntiLambda0" , " mT Scaled #bar{#Lambda}(1520) from AntiLambda0" , kTHnSparseF , {axisPt, axisCent});
250+
251+ histos.add (" SignalLoss/hGen_mT_scaled_XiMinus" , " mT Scaled #Lambda(1520) from Xi-" , kTHnSparseF , {axisPt, axisCent});
252+ histos.add (" SignalLoss/hGen_mT_scaled_XiPlus" , " mT Scaled #bar{#Lambda}(1520) from Xi+" , kTHnSparseF , {axisPt, axisCent});
253+
254+ histos.add (" SignalLoss/hGen_mT_scaled_Xi0" , " mT Scaled #Lambda(1520) from Xi0" , kTHnSparseF , {axisPt, axisCent});
255+ histos.add (" SignalLoss/hGen_mT_scaled_AntiXi0" , " mT Scaled #bar{#Lambda}(1520) from AntiXi0" , kTHnSparseF , {axisPt, axisCent});
256+
257+ histos.add (" SignalLoss/hGen_mT_scaled_OmegaMinus" , " mT Scaled #Lambda(1520) from Omega-" , kTHnSparseF , {axisPt, axisCent});
258+ histos.add (" SignalLoss/hGen_mT_scaled_OmegaPlus" , " mT Scaled #bar{#Lambda}(1520) from Omega+" , kTHnSparseF , {axisPt, axisCent});
259+ }
242260 }
243261
244262 template <typename T>
@@ -771,10 +789,11 @@ struct lambdaAnalysis_pb {
771789 for (auto const & part : resoParents) {
772790 if (std::abs (part.pdgCode ()) != lambda1520id) // // L* pdg_code = 3124
773791 continue ;
774- // if (std::abs(part.y()) > 0.5) { // rapidity cut
775- // continue;
776- // }
777792
793+ float _yshift = std::abs (part.y ()) - cfgRapidityShift;
794+
795+ if (std::abs (_yshift) > cfgRapidityCut)
796+ continue ;
778797 bool pass1 = false ;
779798 bool pass2 = false ;
780799
@@ -797,6 +816,98 @@ struct lambdaAnalysis_pb {
797816 }
798817 PROCESS_SWITCH (lambdaAnalysis_pb, processMC, " Process Event for MC" , false );
799818
819+ void processMCGen (resoMCCols::iterator const & collision,
820+ aod::ResoMCParents const & resoParents)
821+ {
822+
823+ float centrality = collision.cent ();
824+
825+ histos.fill (HIST (" SignalLoss/hMCEventCutflow" ), 0 ); // All collisions
826+
827+ if (cEvtMCTriggerTVX && !collision.isTriggerTVX ())
828+ return ;
829+ histos.fill (HIST (" SignalLoss/hMCEventCutflow" ), 1 ); // After TriggerTVX
830+
831+ if (cEvtMCVtxIn10 && !collision.isVtxIn10 ())
832+ return ;
833+ histos.fill (HIST (" SignalLoss/hMCEventCutflow" ), 2 ); // After VtxIn10
834+
835+ if (cEvtMCINELgt0 && !collision.isINELgt0 ())
836+ return ;
837+ histos.fill (HIST (" SignalLoss/hMCEventCutflow" ), 3 ); // After INELgt0
838+
839+ if (cEvtMCSel8 && !collision.isInSel8 ())
840+ return ;
841+ histos.fill (HIST (" SignalLoss/hMCEventCutflow" ), 4 ); // After Sel8
842+
843+ if (cEvtMCRecINELgt0 && !collision.isRecINELgt0 ())
844+ return ;
845+ histos.fill (HIST (" SignalLoss/hMCEventCutflow" ), 5 ); // After RecINELgt0
846+
847+ if (cEvtMCAfterAllCuts && !collision.isInAfterAllCuts ())
848+ return ;
849+ histos.fill (HIST (" SignalLoss/hMCEventCutflow" ), 6 ); // After AfterAllCuts
850+
851+ for (auto const & part : resoParents) {
852+
853+ float yshift = std::abs (part.y ()) - cfgRapidityShift;
854+
855+ if (std::abs (yshift) > cfgRapidityCut)
856+ continue ;
857+
858+ int pdg = part.pdgCode ();
859+ float ptRef = part.pt ();
860+ double ptSq = -1.0 ;
861+
862+ std::array<float , 3 > pvec = {part.px (), part.py (), part.pz ()};
863+ float mass = RecoDecay::m (pvec, part.e ());
864+ auto mMassLambda1520 = o2::constants::physics::MassLambda1520;
865+ if (pdg == 2212 ) {
866+ ptSq = (ptRef * ptRef) + (mass * mass) - (mMassLambda1520 * mMassLambda1520 );
867+ if (ptSq > 0 )
868+ histos.fill (HIST (" SignalLoss/hGen_mT_scaled_Proton" ), std::sqrt (ptSq), centrality);
869+ } else if (pdg == -2212 ) {
870+ ptSq = (ptRef * ptRef) + (mass * mass) - (mMassLambda1520 * mMassLambda1520 );
871+ if (ptSq > 0 )
872+ histos.fill (HIST (" SignalLoss/hGen_mT_scaled_AntiProton" ), std::sqrt (ptSq), centrality);
873+ } else if (pdg == 3122 ) {
874+ ptSq = (ptRef * ptRef) + (mass * mass) - (mMassLambda1520 * mMassLambda1520 );
875+ if (ptSq > 0 )
876+ histos.fill (HIST (" SignalLoss/hGen_mT_scaled_Lambda0" ), std::sqrt (ptSq), centrality);
877+ } else if (pdg == -3122 ) {
878+ ptSq = (ptRef * ptRef) + (mass * mass) - (mMassLambda1520 * mMassLambda1520 );
879+ if (ptSq > 0 )
880+ histos.fill (HIST (" SignalLoss/hGen_mT_scaled_AntiLambda0" ), std::sqrt (ptSq), centrality);
881+ } else if (pdg == 3312 ) {
882+ ptSq = (ptRef * ptRef) + (mass * mass) - (mMassLambda1520 * mMassLambda1520 );
883+ if (ptSq > 0 )
884+ histos.fill (HIST (" SignalLoss/hGen_mT_scaled_XiMinus" ), std::sqrt (ptSq), centrality);
885+ } else if (pdg == -3312 ) {
886+ ptSq = (ptRef * ptRef) + (mass * mass) - (mMassLambda1520 * mMassLambda1520 );
887+ if (ptSq > 0 )
888+ histos.fill (HIST (" SignalLoss/hGen_mT_scaled_XiPlus" ), std::sqrt (ptSq), centrality);
889+ } else if (pdg == 3322 ) {
890+ ptSq = (ptRef * ptRef) + (mass * mass) - (mMassLambda1520 * mMassLambda1520 );
891+ if (ptSq > 0 )
892+ histos.fill (HIST (" SignalLoss/hGen_mT_scaled_Xi0" ), std::sqrt (ptSq), centrality);
893+ } else if (pdg == -3322 ) {
894+ ptSq = (ptRef * ptRef) + (mass * mass) - (mMassLambda1520 * mMassLambda1520 );
895+ if (ptSq > 0 )
896+ histos.fill (HIST (" SignalLoss/hGen_mT_scaled_AntiXi0" ), std::sqrt (ptSq), centrality);
897+ } else if (pdg == 3334 ) {
898+ ptSq = (ptRef * ptRef) + (mass * mass) - (mMassLambda1520 * mMassLambda1520 );
899+ if (ptSq > 0 )
900+ histos.fill (HIST (" SignalLoss/hGen_mT_scaled_OmegaMinus" ), std::sqrt (ptSq), centrality);
901+ } else if (pdg == -3334 ) {
902+ ptSq = (ptRef * ptRef) + (mass * mass) - (mMassLambda1520 * mMassLambda1520 );
903+ if (ptSq > 0 )
904+ histos.fill (HIST (" SignalLoss/hGen_mT_scaled_OmegaPlus" ), std::sqrt (ptSq), centrality);
905+ }
906+ }
907+ }
908+
909+ PROCESS_SWITCH (lambdaAnalysis_pb, processMCGen, " Process Event for MC" , false );
910+
800911 using BinningType2 = ColumnBinningPolicy<aod::collision::PosZ, aod::resocollision::Cent>;
801912
802913 void processMix (resoCols& collisions, resoTracks const & tracks)
0 commit comments