@@ -59,13 +59,13 @@ using MyTracks = soa::Join<aod::TracksIU, aod::TracksExtra, aod::TracksCovIU,
5959using MyTrack = MyTracks::iterator;
6060
6161struct TreeCreatorElectronMLDDA {
62- enum class EM_V0_Label : int { // Reconstructed V0
63- kUndef = -1 ,
64- kGamma = 0 ,
65- kK0S = 1 ,
66- kLambda = 2 ,
67- kAntiLambda = 3 ,
68- };
62+ // enum class EM_V0_Label : int { // Reconstructed V0
63+ // kUndef = -1,
64+ // kGamma = 0,
65+ // kK0S = 1,
66+ // kLambda = 2,
67+ // kAntiLambda = 3,
68+ // };
6969
7070 SliceCache cache;
7171 Produces<o2::aod::EMPrimaryTracks> emprimarytracks; // flat table containing collision + track information
@@ -151,6 +151,7 @@ struct TreeCreatorElectronMLDDA {
151151 Configurable<double > d_bz_input{" d_bz_input" , -999 , " bz field, -999 is automatic" };
152152 Configurable<int > useMatCorrType{" useMatCorrType" , 0 , " 0: none, 1: TGeo, 2: LUT" };
153153
154+ Configurable<float > downscaling_track{" downscaling_track" , 1e-4 , " down scaling factor to store track" };
154155 Configurable<float > downscaling_electron{" downscaling_electron" , 0.005 , " down scaling factor to store electron" };
155156 Configurable<float > downscaling_pion{" downscaling_pion" , 0.001 , " down scaling factor to store pion" };
156157 Configurable<float > downscaling_kaon{" downscaling_kaon" , 1.1 , " down scaling factor to store kaon" };
@@ -167,12 +168,12 @@ struct TreeCreatorElectronMLDDA {
167168 Configurable<float > cfg_max_frac_shared_clusters_tpc{" cfg_max_frac_shared_clusters_tpc" , 0.7 , " max fraction of shared clusters in TPC" };
168169 Configurable<int > cfg_min_ncrossedrows_tpc{" cfg_min_ncrossedrows_tpc" , 70 , " min ncrossed rows" };
169170 Configurable<int > cfg_min_ncluster_tpc{" cfg_min_ncluster_tpc" , 0 , " min ncluster tpc" };
170- Configurable<int > cfg_min_ncluster_its{" cfg_min_ncluster_its" , 2 , " min ncluster its" };
171- Configurable<int > cfg_min_ncluster_itsib{" cfg_min_ncluster_itsib" , 0 , " min ncluster itsib" };
171+ Configurable<int > cfg_min_ncluster_its{" cfg_min_ncluster_its" , 4 , " min ncluster its" };
172+ Configurable<int > cfg_min_ncluster_itsib{" cfg_min_ncluster_itsib" , 1 , " min ncluster itsib" };
172173 Configurable<float > cfg_max_chi2tpc{" cfg_max_chi2tpc" , 5.0 , " max chi2/NclsTPC" };
173174 Configurable<float > cfg_max_chi2its{" cfg_max_chi2its" , 6.0 , " max chi2/NclsITS" };
174- Configurable<float > cfg_max_dcaxy{" cfg_max_dcaxy" , 0.3 , " max dca XY in cm" };
175- Configurable<float > cfg_max_dcaz{" cfg_max_dcaz" , 0.3 , " max dca Z in cm" };
175+ Configurable<float > cfg_max_dcaxy{" cfg_max_dcaxy" , 1.0 , " max dca XY in cm" };
176+ Configurable<float > cfg_max_dcaz{" cfg_max_dcaz" , 1.0 , " max dca Z in cm" };
176177 } trackcuts;
177178
178179 struct : ConfigurableGroup {
@@ -513,7 +514,7 @@ struct TreeCreatorElectronMLDDA {
513514 }
514515
515516 template <typename TCollision, typename TTrack>
516- void fillTrackTable (TCollision const & collision, TTrack const & track, const int pidlabel, const int tracktype)
517+ void fillTrackTable (TCollision const & collision, TTrack const & track, const int pidlabel, const int tracktype, const bool isForValidation )
517518 {
518519 if (std::find (stored_trackIds.begin (), stored_trackIds.end (), track.globalIndex ()) == stored_trackIds.end ()) {
519520 mDcaInfoCov .set (999 , 999 , 999 , 999 , 999 );
@@ -532,7 +533,7 @@ struct TreeCreatorElectronMLDDA {
532533 track.tpcChi2NCl (), track.tpcInnerParam (),
533534 track.tpcSignal (), track.tpcNSigmaEl (), track.tpcNSigmaMu (), track.tpcNSigmaPi (), track.tpcNSigmaKa (), track.tpcNSigmaPr (),
534535 track.beta (), track.tofNSigmaEl (), track.tofNSigmaMu (), track.tofNSigmaPi (), track.tofNSigmaKa (), track.tofNSigmaPr (),
535- track.itsClusterSizes (), track.itsChi2NCl (), track.tofChi2 (), track.detectorMap (), pidlabel, tracktype);
536+ track.itsClusterSizes (), track.itsChi2NCl (), track.tofChi2 (), track.detectorMap (), pidlabel, tracktype, isForValidation );
536537 stored_trackIds.emplace_back (track.globalIndex ());
537538 }
538539 }
@@ -594,18 +595,18 @@ struct TreeCreatorElectronMLDDA {
594595 registry.fill (HIST (" V0/hTPCdEdx_P_Pi" ), pos.p (), pos.tpcSignal ());
595596 registry.fill (HIST (" V0/hTOFbeta_P_Pi" ), pos.p (), pos.beta ());
596597 if (dist01 (engine) < downscaling_pion) {
597- fillTrackTable (collision, pos, static_cast <int >(o2::aod::pwgem::dilepton::PID_Label::kPion ), static_cast <int >(o2::aod::pwgem::dilepton::Track_Type::kSecondary ));
598+ fillTrackTable (collision, pos, static_cast <int >(o2::aod::pwgem::dilepton::PID_Label::kPion ), static_cast <int >(o2::aod::pwgem::dilepton::Track_Type::kSecondary ), false );
598599 }
599600 if (dist01 (engine) < downscaling_pion) {
600- fillTrackTable (collision, neg, static_cast <int >(o2::aod::pwgem::dilepton::PID_Label::kPion ), static_cast <int >(o2::aod::pwgem::dilepton::Track_Type::kSecondary ));
601+ fillTrackTable (collision, neg, static_cast <int >(o2::aod::pwgem::dilepton::PID_Label::kPion ), static_cast <int >(o2::aod::pwgem::dilepton::Track_Type::kSecondary ), false );
601602 }
602603 }
603604 }
604605 if (isProton (pos) && isPionTight (neg)) {
605606 registry.fill (HIST (" V0/hMassLambda" ), v0.mLambda ());
606607 if (v0cuts.cfg_min_mass_lambda < v0.mLambda () && v0.mLambda () < v0cuts.cfg_max_mass_lambda ) {
607608 if (dist01 (engine) < downscaling_proton) {
608- fillTrackTable (collision, pos, static_cast <int >(o2::aod::pwgem::dilepton::PID_Label::kProton ), static_cast <int >(o2::aod::pwgem::dilepton::Track_Type::kSecondary ));
609+ fillTrackTable (collision, pos, static_cast <int >(o2::aod::pwgem::dilepton::PID_Label::kProton ), static_cast <int >(o2::aod::pwgem::dilepton::Track_Type::kSecondary ), false );
609610 }
610611 registry.fill (HIST (" V0/hTPCdEdx_P_Pr" ), pos.p (), pos.tpcSignal ());
611612 registry.fill (HIST (" V0/hTOFbeta_P_Pr" ), pos.p (), pos.beta ());
@@ -615,7 +616,7 @@ struct TreeCreatorElectronMLDDA {
615616 registry.fill (HIST (" V0/hMassAntiLambda" ), v0.mAntiLambda ());
616617 if (v0cuts.cfg_min_mass_lambda < v0.mAntiLambda () && v0.mAntiLambda () < v0cuts.cfg_max_mass_lambda ) {
617618 if (dist01 (engine) < downscaling_proton) {
618- fillTrackTable (collision, neg, static_cast <int >(o2::aod::pwgem::dilepton::PID_Label::kProton ), static_cast <int >(o2::aod::pwgem::dilepton::Track_Type::kSecondary ));
619+ fillTrackTable (collision, neg, static_cast <int >(o2::aod::pwgem::dilepton::PID_Label::kProton ), static_cast <int >(o2::aod::pwgem::dilepton::Track_Type::kSecondary ), false );
619620 }
620621 registry.fill (HIST (" V0/hTPCdEdx_P_Pr" ), neg.p (), neg.tpcSignal ());
621622 registry.fill (HIST (" V0/hTOFbeta_P_Pr" ), neg.p (), neg.beta ());
@@ -627,10 +628,10 @@ struct TreeCreatorElectronMLDDA {
627628 registry.fill (HIST (" V0/hMassGamma_Rxy" ), v0.v0radius (), v0.mGamma ());
628629 if ((v0cuts.cfg_min_mass_photon < v0.mGamma () && v0.mGamma () < v0cuts.cfg_max_mass_photon )) {
629630 if (dist01 (engine) < downscaling_electron) {
630- fillTrackTable (collision, pos, static_cast <int >(o2::aod::pwgem::dilepton::PID_Label::kElectron ), static_cast <int >(o2::aod::pwgem::dilepton::Track_Type::kSecondary ));
631+ fillTrackTable (collision, pos, static_cast <int >(o2::aod::pwgem::dilepton::PID_Label::kElectron ), static_cast <int >(o2::aod::pwgem::dilepton::Track_Type::kSecondary ), false );
631632 }
632633 if (dist01 (engine) < downscaling_electron) {
633- fillTrackTable (collision, neg, static_cast <int >(o2::aod::pwgem::dilepton::PID_Label::kElectron ), static_cast <int >(o2::aod::pwgem::dilepton::Track_Type::kSecondary ));
634+ fillTrackTable (collision, neg, static_cast <int >(o2::aod::pwgem::dilepton::PID_Label::kElectron ), static_cast <int >(o2::aod::pwgem::dilepton::Track_Type::kSecondary ), false );
634635 }
635636 registry.fill (HIST (" V0/hTPCdEdx_P_El" ), neg.p (), neg.tpcSignal ());
636637 registry.fill (HIST (" V0/hTOFbeta_P_El" ), neg.p (), neg.beta ());
@@ -665,10 +666,10 @@ struct TreeCreatorElectronMLDDA {
665666 registry.fill (HIST (" V0/hTOFbeta_P_El" ), pos.p (), pos.beta ());
666667
667668 if (dist01 (engine) < downscaling_electron) {
668- fillTrackTable (collision, neg, static_cast <int >(o2::aod::pwgem::dilepton::PID_Label::kElectron ), static_cast <int >(o2::aod::pwgem::dilepton::Track_Type::kPrimary )); // secondary in primary electron candidates
669+ fillTrackTable (collision, neg, static_cast <int >(o2::aod::pwgem::dilepton::PID_Label::kElectron ), static_cast <int >(o2::aod::pwgem::dilepton::Track_Type::kPrimary ), false ); // secondary in primary electron candidates
669670 }
670671 if (dist01 (engine) < downscaling_electron) {
671- fillTrackTable (collision, pos, static_cast <int >(o2::aod::pwgem::dilepton::PID_Label::kElectron ), static_cast <int >(o2::aod::pwgem::dilepton::Track_Type::kPrimary )); // secondary in primary electron candidates
672+ fillTrackTable (collision, pos, static_cast <int >(o2::aod::pwgem::dilepton::PID_Label::kElectron ), static_cast <int >(o2::aod::pwgem::dilepton::Track_Type::kPrimary ), false ); // secondary in primary electron candidates
672673 }
673674 }
674675 } // end of ULS pair loop
@@ -755,31 +756,20 @@ struct TreeCreatorElectronMLDDA {
755756 registry.fill (HIST (" V0/hTPCdEdx_P_Ka" ), bachelor.p (), bachelor.tpcSignal ());
756757 registry.fill (HIST (" V0/hTOFbeta_P_Ka" ), bachelor.p (), bachelor.beta ());
757758 if (dist01 (engine) < downscaling_kaon) {
758- fillTrackTable (collision, bachelor, static_cast <int >(o2::aod::pwgem::dilepton::PID_Label::kKaon ), static_cast <int >(o2::aod::pwgem::dilepton::Track_Type::kPrimary ));
759+ fillTrackTable (collision, bachelor, static_cast <int >(o2::aod::pwgem::dilepton::PID_Label::kKaon ), static_cast <int >(o2::aod::pwgem::dilepton::Track_Type::kPrimary ), false );
759760 }
760761 }
761762 }
762763 } // end of cascade loop
763764
764- // auto tracks_coll = tracks.sliceBy(perCollision_track, collision.globalIndex());
765- // for (const auto& track : tracks_coll) {
766- // if (!isSelectedTrack(collision, track)) {
767- // continue;
768- // }
769- // registry.fill(HIST("PrimaryTrack/hTPCdEdx_P"), track.p(), track.tpcSignal());
770- // registry.fill(HIST("PrimaryTrack/hTOFbeta_P"), track.p(), track.beta());
771- // registry.fill(HIST("PrimaryTrack/hITSClusterSize_P"), track.p(), meanClusterSizeITS<0, 7>(track) * std::cos(std::atan(track.tgl())));
772- // registry.fill(HIST("PrimaryTrack/hTPCNsigmaEl_P"), track.p(), track.tpcNSigmaEl());
773- // registry.fill(HIST("PrimaryTrack/hTOFNsigmaEl_P"), track.p(), track.tofNSigmaEl());
774- // registry.fill(HIST("PrimaryTrack/hTPCNsigmaMu_P"), track.p(), track.tpcNSigmaMu());
775- // registry.fill(HIST("PrimaryTrack/hTOFNsigmaMu_P"), track.p(), track.tofNSigmaMu());
776- // registry.fill(HIST("PrimaryTrack/hTPCNsigmaPi_P"), track.p(), track.tpcNSigmaPi());
777- // registry.fill(HIST("PrimaryTrack/hTOFNsigmaPi_P"), track.p(), track.tofNSigmaPi());
778- // registry.fill(HIST("PrimaryTrack/hTPCNsigmaKa_P"), track.p(), track.tpcNSigmaKa());
779- // registry.fill(HIST("PrimaryTrack/hTOFNsigmaKa_P"), track.p(), track.tofNSigmaKa());
780- // registry.fill(HIST("PrimaryTrack/hTPCNsigmaPr_P"), track.p(), track.tpcNSigmaPr());
781- // registry.fill(HIST("PrimaryTrack/hTOFNsigmaPr_P"), track.p(), track.tofNSigmaPr());
782- // } // end of track loop
765+ const auto & tracks_coll = tracks.sliceBy (perCollision_track, collision.globalIndex ());
766+ for (const auto & track : tracks_coll) {
767+ if (isSelectedTrack (collision, track) && (v0cuts.cfg_min_TPCNsigmaEl < track.tpcNSigmaEl () && track.tpcNSigmaEl () < v0cuts.cfg_max_TPCNsigmaEl )) {
768+ if (dist01 (engine) < downscaling_track) {
769+ fillTrackTable (collision, track, static_cast <int >(o2::aod::pwgem::dilepton::PID_Label::kUnDef ), static_cast <int >(o2::aod::pwgem::dilepton::Track_Type::kPrimary ), true );
770+ }
771+ }
772+ } // end of track loop
783773
784774 } // end of collision loop
785775 stored_trackIds.clear ();
0 commit comments