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

Check failure on line 287 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 @@ -292,7 +292,7 @@
cosAngle2 /= modulus2;
sinAngle2 /= modulus2;
length2 = trcCircle.rC * TMath::ACos(cosAngle2);
length2 *= sqrt(1.0f + track.getTgl() * track.getTgl());

Check failure on line 295 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 @@ -330,7 +330,7 @@
float findInterceptLength(o2::track::TrackPar track, float magneticField)
{
float length = 1e+6;
for (int iSeg = 0; iSeg < 18; iSeg++) {

Check failure on line 333 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 @@ -344,7 +344,7 @@
length = thisLength;
}
}
if (length > 1e+5)

Check failure on line 347 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 @@ -550,10 +550,10 @@
}

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

Check failure on line 553 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 556 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 556 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 @@ -618,39 +618,39 @@
if (!hSigmaPosK0Pi || !hSigmaNegK0Pi || !hSigmaPosLaPi || !hSigmaPosLaPr || !hSigmaNegLaPi || !hSigmaNegLaPr) {
LOG(info) << "Problems finding sigma histograms!";
}
}

if (calculateCascades.value) {
hMeanPosXiPi = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hMeanPosXiPi"));
hMeanPosXiPr = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hMeanPosXiPr"));
hMeanNegXiPi = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hMeanNegXiPi"));
hMeanNegXiPr = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hMeanNegXiPr"));
hMeanBachXiPi = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hMeanBachXiPi"));
hMeanPosOmPi = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hMeanPosOmPi"));
hMeanPosOmPr = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hMeanPosOmPr"));
hMeanNegOmPi = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hMeanNegOmPi"));
hMeanNegOmPr = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hMeanNegOmPr"));
hMeanBachOmKa = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hMeanBachOmKa"));

hSigmaPosXiPi = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hSigmaPosXiPi"));
hSigmaPosXiPr = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hSigmaPosXiPr"));
hSigmaNegXiPi = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hSigmaNegXiPi"));
hSigmaNegXiPr = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hSigmaNegXiPr"));
hSigmaBachXiPi = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hSigmaBachXiPi"));
hSigmaPosOmPi = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hSigmaPosOmPi"));
hSigmaPosOmPr = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hSigmaPosOmPr"));
hSigmaNegOmPi = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hSigmaNegOmPi"));
hSigmaNegOmPr = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hSigmaNegOmPr"));
hSigmaBachOmKa = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hSigmaBachOmKa"));

if (!hMeanPosXiPi || !hMeanPosXiPr || !hMeanNegXiPi || !hMeanNegXiPr || !hMeanBachXiPi)
LOG(info) << "Problems finding xi mean histograms!";
if (!hMeanPosOmPi || !hMeanPosOmPr || !hMeanNegOmPi || !hMeanNegOmPr || !hMeanBachOmKa)
LOG(info) << "Problems finding omega sigma histograms!";
if (!hSigmaPosXiPi || !hSigmaPosXiPr || !hSigmaNegXiPi || !hSigmaNegXiPr || !hSigmaBachXiPi)
LOG(info) << "Problems finding xi sigma histograms!";
if (!hSigmaPosOmPi || !hSigmaPosOmPr || !hSigmaNegOmPi || !hSigmaNegOmPr || !hSigmaBachOmKa)
LOG(info) << "Problems finding omega sigma histograms!";
}
if (calculateCascades.value) {
hMeanPosXiPi = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hMeanPosXiPi"));
hMeanPosXiPr = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hMeanPosXiPr"));
hMeanNegXiPi = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hMeanNegXiPi"));
hMeanNegXiPr = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hMeanNegXiPr"));
hMeanBachXiPi = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hMeanBachXiPi"));
hMeanPosOmPi = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hMeanPosOmPi"));
hMeanPosOmPr = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hMeanPosOmPr"));
hMeanNegOmPi = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hMeanNegOmPi"));
hMeanNegOmPr = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hMeanNegOmPr"));
hMeanBachOmKa = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hMeanBachOmKa"));

hSigmaPosXiPi = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hSigmaPosXiPi"));
hSigmaPosXiPr = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hSigmaPosXiPr"));
hSigmaNegXiPi = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hSigmaNegXiPi"));
hSigmaNegXiPr = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hSigmaNegXiPr"));
hSigmaBachXiPi = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hSigmaBachXiPi"));
hSigmaPosOmPi = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hSigmaPosOmPi"));
hSigmaPosOmPr = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hSigmaPosOmPr"));
hSigmaNegOmPi = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hSigmaNegOmPi"));
hSigmaNegOmPr = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hSigmaNegOmPr"));
hSigmaBachOmKa = reinterpret_cast<TH1*>(nSigmaCalibObjects->FindObject("hSigmaBachOmKa"));

if (!hMeanPosXiPi || !hMeanPosXiPr || !hMeanNegXiPi || !hMeanNegXiPr || !hMeanBachXiPi)
LOG(info) << "Problems finding xi mean histograms!";
if (!hMeanPosOmPi || !hMeanPosOmPr || !hMeanNegOmPi || !hMeanNegOmPr || !hMeanBachOmKa)
LOG(info) << "Problems finding omega sigma histograms!";
if (!hSigmaPosXiPi || !hSigmaPosXiPr || !hSigmaNegXiPi || !hSigmaNegXiPr || !hSigmaBachXiPi)
LOG(info) << "Problems finding xi sigma histograms!";
if (!hSigmaPosOmPi || !hSigmaPosOmPr || !hSigmaNegOmPi || !hSigmaNegOmPr || !hSigmaBachOmKa)
LOG(info) << "Problems finding omega sigma histograms!";
}
}
}
Expand Down Expand Up @@ -805,7 +805,7 @@
float velocityPositivePr, velocityPositivePi, lengthPositive;
velocityPositivePr = velocityPositivePi = lengthPositive = o2::aod::v0data::kNoTOFValue;

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

Check failure on line 808 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 @@ -883,7 +883,7 @@
}
float velocityNegativePr, velocityNegativePi, lengthNegative;
velocityNegativePr = velocityNegativePi = lengthNegative = o2::aod::v0data::kNoTOFValue;
if (nTof.hasTOF && nTof.tofEvTime > -1e+5 && nValidTOF) {

Check failure on line 886 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 @@ -1035,7 +1035,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 1038 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
Loading