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
37 changes: 0 additions & 37 deletions ALICE3/DataModel/OTFMulticharm.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

DECLARE_SOA_COLUMN(XicMass, xicMass, float);
DECLARE_SOA_COLUMN(XiccMass, xiccMass, float);
DECLARE_SOA_COLUMN(LUTConfigId, lutConfigId, int); //! Index for LUT configuration

Check failure on line 38 in ALICE3/DataModel/OTFMulticharm.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.

// kine vars
DECLARE_SOA_COLUMN(XiccPt, xiccPt, float);
Expand All @@ -53,13 +53,6 @@
DECLARE_SOA_COLUMN(XiccDCAxy, xiccDCAxy, float);
DECLARE_SOA_COLUMN(XiccDCAz, xiccDCAz, float);

DECLARE_SOA_COLUMN(BachDCAxy, bachDCAxy, float);
DECLARE_SOA_COLUMN(BachDCAz, bachDCAz, float);
DECLARE_SOA_COLUMN(PosDCAxy, posDCAxy, float);
DECLARE_SOA_COLUMN(PosDCAz, posDCAz, float);
DECLARE_SOA_COLUMN(NegDCAxy, negDCAxy, float);
DECLARE_SOA_COLUMN(NegDCAz, negDCAz, float);

DECLARE_SOA_COLUMN(Pi1cDCAxy, pi1cDCAxy, float);
DECLARE_SOA_COLUMN(Pi1cDCAz, pi1cDCAz, float);
DECLARE_SOA_COLUMN(Pi2cDCAxy, pi2cDCAxy, float);
Expand All @@ -75,19 +68,9 @@
DECLARE_SOA_COLUMN(XiccProperLength, xiccProperLength, float);

// Daughter info
DECLARE_SOA_COLUMN(PosPt, posPt, float);
DECLARE_SOA_COLUMN(PosEta, posEta, float);
DECLARE_SOA_COLUMN(NegPt, negPt, float);
DECLARE_SOA_COLUMN(NegEta, negEta, float);
DECLARE_SOA_COLUMN(BachPt, bachPt, float);
DECLARE_SOA_COLUMN(BachEta, bachEta, float);
DECLARE_SOA_COLUMN(BachPhi, bachPhi, float);
DECLARE_SOA_COLUMN(Pi1cPt, pi1cPt, float);
DECLARE_SOA_COLUMN(Pi1cEta, pi1cEta, float);
DECLARE_SOA_COLUMN(Pi2cPt, pi2cPt, float);
DECLARE_SOA_COLUMN(Pi2cEta, pi2cEta, float);
DECLARE_SOA_COLUMN(PiccPt, piccPt, float);
DECLARE_SOA_COLUMN(PiccEta, piccEta, float);

} // namespace otfmulticharm

Expand Down Expand Up @@ -133,26 +116,6 @@
otfmulticharm::PiccPt,
otfmulticharm::LUTConfigId);

DECLARE_SOA_TABLE(MCharmExtra, "AOD", "MCharmExtra",
otfmulticharm::BachPt,
otfmulticharm::BachEta,
otfmulticharm::BachDCAxy,
otfmulticharm::BachDCAz,

otfmulticharm::PosPt,
otfmulticharm::PosEta,
otfmulticharm::PosDCAxy,
otfmulticharm::PosDCAz,

otfmulticharm::NegPt,
otfmulticharm::NegEta,
otfmulticharm::NegDCAxy,
otfmulticharm::NegDCAz,

otfmulticharm::Pi1cEta,
otfmulticharm::Pi2cEta,
otfmulticharm::PiccEta);

} // namespace o2::aod

#endif // ALICE3_DATAMODEL_OTFMULTICHARM_H_
12 changes: 9 additions & 3 deletions ALICE3/DataModel/OTFStrangeness.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
DECLARE_SOA_INDEX_COLUMN_FULL(CascadeTrack, cascadeTrack, int, Tracks, "_Cascade"); //!
DECLARE_SOA_INDEX_COLUMN_FULL(PosTrack, posTrack, int, Tracks, "_Pos"); //!
DECLARE_SOA_INDEX_COLUMN_FULL(NegTrack, negTrack, int, Tracks, "_Neg"); //!
DECLARE_SOA_INDEX_COLUMN_FULL(BachTrack, bachTrack, int, Tracks, "_Bach"); //!
DECLARE_SOA_INDEX_COLUMN_FULL(Bachelor, bachelor, int, Tracks, "_Bach"); //!

