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
8 changes: 8 additions & 0 deletions PWGDQ/Core/HistogramsLibrary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@
groupStr.ToLower();
TString subGroupStr = subGroupName;
subGroupStr.ToLower();
if (groupStr.Contains("timeframe")) {
hm->AddHistogram(histClass, "TF_NCollisions", "Number of collisions per TF", false, 1000, 0.0, 5000.0, VarManager::kTFNCollisions);
hm->AddHistogram(histClass, "TF_NMCCollisions", "Number of MC collisions per TF", false, 1000, 0.0, 5000.0, VarManager::kTFNMCCollisions);
hm->AddHistogram(histClass, "TF_NBCs", "Number of BCs per TF", false, 1000, 0.0, 50000.0, VarManager::kTFNBCs);
hm->AddHistogram(histClass, "TF_NTracks", "Number of tracks per TF", false, 1000, 0.0, 200000.0, VarManager::kTFNTracks);
hm->AddHistogram(histClass, "TF_NMuons", "Number of muons per TF", false, 1000, 0.0, 5000.0, VarManager::kTFNMuons);
hm->AddHistogram(histClass, "TF_NMFTs", "Number of MFT tracks per TF", false, 1000, 0.0, 200000.0, VarManager::kTFNMFTs);
}
if (!groupStr.CompareTo("event")) {
if (!subGroupStr.Contains("generator")) {
hm->AddHistogram(histClass, "VtxZ", "Vtx Z", false, 60, -15.0, 15.0, VarManager::kVtxZ);
Expand Down Expand Up @@ -2123,7 +2131,7 @@
bool isTH2 = (histTypeStr.CompareTo("TH2") == 0);
bool isTH3 = (histTypeStr.CompareTo("TH3") == 0);
bool isTHn = (histTypeStr.CompareTo("THn") == 0);
if (!(isTH1 || isTH2 || isTH3 || isTHn)) {

Check failure on line 2134 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
LOG(fatal) << "The type field must be one of the TH1, TH2, TH3 or THn";
return false;
}
Expand Down Expand Up @@ -2279,7 +2287,7 @@
}

//__________________________________________________________________
void o2::aod::dqhistograms::AddHistogramsFromJSON(HistogramManager* hm, const char* json)

Check failure on line 2290 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
{
//
// Add histograms to already existing histogram classes from a JSON formatted string
Expand Down Expand Up @@ -2342,7 +2350,7 @@
int* vars = new int[nDimensions];
int iDim = 0;
for (auto& v : hist.FindMember("vars")->value.GetArray()) {
LOG(debug) << "iDim " << iDim << ": " << v.GetString();

Check failure on line 2353 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
vars[iDim++] = VarManager::fgVarNamesMap[v.GetString()];
}

Expand All @@ -2353,7 +2361,7 @@
if (isConstantBinning) {
nBins = new int[nDimensions];
xmin = new double[nDimensions];
xmax = new double[nDimensions];

Check failure on line 2364 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
int iDim = 0;
for (auto& v : hist.FindMember("nBins")->value.GetArray()) {
nBins[iDim++] = v.GetInt();
Expand All @@ -2367,27 +2375,27 @@
iDim = 0;
for (auto& v : hist.FindMember("xmax")->value.GetArray()) {
xmax[iDim++] = v.GetDouble();
LOG(debug) << "xmax " << iDim << ": " << xmax[iDim - 1];

Check failure on line 2378 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
}
} else {
int iDim = 0;
binLimits = new TArrayD[nDimensions];
for (auto& v : hist.FindMember("binLimits")->value.GetArray()) {

Check failure on line 2383 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
double* lims = new double[v.GetArray().Size()];
int iElem = 0;
for (auto& lim : v.GetArray()) {
lims[iElem++] = lim.GetDouble();
}

Check failure on line 2388 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
binLimits[iDim++] = TArrayD(v.GetArray().Size(), lims);
}
}

TString* axLabels = nullptr;
if (hist.HasMember("axLabels")) {
axLabels = new TString[hist.FindMember("axLabels")->value.GetArray().Size()];

Check failure on line 2395 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
int iDim = 0;
for (auto& v : hist.FindMember("axLabels")->value.GetArray()) {
axLabels[iDim++] = v.GetString();

Check failure on line 2398 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
}
}

Expand All @@ -2398,7 +2406,7 @@
if (isConstantBinning) {
for (auto histClass : histClasses) {
hm->AddHistogram(histClass, histName, title, nDimensions, vars, nBins, xmin, xmax, axLabels, varW, useSparse, isDouble);
}

Check failure on line 2409 in PWGDQ/Core/HistogramsLibrary.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
} else {
for (auto histClass : histClasses) {
hm->AddHistogram(histClass, histName, title, nDimensions, vars, binLimits, axLabels, varW, useSparse, isDouble);
Expand Down
5 changes: 4 additions & 1 deletion PWGDQ/Core/MCProng.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,10 @@ void MCProng::Print() const
<< ") ExcludePDG(" << fExcludePDG[i] << ") SourceBits(" << fSourceBits[i] << ") ExcludeSource(" << fExcludeSource[i]
<< ") UseANDonSource(" << fUseANDonSourceBitMap[i] << ") CheckGenerationsInTime(" << fCheckGenerationsInTime << ")";
for (std::size_t j = 0; j < fPDGInHistory.size(); j++) {
std::cout << " #" << j << " PDGInHistory(" << fPDGInHistory[j] << ") ExcludePDGInHistory(" << fExcludePDGInHistory[j] << ")";
std::cout << " #" << j << " PDGInHistory(" << fPDGInHistory[j] << ")";
}
for (std::size_t j = 0; j < fExcludePDGInHistory.size(); j++) {
std::cout << " #" << j << " ExcludePDGInHistory(" << fExcludePDGInHistory[j] << ")";
}
std::cout << std::endl;
}
Expand Down
18 changes: 18 additions & 0 deletions PWGDQ/Core/VarManager.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,18 @@ void VarManager::SetDefaultVarNames()

fgVariableNames[kRunNo] = "Run number";
fgVariableUnits[kRunNo] = "";
fgVariableNames[kTFNBCs] = "Number of bunch crossings per TF";
fgVariableUnits[kTFNBCs] = "";
fgVariableNames[kTFNCollisions] = "Number of collisions per TF";
fgVariableUnits[kTFNCollisions] = "";
fgVariableNames[kTFNMCCollisions] = "Number of MC collisions per TF";
fgVariableUnits[kTFNMCCollisions] = "";
fgVariableNames[kTFNTracks] = "Number of tracks per TF";
fgVariableUnits[kTFNTracks] = "";
fgVariableNames[kTFNMuons] = "Number of muons per TF";
fgVariableUnits[kTFNMuons] = "";
fgVariableNames[kTFNMFTs] = "Number of MFT tracks per TF";
fgVariableUnits[kTFNMFTs] = "";
fgVariableNames[kBC] = "Bunch crossing";
fgVariableUnits[kBC] = "";
fgVariableNames[kTimeFromSOR] = "time since SOR";
Expand Down Expand Up @@ -1402,6 +1414,12 @@ void VarManager::SetDefaultVarNames()
// Set the variables short names map. This is needed for dynamic configuration via JSON files
fgVarNamesMap["kNothing"] = kNothing;
fgVarNamesMap["kRunNo"] = kRunNo;
fgVarNamesMap["kTFNBCs"] = kTFNBCs;
fgVarNamesMap["kTFNCollisions"] = kTFNCollisions;
fgVarNamesMap["kTFNMCCollisions"] = kTFNMCCollisions;
fgVarNamesMap["kTFNTracks"] = kTFNTracks;
fgVarNamesMap["kTFNMuons"] = kTFNMuons;
fgVarNamesMap["kTFNMFTs"] = kTFNMFTs;
fgVarNamesMap["kNRunWiseVariables"] = kNRunWiseVariables;
fgVarNamesMap["kTimestamp"] = kTimestamp;
fgVarNamesMap["kTimeFromSOR"] = kTimeFromSOR;
Expand Down
191 changes: 92 additions & 99 deletions PWGDQ/Core/VarManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "Common/CCDB/TriggerAliases.h"
#include "Common/Core/CollisionTypeHelper.h"
#include "Common/Core/EventPlaneHelper.h"
#include "Common/Core/PID/PIDTOFParamService.h"
#include "Common/Core/fwdtrackUtilities.h"
#include "Common/Core/trackUtilities.h"

Expand Down Expand Up @@ -129,18 +130,19 @@ class VarManager : public TObject
ReducedMuon = BIT(14),
ReducedMuonExtra = BIT(15),
ReducedMuonCov = BIT(16),
ParticleMC = BIT(17),
Pair = BIT(18), // TODO: check whether we really need the Pair member here
AmbiTrack = BIT(19),
AmbiMuon = BIT(20),
DalitzBits = BIT(21),
TrackTPCPID = BIT(22),
TrackMFT = BIT(23),
ReducedTrackCollInfo = BIT(24), // TODO: remove it once new reduced data tables are produced for dielectron with ReducedTracksBarrelInfo
ReducedMuonCollInfo = BIT(25), // TODO: remove it once new reduced data tables are produced for dielectron with ReducedTracksBarrelInfo
MuonRealign = BIT(26),
MuonCovRealign = BIT(27),
MFTCov = BIT(28)
Pair = BIT(17), // TODO: check whether we really need the Pair member here
AmbiTrack = BIT(18),
AmbiMuon = BIT(19),
DalitzBits = BIT(20),
TrackTPCPID = BIT(21),
TrackMFT = BIT(22),
ReducedTrackCollInfo = BIT(23), // TODO: remove it once new reduced data tables are produced for dielectron with ReducedTracksBarrelInfo
ReducedMuonCollInfo = BIT(24), // TODO: remove it once new reduced data tables are produced for dielectron with ReducedTracksBarrelInfo
MuonRealign = BIT(25),
MuonCovRealign = BIT(26),
MFTCov = BIT(27),
TrackTOFService = BIT(28),
ParticleMC = BIT(29)
};

enum PairCandidateType {
Expand Down Expand Up @@ -188,8 +190,17 @@ class VarManager : public TObject
kRunNo = 0,
kNRunWiseVariables,

// Timeframe wise variables
kTFNBCs = kNRunWiseVariables,
kTFNCollisions,
kTFNMCCollisions,
kTFNTracks,
kTFNMuons,
kTFNMFTs,
kNTFWiseVariables,

// Event wise variables
kTimestamp,
kTimestamp = kNTFWiseVariables,
kTimeFromSOR, // Time since Start of Run (SOR) in minutes
kCollisionTime,
kCollisionTimeRes,
Expand Down Expand Up @@ -442,7 +453,6 @@ class VarManager : public TObject
kTwoR2SP2, // Scalar product resolution of event2 for ME technique
kTwoR2EP1, // Event plane resolution of event2 for ME technique
kTwoR2EP2, // Event plane resolution of event2 for ME technique
kNEventWiseVariables,

// Variables for event mixing with cumulant
kV22m,
Expand All @@ -453,9 +463,10 @@ class VarManager : public TObject
kV24ME,
kWV22ME,
kWV24ME,
kNEventWiseVariables,

// Basic track/muon/pair wise variables
kX,
kX = kNEventWiseVariables,
kY,
kZ,
kPt,
Expand Down Expand Up @@ -571,7 +582,7 @@ class VarManager : public TObject
kNBarrelTrackVariables,

// Muon track variables
kMuonNClusters,
kMuonNClusters = kNBarrelTrackVariables,
kMuonPDca,
kMuonRAtAbsorberEnd,
kMCHBitMap,
Expand Down Expand Up @@ -1163,8 +1174,8 @@ class VarManager : public TObject
static void FillBC(T const& bc, float* values = nullptr);
template <uint32_t fillMap, typename T>
static void FillEvent(T const& event, float* values = nullptr);
template <uint32_t fillMap, typename TEvent, typename TAssoc, typename TTracks>
static void FillEventTrackEstimators(TEvent const& collision, TAssoc const& groupedTrackIndices, TTracks const& tracks, float* values = nullptr);
template <typename T>
static void FillTimeFrame(T const& tfTable, float* values = nullptr);
template <typename T>
static void FillEventFlowResoFactor(T const& hs_sp, T const& hs_ep, float* values = nullptr);
template <typename T>
Expand All @@ -1181,7 +1192,7 @@ class VarManager : public TObject
static void FillPhoton(T const& photon, float* values = nullptr);
template <uint32_t fillMap, typename T, typename C>
static void FillTrackCollision(T const& track, C const& collision, float* values = nullptr);
template <int candidateType, typename T1, typename T2, typename C>
template <int candidateType, uint32_t fillMap, typename T1, typename T2, typename C>
static void FillTrackCollisionMC(T1 const& track, T2 const& MotherTrack, C const& collision, float* values = nullptr);
template <uint32_t fillMap, typename T, typename C, typename M, typename P>
static void FillTrackCollisionMatCorr(T const& track, C const& collision, M const& materialCorr, P const& propagator, float* values = nullptr);
Expand Down Expand Up @@ -1364,7 +1375,7 @@ class VarManager : public TObject
VarManager& operator=(const VarManager& c);
VarManager(const VarManager& c);

ClassDef(VarManager, 4);
ClassDef(VarManager, 5);
};

template <typename T, typename C>
Expand Down Expand Up @@ -1633,6 +1644,32 @@ void VarManager::FillGlobalMuonRefitCov(T1 const& muontrack, T2 const& mfttrack,
}
}

template <typename T>
void VarManager::FillTimeFrame(T const& tf, float* values)
{
if (!values) {
values = fgValues;
}
if constexpr (T::template contains<o2::aod::BCs>()) {
values[kTFNBCs] = tf.size();
}
if constexpr (T::template contains<o2::aod::Collisions>()) {
values[kTFNCollisions] = tf.size();
}
if constexpr (T::template contains<o2::aod::McCollisions>()) {
values[kTFNMCCollisions] = tf.size();
}
if constexpr (T::template contains<o2::aod::Tracks>()) {
values[kTFNTracks] = tf.size();
}
if constexpr (T::template contains<o2::aod::FwdTracks>()) {
values[kTFNMuons] = tf.size();
}
if constexpr (T::template contains<o2::aod::MFTTracks>()) {
values[kTFNMFTs] = tf.size();
}
}

template <typename T>
void VarManager::FillBC(T const& bc, float* values)
{
Expand Down Expand Up @@ -2138,56 +2175,6 @@ void VarManager::FillEvent(T const& event, float* values)
// FillEventDerived(values);
}

template <uint32_t fillMap, typename TEvent, typename TAssoc, typename TTracks>
void VarManager::FillEventTrackEstimators(TEvent const& collision, TAssoc const& assocs, TTracks const& /*tracks*/, float* values)
{
// Compute median Z for the large dcaZ tracks in the TPC
// This is for studies of the pileup impact on the TPC

if (!values) {
values = fgValues;
}

if constexpr ((fillMap & Track) > 0 && (fillMap & TrackDCA) > 0) {

std::vector<float> tracksP;
std::vector<float> tracksM;

for (const auto& assoc : assocs) {
auto track = assoc.template track_as<TTracks>();
// compute the dca of this track wrt the collision
auto trackPar = getTrackPar(track);
std::array<float, 2> dca{1e10f, 1e10f};
trackPar.propagateParamToDCA({collision.posX(), collision.posY(), collision.posZ()}, fgMagField, &dca);

// if it is a displaced track longitudinally, add it to the track vector
if (abs(dca[0]) < 3.0 && abs(dca[1]) > 4.0) {
if (track.tgl() > 0.1) {
tracksP.push_back(track.z());
}
if (track.tgl() < -0.1) {
tracksM.push_back(track.z());
}
}
} // end loop over associations

// compute the number of pileup contributors and the median z for pileup
if (tracksP.size() > 0) {
std::sort(tracksP.begin(), tracksP.end());
auto midP = tracksP.size() / 2;
values[kNTPCpileupContribA] = tracksP.size();
values[kNTPCpileupZA] = (tracksP.size() % 2 ? (tracksP[midP] + tracksP[midP - 1]) / 2 : tracksP[midP]);
}

if (tracksM.size() > 0) {
std::sort(tracksM.begin(), tracksM.end());
values[kNTPCpileupContribC] = tracksM.size();
auto midM = tracksM.size() / 2;
values[kNTPCpileupZC] = (tracksM.size() % 2 ? (tracksM[midM] + tracksM[midM - 1]) / 2 : tracksM[midM]);
}
}
}

template <typename T>
void VarManager::FillEventFlowResoFactor(T const& hs_sp, T const& hs_ep, float* values)
{
Expand Down Expand Up @@ -2280,25 +2267,17 @@ void VarManager::FillTwoEvents(T const& ev1, T const& ev2, float* values)
if (!values) {
values = fgValues;
}

// if constexpr (T::template contains<o2::aod::Collision>()) {
values[kTwoEvPosZ1] = ev1.posZ();
values[kTwoEvPosZ2] = ev2.posZ();
values[kTwoEvPosR1] = std::sqrt(ev1.posX() * ev1.posX() + ev1.posY() * ev1.posY());
values[kTwoEvPosR2] = std::sqrt(ev2.posX() * ev2.posX() + ev2.posY() * ev2.posY());
values[kTwoEvPVcontrib1] = ev1.numContrib();
values[kTwoEvPVcontrib2] = ev2.numContrib();
if (ev1.numContrib() < ev2.numContrib()) {
values[kTwoEvPosZ1] = ev2.posZ();
values[kTwoEvPosZ2] = ev1.posZ();
values[kTwoEvPVcontrib1] = ev2.numContrib();
values[kTwoEvPVcontrib2] = ev1.numContrib();
values[kTwoEvPosR1] = std::sqrt(ev2.posX() * ev2.posX() + ev2.posY() * ev2.posY());
;
values[kTwoEvPosR2] = std::sqrt(ev1.posX() * ev1.posX() + ev1.posY() * ev1.posY());
}
values[kTwoEvDeltaZ] = ev1.posZ() - ev2.posZ();
values[kTwoEvDeltaX] = ev1.posX() - ev2.posX();
values[kTwoEvDeltaY] = ev1.posY() - ev2.posY();
//}
values[kTwoEvPVcontrib1] = ev1.numContrib();
values[kTwoEvPVcontrib2] = ev2.numContrib();
values[kTwoEvDeltaR] = std::sqrt(values[kTwoEvDeltaX] * values[kTwoEvDeltaX] + values[kTwoEvDeltaY] * values[kTwoEvDeltaY]);
}

Expand Down Expand Up @@ -2680,6 +2659,12 @@ void VarManager::FillTrack(T const& track, float* values)
values[kTOFbeta] = track.beta();
}
}
if constexpr ((fillMap & TrackTOFService) > 0) {
values[kTOFnSigmaEl] = track.tofNSigmaDynEl();
values[kTOFnSigmaEl] = track.tofNSigmaDynPi();
values[kTOFnSigmaEl] = track.tofNSigmaDynKa();
values[kTOFnSigmaEl] = track.tofNSigmaDynPr();
}
if constexpr ((fillMap & TrackTPCPID) > 0) {
values[kTPCnSigmaEl] = track.tpcNSigmaEl();
values[kTPCnSigmaPi] = track.tpcNSigmaPi();
Expand Down Expand Up @@ -2870,47 +2855,55 @@ void VarManager::FillTrackMC(const U& mcStack, T const& track, float* values)
FillTrackDerived(values);
}

