Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions PWGEM/Dilepton/Core/DileptonSV.h
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@
pair_dca_axis_title = "DCA_{ee}^{3D} (#sigma)";
if (dielectroncuts.cfgDCAType == 1) {
pair_dca_axis_title = "DCA_{ee}^{XY} (#sigma)";
} else if (dielectroncuts.cfgDCAType == 2) {

Check failure on line 640 in PWGEM/Dilepton/Core/DileptonSV.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
pair_dca_axis_title = "DCA_{ee}^{Z} (#sigma)";
}
} else if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDimuon) {
Expand Down Expand Up @@ -757,7 +757,7 @@
}

// event info
if (nmod == 2) {

Check failure on line 760 in PWGEM/Dilepton/Core/DileptonSV.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
o2::aod::pwgem::dilepton::utils::eventhistogram::addEventHistograms<2>(&fRegistry);
} else {
o2::aod::pwgem::dilepton::utils::eventhistogram::addEventHistograms<-1>(&fRegistry);
Expand Down Expand Up @@ -874,7 +874,7 @@
fDimuonCut.SetMatchingChi2MCHMID(0.f, dimuoncuts.cfg_max_matching_chi2_mchmid);
fDimuonCut.SetDCAxy(0.f, dimuoncuts.cfg_max_dcaxy);
fDimuonCut.SetRabs(dimuoncuts.cfg_min_rabs, dimuoncuts.cfg_max_rabs);
fDimuonCut.SetMaxPDCARabsDep([&](float rabs) { return (rabs < 26.5 ? 594.f : 324.f); });

Check failure on line 877 in PWGEM/Dilepton/Core/DileptonSV.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
fDimuonCut.SetMaxdPtdEtadPhiwrtMCHMID(dimuoncuts.cfg_max_relDPt_wrt_matchedMCHMID, dimuoncuts.cfg_max_DEta_wrt_matchedMCHMID, dimuoncuts.cfg_max_DPhi_wrt_matchedMCHMID); // this is relevant for global muons
fDimuonCut.SetMFTHitMap(dimuoncuts.requireMFTHitMap, dimuoncuts.requiredMFTDisks);
fDimuonCut.EnableTTCA(dimuoncuts.enableTTCA);
Expand All @@ -886,7 +886,7 @@
int ptbin = lower_bound(dielectroncuts.binsMLSCT.value.begin(), dielectroncuts.binsMLSCT.value.end(), track.pt()) - dielectroncuts.binsMLSCT.value.begin() - 1;
if (ptbin < 0) {
ptbin = 0;
} else if (static_cast<int>(dielectroncuts.binsMLSCT.value.size()) - 2 < ptbin) {

Check failure on line 889 in PWGEM/Dilepton/Core/DileptonSV.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
ptbin = static_cast<int>(dielectroncuts.binsMLSCT.value.size()) - 2;
}

Expand All @@ -905,7 +905,7 @@
{
bool is_good = true;
for (const auto& qn : qvectors[nmod]) {
if (std::fabs(qn[0]) > 20.f || std::fabs(qn[1]) > 20.f) {

Check failure on line 908 in PWGEM/Dilepton/Core/DileptonSV.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
is_good = false;
break;
}
Expand Down Expand Up @@ -989,7 +989,7 @@
trackParCov0.getPxPyPzGlo(pvec0);
trackParCov1.getPxPyPzGlo(pvec1);
std::array<float, 3> momDilepton = {pvec0[0] + pvec1[0], pvec0[1] + pvec1[1], pvec0[2] + pvec1[2]};
candidate.cpa = RecoDecay::cpa(pvertex, secondaryVertex, momDilepton);
candidate.cpa = std::clamp(RecoDecay::cpa(pvertex, secondaryVertex, momDilepton), -1.0, std::nextafter(1.0, 0.0));

candidate.lxy = std::sqrt(std::pow(secondaryVertex[0] - collision.posX(), 2) + std::pow(secondaryVertex[1] - collision.posY(), 2));
candidate.lz = secondaryVertex[2] - collision.posZ();
Expand Down Expand Up @@ -1036,7 +1036,7 @@
auto trackParCov0 = mFwdDCAFitter.getTrack(0);
auto trackParCov1 = mFwdDCAFitter.getTrack(1);
std::array<float, 3> momDilepton = {static_cast<float>(trackParCov0.getPx() + trackParCov1.getPx()), static_cast<float>(trackParCov0.getPy() + trackParCov1.getPy()), static_cast<float>(trackParCov0.getPz() + trackParCov1.getPz())};
candidate.cpa = RecoDecay::cpa(pvertex, secondaryVertex, momDilepton);
candidate.cpa = std::clamp(RecoDecay::cpa(pvertex, secondaryVertex, momDilepton), -1.0, std::nextafter(1.0, 0.0));

candidate.lxy = std::sqrt(std::pow(secondaryVertex[0] - collision.posX(), 2) + std::pow(secondaryVertex[1] - collision.posY(), 2));
candidate.lz = secondaryVertex[2] - collision.posZ();
Expand Down Expand Up @@ -1137,7 +1137,7 @@
pair_dca = o2::aod::pwgem::dilepton::utils::pairutil::pairDCAQuadSum(o2::aod::pwgem::dilepton::utils::emtrackutil::dca3DinSigma(t1), o2::aod::pwgem::dilepton::utils::emtrackutil::dca3DinSigma(t2));
if (dielectroncuts.cfgDCAType == 1) {
pair_dca = o2::aod::pwgem::dilepton::utils::pairutil::pairDCAQuadSum(o2::aod::pwgem::dilepton::utils::emtrackutil::dcaXYinSigma(t1), o2::aod::pwgem::dilepton::utils::emtrackutil::dcaXYinSigma(t2));
} else if (dielectroncuts.cfgDCAType == 2) {

Check failure on line 1140 in PWGEM/Dilepton/Core/DileptonSV.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
pair_dca = o2::aod::pwgem::dilepton::utils::pairutil::pairDCAQuadSum(o2::aod::pwgem::dilepton::utils::emtrackutil::dcaZinSigma(t1), o2::aod::pwgem::dilepton::utils::emtrackutil::dcaZinSigma(t2));
}
} else if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDimuon) {
Expand Down Expand Up @@ -1513,7 +1513,7 @@
{q2ft0m, q2ft0a, q2ft0c, q2btot, q2bpos, q2bneg, q2fv0a}, // 2nd harmonics
};

if (nmod == 2) {

Check failure on line 1516 in PWGEM/Dilepton/Core/DileptonSV.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
o2::aod::pwgem::dilepton::utils::eventhistogram::fillEventInfo<0, 2>(&fRegistry, collision);
} else {
o2::aod::pwgem::dilepton::utils::eventhistogram::fillEventInfo<0, -1>(&fRegistry, collision);
Expand Down Expand Up @@ -1571,7 +1571,7 @@
bootstrapweights.push_back(1.0); // to pass as non-empyt dummy to use
}

if (nmod == 2) {

Check failure on line 1574 in PWGEM/Dilepton/Core/DileptonSV.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
o2::aod::pwgem::dilepton::utils::eventhistogram::fillEventInfo<1, 2>(&fRegistry, collision);
} else {
o2::aod::pwgem::dilepton::utils::eventhistogram::fillEventInfo<1, -1>(&fRegistry, collision);
Expand Down Expand Up @@ -1617,14 +1617,14 @@
int zbin = lower_bound(zvtx_bin_edges.begin(), zvtx_bin_edges.end(), collision.posZ()) - zvtx_bin_edges.begin() - 1;
if (zbin < 0) {
zbin = 0;
} else if (static_cast<int>(zvtx_bin_edges.size()) - 2 < zbin) {

Check failure on line 1620 in PWGEM/Dilepton/Core/DileptonSV.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
zbin = static_cast<int>(zvtx_bin_edges.size()) - 2;
}

int centbin = lower_bound(cent_bin_edges.begin(), cent_bin_edges.end(), centrality) - cent_bin_edges.begin() - 1;
if (centbin < 0) {
centbin = 0;
} else if (static_cast<int>(cent_bin_edges.size()) - 2 < centbin) {

Check failure on line 1627 in PWGEM/Dilepton/Core/DileptonSV.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
centbin = static_cast<int>(cent_bin_edges.size()) - 2;
}

Expand Down
4 changes: 2 additions & 2 deletions PWGEM/Dilepton/Core/DileptonSVMC.h
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ struct DileptonSVMC {
trackParCov0.getPxPyPzGlo(pvec0);
trackParCov1.getPxPyPzGlo(pvec1);
std::array<float, 3> momDilepton = {pvec0[0] + pvec1[0], pvec0[1] + pvec1[1], pvec0[2] + pvec1[2]};
candidate.cpa = RecoDecay::cpa(pvertex, secondaryVertex, momDilepton);
candidate.cpa = std::clamp(RecoDecay::cpa(pvertex, secondaryVertex, momDilepton), -1.0, std::nextafter(1.0, 0.0));

candidate.lxy = std::sqrt(std::pow(secondaryVertex[0] - collision.posX(), 2) + std::pow(secondaryVertex[1] - collision.posY(), 2));
candidate.lz = secondaryVertex[2] - collision.posZ();
Expand Down Expand Up @@ -1031,7 +1031,7 @@ struct DileptonSVMC {
auto trackParCov0 = mFwdDCAFitter.getTrack(0);
auto trackParCov1 = mFwdDCAFitter.getTrack(1);
std::array<float, 3> momDilepton = {static_cast<float>(trackParCov0.getPx() + trackParCov1.getPx()), static_cast<float>(trackParCov0.getPy() + trackParCov1.getPy()), static_cast<float>(trackParCov0.getPz() + trackParCov1.getPz())};
candidate.cpa = RecoDecay::cpa(pvertex, secondaryVertex, momDilepton);
candidate.cpa = std::clamp(RecoDecay::cpa(pvertex, secondaryVertex, momDilepton), -1.0, std::nextafter(1.0, 0.0));

candidate.lxy = std::sqrt(std::pow(secondaryVertex[0] - collision.posX(), 2) + std::pow(secondaryVertex[1] - collision.posY(), 2));
candidate.lz = secondaryVertex[2] - collision.posZ();
Expand Down
Loading