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
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include "ReconstructionDataFormats/PrimaryVertex.h"
#include "ReconstructionDataFormats/GlobalTrackID.h"
#include "SimulationDataFormat/MCEventLabel.h"

namespace o2
{
Expand All @@ -27,6 +28,7 @@ struct PrimaryVertexExt : public PrimaryVertex {
std::array<uint16_t, o2::dataformats::GlobalTrackID::Source::NSources> nSrc{}; // N contributors for each source type
std::array<uint16_t, o2::dataformats::GlobalTrackID::Source::NSources> nSrcA{}; // N associated and passing cuts for each source type
std::array<uint16_t, o2::dataformats::GlobalTrackID::Source::NSources> nSrcAU{}; // N ambgous associated and passing cuts for each source type
o2::MCEventLabel mcLb{};
double FT0Time = -1.; // time of closest FT0 trigger
float FT0A = -1; // amplitude of closest FT0 A side
float FT0C = -1; // amplitude of closest FT0 C side
Expand All @@ -41,7 +43,7 @@ struct PrimaryVertexExt : public PrimaryVertex {
std::string asString() const;
#endif

ClassDefNV(PrimaryVertexExt, 6);
ClassDefNV(PrimaryVertexExt, 7);
};

#ifndef GPUCA_GPUCODE_DEVICE
Expand Down
18 changes: 12 additions & 6 deletions Detectors/GlobalTrackingWorkflow/study/src/TrackingStudy.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,9 @@ void TrackingStudySpec::process(o2::globaltracking::RecoContainer& recoData)
if (iv != nv - 1) {
auto& pve = pveVec[iv];
static_cast<o2::dataformats::PrimaryVertex&>(pve) = pvvec[iv];
if (mUseMC) {
pve.mcLb = recoData.getPrimaryVertexMCLabel(iv);
}
// find best matching FT0 signal
float bestTimeDiff = 1000, bestTime = -999;
int bestFTID = -1;
Expand Down Expand Up @@ -611,13 +614,16 @@ void TrackingStudySpec::process(o2::globaltracking::RecoContainer& recoData)
vid[slot] = id;
};

std::vector<o2::dataformats::PrimaryVertexExt> pveT; // neighbours in time
std::vector<o2::dataformats::PrimaryVertexExt> pveZ; // neighbours in Z
std::vector<int> idT(mMaxNeighbours), idZ(mMaxNeighbours);
std::vector<float> dT(mMaxNeighbours), dZ(mMaxNeighbours);
for (int cnt = 0; cnt < nvtot; cnt++) {
pveT.clear(); // neighbours in time
pveZ.clear(); // neighbours in Z

const auto& pve = pveVec[cnt];
float tv = pve.getTimeStamp().getTimeStamp();
std::vector<o2::dataformats::PrimaryVertexExt> pveT(mMaxNeighbours); // neighbours in time
std::vector<o2::dataformats::PrimaryVertexExt> pveZ(mMaxNeighbours); // neighbours in Z
std::vector<int> idT(mMaxNeighbours), idZ(mMaxNeighbours);
std::vector<float> dT(mMaxNeighbours), dZ(mMaxNeighbours);
for (int i = 0; i < mMaxNeighbours; i++) {
idT[i] = idZ[i] = -1;
dT[i] = mMaxVTTimeDiff;
Expand Down Expand Up @@ -666,14 +672,14 @@ void TrackingStudySpec::process(o2::globaltracking::RecoContainer& recoData)
}
for (int i = 0; i < mMaxNeighbours; i++) {
if (idT[i] != -1) {
pveT[i] = pveVec[idT[i]];
pveT.push_back(pveVec[idT[i]]);
} else {
break;
}
}
for (int i = 0; i < mMaxNeighbours; i++) {
if (idZ[i] != -1) {
pveZ[i] = pveVec[idZ[i]];
pveZ.push_back(pveVec[idZ[i]]);
} else {
break;
}
Expand Down