Skip to content

Commit 292a0df

Browse files
committed
Add more info in CreateDic macro
1 parent 7cc55c2 commit 292a0df

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

Detectors/Upgrades/ITS3/macros/test/CheckDigitsITS3.C

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ void CheckDigitsITS3(std::string digifile = "it3digits.root", std::string hitfil
8080

8181
int nevD = digTree->GetEntries(); // digits in cont. readout may be grouped as few events per entry
8282

83-
int lastReadHitEv = -1;
8483

8584
int nDigitReadIB{0}, nDigitReadOB{0};
8685
int nDigitFilledIB{0}, nDigitFilledOB{0};

Detectors/Upgrades/ITS3/macros/test/CreateDictionariesITS3.C

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ void CreateDictionariesITS3(bool saveDeltas = false,
9494
TNtuple* nt = nullptr;
9595
if (saveDeltas) {
9696
fout = TFile::Open("CreateDictionaries.root", "recreate");
97-
nt = new TNtuple("nt", "hashes ntuple", "hash:dx:dz");
97+
nt = new TNtuple("nt", "hashes ntuple", "hash:layer:chipID:dx:dz:outlimDx:outlimDz");
9898
}
9999

100100
const o2::steer::DigitizationContext* digContext = nullptr;
@@ -284,19 +284,25 @@ void CreateDictionariesITS3(bool saveDeltas = false,
284284
dZ = xyzLocM.Z() - locC.Z();
285285
dX /= (ib) ? o2::its3::SegmentationMosaix::PitchRow : o2::itsmft::SegmentationAlpide::PitchRow;
286286
dZ /= (ib) ? o2::its3::SegmentationMosaix::PitchCol : o2::itsmft::SegmentationAlpide::PitchCol;
287-
if (saveDeltas) {
288-
nt->Fill(topology.getHash(), dX, dZ);
289-
}
287+
288+
float outLimitDx{-1}, outLimitDz{-1};
290289
if (checkOutliers > 0.) {
291-
if (bool bX = std::abs(dX) > topology.getRowSpan() * checkOutliers, bZ = std::abs(dZ) > topology.getColumnSpan() * checkOutliers; bX || bZ) { // ignore outlier
290+
outLimitDx = topology.getRowSpan() * checkOutliers;
291+
outLimitDz = topology.getColumnSpan() * checkOutliers;
292+
bool isOutDx = std::abs(dX) > outLimitDx;
293+
bool isOutDz = std::abs(dZ) > outLimitDz;
294+
if (isOutDx || isOutDz) { // ignore outlier
292295
(ib) ? ++cOutliersIB : ++cOutliersOB;
293-
LOGP(debug, "Ignored Value dX={} > {} * {} -> {}", dX, topology.getRowSpan(), checkOutliers, bX);
294-
LOGP(debug, "Ignored Value dZ={} > {} * {} -> {}", dZ, topology.getColumnSpan(), checkOutliers, bZ);
296+
LOGP(debug, "Ignored Value dX={} > {} * {} -> {}", dX, topology.getRowSpan(), checkOutliers, isOutDx);
297+
LOGP(debug, "Ignored Value dZ={} > {} * {} -> {}", dZ, topology.getColumnSpan(), checkOutliers, isOutDz);
295298
dX = dZ = BuildTopologyDictionary::IgnoreVal;
296299
} else {
297300
(ib) ? ++cOkIB : ++cOkOB;
298301
}
299302
}
303+
if (saveDeltas) {
304+
nt->Fill(topology.getHash(), layer, chipID, dX, dZ, outLimitDx, outLimitDz);
305+
}
300306
}
301307
} else {
302308
/* LOGP(info, " Failed to find MC hit entry for Tr: {} chipID: {}", trID, chipID); */

0 commit comments

Comments
 (0)