@@ -211,6 +211,7 @@ struct TreeCreatorElectronMLDDA {
211211 Configurable<bool > cfg_includeITSsa{" cfg_includeITSsa" , false , " Flag to include ITSsa tracks" };
212212 Configurable<float > cfg_max_pt_itssa{" cfg_max_pt_itssa" , 0.15 , " mix pt for ITSsa track" };
213213 Configurable<float > cfg_min_qt_strangeness{" cfg_min_qt_strangeness" , 0.015 , " min qt for Lambda and K0S" };
214+ Configurable<bool > requireTOF_for_tagging{" requireTOF_for_tagging" , false , " flag to require TOF for tagging 1 leg from V0" };
214215
215216 Configurable<float > cfg_min_TPCNsigmaEl{" cfg_min_TPCNsigmaEl" , -5 , " min n sigma e in TPC" };
216217 Configurable<float > cfg_max_TPCNsigmaEl{" cfg_max_TPCNsigmaEl" , +5 , " max n sigma e in TPC" };
@@ -262,6 +263,7 @@ struct TreeCreatorElectronMLDDA {
262263 Configurable<float > cfg_min_rxy{" cfg_min_rxy" , 0.5 , " minimum V0 rxy in cascade" };
263264 Configurable<float > cfg_min_dcaxy_v0leg{" cfg_min_dcaxy_v0leg" , 0.1 , " min dca XY for v0 legs in cm" };
264265 Configurable<float > cfg_min_dcaxy_bachelor{" cfg_min_dcaxy_bachelor" , 0.1 , " min dca XY for bachelor in cm" };
266+ Configurable<bool > requireTOF_for_tagging{" requireTOF_for_tagging" , false , " flag to require TOF for tagging 1 leg from V0" };
265267 } cascadecuts;
266268
267269 // for RCT
@@ -803,64 +805,76 @@ struct TreeCreatorElectronMLDDA {
803805 if (v0cuts.cfg_min_qt_strangeness < v0.qtarm ()) {
804806 if (!(v0cuts.cfg_min_mass_lambda_veto < v0.mLambda () && v0.mLambda () < v0cuts.cfg_max_mass_lambda_veto ) && !(v0cuts.cfg_min_mass_lambda_veto < v0.mAntiLambda () && v0.mAntiLambda () < v0cuts.cfg_max_mass_lambda_veto )) {
805807 if (isPionTight (pos) && isPion (neg)) {
806- registry.fill (HIST (" V0/hMassK0Short" ), v0.mK0Short ());
807- if (v0cuts.cfg_min_mass_k0s < v0.mK0Short () && v0.mK0Short () < v0cuts.cfg_max_mass_k0s ) {
808- registry.fill (HIST (" V0/hTPCdEdx_P_Pi" ), neg.tpcInnerParam (), neg.tpcSignal ());
809- registry.fill (HIST (" V0/hTOFbeta_P_Pi" ), neg.tpcInnerParam (), neg.beta ());
810- fillTrackTable (collision, neg, static_cast <uint8_t >(o2::aod::pwgem::dilepton::ml::PID_Label::kPion ));
808+ if (!v0cuts.requireTOF_for_tagging || pos.hasTOF ()) {
809+ registry.fill (HIST (" V0/hMassK0Short" ), v0.mK0Short ());
810+ if (v0cuts.cfg_min_mass_k0s < v0.mK0Short () && v0.mK0Short () < v0cuts.cfg_max_mass_k0s ) {
811+ registry.fill (HIST (" V0/hTPCdEdx_P_Pi" ), neg.tpcInnerParam (), neg.tpcSignal ());
812+ registry.fill (HIST (" V0/hTOFbeta_P_Pi" ), neg.tpcInnerParam (), neg.beta ());
813+ fillTrackTable (collision, neg, static_cast <uint8_t >(o2::aod::pwgem::dilepton::ml::PID_Label::kPion ));
814+ }
811815 }
812816 }
813817 if (isPion (pos) && isPionTight (neg)) {
814- registry.fill (HIST (" V0/hMassK0Short" ), v0.mK0Short ());
815- if (v0cuts.cfg_min_mass_k0s < v0.mK0Short () && v0.mK0Short () < v0cuts.cfg_max_mass_k0s ) {
816- registry.fill (HIST (" V0/hTPCdEdx_P_Pi" ), pos.tpcInnerParam (), pos.tpcSignal ());
817- registry.fill (HIST (" V0/hTOFbeta_P_Pi" ), pos.tpcInnerParam (), pos.beta ());
818- fillTrackTable (collision, pos, static_cast <uint8_t >(o2::aod::pwgem::dilepton::ml::PID_Label::kPion ));
818+ if (!v0cuts.requireTOF_for_tagging || neg.hasTOF ()) {
819+ registry.fill (HIST (" V0/hMassK0Short" ), v0.mK0Short ());
820+ if (v0cuts.cfg_min_mass_k0s < v0.mK0Short () && v0.mK0Short () < v0cuts.cfg_max_mass_k0s ) {
821+ registry.fill (HIST (" V0/hTPCdEdx_P_Pi" ), pos.tpcInnerParam (), pos.tpcSignal ());
822+ registry.fill (HIST (" V0/hTOFbeta_P_Pi" ), pos.tpcInnerParam (), pos.beta ());
823+ fillTrackTable (collision, pos, static_cast <uint8_t >(o2::aod::pwgem::dilepton::ml::PID_Label::kPion ));
824+ }
819825 }
820826 }
821- }
827+ } // end of K0S
822828
823829 if (!(v0cuts.cfg_min_mass_k0s_veto < v0.mK0Short () && v0.mK0Short () < v0cuts.cfg_max_mass_k0s_veto )) {
824830 if (isProton (pos) && isPionTight (neg)) {
825- registry.fill (HIST (" V0/hMassLambda" ), v0.mLambda ());
826- if (v0cuts.cfg_min_mass_lambda < v0.mLambda () && v0.mLambda () < v0cuts.cfg_max_mass_lambda ) {
827- fillTrackTable (collision, pos, static_cast <uint8_t >(o2::aod::pwgem::dilepton::ml::PID_Label::kProton ));
828- registry.fill (HIST (" V0/hTPCdEdx_P_Pr" ), pos.tpcInnerParam (), pos.tpcSignal ());
829- registry.fill (HIST (" V0/hTOFbeta_P_Pr" ), pos.tpcInnerParam (), pos.beta ());
831+ if (!v0cuts.requireTOF_for_tagging || neg.hasTOF ()) {
832+ registry.fill (HIST (" V0/hMassLambda" ), v0.mLambda ());
833+ if (v0cuts.cfg_min_mass_lambda < v0.mLambda () && v0.mLambda () < v0cuts.cfg_max_mass_lambda ) {
834+ fillTrackTable (collision, pos, static_cast <uint8_t >(o2::aod::pwgem::dilepton::ml::PID_Label::kProton ));
835+ registry.fill (HIST (" V0/hTPCdEdx_P_Pr" ), pos.tpcInnerParam (), pos.tpcSignal ());
836+ registry.fill (HIST (" V0/hTOFbeta_P_Pr" ), pos.tpcInnerParam (), pos.beta ());
837+ }
830838 }
831- }
839+ } // end of Lambda
832840 if (isPionTight (pos) && isProton (neg)) {
833- registry.fill (HIST (" V0/hMassAntiLambda" ), v0.mAntiLambda ());
834- if (v0cuts.cfg_min_mass_lambda < v0.mAntiLambda () && v0.mAntiLambda () < v0cuts.cfg_max_mass_lambda ) {
835- fillTrackTable (collision, neg, static_cast <uint8_t >(o2::aod::pwgem::dilepton::ml::PID_Label::kProton ));
836- registry.fill (HIST (" V0/hTPCdEdx_P_Pr" ), neg.tpcInnerParam (), neg.tpcSignal ());
837- registry.fill (HIST (" V0/hTOFbeta_P_Pr" ), neg.tpcInnerParam (), neg.beta ());
841+ if (!v0cuts.requireTOF_for_tagging || pos.hasTOF ()) {
842+ registry.fill (HIST (" V0/hMassAntiLambda" ), v0.mAntiLambda ());
843+ if (v0cuts.cfg_min_mass_lambda < v0.mAntiLambda () && v0.mAntiLambda () < v0cuts.cfg_max_mass_lambda ) {
844+ fillTrackTable (collision, neg, static_cast <uint8_t >(o2::aod::pwgem::dilepton::ml::PID_Label::kProton ));
845+ registry.fill (HIST (" V0/hTPCdEdx_P_Pr" ), neg.tpcInnerParam (), neg.tpcSignal ());
846+ registry.fill (HIST (" V0/hTOFbeta_P_Pr" ), neg.tpcInnerParam (), neg.beta ());
847+ }
838848 }
839- }
849+ } // end of AntiLambda
840850 }
841851 } // end of stangeness
842852
843853 if (isElectronTight (pos) && isElectron (neg)) {
844- registry.fill (HIST (" V0/hMassGamma" ), v0.mGamma ());
845- registry.fill (HIST (" V0/hMassGamma_Rxy" ), v0.v0radius (), v0.mGamma ());
846- if (v0cuts.cfg_min_mass_photon < v0.mGamma () && v0.mGamma () < v0cuts.cfg_max_mass_photon ) {
847- registry.fill (HIST (" V0/hXY_Gamma" ), v0.x (), v0.y ());
848- fillTrackTable (collision, neg, static_cast <uint8_t >(o2::aod::pwgem::dilepton::ml::PID_Label::kElectron ));
849- registry.fill (HIST (" V0/hTPCdEdx_P_El" ), neg.tpcInnerParam (), neg.tpcSignal ());
850- registry.fill (HIST (" V0/hTOFbeta_P_El" ), neg.tpcInnerParam (), neg.beta ());
854+ if (!v0cuts.requireTOF_for_tagging || pos.hasTOF ()) {
855+ registry.fill (HIST (" V0/hMassGamma" ), v0.mGamma ());
856+ registry.fill (HIST (" V0/hMassGamma_Rxy" ), v0.v0radius (), v0.mGamma ());
857+ if (v0cuts.cfg_min_mass_photon < v0.mGamma () && v0.mGamma () < v0cuts.cfg_max_mass_photon ) {
858+ registry.fill (HIST (" V0/hXY_Gamma" ), v0.x (), v0.y ());
859+ fillTrackTable (collision, neg, static_cast <uint8_t >(o2::aod::pwgem::dilepton::ml::PID_Label::kElectron ));
860+ registry.fill (HIST (" V0/hTPCdEdx_P_El" ), neg.tpcInnerParam (), neg.tpcSignal ());
861+ registry.fill (HIST (" V0/hTOFbeta_P_El" ), neg.tpcInnerParam (), neg.beta ());
862+ }
851863 }
852- }
864+ } // end of photon conversion
853865
854866 if (isElectron (pos) && isElectronTight (neg)) {
855- registry.fill (HIST (" V0/hMassGamma" ), v0.mGamma ());
856- registry.fill (HIST (" V0/hMassGamma_Rxy" ), v0.v0radius (), v0.mGamma ());
857- if (v0cuts.cfg_min_mass_photon < v0.mGamma () && v0.mGamma () < v0cuts.cfg_max_mass_photon ) {
858- registry.fill (HIST (" V0/hXY_Gamma" ), v0.x (), v0.y ());
859- fillTrackTable (collision, pos, static_cast <uint8_t >(o2::aod::pwgem::dilepton::ml::PID_Label::kElectron ));
860- registry.fill (HIST (" V0/hTPCdEdx_P_El" ), pos.tpcInnerParam (), pos.tpcSignal ());
861- registry.fill (HIST (" V0/hTOFbeta_P_El" ), pos.tpcInnerParam (), pos.beta ());
867+ if (!v0cuts.requireTOF_for_tagging || neg.hasTOF ()) {
868+ registry.fill (HIST (" V0/hMassGamma" ), v0.mGamma ());
869+ registry.fill (HIST (" V0/hMassGamma_Rxy" ), v0.v0radius (), v0.mGamma ());
870+ if (v0cuts.cfg_min_mass_photon < v0.mGamma () && v0.mGamma () < v0cuts.cfg_max_mass_photon ) {
871+ registry.fill (HIST (" V0/hXY_Gamma" ), v0.x (), v0.y ());
872+ fillTrackTable (collision, pos, static_cast <uint8_t >(o2::aod::pwgem::dilepton::ml::PID_Label::kElectron ));
873+ registry.fill (HIST (" V0/hTPCdEdx_P_El" ), pos.tpcInnerParam (), pos.tpcSignal ());
874+ registry.fill (HIST (" V0/hTOFbeta_P_El" ), pos.tpcInnerParam (), pos.beta ());
875+ }
862876 }
863- }
877+ } // end of photon conversion
864878
865879 } // end of v0 loop
866880
@@ -878,10 +892,16 @@ struct TreeCreatorElectronMLDDA {
878892 if (!isProtonTight (pos) || !isPionTight (neg)) {
879893 continue ;
880894 }
895+ if (cascadecuts.requireTOF_for_tagging && !pos.hasTOF ()) { // require TOF to proton candidates. // pion from L is soft. Don't require TOF for soft pions.
896+ continue ;
897+ }
881898 } else { // Omegabar+ -> Lbar + K+ -> pbar + pi+ + K+
882899 if (!isProtonTight (neg) || !isPionTight (pos)) {
883900 continue ;
884901 }
902+ if (cascadecuts.requireTOF_for_tagging && !neg.hasTOF ()) { // require TOF to anti-proton candidates. // pion from L is soft. Don't require TOF for soft pions.
903+ continue ;
904+ }
885905 }
886906
887907 if (!(cascadecuts.cfg_min_mass_lambda < cascade.mLambda () && cascade.mLambda () < cascadecuts.cfg_max_mass_lambda )) {
0 commit comments