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 PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@
#include "ReconstructionDataFormats/PID.h"
#include "ReconstructionDataFormats/Track.h"

#include <string>
#include <vector>
#include <array>
#include <cmath>
#include <cstdlib>
#include <iterator>
#include <map>
#include <string>
#include <utility>
#include <vector>

using namespace o2;
using namespace o2::framework;
Expand Down Expand Up @@ -243,7 +243,7 @@
if (centerDistToPC > trcCircle.rC)
return -103;

float pcaToIntercept = TMath::Sqrt(TMath::Abs(trcCircle.rC * trcCircle.rC - centerDistToPC * centerDistToPC));

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

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.

float interceptX1 = pcaX + (x2 - x1) / segmentModulus * pcaToIntercept;
float interceptY1 = pcaY + (y2 - y1) / segmentModulus * pcaToIntercept;
Expand All @@ -262,23 +262,23 @@
sinAngle1 = (interceptX1 - trcCircle.xC) * (startPoint[1] - trcCircle.yC) - (interceptY1 - trcCircle.yC) * (startPoint[0] - trcCircle.xC);
cosAngle1 /= modulus1;
sinAngle1 /= modulus1;
length1 = trcCircle.rC * TMath::ACos(cosAngle1);

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

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
length1 *= sqrt(1.0f + track.getTgl() * track.getTgl());

Check failure on line 266 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);
sinAngle2 = (interceptX2 - trcCircle.xC) * (startPoint[1] - trcCircle.yC) - (interceptY2 - trcCircle.yC) * (startPoint[0] - trcCircle.xC);
cosAngle2 /= modulus2;
sinAngle2 /= modulus2;
length2 = trcCircle.rC * TMath::ACos(cosAngle2);

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

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
length2 *= sqrt(1.0f + track.getTgl() * track.getTgl());

Check failure on line 274 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);

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

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
if (sinAngle1 < 0)
angle1 *= -1.0f;
float px1 = +TMath::Cos(angle1) * mom[0] + TMath::Sin(angle1) * mom[1];

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

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
float py1 = -TMath::Sin(angle1) * mom[0] + TMath::Cos(angle1) * mom[1];

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

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.

float angle2 = TMath::ACos(cosAngle2);
if (sinAngle2 < 0)
Expand Down Expand Up @@ -509,7 +509,7 @@
if (propagationConfiguration.d_bz_input > -990) {
d_bz = propagationConfiguration.d_bz_input;
o2::parameters::GRPMagField grpmag;
if (fabs(d_bz) > 1e-5) {

Check failure on line 512 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 @@ -946,7 +946,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 949 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
2 changes: 1 addition & 1 deletion PWGLF/Utils/strangenessBuilderModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
#include "Framework/HistogramRegistry.h"
#include "Framework/HistogramSpec.h"

#include <vector>
#include <array>
#include <cmath>
#include <cstdlib>
#include <memory>
#include <string>
#include <vector>

//__________________________________________
// strangeness builder module
Expand Down
Loading