@@ -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