@@ -65,6 +65,8 @@ DECLARE_SOA_COLUMN(Mass, mass, float);
6565DECLARE_SOA_COLUMN (PosTrackId, postrackid, int64_t );
6666DECLARE_SOA_COLUMN (NegTrackId, negtrackid, int64_t );
6767DECLARE_SOA_COLUMN (V0Type, v0type, int8_t );
68+ DECLARE_SOA_COLUMN (Cospa, cospa, float );
69+ DECLARE_SOA_COLUMN (DcaDau, dcadau, float );
6870} // namespace lambdatrack
6971DECLARE_SOA_TABLE (LambdaTracks, " AOD" , " LAMBDATRACKS" , o2::soa::Index<>,
7072 lambdatrack::LambdaCollisionId,
@@ -77,7 +79,9 @@ DECLARE_SOA_TABLE(LambdaTracks, "AOD", "LAMBDATRACKS", o2::soa::Index<>,
7779 lambdatrack::Mass,
7880 lambdatrack::PosTrackId,
7981 lambdatrack::NegTrackId,
80- lambdatrack::V0Type);
82+ lambdatrack::V0Type,
83+ lambdatrack::Cospa,
84+ lambdatrack::DcaDau);
8185using LambdaTrack = LambdaTracks::iterator;
8286
8387namespace lambdamcgentrack
@@ -95,7 +99,9 @@ DECLARE_SOA_TABLE(LambdaMCGenTracks, "AOD", "LMCGENTRACKS", o2::soa::Index<>,
9599 lambdatrack::Mass,
96100 lambdatrack::PosTrackId,
97101 lambdatrack::NegTrackId,
98- lambdatrack::V0Type);
102+ lambdatrack::V0Type,
103+ lambdatrack::Cospa,
104+ lambdatrack::DcaDau);
99105using LambdaMCGenTrack = LambdaMCGenTracks::iterator;
100106
101107} // namespace o2::aod
@@ -124,7 +130,8 @@ struct lambdaCorrTableProducer {
124130 Produces<aod::LambdaMCGenTracks> lambdaMCGenTrackTable;
125131
126132 // Collisions
127- Configurable<float > cfg_z_vtx{" cfg_z_vtx" , 10.0 , " z vertex cut" };
133+ Configurable<float > cfg_min_z_vtx{" cfg_min_z_vtx" , -10.0 , " z vertex cut" };
134+ Configurable<float > cfg_max_z_vtx{" cfg_max_z_vtx" , 10.0 , " z vertex cut" };
128135 Configurable<bool > cfg_sel8_sel{" cfg_sel8_sel" , true , " Sel8 (T0A + T0C) Selection" };
129136 Configurable<bool > cfg_trigger_tvx_sel{" cfg_trigger_tvx_sel" , false , " Trigger Time and Vertex Selection" };
130137 Configurable<bool > cfg_tf_border{" cfg_tf_border" , false , " Timeframe Border Selection" };
@@ -298,7 +305,7 @@ struct lambdaCorrTableProducer {
298305 bool selCol (C const & col)
299306 {
300307
301- if (fabs ( col.posZ ()) > cfg_z_vtx ) {
308+ if (col. posZ () < cfg_min_z_vtx || col.posZ () > cfg_max_z_vtx ) {
302309 return false ;
303310 }
304311
@@ -650,7 +657,7 @@ struct lambdaCorrTableProducer {
650657 }
651658
652659 // Fill Lambda/AntiLambda Table
653- lambdaTrackTable (lambdaCollisionTable.lastIndex (), v0track.px (), v0track.py (), v0track.pz (), v0track.pt (), rap, v0track.phi (), mass, postrack.index (), negtrack.index (), (int8_t )v0part);
660+ lambdaTrackTable (lambdaCollisionTable.lastIndex (), v0track.px (), v0track.py (), v0track.pz (), v0track.pt (), rap, v0track.phi (), mass, postrack.index (), negtrack.index (), (int8_t )v0part, v0track. v0cosPA (), v0track. dcaV0daughters () );
654661 }
655662
656663 using Collisions = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Ms>;
@@ -764,7 +771,7 @@ struct lambdaCorrTableProducer {
764771 histos.fill (HIST (" McGen/h1d_collisions_info" ), 1.5 );
765772
766773 // apply collision cuts
767- if (fabs ( mcCollision.posZ ()) > cfg_z_vtx ) {
774+ if (mcCollision. posZ () < cfg_min_z_vtx || mcCollision.posZ () > cfg_max_z_vtx ) {
768775 return ;
769776 }
770777
@@ -834,7 +841,7 @@ struct lambdaCorrTableProducer {
834841 histos.fill (HIST (" McGen/h2d_pteta_lambda" ), mcpart.eta (), mcpart.pt ());
835842 histos.fill (HIST (" McGen/h2d_ptrap_lambda" ), mcpart.y (), mcpart.pt ());
836843 histos.fill (HIST (" McGen/h2d_ptphi_lambda" ), mcpart.phi (), mcpart.pt ());
837- lambdaMCGenTrackTable (lambdaMCGenCollisionTable.lastIndex (), mcpart.px (), mcpart.py (), mcpart.pz (), mcpart.pt (), rap, mcpart.phi (), mass, daughterIDs[0 ], daughterIDs[1 ], (int8_t )kLambda );
844+ lambdaMCGenTrackTable (lambdaMCGenCollisionTable.lastIndex (), mcpart.px (), mcpart.py (), mcpart.pz (), mcpart.pt (), rap, mcpart.phi (), mass, daughterIDs[0 ], daughterIDs[1 ], (int8_t )kLambda , - 999 ., - 999 . );
838845 } else if (mcpart.pdgCode () == kLambda0Bar ) {
839846 histos.fill (HIST (" McGen/h1d_antilambda_daughter_PDG" ), daughterPDGs[0 ]);
840847 histos.fill (HIST (" McGen/h1d_antilambda_daughter_PDG" ), daughterPDGs[1 ]);
@@ -846,7 +853,7 @@ struct lambdaCorrTableProducer {
846853 histos.fill (HIST (" McGen/h2d_pteta_antilambda" ), mcpart.eta (), mcpart.pt ());
847854 histos.fill (HIST (" McGen/h2d_ptrap_antilambda" ), mcpart.y (), mcpart.pt ());
848855 histos.fill (HIST (" McGen/h2d_ptphi_antilambda" ), mcpart.phi (), mcpart.pt ());
849- lambdaMCGenTrackTable (lambdaMCGenCollisionTable.lastIndex (), mcpart.px (), mcpart.py (), mcpart.pz (), mcpart.pt (), rap, mcpart.phi (), mass, daughterIDs[1 ], daughterIDs[0 ], (int8_t )kAntiLambda );
856+ lambdaMCGenTrackTable (lambdaMCGenCollisionTable.lastIndex (), mcpart.px (), mcpart.py (), mcpart.pz (), mcpart.pt (), rap, mcpart.phi (), mass, daughterIDs[1 ], daughterIDs[0 ], (int8_t )kAntiLambda , - 999 ., - 999 . );
850857 }
851858 }
852859 }
@@ -918,6 +925,9 @@ struct lambdaCorrelationAnalysis {
918925 const AxisSpec axisRapPhi (knrapphibins, kminrapphi, kmaxrapphi, " rap #phi" );
919926 const AxisSpec axisQinv (100 , 0 , 10 , " q_{inv} (GeV/#it{c})" );
920927
928+ const AxisSpec axisCPA (100 , 0.99 , 1.0 , " cos(#theta_{PA})" );
929+ const AxisSpec axisDcaDau (75 , 0 ., 1.5 , " Daug DCA (#sigma)" );
930+
921931 // Create Histograms.
922932 // Event
923933 histos.add (" Event/Reco/h1d_collision_posz" , " V_{Z} Distribution" , kTH1F , {axisPosZ});
@@ -929,6 +939,13 @@ struct lambdaCorrelationAnalysis {
929939 histos.add (" Event/Reco/h1d_lambda_totmult" , " #Lambda - Multiplicity" , kTH1I , {axisMult});
930940 histos.add (" Event/Reco/h1d_antilambda_totmult" , " #bar{#Lambda} - Multiplicity" , kTH1I , {axisMult});
931941
942+ // InvMass, DcaDau and CosPA
943+ histos.add (" Reco/QA_Lambda/h1d_V0_mass" , " M_{p#pi}" , kTH1F , {axisMass});
944+ histos.add (" Reco/QA_Lambda/h1d_V0_cpa" , " cos(#theta_{PA})" , kTH1F , {axisCPA});
945+ histos.add (" Reco/QA_Lambda/h1d_V0_dcadau" , " DCA_{p#pi} at V0 Decay Vertex" , kTH1F , {axisDcaDau});
946+
947+ histos.addClone (" Reco/QA_Lambda/" , " Reco/QA_AntiLambda/" );
948+
932949 // single and two particle densities
933950 // 1D Histograms
934951 histos.add (" Reco/h1d_n1_pt_LaP" , " #rho_{1}^{#Lambda}" , kTH1D , {axisPt});
@@ -970,18 +987,26 @@ struct lambdaCorrelationAnalysis {
970987 }
971988 }
972989
973- template <typename T, typename V>
990+ template <bool fillHist, ParticleType part, RecGenType rec_gen, typename T, typename V>
974991 bool removeLambdaSharingDau (T const & v, V const & vs)
975992 {
976993 // check whether to remove lambda or not
977994 if (!cfg_remove_lambda) {
978995 return true ;
979996 }
980997
998+ static constexpr std::string_view sub_dir_recgen[] = {" Reco/" , " McGen/" };
999+ static constexpr std::string_view sub_dir[] = {" QA_Lambda/" , " QA_AntiLambda/" };
1000+
9811001 bool ret_flag = true ;
9821002
9831003 for (auto const & x : vs) {
9841004 if ((v.index () != x.index ()) && (v.postrackid () == x.postrackid () || v.negtrackid () == x.negtrackid ())) {
1005+ if (fillHist) {
1006+ histos.fill (HIST (sub_dir_recgen[rec_gen]) + HIST (sub_dir[part]) + HIST (" h1d_V0_mass" ), x.mass ());
1007+ histos.fill (HIST (sub_dir_recgen[rec_gen]) + HIST (sub_dir[part]) + HIST (" h1d_V0_cpa" ), x.cospa ());
1008+ histos.fill (HIST (sub_dir_recgen[rec_gen]) + HIST (sub_dir[part]) + HIST (" h1d_V0_dcadau" ), x.dcadau ());
1009+ }
9851010 if (std::abs (v.mass () - MassLambda0) > std::abs (x.mass () - MassLambda0)) {
9861011 ret_flag = false ;
9871012 break ;
@@ -1077,7 +1102,7 @@ struct lambdaCorrelationAnalysis {
10771102
10781103 for (auto const & track : tracks) {
10791104 ++ntrk1;
1080- if (!removeLambdaSharingDau (track, tracks)) {
1105+ if (!removeLambdaSharingDau< true , part, rec_gen> (track, tracks)) {
10811106 ++ntrk2;
10821107 continue ;
10831108 }
@@ -1119,7 +1144,7 @@ struct lambdaCorrelationAnalysis {
11191144 void analyzePairs (T const & trks_1, T const & trks_2)
11201145 {
11211146 for (auto const & trk_1 : trks_1) {
1122- if (!removeLambdaSharingDau (trk_1, trks_1)) {
1147+ if (!removeLambdaSharingDau< false , kLambda , rec_gen> (trk_1, trks_1)) {
11231148 continue ;
11241149 }
11251150 for (auto const & trk_2 : trks_2) {
@@ -1128,7 +1153,7 @@ struct lambdaCorrelationAnalysis {
11281153 continue ;
11291154 }
11301155 // check if Lambda shares a daughter and select the one closest to PDG Mass
1131- if (!removeLambdaSharingDau (trk_2, trks_2)) {
1156+ if (!removeLambdaSharingDau< false , kLambda , rec_gen> (trk_2, trks_2)) {
11321157 continue ;
11331158 }
11341159 fillPairHistos<partpair, rec_gen>(trk_1, trk_2);
0 commit comments