Skip to content

Commit ceb5f80

Browse files
authored
[PWGEM/Dilepton] update treeCreatorElectronMLDDA.cxx (#12480)
1 parent bb21c5a commit ceb5f80

File tree

1 file changed

+22
-18
lines changed

1 file changed

+22
-18
lines changed

PWGEM/Dilepton/TableProducer/treeCreatorElectronMLDDA.cxx

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ struct TreeCreatorElectronMLDDA {
207207
Configurable<bool> cfg_includeITSsa{"cfg_includeITSsa", false, "Flag to include ITSsa tracks"};
208208
Configurable<float> cfg_max_pt_itssa{"cfg_max_pt_itssa", 0.15, "mix pt for ITSsa track"};
209209
Configurable<float> cfg_min_qt_strangeness{"cfg_min_qt_strangeness", 0.015, "min qt for Lambda and K0S"};
210+
Configurable<bool> cfg_require_collinearV0{"cfg_require_collinearV0", false, "require collinear V0 for photon conversions"};
210211

211212
Configurable<float> cfg_min_TPCNsigmaEl{"cfg_min_TPCNsigmaEl", -5, "min n sigma e in TPC"};
212213
Configurable<float> cfg_max_TPCNsigmaEl{"cfg_max_TPCNsigmaEl", +5, "max n sigma e in TPC"};
@@ -748,7 +749,7 @@ struct TreeCreatorElectronMLDDA {
748749
Partition<MyTracks> negTracks = o2::aod::track::signed1Pt < 0.f && ncheckbit(aod::track::v001::detectorMap, (uint8_t)o2::aod::track::ITS) == true;
749750
std::vector<uint64_t> stored_trackIds;
750751

751-
void processPID(filteredMyCollisions const& collisions, aod::BCsWithTimestamps const&, filteredV0s const& v0s, filteredCascades const& cascades, MyTracks const& tracks)
752+
void processPID(filteredMyCollisions const& collisions, aod::BCsWithTimestamps const&, filteredV0s const& v0s, filteredCascades const& cascades, MyTracks const& tracks, aod::V0s const&)
752753
{
753754
stored_trackIds.reserve(tracks.size());
754755
for (const auto& collision : collisions) {
@@ -768,6 +769,7 @@ struct TreeCreatorElectronMLDDA {
768769

769770
auto v0s_coll = v0s.sliceBy(perCollision_v0, collision.globalIndex());
770771
for (const auto& v0 : v0s_coll) {
772+
auto o2v0 = v0.template v0_as<aod::V0s>();
771773
auto pos = v0.template posTrack_as<MyTracks>();
772774
auto neg = v0.template negTrack_as<MyTracks>();
773775
// LOGF(info, "v0.globalIndex() = %d, v0.collisionId() = %d, v0.posTrackId() = %d, v0.negTrackId() = %d", v0.globalIndex(), v0.collisionId(), v0.posTrackId(), v0.negTrackId());
@@ -831,25 +833,27 @@ struct TreeCreatorElectronMLDDA {
831833
}
832834
} // end of stangeness
833835

834-
if (isElectronTight(pos) && isElectron(neg)) {
835-
registry.fill(HIST("V0/hMassGamma"), v0.mGamma());
836-
registry.fill(HIST("V0/hMassGamma_Rxy"), v0.v0radius(), v0.mGamma());
837-
if (v0cuts.cfg_min_mass_photon < v0.mGamma() && v0.mGamma() < v0cuts.cfg_max_mass_photon) {
838-
registry.fill(HIST("V0/hXY_Gamma"), v0.x(), v0.y());
839-
fillTrackTable(collision, neg, static_cast<uint8_t>(o2::aod::pwgem::dilepton::ml::PID_Label::kElectron));
840-
registry.fill(HIST("V0/hTPCdEdx_P_El"), neg.tpcInnerParam(), neg.tpcSignal());
841-
registry.fill(HIST("V0/hTOFbeta_P_El"), neg.tpcInnerParam(), neg.beta());
836+
if (!v0cuts.cfg_require_collinearV0 || o2v0.isCollinearV0()) {
837+
if (isElectronTight(pos) && isElectron(neg)) {
838+
registry.fill(HIST("V0/hMassGamma"), v0.mGamma());
839+
registry.fill(HIST("V0/hMassGamma_Rxy"), v0.v0radius(), v0.mGamma());
840+
if (v0cuts.cfg_min_mass_photon < v0.mGamma() && v0.mGamma() < v0cuts.cfg_max_mass_photon) {
841+
registry.fill(HIST("V0/hXY_Gamma"), v0.x(), v0.y());
842+
fillTrackTable(collision, neg, static_cast<uint8_t>(o2::aod::pwgem::dilepton::ml::PID_Label::kElectron));
843+
registry.fill(HIST("V0/hTPCdEdx_P_El"), neg.tpcInnerParam(), neg.tpcSignal());
844+
registry.fill(HIST("V0/hTOFbeta_P_El"), neg.tpcInnerParam(), neg.beta());
845+
}
842846
}
843-
}
844847

845-
if (isElectron(pos) && isElectronTight(neg)) {
846-
registry.fill(HIST("V0/hMassGamma"), v0.mGamma());
847-
registry.fill(HIST("V0/hMassGamma_Rxy"), v0.v0radius(), v0.mGamma());
848-
if (v0cuts.cfg_min_mass_photon < v0.mGamma() && v0.mGamma() < v0cuts.cfg_max_mass_photon) {
849-
registry.fill(HIST("V0/hXY_Gamma"), v0.x(), v0.y());
850-
fillTrackTable(collision, pos, static_cast<uint8_t>(o2::aod::pwgem::dilepton::ml::PID_Label::kElectron));
851-
registry.fill(HIST("V0/hTPCdEdx_P_El"), pos.tpcInnerParam(), pos.tpcSignal());
852-
registry.fill(HIST("V0/hTOFbeta_P_El"), pos.tpcInnerParam(), pos.beta());
848+
if (isElectron(pos) && isElectronTight(neg)) {
849+
registry.fill(HIST("V0/hMassGamma"), v0.mGamma());
850+
registry.fill(HIST("V0/hMassGamma_Rxy"), v0.v0radius(), v0.mGamma());
851+
if (v0cuts.cfg_min_mass_photon < v0.mGamma() && v0.mGamma() < v0cuts.cfg_max_mass_photon) {
852+
registry.fill(HIST("V0/hXY_Gamma"), v0.x(), v0.y());
853+
fillTrackTable(collision, pos, static_cast<uint8_t>(o2::aod::pwgem::dilepton::ml::PID_Label::kElectron));
854+
registry.fill(HIST("V0/hTPCdEdx_P_El"), pos.tpcInnerParam(), pos.tpcSignal());
855+
registry.fill(HIST("V0/hTOFbeta_P_El"), pos.tpcInnerParam(), pos.beta());
856+
}
853857
}
854858
}
855859

0 commit comments

Comments
 (0)