template <int candidateType, typename T1, typename T2, typename C>
template <int candidateType, uint32_t fillMap, typename T1, typename T2, typename C>
void VarManager::FillTrackCollisionMC(T1 const& track, T2 const& MotherTrack, C const& collision, float* values)
{

if (!values) {
values = fgValues;
}

float m = 0.0;
float pdgLifetime = 0.0;
if (std::abs(MotherTrack.pdgCode()) == 521) {
m = o2::constants::physics::MassBPlus;
pdgLifetime = 1.638e-12; // s
}
float m = o2::constants::physics::MassBPlus;
float pdgLifetime = 1.638e-12; // s
if (std::abs(MotherTrack.pdgCode()) == 511) {
m = o2::constants::physics::MassB0;
pdgLifetime = 1.517e-12; // s
}

// Extract the collision primary vertex position using constexpr, since the collision type may be CollisionMC or ReducedMCEvent
double collPos[3] = {0.0, 0.0, 0.0};
if constexpr (fillMap & ObjTypes::CollisionMC) {
collPos[0] = collision.posX();
collPos[1] = collision.posY();
collPos[2] = collision.posZ();
} else if constexpr (fillMap & ObjTypes::ReducedEventMC) {
collPos[0] = collision.mcPosX();
collPos[1] = collision.mcPosY();
collPos[2] = collision.mcPosZ();
}

// displaced vertex is compued with decay product (track) and momentum of mother particle (MotherTrack)
values[kMCVertexingLxy] = (collision.mcPosX() - track.vx()) * (collision.mcPosX() - track.vx()) +
(collision.mcPosY() - track.vy()) * (collision.mcPosY() - track.vy());
values[kMCVertexingLz] = (collision.mcPosZ() - track.vz()) * (collision.mcPosZ() - track.vz());
values[kMCVertexingLxy] = (collPos[0] - track.vx()) * (collPos[0] - track.vx()) +
(collPos[1] - track.vy()) * (collPos[1] - track.vy());
values[kMCVertexingLz] = (collPos[2] - track.vz()) * (collPos[2] - track.vz());
values[kMCVertexingLxyz] = values[kMCVertexingLxy] + values[kMCVertexingLz];
values[kMCVertexingLxy] = std::sqrt(values[kMCVertexingLxy]);
values[kMCVertexingLz] = std::sqrt(values[kMCVertexingLz]);
values[kMCVertexingLxyz] = std::sqrt(values[kMCVertexingLxyz]);
values[kMCVertexingTauz] = (collision.mcPosZ() - track.vz()) * m / (TMath::Abs(MotherTrack.pz()) * o2::constants::physics::LightSpeedCm2NS);
values[kMCVertexingTauz] = (collPos[2] - track.vz()) * m / (TMath::Abs(MotherTrack.pz()) * o2::constants::physics::LightSpeedCm2NS);
values[kMCVertexingTauxy] = values[kMCVertexingLxy] * m / (MotherTrack.pt() * o2::constants::physics::LightSpeedCm2NS);

values[kMCCosPointingAngle] = ((collision.mcPosX() - track.vx()) * MotherTrack.px() +
(collision.mcPosY() - track.vy()) * MotherTrack.py() +
(collision.mcPosZ() - track.vz()) * MotherTrack.pz()) /
values[kMCCosPointingAngle] = ((collPos[0] - track.vx()) * MotherTrack.px() +
(collPos[1] - track.vy()) * MotherTrack.py() +
(collPos[2] - track.vz()) * MotherTrack.pz()) /
(MotherTrack.p() * values[VarManager::kMCVertexingLxyz]);

values[kMCLxyExpected] = (MotherTrack.pt() / m) * (pdgLifetime * o2::constants::physics::LightSpeedCm2S);
values[kMCLxyzExpected] = (MotherTrack.p() / m) * (pdgLifetime * o2::constants::physics::LightSpeedCm2S);

values[kMCVertexingLzProjected] = ((track.vz() - collision.mcPosZ()) * MotherTrack.pz()) / TMath::Abs(MotherTrack.pz());
values[kMCVertexingLxyProjected] = (((track.vx() - collision.mcPosX()) * MotherTrack.px()) + ((track.vy() - collision.mcPosY()) * MotherTrack.py())) / TMath::Abs(MotherTrack.pt());
values[kMCVertexingLxyzProjected] = (((track.vx() - collision.mcPosX()) * MotherTrack.px()) + ((track.vy() - collision.mcPosY()) * MotherTrack.py()) + ((track.vz() - collision.mcPosZ()) * MotherTrack.pz())) / MotherTrack.p();
values[kMCVertexingLzProjected] = ((track.vz() - collPos[2]) * MotherTrack.pz()) / TMath::Abs(MotherTrack.pz());
values[kMCVertexingLxyProjected] = (((track.vx() - collPos[0]) * MotherTrack.px()) + ((track.vy() - collPos[1]) * MotherTrack.py())) / TMath::Abs(MotherTrack.pt());
values[kMCVertexingLxyzProjected] = (((track.vx() - collPos[1]) * MotherTrack.px()) + ((track.vy() - collPos[1]) * MotherTrack.py()) + ((track.vz() - collPos[2]) * MotherTrack.pz())) / MotherTrack.p();
values[kMCVertexingTauxyProjected] = values[kMCVertexingLxyProjected] * m / (MotherTrack.pt());
values[kMCVertexingTauzProjected] = values[kMCVertexingLzProjected] * m / TMath::Abs(MotherTrack.pz());
values[kMCVertexingTauxyzProjected] = values[kMCVertexingLxyzProjected] * m / (MotherTrack.p());
Expand Down
2 changes: 1 addition & 1 deletion PWGDQ/DataModel/ReducedInfoTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ DECLARE_SOA_COLUMN(DeviationxyTrk1KF, deviationxyTrk1KF, float); //! 2D chi2 dev
// pair information
namespace reducedpair
{
DECLARE_SOA_INDEX_COLUMN(ReducedEvent, reducedevent); //!
DECLARE_SOA_INDEX_COLUMN(ReducedEvent, reducedevent);
DECLARE_SOA_INDEX_COLUMN_FULL(Index0, index0, int, ReducedTracks, "_0"); //! Index to first prong
DECLARE_SOA_INDEX_COLUMN_FULL(Index1, index1, int, ReducedTracks, "_1"); //! Index to second prong
DECLARE_SOA_INDEX_COLUMN_FULL(Prong0, prong0, int, Tracks, "_0"); //! Index of first prong in Tracks table
Expand Down
Loading
Loading