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
2 changes: 1 addition & 1 deletion Detectors/GlobalTrackingWorkflow/study/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# granted to it by virtue of its status as an Intergovernmental Organization
# or submit itself to any jurisdiction.

#add_compile_options(-O0 -g -fPIC)
add_compile_options(-O0 -g -fPIC)

o2_add_library(GlobalTrackingStudy
TARGETVARNAME targetName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ struct TrackMCStudyConfig : o2::conf::ConfigurableParamHelper<TrackMCStudyConfig
float decayMotherMaxT = 1.0f; // max TOF in ns for mother particles to study
bool requireITSorTPCTrackRefs = true;
bool requireTopBottomRefs = false;
bool storeTPCTrackRefs = false;
int minTPCRefsToExtractClRes = 2;
int nOccBinsDrift = 10; // number of bins for TPC max drift time, where we integrate the occupancies
int nTBPerOccBin = 48; // number of TB per occ bin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ struct MCTrackInfo {
int getLowestITSLayer() const;
int getHighestITSLayer() const;
std::vector<float> occTPCV{};
std::vector<o2::track::TrackPar> trackRefsTPC{};
o2::track::TrackPar track{};
o2::MCCompLabel label{};
float occTPC = -1.f;
Expand Down Expand Up @@ -73,7 +74,7 @@ struct MCTrackInfo {
float getTrackParTPCPar(int i, float b, float x = 90) const;
float getTrackParTPCPhiSec(float b, float x = 90) const;

ClassDefNV(MCTrackInfo, 7);
ClassDefNV(MCTrackInfo, 8);
};

struct RecTrack {
Expand Down
15 changes: 12 additions & 3 deletions Detectors/GlobalTrackingWorkflow/study/src/TrackMCStudy.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ void TrackMCStudy::process(const o2::globaltracking::RecoContainer& recoData)
}

LOGP(info, "collected {} MC tracks", mSelMCTracks.size());
if (params.minTPCRefsToExtractClRes > 0) { // prepare MC trackrefs for TPC
if (params.minTPCRefsToExtractClRes > 0 || params.storeTPCTrackRefs) { // prepare MC trackrefs for TPC
processTPCTrackRefs();
}

Expand All @@ -532,6 +532,15 @@ void TrackMCStudy::process(const o2::globaltracking::RecoContainer& recoData)
}
return lhs.gid.getSource() > rhs.gid.getSource();
});
if (params.storeTPCTrackRefs) {
auto rft = mSelTRefIdx.find(entry.first);
if (rft != mSelTRefIdx.end()) {
auto rfent = rft->second;
for (int irf = rfent.first; irf < rfent.second; irf++) {
trackFam.mcTrackInfo.trackRefsTPC.push_back(mSelTRefs[irf]);
}
}
}
// fill track params
int tcnt = 0;
for (auto& tref : tracks) {
Expand Down Expand Up @@ -598,8 +607,8 @@ void TrackMCStudy::process(const o2::globaltracking::RecoContainer& recoData)
tcnt++;
}
if (trackFam.entITS > -1 && trackFam.entTPC > -1) { // ITS and TPC were found but matching failed
auto vidITS = tracks[trackFam.entITS].gid;
auto vidTPC = tracks[trackFam.entTPC].gid;
auto vidITS = recoData.getITSContributorGID(tracks[trackFam.entITS].gid);
auto vidTPC = recoData.getTPCContributorGID(tracks[trackFam.entTPC].gid);
auto trcTPC = recoData.getTrackParam(vidTPC);
auto trcITS = recoData.getTrackParamOut(vidITS);
if (propagateToRefX(trcTPC, trcITS)) {
Expand Down