DECLARE_SOA_INDEX_COLUMN(McParticle, mcParticle);

Expand All @@ -53,6 +53,8 @@
DECLARE_SOA_COLUMN(CascRadiusMC, cascRadiusMC, float);
DECLARE_SOA_COLUMN(MLambda, mLambda, float);
DECLARE_SOA_COLUMN(MXi, mXi, float);
DECLARE_SOA_COLUMN(DCAXYCascToPV, dcaXYCascToPV, float);

Check failure on line 56 in ALICE3/DataModel/OTFStrangeness.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(DCAZCascToPV, dcaZCascToPV, float);

Check failure on line 57 in ALICE3/DataModel/OTFStrangeness.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.

// strangeness tracking
DECLARE_SOA_COLUMN(FindableClusters, findableClusters, int);
Expand All @@ -65,7 +67,7 @@
otfcascade::CascadeTrackId,
otfcascade::PosTrackId,
otfcascade::NegTrackId,
otfcascade::BachTrackId,
otfcascade::BachelorId,
otfcascade::DcaV0Daughters,
otfcascade::DcaCascadeDaughters,
otfcascade::V0Radius,
Expand All @@ -74,12 +76,16 @@
otfcascade::MLambda,
otfcascade::MXi,
otfcascade::FindableClusters,
otfcascade::FoundClusters);
otfcascade::FoundClusters,
otfcascade::DCAXYCascToPV,
otfcascade::DCAZCascToPV);

using UpgradeCascade = UpgradeCascades::iterator;

DECLARE_SOA_TABLE(A3CascadeMcLabels, "AOD", "A3CASCADEMCLABELS",
o2::soa::Index<>, otfcascade::McParticleId);
DECLARE_SOA_TABLE(UpgradeCascadeMcLabels, "AOD", "UPGRADECASCMCLAB",
o2::soa::Index<>, otfcascade::McParticleId);

