Skip to content
Draft
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
5 changes: 0 additions & 5 deletions PWGDQ/Core/CutsLibrary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5988,7 +5988,7 @@
if (icase == 0) {
cut->AddCut(VarManager::kTPCnSigmaEl, -4., 4., false, VarManager::kPin, 0.0, 1e+10, false);
cut->AddCut(VarManager::kTPCnSigmaPi, -99., 2.5, true, VarManager::kPin, 0.0, 1e+10, false);
} else if (icase == 1 || icase == 2) {

Check failure on line 5991 in PWGDQ/Core/CutsLibrary.cxx

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.
cut->AddCut(VarManager::kTPCnSigmaEl_Corr, -4., 4., false, VarManager::kPin, 0.0, 1e+10, false);
cut->AddCut(VarManager::kTPCnSigmaPi_Corr, -99., 2.5, true, VarManager::kPin, 0.0, 1e+10, false);
}
Expand Down Expand Up @@ -7351,11 +7351,6 @@
return cut;
}

if (nameStr == "alice3oTOFPIDEl") {
cut->AddCut(VarManager::kOuterTOFnSigmaEl, -3.0, 3.0);
return cut;
}

if (nameStr == "alice3oTOFPIDPi") {
cut->AddCut(VarManager::kOuterTOFnSigmaPi, -3.0, 3.0);
return cut;
Expand Down
26 changes: 0 additions & 26 deletions PWGDQ/Core/VarManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -1524,7 +1524,7 @@

static void SetCalibrationType(int type, bool useInterpolation = true)
{
if (type < 0 || type > 2) {

Check failure on line 1527 in PWGDQ/Core/VarManager.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.
LOG(fatal) << "Invalid calibration type. Must be 0, 1, or 2.";
}
fgCalibrationType = type;
Expand Down Expand Up @@ -1757,7 +1757,7 @@
{
o2::track::TrackParCovFwd fwdtrack = o2::aod::fwdtrackutils::getTrackParCovFwdShift(muon, fgzShiftFwd, muon);
o2::dataformats::GlobalFwdTrack propmuon;
if (static_cast<int>(muon.trackType()) > 2) {

Check failure on line 1760 in PWGDQ/Core/VarManager.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::dataformats::GlobalFwdTrack track;
track.setParameters(fwdtrack.getParameters());
track.setZ(fwdtrack.getZ());
Expand All @@ -1782,7 +1782,7 @@
propmuon.setZ(proptrack.getZ());
propmuon.setCovariances(proptrack.getCovariances());

} else if (static_cast<int>(muon.trackType()) < 2) {

Check failure on line 1785 in PWGDQ/Core/VarManager.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.
std::array<double, 3> dcaInfOrig{999.f, 999.f, 999.f};
fwdtrack.propagateToDCAhelix(fgMagField, {collision.posX(), collision.posY(), collision.posZ()}, dcaInfOrig);
propmuon.setParameters(fwdtrack.getParameters());
Expand Down Expand Up @@ -1844,7 +1844,7 @@

// Redo propagation only for muon tracks
// propagation of MFT tracks alredy done in fwdtrack-extention task
if (static_cast<int>(muon.trackType()) > 2) {

Check failure on line 1847 in PWGDQ/Core/VarManager.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::dataformats::GlobalFwdTrack propmuonAtDCA = PropagateMuon(muon, collision, kToDCA);
o2::dataformats::GlobalFwdTrack propmuonAtRabs = PropagateMuon(muon, collision, kToRabs);
float dcaX = (propmuonAtDCA.getX() - collision.posX());
Expand Down Expand Up @@ -2645,7 +2645,7 @@
if (!track.hasTPC()) {
continue; // skip tracks without TPC information
}
if (track.dcaZ() > 998) {

Check failure on line 2648 in PWGDQ/Core/VarManager.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.
continue; // skip tracks without valid DCAz
}
dcazValues.push_back(track.dcaZ());
Expand Down Expand Up @@ -2733,13 +2733,13 @@
int counter10mm = 0;
for (auto const& d : dcazValues) {
double absD = std::abs(d);
if (absD > 0.01) {

Check failure on line 2736 in PWGDQ/Core/VarManager.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.
counter100um++;
if (absD > 0.02) {

Check failure on line 2738 in PWGDQ/Core/VarManager.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.
counter200um++;
if (absD > 0.05) {

Check failure on line 2740 in PWGDQ/Core/VarManager.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.
counter500um++;
if (absD > 0.1) {

Check failure on line 2742 in PWGDQ/Core/VarManager.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.
counter1mm++;
if (absD > 0.2) {
counter2mm++;
Expand Down Expand Up @@ -7336,10 +7336,6 @@
m2 = o2::constants::physics::MassPionCharged;
}

if constexpr (pairType == kElectronMuon) {
m2 = o2::constants::physics::MassMuon;
}

values[kCharge] = t1.sign() + t2.sign();
values[kCharge1] = t1.sign();
values[kCharge2] = t2.sign();
Expand All @@ -7349,7 +7345,6 @@
values[kMass] = v12.M();
values[kPt] = v12.Pt();
values[kEta] = v12.Eta();
// values[kPhi] = v12.Phi();
values[kPhi] = RecoDecay::constrainAngle(v12.Phi());
values[kRap] = -v12.Rapidity();
double Ptot1 = TMath::Sqrt(v1.Px() * v1.Px() + v1.Py() * v1.Py() + v1.Pz() * v1.Pz());
Expand Down Expand Up @@ -7523,17 +7518,6 @@
}
}
}
if constexpr ((pairType == kDecayToMuMu) && ((fillMap & Muon) > 0 || (fillMap & ReducedMuon) > 0)) {
if (fgUsedVars[kQuadDCAabsXY]) {
double dca1X = t1.fwdDcaX();
double dca1Y = t1.fwdDcaY();
double dca1XY = std::sqrt(dca1X * dca1X + dca1Y * dca1Y);
double dca2X = t2.fwdDcaX();
double dca2Y = t2.fwdDcaY();
double dca2XY = std::sqrt(dca2X * dca2X + dca2Y * dca2Y);
values[kQuadDCAabsXY] = std::sqrt((dca1XY * dca1XY + dca2XY * dca2XY) / 2.);
}
}
if (fgUsedVars[kPairPhiv]) {
values[kPairPhiv] = calculatePhiV<pairType>(t1, t2);
}
Expand All @@ -7558,7 +7542,6 @@
// check at compile time that the event and cov matrix have the cov matrix
constexpr bool eventHasVtxCov = ((collFillMap & Collision) > 0 || (collFillMap & ReducedEventVtxCov) > 0);
constexpr bool trackHasCov = ((fillMap & TrackCov) > 0 || (fillMap & ReducedTrackBarrelCov) > 0);
constexpr bool muonHasCov = ((fillMap & MuonCov) > 0 || (fillMap & ReducedMuonCov) > 0);

if (!values) {
values = fgValues;
Expand All @@ -7569,10 +7552,6 @@
m1 = o2::constants::physics::MassKaonCharged;
m2 = o2::constants::physics::MassPionCharged;
}
if constexpr (pairType == kDecayToMuMu && muonHasCov) {
m1 = o2::constants::physics::MassMuon;
m2 = o2::constants::physics::MassMuon;
}
ROOT::Math::PtEtaPhiMVector v1(t1.pt(), t1.eta(), t1.phi(), m1);
ROOT::Math::PtEtaPhiMVector v2(t2.pt(), t2.eta(), t2.phi(), m2);
ROOT::Math::PtEtaPhiMVector v12 = v1 + v2;
Expand All @@ -7597,11 +7576,6 @@
t2.c1PtY(), t2.c1PtZ(), t2.c1PtSnp(), t2.c1PtTgl(), t2.c1Pt21Pt2()};
o2::track::TrackParCov pars2{t2.x(), t2.alpha(), t2pars, t2covs};
procCode = fgFitterTwoProngBarrel.process(pars1, pars2);
} else if constexpr ((pairType == kDecayToMuMu) && muonHasCov) {
// Initialize track parameters for forward
o2::track::TrackParCovFwd pars1 = FwdToTrackPar(t1, t1);
o2::track::TrackParCovFwd pars2 = FwdToTrackPar(t2, t2);
procCode = fgFitterTwoProngFwd.process(pars1, pars2);
} else {
return;
}
Expand Down
Loading
Loading