Skip to content
Merged
Changes from 1 commit
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
16 changes: 8 additions & 8 deletions ALICE3/TableProducer/OTF/onTheFlyTracker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

#include <TGenPhaseSpace.h>
#include <TGeoGlobalMagField.h>
#include <TLorentzVector.h>

Check failure on line 53 in ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/lorentz-vector]

Do not use the TLorentzVector legacy class. Use std::array with RecoDecay methods or the ROOT::Math::LorentzVector template instead.
#include <TPDGCode.h>
#include <TRandom3.h>

Expand Down Expand Up @@ -105,15 +105,15 @@
Configurable<bool> doExtraQA{"doExtraQA", false, "do extra 2D QA plots"};
Configurable<bool> extraQAwithoutDecayDaughters{"extraQAwithoutDecayDaughters", false, "remove decay daughters from qa plots (yes/no)"};

Configurable<std::string> lutEl{"lutEl", "lutCovm.el.dat", "LUT for electrons"};
Configurable<std::string> lutMu{"lutMu", "lutCovm.mu.dat", "LUT for muons"};
Configurable<std::string> lutPi{"lutPi", "lutCovm.pi.dat", "LUT for pions"};
Configurable<std::string> lutKa{"lutKa", "lutCovm.ka.dat", "LUT for kaons"};
Configurable<std::string> lutEl{"lutEl", "lutCovm.el.dat", "LUT for electrons (if emtpy no LUT is taken)"};
Configurable<std::string> lutMu{"lutMu", "lutCovm.mu.dat", "LUT for muons (if emtpy no LUT is taken)"};
Configurable<std::string> lutPi{"lutPi", "lutCovm.pi.dat", "LUT for pions (if emtpy no LUT is taken)"};
Configurable<std::string> lutKa{"lutKa", "lutCovm.ka.dat", "LUT for kaons (if emtpy no LUT is taken)"};
Configurable<std::string> lutPr{"lutPr", "lutCovm.pr.dat", "LUT for protons"};
Configurable<std::string> lutDe{"lutDe", "lutCovm.de.dat", "LUT for deuterons"};
Configurable<std::string> lutTr{"lutTr", "lutCovm.tr.dat", "LUT for tritons"};
Configurable<std::string> lutHe3{"lutHe3", "lutCovm.he3.dat", "LUT for Helium-3"};
Configurable<std::string> lutAl{"lutAl", "lutCovm.he3.dat", "LUT for Alphas"};
Configurable<std::string> lutDe{"lutDe", "", "LUT for deuterons (if emtpy no LUT is taken)"};
Configurable<std::string> lutTr{"lutTr", "", "LUT for tritons (if emtpy no LUT is taken)"};
Configurable<std::string> lutHe3{"lutHe3", "", "LUT for Helium-3 (if emtpy no LUT is taken)"};
Configurable<std::string> lutAl{"lutAl", "", "LUT for Alphas (if emtpy no LUT is taken)"};

