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
24 changes: 21 additions & 3 deletions ALICE3/DataModel/tracksAlice3.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ namespace o2::aod
{
namespace track_alice3
{

DECLARE_SOA_COLUMN(IsReconstructed, isReconstructed, bool); //! is reconstructed or not
DECLARE_SOA_COLUMN(NSiliconHits, nSiliconHits, int); //! number of silicon hits
DECLARE_SOA_COLUMN(NTPCHits, nTPCHits, int); //! number of tpc hits
Expand All @@ -34,6 +35,11 @@ DECLARE_SOA_COLUMN(TrackType, trackType, int); //! Type of the trac
DECLARE_SOA_COLUMN(IsPVContributor, isPVContributor, bool); //! Has track contributed to the PV fit?
DECLARE_SOA_COLUMN(TrackIU, trackIU, float); //! Innermost update: radius (cm) of the innermost hit assigned to the track
DECLARE_SOA_COLUMN(TrackOU, trackOU, float); //! Outermost update: radius (cm) of the outermost hit assigned to the track
DECLARE_SOA_COLUMN(SecondaryVertexRadius, secondaryVertexRadius, float); //! Radius of the secondary vertex associated with the track
DECLARE_SOA_COLUMN(SecondaryVertexX, secondaryVertexX, float); //! X position of the secondary vertex associated with the track
DECLARE_SOA_COLUMN(SecondaryVertexY, secondaryVertexY, float); //! Y position of the secondary vertex associated with the track
DECLARE_SOA_COLUMN(SecondaryVertexZ, secondaryVertexZ, float); //! Z position of the secondary vertex associated with the track

} // namespace track_alice3
DECLARE_SOA_TABLE(TracksAlice3, "AOD", "TRACKSALICE3",
track_alice3::IsReconstructed,
Expand All @@ -45,23 +51,35 @@ DECLARE_SOA_TABLE(TracksAlice3Pdg, "AOD", "TRACKSALICE3PDG",
track_alice3::PdgCode);
using TrackAlice3Pdg = TracksAlice3Pdg::iterator;

DECLARE_SOA_TABLE(TracksExtraA3, "AOD", "TracksExtraA3",
DECLARE_SOA_TABLE(TracksExtraA3_000, "AOD", "TracksExtraA3",
track_alice3::NSiliconHits,
track_alice3::NTPCHits,
track_alice3::TrackType,
track_alice3::IsPVContributor);
DECLARE_SOA_TABLE_VERSIONED(TracksExtraA3_001, "AOD", "TracksExtraA3", 1,
track_alice3::NSiliconHits,
track_alice3::NTPCHits,
track_alice3::TrackType,
track_alice3::IsPVContributor,
track_alice3::SecondaryVertexRadius,
track_alice3::SecondaryVertexX,
track_alice3::SecondaryVertexY,
track_alice3::SecondaryVertexZ);
using TracksExtraA3 = TracksExtraA3_001;
using TrackExtraA3 = TracksExtraA3::iterator;

namespace mcparticle_alice3
{

DECLARE_SOA_COLUMN(NHits, nHits, int); //! number of silicon hits
DECLARE_SOA_COLUMN(Charge, charge, float); //! particle charge
DECLARE_SOA_COLUMN(DecayRadius, decayRadius, float); //! Radius for decayed particle produced by decayer (-1 if not decayed)
DECLARE_SOA_BITMAP_COLUMN(DecayerBits, decayerBits, 8); //! Bit mask for particle produced by the OTF decayer
DECLARE_SOA_COLUMN(SecondaryVertexRadius, secondaryVertexRadius, float); //! Radius of the secondary vertex associated with the track
} // namespace mcparticle_alice3
DECLARE_SOA_TABLE(MCParticlesExtraA3, "AOD", "MCParticlesExtraA3",
mcparticle_alice3::NHits,
mcparticle_alice3::Charge);
mcparticle_alice3::Charge,
mcparticle_alice3::SecondaryVertexRadius);
using MCParticleExtraA3 = MCParticlesExtraA3::iterator;

DECLARE_SOA_TABLE(OTFParticleExtras, "AOD", "OTFPARTICLEEXTRA",
Expand Down
13 changes: 6 additions & 7 deletions ALICE3/TableProducer/OTF/onTheFlyTracker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@
#include <map>
#include <memory>
#include <string>
#include <string_view>
#include <utility>
#include <vector>

Expand Down Expand Up @@ -259,7 +258,7 @@ struct OnTheFlyTracker {

// V0 names for filling histograms
static constexpr int NtypesV0 = 3;
static constexpr std::string_view NameV0s[NtypesV0] = {"K0", "Lambda", "AntiLambda"};
static constexpr std::array<const char*, NtypesV0> NameV0s = {"K0", "Lambda", "AntiLambda"};

// Class to hold the track information for the O2 vertexing
class TrackAlice3 : public o2::track::TrackParCov
Expand Down Expand Up @@ -1473,7 +1472,7 @@ struct OnTheFlyTracker {
continue;
}
for (int indexDetector = 0; indexDetector < mGeoContainer.getNumberOfConfigurations(); indexDetector++) {
std::string path = Form("V0Building_Configuration_%i/%s/", indexDetector, NameV0s[indexV0].data());
std::string path = Form("V0Building_Configuration_%i/%s/", indexDetector, NameV0s[indexV0]);
fillHist<TH2>(path + "hGen", v0DecayRadius2D, mcParticle.pt());
fillHist<TH2>(path + "hGenNegDaughterFromV0", v0DecayRadius2D, v0DecayProducts[0].Pt());
fillHist<TH2>(path + "hGenPosDaughterFromV0", v0DecayRadius2D, v0DecayProducts[1].Pt());
Expand Down Expand Up @@ -1560,21 +1559,21 @@ struct OnTheFlyTracker {
fillHist<TH1>(Form("V0Building_Configuration_%i/hV0Building", icfg), 1.0f);
for (size_t indexV0 = 0; indexV0 < V0PDGs.size(); indexV0++) {
if (mcParticle.pdgCode() == V0PDGs[indexV0]) {
fillHist<TH2>(Form("V0Building_Configuration_%i/%s/hReco", icfg, NameV0s[indexV0].data()), v0DecayRadius2D, mcParticle.pt());
fillHist<TH2>(Form("V0Building_Configuration_%i/%s/hReco", icfg, NameV0s[indexV0]), v0DecayRadius2D, mcParticle.pt());
}
}
}
if (isV0Reco[0]) {
for (size_t indexV0 = 0; indexV0 < V0PDGs.size(); indexV0++) {
if (mcParticle.pdgCode() == V0PDGs[indexV0]) {
fillHist<TH2>(Form("V0Building_Configuration_%i/%s/hRecoNegDaughterFromV0", icfg, NameV0s[indexV0].data()), v0DecayRadius2D, v0DecayProducts[0].Pt());
fillHist<TH2>(Form("V0Building_Configuration_%i/%s/hRecoNegDaughterFromV0", icfg, NameV0s[indexV0]), v0DecayRadius2D, v0DecayProducts[0].Pt());
}
}
}
if (isV0Reco[1]) {
for (size_t indexV0 = 0; indexV0 < V0PDGs.size(); indexV0++) {
if (mcParticle.pdgCode() == V0PDGs[indexV0]) {
fillHist<TH2>(Form("V0Building_Configuration_%i/%s/hRecoPosDaughterFromV0", icfg, NameV0s[indexV0].data()), v0DecayRadius2D, v0DecayProducts[1].Pt());
fillHist<TH2>(Form("V0Building_Configuration_%i/%s/hRecoPosDaughterFromV0", icfg, NameV0s[indexV0]), v0DecayRadius2D, v0DecayProducts[1].Pt());
}
}
}
Expand Down Expand Up @@ -1817,7 +1816,7 @@ struct OnTheFlyTracker {
trackParCov.getSigmaTgl2(), trackParCov.getSigma1PtY(), trackParCov.getSigma1PtZ(), trackParCov.getSigma1PtSnp(), trackParCov.getSigma1PtTgl(),
trackParCov.getSigma1Pt2());
tableMcTrackLabels(trackParCov.mcLabel, 0);
tableTracksExtraA3(trackParCov.nSiliconHits, trackParCov.nTPCHits, trackParCov.trackType, trackParCov.isPVContributor);
tableTracksExtraA3(trackParCov.nSiliconHits, trackParCov.nTPCHits, trackParCov.trackType, trackParCov.isPVContributor, -1, -1, -1, -1);

// populate extra tables if required to do so
if (populateTracksExtra) {
Expand Down
Loading
Loading