Skip to content
Merged
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
10 changes: 5 additions & 5 deletions PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@
cosAngle1 /= modulus1;
sinAngle1 /= modulus1;
length1 = trcCircle.rC * TMath::ACos(cosAngle1);
length1 *= sqrt(1.0f + track.getTgl() * track.getTgl());

Check failure on line 286 in PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.

modulus2 = std::hypot(interceptX2 - trcCircle.xC, interceptY2 - trcCircle.yC) * std::hypot(startPoint[0] - trcCircle.xC, startPoint[1] - trcCircle.yC);
cosAngle2 = (interceptX2 - trcCircle.xC) * (startPoint[0] - trcCircle.xC) + (interceptY2 - trcCircle.yC) * (startPoint[1] - trcCircle.yC);
Expand All @@ -291,7 +291,7 @@
cosAngle2 /= modulus2;
sinAngle2 /= modulus2;
length2 = trcCircle.rC * TMath::ACos(cosAngle2);
length2 *= sqrt(1.0f + track.getTgl() * track.getTgl());

Check failure on line 294 in PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.

// rotate transverse momentum vector such that it is at intercepts
float angle1 = TMath::ACos(cosAngle1);
Expand Down Expand Up @@ -329,7 +329,7 @@
float findInterceptLength(o2::track::TrackPar track, float magneticField)
{
float length = 1e+6;
for (int iSeg = 0; iSeg < 18; iSeg++) {

Check failure on line 332 in PWGLF/TableProducer/Strangeness/strangenesstofpid.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.
// Detector segmentation loop
float segmentAngle = 20.0f / 180.0f * TMath::Pi();
float theta = static_cast<float>(iSeg) * 20.0f / 180.0f * TMath::Pi();
Expand All @@ -343,7 +343,7 @@
length = thisLength;
}
}
if (length > 1e+5)

Check failure on line 346 in PWGLF/TableProducer/Strangeness/strangenesstofpid.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.
length = -100; // force negative to avoid misunderstandings
return length;
}
Expand Down Expand Up @@ -545,10 +545,10 @@
}

// In case override, don't proceed, please - no CCDB access required
if (propagationConfiguration.d_bz_input > -990) {

Check failure on line 548 in PWGLF/TableProducer/Strangeness/strangenesstofpid.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.
d_bz = propagationConfiguration.d_bz_input;
o2::parameters::GRPMagField grpmag;
if (fabs(d_bz) > 1e-5) {

Check failure on line 551 in PWGLF/TableProducer/Strangeness/strangenesstofpid.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.

Check failure on line 551 in PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
grpmag.setL3Current(30000.f / (d_bz / 5.0f));
}
o2::base::Propagator::initFieldFromGRP(&grpmag);
Expand Down Expand Up @@ -792,15 +792,15 @@
std::abs(pTof.tpcNSigmaPi) < v0Group.qaTPCNSigma &&
std::abs(nTof.tpcNSigmaPi) < v0Group.qaTPCNSigma;

bool pValidTOF = rejectUndefinedTof.value ? static_cast<bool>(std::fabs(pTof.tofSignal)>o2::aod::v0data::kEpsilon) : true;
bool nValidTOF = rejectUndefinedTof.value ? static_cast<bool>(std::fabs(nTof.tofSignal)>o2::aod::v0data::kEpsilon) : true;
bool pValidTOF = rejectUndefinedTof.value ? static_cast<bool>(std::fabs(pTof.tofSignal) > o2::aod::v0data::kEpsilon) : true;
bool nValidTOF = rejectUndefinedTof.value ? static_cast<bool>(std::fabs(nTof.tofSignal) > o2::aod::v0data::kEpsilon) : true;

//_____________________________________________________________________________________________
// Actual calculation
float velocityPositivePr, velocityPositivePi, lengthPositive;
velocityPositivePr = velocityPositivePi = lengthPositive = o2::aod::v0data::kNoTOFValue;

if (pTof.hasTOF && pTof.hasITS && pTof.tofEvTime > -1e+5 && pValidTOF) {

Check failure on line 803 in PWGLF/TableProducer/Strangeness/strangenesstofpid.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.
// method 0: legacy standalone without use of primary particle TOF
if (calculationMethod.value == 0) {
velocityPositivePr = velocity(posTrack.getP(), o2::constants::physics::MassProton);
Expand Down Expand Up @@ -876,7 +876,7 @@
}
float velocityNegativePr, velocityNegativePi, lengthNegative;
velocityNegativePr = velocityNegativePi = lengthNegative = o2::aod::v0data::kNoTOFValue;
if (nTof.hasTOF && nTof.hasITS && nTof.tofEvTime > -1e+5 && nValidTOF) {

Check failure on line 879 in PWGLF/TableProducer/Strangeness/strangenesstofpid.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.
// method 0: legacy standalone without use of primary particle TOF
if (calculationMethod.value == 0) {
velocityNegativePr = velocity(negTrack.getP(), o2::constants::physics::MassProton);
Expand Down Expand Up @@ -1026,7 +1026,7 @@
// d3d = std::hypot(cascade.x() - cascCloseToPVPosition[0], cascade.y() - cascCloseToPVPosition[1], cascade.z() - cascCloseToPVPosition[2]); // cross-check variable
float sinThetaOverTwo = d / (2.0f * trcCircleCascade.rC);
lengthCascade = 2.0f * trcCircleCascade.rC * TMath::ASin(sinThetaOverTwo);
lengthCascade *= sqrt(1.0f + cascTrack.getTgl() * cascTrack.getTgl());

Check failure on line 1029 in PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
}

if (!successPropag) {
Expand Down Expand Up @@ -1062,9 +1062,9 @@
std::abs(nTof.tpcNSigmaPr) < cascadeGroup.qaTPCNSigma &&
std::abs(bTof.tpcNSigmaKa) < cascadeGroup.qaTPCNSigma;

bool pValidTOF = rejectUndefinedTof.value ? static_cast<bool>(std::fabs(pTof.tofSignal)>o2::aod::v0data::kEpsilon) : true;
bool nValidTOF = rejectUndefinedTof.value ? static_cast<bool>(std::fabs(nTof.tofSignal)>o2::aod::v0data::kEpsilon) : true;
bool bValidTOF = rejectUndefinedTof.value ? static_cast<bool>(std::fabs(bTof.tofSignal)>o2::aod::v0data::kEpsilon) : true;
bool pValidTOF = rejectUndefinedTof.value ? static_cast<bool>(std::fabs(pTof.tofSignal) > o2::aod::v0data::kEpsilon) : true;
bool nValidTOF = rejectUndefinedTof.value ? static_cast<bool>(std::fabs(nTof.tofSignal) > o2::aod::v0data::kEpsilon) : true;
bool bValidTOF = rejectUndefinedTof.value ? static_cast<bool>(std::fabs(bTof.tofSignal) > o2::aod::v0data::kEpsilon) : true;

//_____________________________________________________________________________________________
// Actual calculation
Expand Down
Loading