namespace casc_pid
{
Expand Down
38 changes: 21 additions & 17 deletions ALICE3/TableProducer/OTF/onTheFlyTracker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
#include <TGeoGlobalMagField.h>
#include <TH1.h>
#include <TH2.h>
#include <TLorentzVector.h>

Check failure on line 80 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 <TMCProcess.h>
#include <TMath.h>
#include <TPDGCode.h>
Expand Down Expand Up @@ -144,6 +144,7 @@
Produces<aod::UpgradeCascades> tableUpgradeCascades;
Produces<aod::OTFLUTConfigId> tableOTFLUTConfigId;
Produces<aod::UpgradeV0s> tableUpgradeV0s;
Produces<aod::UpgradeCascadeMcLabels> tableUpgradeCascadeMcLabels;

// optionally produced, empty (to be tuned later)
Produces<aod::StoredTracksExtra_002> tableStoredTracksExtra; // base table, extend later
Expand Down Expand Up @@ -762,7 +763,7 @@
/// \param xiDecayVertex the address of the xi decay vertex
/// \param laDecayVertex the address of the la decay vertex
template <typename McParticleType>
void decayCascade(McParticleType particle, o2::track::TrackParCov track, std::vector<TLorentzVector>& decayDaughters, std::vector<double>& xiDecayVertex, std::vector<double>& laDecayVertex)

Check failure on line 766 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.
{
const double uXi = rand.Uniform(0, 1);
const double ctauXi = 4.91; // cm
Expand All @@ -785,12 +786,12 @@
xiDecayVertex.push_back(particle.vz() + rxyzXi * (particle.pz() / particle.p()));

std::vector<double> xiDaughters = {o2::constants::physics::MassLambda, o2::constants::physics::MassPionCharged};
TLorentzVector xi(newPx, newPy, particle.pz(), newE);

Check failure on line 789 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.
TGenPhaseSpace xiDecay;
xiDecay.SetDecay(xi, 2, xiDaughters.data());
xiDecay.Generate();
decayDaughters.push_back(*xiDecay.GetDecay(1));
TLorentzVector la = *xiDecay.GetDecay(0);

Check failure on line 794 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.

const double uLa = rand.Uniform(0, 1);
const double ctauLa = 7.845; // cm
Expand All @@ -813,7 +814,7 @@
/// \param decayDaughters the address of resulting daughters
/// \param v0DecayVertex the address of the la decay vertex
template <typename McParticleType>
void decayV0Particle(McParticleType particle, std::vector<TLorentzVector>& decayDaughters, std::vector<double>& v0DecayVertex, int pdgCode)

Check failure on line 817 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.
{
double u = rand.Uniform(0, 1);
double v0Mass = -1.;
Expand Down Expand Up @@ -847,7 +848,7 @@

const double v0BetaGamma = particle.p() / v0Mass;
const double v0rxyz = (-v0BetaGamma * ctau * std::log(1 - u));
TLorentzVector v0(particle.px(), particle.py(), particle.pz(), particle.e());

Check failure on line 851 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.

v0DecayVertex.push_back(particle.vx() + v0rxyz * (particle.px() / particle.p()));
v0DecayVertex.push_back(particle.vy() + v0rxyz * (particle.py() / particle.p()));
Expand Down Expand Up @@ -922,7 +923,7 @@
o2::upgrade::convertMCParticleToO2Track(mcParticle, trackParCov, pdgDB);
const std::string histPath = "Configuration_" + std::to_string(icfg) + "/";

std::vector<TLorentzVector> cascadeDecayProducts;

Check failure on line 926 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.
std::vector<double> xiDecayVertex, laDecayVertex;
static constexpr int kCascProngs = 3;
std::array<o2::track::TrackParCov, kCascProngs> xiDaughterTrackParCovsPerfect;
Expand Down Expand Up @@ -1315,8 +1316,9 @@
} // end cascade kink building

// +-~-+-~-+-~-+-~-+-~-+-~-+-~-+-~-+-~-+-~-+-~-+-~-+-~-+
double dcaXY{999.f}, dcaZ{999.f};
o2::track::TrackParCov trackParametrization(xiTrackParCov);
if (cascadeDecaySettings.doXiQA) {
double dcaXY{-1.}, dcaZ{-1.};
if (reconstructedCascade) {
getHist(TH2, histPath + "hRecoXi")->Fill(xiDecayRadius2D, mcParticle.pt());
getHist(TH1, histPath + "hMassLambda")->Fill(thisCascade.mLambda);
Expand All @@ -1325,40 +1327,37 @@
getHist(TH2, histPath + "h2dDeltaPtVsPt")->Fill(thisCascade.pt, (mcParticle.pt() - thisCascade.pt) / thisCascade.pt);
getHist(TH2, histPath + "h2dDeltaEtaVsPt")->Fill(thisCascade.pt, mcParticle.eta() - thisCascade.eta);
getHist(TH2, histPath + "hFoundVsFindable")->Fill(thisCascade.findableClusters, thisCascade.foundClusters);

o2::track::TrackParCov trackParametrization(xiTrackParCov);
trackParametrization.propagateToDCA(primaryVertex, mMagneticField, &dcaInfo);
getHist(TH2, histPath + "h2dDCAxyCascade")->Fill(trackParametrization.getPt(), dcaXY * 1e+4); // in microns, please
getHist(TH2, histPath + "h2dDCAzCascade")->Fill(trackParametrization.getPt(), dcaZ * 1e+4); // in microns, please
}
if (isReco[0]) {
getHist(TH2, histPath + "hRecoPiFromXi")->Fill(xiDecayRadius2D, cascadeDecayProducts[0].Pt());
o2::track::TrackParCov trackParametrizationCascProng0(xiTrackParCov);
if (populateTracksDCA && xiTrackParCov.propagateToDCA(primaryVertex, mMagneticField, &dcaInfo)) { // FIXME: this is not the right trackParametrization, need to propagate the bachelor track
o2::track::TrackParCov trackParametrizationBachelor(xiTrackParCov);
if (populateTracksDCA && trackParametrizationBachelor.propagateToDCA(primaryVertex, mMagneticField, &dcaInfo)) {
dcaXY = dcaInfo.getY();
dcaZ = dcaInfo.getZ();
getHist(TH2, histPath + "h2dDCAxyCascadeBachelor")->Fill(trackParametrizationCascProng0.getPt(), dcaXY * 1e+4); // in microns, please
getHist(TH2, histPath + "h2dDCAzCascadeBachelor")->Fill(trackParametrizationCascProng0.getPt(), dcaZ * 1e+4); // in microns, please
getHist(TH2, histPath + "h2dDCAxyCascadeBachelor")->Fill(trackParametrizationBachelor.getPt(), dcaXY * 1e+4); // in microns, please
getHist(TH2, histPath + "h2dDCAzCascadeBachelor")->Fill(trackParametrizationBachelor.getPt(), dcaZ * 1e+4); // in microns, please
}
}
if (isReco[1]) {
getHist(TH2, histPath + "hRecoPiFromLa")->Fill(laDecayRadius2D, cascadeDecayProducts[1].Pt());
o2::track::TrackParCov trackParametrizationCascProng1(xiTrackParCov);
if (populateTracksDCA && xiTrackParCov.propagateToDCA(primaryVertex, mMagneticField, &dcaInfo)) { // FIXME: this is not the right trackParametrization, need to propagate the negative pion track
o2::track::TrackParCov trackParametrizationNegative(xiTrackParCov);
if (populateTracksDCA && trackParametrizationNegative.propagateToDCA(primaryVertex, mMagneticField, &dcaInfo)) {
dcaXY = dcaInfo.getY();
dcaZ = dcaInfo.getZ();
getHist(TH2, histPath + "h2dDCAxyCascadeNegative")->Fill(trackParametrizationCascProng1.getPt(), dcaXY * 1e+4); // in microns, please
getHist(TH2, histPath + "h2dDCAzCascadeNegative")->Fill(trackParametrizationCascProng1.getPt(), dcaZ * 1e+4); // in microns, please
getHist(TH2, histPath + "h2dDCAxyCascadeNegative")->Fill(trackParametrizationNegative.getPt(), dcaXY * 1e+4); // in microns, please
getHist(TH2, histPath + "h2dDCAzCascadeNegative")->Fill(trackParametrizationNegative.getPt(), dcaZ * 1e+4); // in microns, please
}
}
if (isReco[2]) {
getHist(TH2, histPath + "hRecoPrFromLa")->Fill(laDecayRadius2D, cascadeDecayProducts[2].Pt());
o2::track::TrackParCov trackParametrizationCascProng2(xiTrackParCov);
if (populateTracksDCA && xiTrackParCov.propagateToDCA(primaryVertex, mMagneticField, &dcaInfo)) { // FIXME: this is not the right trackParametrization, need to propagate the positive proton track
o2::track::TrackParCov trackParametrizationPositive(xiTrackParCov);
if (populateTracksDCA && trackParametrizationPositive.propagateToDCA(primaryVertex, mMagneticField, &dcaInfo)) {
dcaXY = dcaInfo.getY();
dcaZ = dcaInfo.getZ();
getHist(TH2, histPath + "h2dDCAxyCascadePositive")->Fill(trackParametrizationCascProng2.getPt(), dcaXY * 1e+4); // in microns, please
getHist(TH2, histPath + "h2dDCAzCascadePositive")->Fill(trackParametrizationCascProng2.getPt(), dcaZ * 1e+4); // in microns, please
getHist(TH2, histPath + "h2dDCAxyCascadePositive")->Fill(trackParametrizationPositive.getPt(), dcaXY * 1e+4); // in microns, please
getHist(TH2, histPath + "h2dDCAzCascadePositive")->Fill(trackParametrizationPositive.getPt(), dcaZ * 1e+4); // in microns, please
}
}
}
Expand All @@ -1368,7 +1367,11 @@
return;
}

// Make sure the xi variables are stored in dcaXY and dcaZ
trackParametrization.propagateToDCA(primaryVertex, mMagneticField, &dcaInfo);

// populate Cascades
tableUpgradeCascadeMcLabels(mcParticle.globalIndex());
tableUpgradeCascades(tableCollisions.lastIndex(),
thisCascade.cascadeTrackId,
thisCascade.positiveId,
Expand All @@ -1382,7 +1385,8 @@
thisCascade.mLambda,
thisCascade.mXi,
thisCascade.findableClusters,
thisCascade.foundClusters);
thisCascade.foundClusters,
dcaXY, dcaZ);
}

/// Function to study V0s and fill the relevant histograms
Expand Down
Loading
Loading