struct : ConfigurableGroup {
ConfigurableAxis axisMomentum{"axisMomentum", {VARIABLE_WIDTH, 0.0f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.0f, 1.1f, 1.2f, 1.3f, 1.4f, 1.5f, 1.6f, 1.7f, 1.8f, 1.9f, 2.0f, 2.2f, 2.4f, 2.6f, 2.8f, 3.0f, 3.2f, 3.4f, 3.6f, 3.8f, 4.0f, 4.4f, 4.8f, 5.2f, 5.6f, 6.0f, 6.5f, 7.0f, 7.5f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 17.0f, 19.0f, 21.0f, 23.0f, 25.0f, 30.0f, 35.0f, 40.0f, 50.0f}, "#it{p} (GeV/#it{c})"};
Expand Down Expand Up @@ -447,13 +447,13 @@
double pi_mass = o2::constants::physics::MassPionCharged;
double pr_mass = o2::constants::physics::MassProton;

double xi_gamma = 1 / sqrt(1 + (particle.p() * particle.p()) / (xi_mass * xi_mass));

Check failure on line 450 in ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
double xi_ctau = 4.91 * xi_gamma;
double xi_rxyz = (-xi_ctau * log(1 - u));

Check failure on line 452 in ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
float sna, csa;
o2::math_utils::CircleXYf_t xi_circle;
track.getCircleParams(magneticField, xi_circle, sna, csa);
double xi_rxy = xi_rxyz / sqrt(1. + track.getTgl() * track.getTgl());

Check failure on line 456 in ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
double theta = xi_rxy / xi_circle.rC;
double newX = ((particle.vx() - xi_circle.xC) * std::cos(theta) - (particle.vy() - xi_circle.yC) * std::sin(theta)) + xi_circle.xC;
double newY = ((particle.vy() - xi_circle.yC) * std::cos(theta) + (particle.vx() - xi_circle.xC) * std::sin(theta)) + xi_circle.yC;
Expand All @@ -471,10 +471,10 @@
decayDaughters.push_back(*xiDecay.GetDecay(1));
TLorentzVector la = *xiDecay.GetDecay(0);

double la_gamma = 1 / sqrt(1 + (la.P() * la.P()) / (la_mass * la_mass));

Check failure on line 474 in ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
double la_ctau = 7.89 * la_gamma;
std::vector<double> laDaughters = {pi_mass, pr_mass};
double la_rxyz = (-la_ctau * log(1 - u));

Check failure on line 477 in ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
laDecayVertex.push_back(xiDecayVertex[0] + la_rxyz * (xiDecay.GetDecay(0)->Px() / xiDecay.GetDecay(0)->P()));
laDecayVertex.push_back(xiDecayVertex[1] + la_rxyz * (xiDecay.GetDecay(0)->Py() / xiDecay.GetDecay(0)->P()));
laDecayVertex.push_back(xiDecayVertex[2] + la_rxyz * (xiDecay.GetDecay(0)->Pz() / xiDecay.GetDecay(0)->P()));
Expand Down Expand Up @@ -558,8 +558,8 @@
o2::track::TrackParCov xiTrackParCov;
o2::upgrade::convertMCParticleToO2Track(mcParticle, xiTrackParCov, pdgDB);
decayParticle(mcParticle, xiTrackParCov, decayProducts, xiDecayVertex, laDecayVertex);
xiDecayRadius2D = sqrt(xiDecayVertex[0] * xiDecayVertex[0] + xiDecayVertex[1] * xiDecayVertex[1]);

Check failure on line 561 in ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
laDecayRadius2D = sqrt(laDecayVertex[0] * laDecayVertex[0] + laDecayVertex[1] * laDecayVertex[1]);

Check failure on line 562 in ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

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

Expand Down Expand Up @@ -734,7 +734,7 @@
// DCA to PV taken care of in daughter tracks already, not necessary
thisCascade.dcaV0dau = TMath::Sqrt(fitter.getChi2AtPCACandidate());
thisCascade.v0radius = std::hypot(pos[0], pos[1]);
thisCascade.mLambda = RecoDecay::m(array{array{posP[0], posP[1], posP[2]}, array{negP[0], negP[1], negP[2]}}, array{o2::constants::physics::MassProton, o2::constants::physics::MassPionCharged});

Check failure on line 737 in ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

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

// go for cascade: create V0 (pseudo)track from reconstructed V0
std::array<float, 21> covV = {0.};
Expand Down Expand Up @@ -779,7 +779,7 @@
thisCascade.cascradius = std::hypot(posCascade[0], posCascade[1]);
bachelorTrackAtPCA.getPxPyPzGlo(bachP);

thisCascade.mXi = RecoDecay::m(array{array{bachP[0], bachP[1], bachP[2]}, array{posP[0] + negP[0], posP[1] + negP[1], posP[2] + negP[2]}}, array{o2::constants::physics::MassPionCharged, o2::constants::physics::MassLambda});

Check failure on line 782 in ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

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

// initialize cascade track
o2::track::TrackParCov cascadeTrack = fitter.createParentTrackParCov();
Expand Down
Loading