Skip to content

Commit dcdf65c

Browse files
authored
[PWGEM/Dilepton] add possibility to require true track-to-collisio association (#9763)
1 parent 37c5189 commit dcdf65c

File tree

6 files changed

+70
-45
lines changed

6 files changed

+70
-45
lines changed

PWGEM/Dilepton/Core/DileptonMC.h

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ struct DileptonMC {
104104
Configurable<bool> cfgApplyWeightTTCA{"cfgApplyWeightTTCA", false, "flag to apply weighting by 1/N"};
105105
Configurable<uint> cfgDCAType{"cfgDCAType", 0, "type of DCA for output. 0:3D, 1:XY, 2:Z, else:3D"};
106106
Configurable<bool> cfgFillUnfolding{"cfgFillUnfolding", false, "flag to fill histograms for unfolding"};
107+
Configurable<bool> cfgRequireTrueAssociation{"cfgRequireTrueAssociation", false, "flag to require true mc collision association"};
107108

108109
ConfigurableAxis ConfMllBins{"ConfMllBins", {VARIABLE_WIDTH, 0.00, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.10, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.20, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.30, 0.31, 0.32, 0.33, 0.34, 0.35, 0.36, 0.37, 0.38, 0.39, 0.40, 0.41, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47, 0.48, 0.49, 0.50, 0.51, 0.52, 0.53, 0.54, 0.55, 0.56, 0.57, 0.58, 0.59, 0.60, 0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68, 0.69, 0.70, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76, 0.77, 0.78, 0.79, 0.80, 0.81, 0.82, 0.83, 0.84, 0.85, 0.86, 0.87, 0.88, 0.89, 0.90, 0.91, 0.92, 0.93, 0.94, 0.95, 0.96, 0.97, 0.98, 0.99, 1.00, 1.01, 1.02, 1.03, 1.04, 1.05, 1.06, 1.07, 1.08, 1.09, 1.10, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.19, 1.20, 1.30, 1.40, 1.50, 1.60, 1.70, 1.80, 1.90, 2.00, 2.10, 2.20, 2.30, 2.40, 2.50, 2.60, 2.70, 2.75, 2.80, 2.85, 2.90, 2.95, 3.00, 3.05, 3.10, 3.15, 3.20, 3.25, 3.30, 3.35, 3.40, 3.45, 3.50, 3.55, 3.60, 3.65, 3.70, 3.75, 3.80, 3.85, 3.90, 3.95, 4.00}, "mll bins for output histograms"};
109110
ConfigurableAxis ConfPtllBins{"ConfPtllBins", {VARIABLE_WIDTH, 0.00, 0.10, 0.20, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80, 0.90, 1.00, 1.10, 1.20, 1.30, 1.40, 1.50, 1.60, 1.70, 1.80, 1.90, 2.00, 2.50, 3.00, 3.50, 4.00, 4.50, 5.00, 6.00, 7.00, 8.00, 9.00, 10.00}, "pTll bins for output histograms"};
@@ -292,7 +293,8 @@ struct DileptonMC {
292293
{
293294
// event info
294295
o2::aod::pwgem::dilepton::utils::eventhistogram::addEventHistograms(&fRegistry);
295-
fRegistry.add("MCEvent/before/hZvtx", "vertex z; Z_{vtx} (cm)", kTH1F, {{100, -50, +50}}, false);
296+
fRegistry.add("MCEvent/before/hZvtx", "mc vertex z; Z_{vtx} (cm)", kTH1F, {{100, -50, +50}}, false);
297+
fRegistry.add("MCEvent/before/hZvtx_rec", "rec. mc vertex z; Z_{vtx} (cm)", kTH1F, {{100, -50, +50}}, false);
296298
fRegistry.addClone("MCEvent/before/", "MCEvent/after/");
297299

298300
std::string mass_axis_title = "m_{ll} (GeV/c^{2})";
@@ -782,7 +784,7 @@ struct DileptonMC {
782784
{
783785
auto t1mc = mcparticles.iteratorAt(t1.emmcparticleId());
784786
auto t2mc = mcparticles.iteratorAt(t2.emmcparticleId());
785-
bool is_from_same_mcevent = t1mc.emmceventId() == t2mc.emmceventId();
787+
bool is_pair_from_same_mcevent = (t1mc.emmceventId() == t2mc.emmceventId());
786788

787789
auto mccollision1 = t1mc.template emmcevent_as<TMCCollisions>();
788790
auto mccollision2 = t2mc.template emmcevent_as<TMCCollisions>();
@@ -913,10 +915,10 @@ struct DileptonMC {
913915
o2::aod::pwgem::dilepton::utils::pairutil::getAngleCS<false>(t1, t2, leptonM1, leptonM2, beamE1, beamE2, beamP1, beamP2, cos_thetaCS, phiCS);
914916
o2::math_utils::bringToPMPi(phiCS);
915917

916-
if ((FindCommonMotherFrom2ProngsWithoutPDG(t1mc, t2mc) > 0 || IsHF(t1mc, t2mc, mcparticles) > 0) && is_from_same_mcevent) { // for bkg study
917-
if (abs(t1mc.pdgCode()) != pdg_lepton || abs(t2mc.pdgCode()) != pdg_lepton) { // hh or eh correlated bkg
918-
if (abs(t1mc.pdgCode()) != pdg_lepton && abs(t2mc.pdgCode()) != pdg_lepton) { // hh correlated bkg
919-
if (t1.sign() * t2.sign() < 0) { // ULS
918+
if ((FindCommonMotherFrom2ProngsWithoutPDG(t1mc, t2mc) > 0 || IsHF(t1mc, t2mc, mcparticles) > 0) && is_pair_from_same_mcevent) { // for bkg study
919+
if (abs(t1mc.pdgCode()) != pdg_lepton || abs(t2mc.pdgCode()) != pdg_lepton) { // hh or eh correlated bkg
920+
if (abs(t1mc.pdgCode()) != pdg_lepton && abs(t2mc.pdgCode()) != pdg_lepton) { // hh correlated bkg
921+
if (t1.sign() * t2.sign() < 0) { // ULS
920922
fRegistry.fill(HIST("Pair/corr_bkg_hh/uls/hs"), v12.M(), v12.Pt(), v12.Rapidity(), dphi, deta, abs(cos_thetaCS), abs(phiCS), aco, asym, abs(dphi_e_ee), pair_dca, weight);
921923
} else if (t1.sign() > 0 && t2.sign() > 0) { // LS++
922924
fRegistry.fill(HIST("Pair/corr_bkg_hh/lspp/hs"), v12.M(), v12.Pt(), v12.Rapidity(), dphi, deta, abs(cos_thetaCS), abs(phiCS), aco, asym, abs(dphi_e_ee), pair_dca, weight);
@@ -947,7 +949,10 @@ struct DileptonMC {
947949
return false;
948950
}
949951

950-
if (!is_from_same_mcevent) {
952+
if (!is_pair_from_same_mcevent) {
953+
return false;
954+
}
955+
if (cfgRequireTrueAssociation && (t1mc.emmceventId() != collision.emmceventId() || t2mc.emmceventId() != collision.emmceventId())) {
951956
return false;
952957
}
953958
int mother_id = FindLF(t1mc, t2mc, mcparticles);
@@ -1254,6 +1259,7 @@ struct DileptonMC {
12541259
if (centralities[cfgCentEstimator] < cfgCentMin || cfgCentMax < centralities[cfgCentEstimator]) {
12551260
continue;
12561261
}
1262+
fRegistry.fill(HIST("MCEvent/before/hZvtx_rec"), mccollision.posZ());
12571263
if (!fEMEventCut.IsSelected(collision)) {
12581264
continue;
12591265
}

PWGEM/Dilepton/Core/SingleTrackQCMC.h

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ struct SingleTrackQCMC {
8787
Configurable<bool> cfgFillQA{"cfgFillQA", false, "flag to fill QA histograms"};
8888
Configurable<bool> cfgApplyWeightTTCA{"cfgApplyWeightTTCA", false, "flag to apply weighting by 1/N"};
8989
Configurable<uint> cfgDCAType{"cfgDCAType", 0, "type of DCA for output. 0:3D, 1:XY, 2:Z, else:3D"};
90+
Configurable<bool> cfgRequireTrueAssociation{"cfgRequireTrueAssociation", false, "flag to require true mc collision association"};
9091

9192
ConfigurableAxis ConfPtlBins{"ConfPtlBins", {VARIABLE_WIDTH, 0.00, 0.05, 0.10, 0.15, 0.20, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80, 0.90, 1.00, 1.10, 1.20, 1.30, 1.40, 1.50, 1.60, 1.70, 1.80, 1.90, 2.00, 2.50, 3.00, 3.50, 4.00, 4.50, 5.00, 6.00, 7.00, 8.00, 9.00, 10.00}, "pTl bins for output histograms"};
9293
ConfigurableAxis ConfDCABins{"ConfDCABins", {VARIABLE_WIDTH, 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0}, "DCA bins for output histograms"};
@@ -221,7 +222,8 @@ struct SingleTrackQCMC {
221222
{
222223
// event info
223224
o2::aod::pwgem::dilepton::utils::eventhistogram::addEventHistograms<-1>(&fRegistry);
224-
fRegistry.add("MCEvent/before/hZvtx", "vertex z; Z_{vtx} (cm)", kTH1F, {{100, -50, +50}}, false);
225+
fRegistry.add("MCEvent/before/hZvtx", "mc vertex z; Z_{vtx} (cm)", kTH1F, {{100, -50, +50}}, false);
226+
fRegistry.add("MCEvent/before/hZvtx_rec", "rec. mc vertex z; Z_{vtx} (cm)", kTH1F, {{100, -50, +50}}, false);
225227
fRegistry.addClone("MCEvent/before/", "MCEvent/after/");
226228

227229
if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDielectron) {
@@ -701,11 +703,6 @@ struct SingleTrackQCMC {
701703
continue;
702704
}
703705

704-
// auto mccollision = collision.template emmcevent_as<TMCCollisions>();
705-
// if (cfgEventGeneratorType >= 0 && mccollision.getSubGeneratorId() != cfgEventGeneratorType) {
706-
// continue;
707-
// }
708-
709706
o2::aod::pwgem::dilepton::utils::eventhistogram::fillEventInfo<0, -1>(&fRegistry, collision);
710707
if (!fEMEventCut.IsSelected(collision)) {
711708
continue;
@@ -731,9 +728,9 @@ struct SingleTrackQCMC {
731728
continue;
732729
}
733730

734-
// if (mctrack.emmceventId() != collision.emmceventId()) {
735-
// continue;
736-
// }
731+
if (cfgRequireTrueAssociation && (mctrack.emmceventId() != collision.emmceventId())) {
732+
continue;
733+
}
737734

738735
if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDielectron) {
739736
if (dielectroncuts.cfg_pid_scheme == static_cast<int>(DielectronCut::PIDSchemes::kPIDML)) {
@@ -811,6 +808,7 @@ struct SingleTrackQCMC {
811808
if (centralities[cfgCentEstimator] < cfgCentMin || cfgCentMax < centralities[cfgCentEstimator]) {
812809
continue;
813810
}
811+
fRegistry.fill(HIST("MCEvent/before/hZvtx_rec"), mccollision.posZ());
814812
if (!fEMEventCut.IsSelected(collision)) {
815813
continue;
816814
}

PWGEM/Dilepton/TableProducer/skimmerPrimaryElectron.cxx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,9 @@ struct skimmerPrimaryElectron {
243243
gpu::gpustd::array<float, 2> dcaInfo;
244244
auto track_par_cov_recalc = getTrackParCov(track);
245245
track_par_cov_recalc.setPID(o2::track::PID::Electron);
246-
std::array<float, 3> pVec_recalc = {0, 0, 0}; // px, py, pz
246+
// std::array<float, 3> pVec_recalc = {0, 0, 0}; // px, py, pz
247247
o2::base::Propagator::Instance()->propagateToDCABxByBz({collision.posX(), collision.posY(), collision.posZ()}, track_par_cov_recalc, 2.f, matCorr, &dcaInfo);
248-
getPxPyPz(track_par_cov_recalc, pVec_recalc);
248+
// getPxPyPz(track_par_cov_recalc, pVec_recalc);
249249
float dcaXY = dcaInfo[0];
250250
float dcaZ = dcaInfo[1];
251251

@@ -315,9 +315,9 @@ struct skimmerPrimaryElectron {
315315
gpu::gpustd::array<float, 2> dcaInfo;
316316
auto track_par_cov_recalc = getTrackParCov(track);
317317
track_par_cov_recalc.setPID(o2::track::PID::Electron);
318-
std::array<float, 3> pVec_recalc = {0, 0, 0}; // px, py, pz
318+
// std::array<float, 3> pVec_recalc = {0, 0, 0}; // px, py, pz
319319
o2::base::Propagator::Instance()->propagateToDCABxByBz({collision.posX(), collision.posY(), collision.posZ()}, track_par_cov_recalc, 2.f, matCorr, &dcaInfo);
320-
getPxPyPz(track_par_cov_recalc, pVec_recalc);
320+
// getPxPyPz(track_par_cov_recalc, pVec_recalc);
321321
float dcaXY = dcaInfo[0];
322322
float dcaZ = dcaInfo[1];
323323

@@ -762,9 +762,9 @@ struct prefilterPrimaryElectron {
762762
gpu::gpustd::array<float, 2> dcaInfo;
763763
auto track_par_cov_recalc = getTrackParCov(track);
764764
track_par_cov_recalc.setPID(o2::track::PID::Electron);
765-
std::array<float, 3> pVec_recalc = {0, 0, 0}; // px, py, pz
765+
// std::array<float, 3> pVec_recalc = {0, 0, 0}; // px, py, pz
766766
o2::base::Propagator::Instance()->propagateToDCABxByBz({collision.posX(), collision.posY(), collision.posZ()}, track_par_cov_recalc, 2.f, matCorr, &dcaInfo);
767-
getPxPyPz(track_par_cov_recalc, pVec_recalc);
767+
// getPxPyPz(track_par_cov_recalc, pVec_recalc);
768768

769769
if (std::fabs(dcaInfo[0]) > max_dcaxy || std::fabs(dcaInfo[1]) > max_dcaz) {
770770
return false;

PWGEM/Dilepton/Tasks/createResolutionMap.cxx

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ struct CreateResolutionMap {
179179
registry.add("Event/Electron/hImpPar_Centrality", "true imapact parameter vs. estimated centrality;impact parameter (fm);centrality (%)", kTH2F, {{200, 0, 20}, {110, 0, 110}}, true);
180180
registry.add("Event/Muon/hImpPar_Centrality", "true imapact parameter vs. estimated centrality;impact parameter (fm);centrality (%)", kTH2F, {{200, 0, 20}, {110, 0, 110}}, true);
181181

182+
registry.add("Electron/hPt", "rec. p_{T,l};p_{T,l} (GeV/c)", kTH1F, {{1000, 0, 10}}, false);
183+
registry.add("Electron/hEtaPhi", "rec. #eta vs. #varphi;#varphi_{l} (rad.);#eta_{l}", kTH2F, {{90, 0, 2 * M_PI}, {80, -2, +2}}, false);
182184
registry.add("Electron/Ptgen_RelDeltaPt", "resolution", kTH2F, {{axis_pt_gen}, {axis_dpt}}, true);
183185
registry.add("Electron/Ptgen_DeltaEta", "resolution", kTH2F, {{axis_pt_gen}, {axis_deta}}, true);
184186
registry.add("Electron/Ptgen_DeltaPhi_Pos", "resolution", kTH2F, {{axis_pt_gen}, {axis_dphi}}, true);
@@ -469,6 +471,8 @@ struct CreateResolutionMap {
469471
}
470472

471473
if (muon.trackType() == static_cast<uint8_t>(o2::aod::fwdtrack::ForwardTrackTypeEnum::MuonStandaloneTrack)) {
474+
registry.fill(HIST("StandaloneMuon/hPt"), pt);
475+
registry.fill(HIST("StandaloneMuon/hEtaPhi"), phi, eta);
472476
registry.fill(HIST("StandaloneMuon/hs_reso"), centrality, mcparticle.pt(), mcparticle.eta(), mcparticle.phi(), -mcparticle.pdgCode() / 13, (mcparticle.pt() - pt) / mcparticle.pt(), mcparticle.eta() - eta, mcparticle.phi() - phi);
473477
registry.fill(HIST("StandaloneMuon/Ptgen_RelDeltaPt"), mcparticle.pt(), (mcparticle.pt() - pt) / mcparticle.pt());
474478
registry.fill(HIST("StandaloneMuon/Ptgen_DeltaEta"), mcparticle.pt(), mcparticle.eta() - eta);
@@ -478,6 +482,8 @@ struct CreateResolutionMap {
478482
registry.fill(HIST("StandaloneMuon/Ptgen_DeltaPhi_Neg"), mcparticle.pt(), mcparticle.phi() - phi);
479483
}
480484
} else if (muon.trackType() == static_cast<uint8_t>(o2::aod::fwdtrack::ForwardTrackTypeEnum::GlobalMuonTrack)) {
485+
registry.fill(HIST("GlobalMuon/hPt"), pt);
486+
registry.fill(HIST("GlobalMuon/hEtaPhi"), phi, eta);
481487
registry.fill(HIST("GlobalMuon/hs_reso"), centrality, mcparticle.pt(), mcparticle.eta(), mcparticle.phi(), -mcparticle.pdgCode() / 13, (mcparticle.pt() - pt) / mcparticle.pt(), mcparticle.eta() - eta, mcparticle.phi() - phi);
482488
registry.fill(HIST("GlobalMuon/Ptgen_RelDeltaPt"), mcparticle.pt(), (mcparticle.pt() - pt) / mcparticle.pt());
483489
registry.fill(HIST("GlobalMuon/Ptgen_DeltaEta"), mcparticle.pt(), mcparticle.eta() - eta);
@@ -521,13 +527,27 @@ struct CreateResolutionMap {
521527
return;
522528
}
523529

524-
registry.fill(HIST("Electron/hs_reso"), centrality, mcparticle.pt(), mcparticle.eta(), mcparticle.phi(), -mcparticle.pdgCode() / 11, (mcparticle.pt() - track.pt()) / mcparticle.pt(), mcparticle.eta() - track.eta(), mcparticle.phi() - track.phi());
525-
registry.fill(HIST("Electron/Ptgen_RelDeltaPt"), mcparticle.pt(), (mcparticle.pt() - track.pt()) / mcparticle.pt());
526-
registry.fill(HIST("Electron/Ptgen_DeltaEta"), mcparticle.pt(), mcparticle.eta() - track.eta());
530+
gpu::gpustd::array<float, 2> dcaInfo;
531+
auto track_par_cov_recalc = getTrackParCov(track);
532+
track_par_cov_recalc.setPID(o2::track::PID::Electron);
533+
// std::array<float, 3> pVec_recalc = {0, 0, 0}; // px, py, pz
534+
o2::base::Propagator::Instance()->propagateToDCABxByBz({collision.posX(), collision.posY(), collision.posZ()}, track_par_cov_recalc, 2.f, matCorr, &dcaInfo);
535+
// getPxPyPz(track_par_cov_recalc, pVec_recalc);
536+
537+
float pt = track_par_cov_recalc.getPt();
538+
float eta = track_par_cov_recalc.getEta();
539+
float phi = track_par_cov_recalc.getPhi();
540+
o2::math_utils::bringTo02Pi(phi);
541+
542+
registry.fill(HIST("Electron/hPt"), pt);
543+
registry.fill(HIST("Electron/hEtaPhi"), phi, eta);
544+
registry.fill(HIST("Electron/hs_reso"), centrality, mcparticle.pt(), mcparticle.eta(), mcparticle.phi(), -mcparticle.pdgCode() / 11, (mcparticle.pt() - pt) / mcparticle.pt(), mcparticle.eta() - eta, mcparticle.phi() - phi);
545+
registry.fill(HIST("Electron/Ptgen_RelDeltaPt"), mcparticle.pt(), (mcparticle.pt() - pt) / mcparticle.pt());
546+
registry.fill(HIST("Electron/Ptgen_DeltaEta"), mcparticle.pt(), mcparticle.eta() - eta);
527547
if (mcparticle.pdgCode() == -11) { // positron
528-
registry.fill(HIST("Electron/Ptgen_DeltaPhi_Pos"), mcparticle.pt(), mcparticle.phi() - track.phi());
548+
registry.fill(HIST("Electron/Ptgen_DeltaPhi_Pos"), mcparticle.pt(), mcparticle.phi() - phi);
529549
} else if (mcparticle.pdgCode() == 11) { // electron
530-
registry.fill(HIST("Electron/Ptgen_DeltaPhi_Neg"), mcparticle.pt(), mcparticle.phi() - track.phi());
550+
registry.fill(HIST("Electron/Ptgen_DeltaPhi_Neg"), mcparticle.pt(), mcparticle.phi() - phi);
531551
}
532552
}
533553

PWGEM/PhotonMeson/Core/V0PhotonCut.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ class V0PhotonCut : public TNamed
288288
return v0.chiSquareNDF() <= mMaxChi2KF;
289289

290290
case V0PhotonCuts::kRZLine:
291-
return v0.v0radius() > abs(v0.vz()) * std::tan(2 * std::atan(std::exp(-mMaxV0Eta))) - mMaxMarginZ;
291+
return v0.v0radius() > std::fabs(v0.vz()) * std::tan(2 * std::atan(std::exp(-mMaxV0Eta))) - mMaxMarginZ;
292292

293293
case V0PhotonCuts::kOnWwireIB: {
294294
const float margin_xy = 1.0; // cm
@@ -297,9 +297,9 @@ class V0PhotonCut : public TNamed
297297
// const float rxy_max = 14.846; // cm
298298
// const float z_min = -17.56; // cm
299299
// const float z_max = +31.15; // cm
300-
float x = abs(v0.vx()); // cm, measured secondary vertex of gamma->ee
301-
float y = v0.vy(); // cm, measured secondary vertex of gamma->ee
302-
float z = v0.vz(); // cm, measured secondary vertex of gamma->ee
300+
float x = std::fabs(v0.vx()); // cm, measured secondary vertex of gamma->ee
301+
float y = v0.vy(); // cm, measured secondary vertex of gamma->ee
302+
float z = v0.vz(); // cm, measured secondary vertex of gamma->ee
303303

304304
float rxy = sqrt(x * x + y * y);
305305
if (rxy < 7.0 || 14.0 < rxy) {
@@ -311,7 +311,7 @@ class V0PhotonCut : public TNamed
311311
return false;
312312
}
313313

314-
float dxy = abs(1.0 * y - x * std::tan(-8.52 * TMath::DegToRad())) / sqrt(pow(1.0, 2) + pow(std::tan(-8.52 * TMath::DegToRad()), 2));
314+
float dxy = std::fabs(1.0 * y - x * std::tan(-8.52 * TMath::DegToRad())) / sqrt(pow(1.0, 2) + pow(std::tan(-8.52 * TMath::DegToRad()), 2));
315315
return !(dxy > margin_xy);
316316
}
317317
case V0PhotonCuts::kOnWwireOB: {
@@ -371,10 +371,10 @@ class V0PhotonCut : public TNamed
371371
return track.tpcNSigmaPi() >= mMinTPCNsigmaPi && track.tpcNSigmaPi() <= mMaxTPCNsigmaPi;
372372

373373
case V0PhotonCuts::kDCAxy:
374-
return abs(track.dcaXY()) <= ((mMaxDcaXYPtDep) ? mMaxDcaXYPtDep(track.pt()) : mMaxDcaXY);
374+
return std::fabs(track.dcaXY()) <= ((mMaxDcaXYPtDep) ? mMaxDcaXYPtDep(track.pt()) : mMaxDcaXY);
375375

376376
case V0PhotonCuts::kDCAz:
377-
return abs(track.dcaZ()) <= mMaxDcaZ;
377+
return std::fabs(track.dcaZ()) <= mMaxDcaZ;
378378

379379
case V0PhotonCuts::kITSNCls:
380380
return mMinNClustersITS <= track.itsNCls() && track.itsNCls() <= mMaxNClustersITS;
@@ -397,13 +397,13 @@ class V0PhotonCut : public TNamed
397397
// if (abs(track.y()) > abs(track.x() * TMath::Tan(10.f * TMath::DegToRad())) + 15.f) {
398398
// return false;
399399
// }
400-
if (track.x() < 0.1 && abs(track.y()) > 15.f) {
400+
if (track.x() < 0.1 && std::fabs(track.y()) > 15.f) {
401401
return false;
402402
}
403-
if (track.x() > 82.9 && abs(track.y()) > abs(track.x() * std::tan(10.f * TMath::DegToRad())) + 5.f) {
403+
if (track.x() > 82.9 && std::fabs(track.y()) > std::fabs(track.x() * std::tan(10.f * TMath::DegToRad())) + 5.f) {
404404
return false;
405405
}
406-
if (track.x() > 82.9 && abs(track.y()) < 15.0 && abs(abs(track.z()) - 44.5) < 2.5) {
406+
if (track.x() > 82.9 && std::fabs(track.y()) < 15.0 && abs(abs(track.z()) - 44.5) < 2.5) {
407407
return false;
408408
}
409409
return true;

0 commit comments

Comments
 (0)