Skip to content
Open
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
9 changes: 5 additions & 4 deletions PWGDQ/Core/VarManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -1520,7 +1520,7 @@

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

Check failure on line 1523 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 @@ -1747,7 +1747,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 1750 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 @@ -1772,7 +1772,7 @@
propmuon.setZ(proptrack.getZ());
propmuon.setCovariances(proptrack.getCovariances());

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

Check failure on line 1775 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 @@ -1834,7 +1834,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 1837 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 @@ -2635,7 +2635,7 @@
if (!track.hasTPC()) {
continue; // skip tracks without TPC information
}
if (track.dcaZ() > 998) {

Check failure on line 2638 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 @@ -2723,15 +2723,15 @@
int counter10mm = 0;
for (auto const& d : dcazValues) {
double absD = std::abs(d);
if (absD > 0.01) {

Check failure on line 2726 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 2728 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 2730 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 2732 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) {

Check failure on line 2734 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.
counter2mm++;
if (absD > 0.5) {
counter5mm++;
Expand Down Expand Up @@ -4352,13 +4352,14 @@
values[kWV24ME] = (std::isnan(V22ME) || std::isinf(V22ME) || std::isnan(V24ME) || std::isinf(V24ME)) ? 0. : 1.0;

// coherent Jpsi A2
bool useCoherentJpsiA2 = fgUsedVars[kA2EP_TPC] || fgUsedVars[kA2EP_FT0A] || fgUsedVars[kA2EP_FT0C];
bool useCoherentJpsiA2 = fgUsedVars[kA2EPME_TPC] || fgUsedVars[kA2EPME_FT0A] || fgUsedVars[kA2EPME_FT0C];
if (useCoherentJpsiA2) {
ROOT::Math::Boost boostv12{v12.BoostToCM()};
ROOT::Math::PtEtaPhiMVector v_daughter = boostv12(t1.sign() > 0 ? v1 : v2);
float Psi2A = t1.sign() > 0 ? Psi2A1 : Psi2A2;
float Psi2B = t1.sign() > 0 ? Psi2B1 : Psi2B2;
float Psi2C = t1.sign() > 0 ? Psi2C1 : Psi2C2;
float R2EP = t1.sign() > 0 ? values[kTwoR2EP1] : values[kTwoR2EP2];

// reaction plane
float phi = RecoDecay::constrainAngle(v_daughter.Phi(), -o2::constants::math::PI);
Expand All @@ -4376,9 +4377,9 @@
values[kCos2DeltaPhiME_FT0A] = TMath::Cos(2. * (phi - Psi2B));
values[kCos2DeltaPhiME_FT0C] = TMath::Cos(2. * (phi - Psi2C));

float A2_TPC = values[kCos2DeltaPhiME_TPC] / values[kR2EP];
float A2_FT0A = values[kCos2DeltaPhiME_FT0A] / values[kR2EP];
float A2_FT0C = values[kCos2DeltaPhiME_FT0C] / values[kR2EP];
float A2_TPC = values[kCos2DeltaPhiME_TPC] / R2EP;
float A2_FT0A = values[kCos2DeltaPhiME_FT0A] / R2EP;
float A2_FT0C = values[kCos2DeltaPhiME_FT0C] / R2EP;
values[kA2EPME_TPC] = std::isnan(A2_TPC) || std::isinf(A2_TPC) ? -999. : A2_TPC;
values[kA2EPME_FT0A] = std::isnan(A2_FT0A) || std::isinf(A2_FT0A) ? -999. : A2_FT0A;
values[kA2EPME_FT0C] = std::isnan(A2_FT0C) || std::isinf(A2_FT0C) ? -999. : A2_FT0C;
Expand Down
Loading