Skip to content

Commit 21d7a6f

Browse files
committed
study
Signed-off-by: Felix Schlepper <[email protected]>
1 parent 8dd2411 commit 21d7a6f

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

Detectors/Upgrades/ITS3/study/macros/PlotDCA.C

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@ void PlotDCA(const char* dets = "all", const char* fName = "its3TrackStudy.root"
8888

8989
for (int cis = 0; cis < GTrackID::NSources; ++cis) {
9090
const auto cdm = GTrackID::getSourceDetectorsMask(cis);
91-
if (!cdm[GTrackID::ITS])
91+
if (!cdm[GTrackID::ITS]) {
9292
continue; // keep same logic as original
93+
}
9394

9495
const std::string srcRaw = GTrackID::getSourceName(cis);
9596
const std::string src = SanitizeSourceName(srcRaw);
@@ -117,6 +118,9 @@ void PlotDCA(const char* dets = "all", const char* fName = "its3TrackStudy.root"
117118

118119
for (int iEntry = 0; tree->LoadTree(iEntry) >= 0; ++iEntry) {
119120
tree->GetEntry(iEntry);
121+
if (!mcTrk->isPrimary()) {
122+
continue;
123+
}
120124
auto pdg = std::abs(mcTrk->GetPdgCode());
121125
if (pdg != 11 && pdg != 211 && pdg != 321 && pdg != 2212) {
122126
continue;
@@ -129,9 +133,9 @@ void PlotDCA(const char* dets = "all", const char* fName = "its3TrackStudy.root"
129133
auto phiReco = trk->getPhi();
130134

131135
for (int spe : {-1, pdg}) {
136+
hMapDeltaPtVsPtAllLayers[spe][src]->Fill(ptGen, deltaPt);
132137
hMapDCAxyVsPtAllLayers[spe][src]->Fill(ptGen, dcaXY);
133138
hMapDCAzVsPtAllLayers[spe][src]->Fill(ptGen, dcaZ);
134-
hMapDeltaPtVsPtAllLayers[spe][src]->Fill(ptGen, deltaPt);
135139
}
136140
}
137141

Detectors/Upgrades/ITS3/study/src/TrackingStudy.cxx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,11 +310,15 @@ void TrackingStudySpec::doDCAStudy(o2::globaltracking::RecoContainer& recoData)
310310
int idMin = vtref.getFirstEntryOfSource(is), idMax = idMin + vtref.getEntriesOfSource(is);
311311
for (int i = idMin; i < idMax; i++) {
312312
const auto vid = trackIndex[i];
313+
if (!vid.isPVContributor()) {
314+
continue;
315+
}
313316
if (!selectITSTrack(vid, recoData)) {
314317
continue;
315318
}
316319

317-
// we fit each different sub-track type, that include ITS
320+
// we fit each different sub-track type, that include ITS, e.g.
321+
// ITS,ITS-TPC,ITS-TPC-TRD,ITS-TPC-TOF,ITS-TPC-TRD-TOF
318322
auto contributorsGID = recoData.getSingleDetectorRefs(vid);
319323
for (int cis = 0; cis < GTrackID::NSources && cis <= is; cis++) {
320324
const auto cdm = GTrackID::getSourceDetectorsMask(cis);
@@ -347,12 +351,13 @@ void TrackingStudySpec::doDCAStudy(o2::globaltracking::RecoContainer& recoData)
347351
++nDCAFitsFail;
348352
continue;
349353
}
350-
const auto& mcTrk = mcReader.getTrack(recoData.getTrackMCLabel(contributorsGID[cis]));
354+
const auto& mcTrk = mcReader.getTrack(lbl);
351355
if (mcTrk == nullptr) {
352356
LOGP(fatal, "mcTrk is null did selection fail?");
353357
}
354358
stream << "mcTrk=" << *mcTrk
355-
<< "dca2MC=" << dcaInfoMC;
359+
<< "dca2MC=" << dcaInfoMC
360+
<< "lbl=" << lbl;
356361
}
357362
stream << "\n";
358363

0 commit comments

Comments
 (0)