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
56 changes: 28 additions & 28 deletions ALICE3/TableProducer/OTF/onTheFlyTracker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -23,42 +23,42 @@
/// \author Roberto Preghenella preghenella@bo.infn.it
///

#include <utility>
#include <array>
#include <string>
#include <map>
#include <vector>

#include <TGeoGlobalMagField.h>
#include <TGenPhaseSpace.h>
#include <TLorentzVector.h>
#include <TRandom3.h>
#include <TPDGCode.h>
#include "ALICE3/Core/DelphesO2TrackSmearer.h"
#include "ALICE3/Core/DetLayer.h"
#include "ALICE3/Core/FastTracker.h"
#include "ALICE3/Core/TrackUtilities.h"
#include "ALICE3/DataModel/OTFStrangeness.h"
#include "ALICE3/DataModel/collisionAlice3.h"
#include "ALICE3/DataModel/tracksAlice3.h"
#include "Common/Core/RecoDecay.h"
#include "Common/DataModel/TrackSelectionTables.h"

#include "CommonConstants/MathConstants.h"
#include "DCAFitter/DCAFitterN.h"
#include "DataFormatsParameters/GRPMagField.h"
#include "DetectorsBase/Propagator.h"
#include "DetectorsVertexing/PVertexer.h"
#include "DetectorsVertexing/PVertexerHelpers.h"
#include "Field/MagneticField.h"
#include "Framework/AnalysisDataModel.h"
#include "Framework/AnalysisTask.h"
#include "Framework/runDataProcessing.h"
#include "Framework/HistogramRegistry.h"
#include "DCAFitter/DCAFitterN.h"
#include "Common/Core/RecoDecay.h"
#include "CommonConstants/MathConstants.h"
#include "Framework/O2DatabasePDGPlugin.h"
#include "Common/DataModel/TrackSelectionTables.h"
#include "Framework/runDataProcessing.h"
#include "ReconstructionDataFormats/DCA.h"
#include "DetectorsBase/Propagator.h"
#include "DataFormatsParameters/GRPMagField.h"
#include "DetectorsVertexing/PVertexer.h"
#include "DetectorsVertexing/PVertexerHelpers.h"
#include "SimulationDataFormat/InteractionSampler.h"
#include "Field/MagneticField.h"

#include "ALICE3/Core/DelphesO2TrackSmearer.h"
#include "ALICE3/Core/FastTracker.h"
#include "ALICE3/Core/DetLayer.h"
#include "ALICE3/Core/TrackUtilities.h"
#include "ALICE3/DataModel/collisionAlice3.h"
#include "ALICE3/DataModel/tracksAlice3.h"
#include "ALICE3/DataModel/OTFStrangeness.h"
#include <TGenPhaseSpace.h>
#include <TGeoGlobalMagField.h>
#include <TLorentzVector.h>
#include <TPDGCode.h>
#include <TRandom3.h>

#include <array>
#include <map>
#include <string>
#include <utility>
#include <vector>

using namespace o2;
using namespace o2::framework;
Expand Down Expand Up @@ -449,13 +449,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 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.
double xi_ctau = 4.91 * xi_gamma;
double xi_rxyz = (-xi_ctau * log(1 - u));

Check failure on line 454 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 458 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 @@ -473,10 +473,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 476 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 479 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 @@ -549,8 +549,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 552 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 553 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 All @@ -574,7 +574,7 @@
}

histos.fill(HIST("hPtGenerated"), mcParticle.pt());
if (TMath::Abs(mcParticle.pdgCode()) == 11)

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

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
histos.fill(HIST("hPtGeneratedEl"), mcParticle.pt());
if (TMath::Abs(mcParticle.pdgCode()) == 211)
histos.fill(HIST("hPtGeneratedPi"), mcParticle.pt());
Expand Down Expand Up @@ -724,7 +724,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 727 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 @@ -769,7 +769,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 772 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