ATLAS Offline Software
Classes | Functions
SubDetHitStatistics.h File Reference
#include "AthenaKernel/CLASS_DEF.h"
#include <cstring>
Include dependency graph for SubDetHitStatistics.h:

Go to the source code of this file.

Classes

class  SubDetHitStatistics
 
class  SubDetHitStatistics::OverflowControlledRef
 A simple class to retrofit overflow protection into the existing code. More...
 

Functions

template<class Ostream >
Ostream & operator<< (Ostream &os, const SubDetHitStatistics &m)
 

Detailed Description

A struture to keep per-subdetector numbers of hits for truth matching. The numbers are typically small, so only one byte (unsigned char) is per subdetector is allocated. However it's been observed that a low-energy track looping in the TRT may sometimes produce more than 255 hits, causing an integer overflow and producing "impossible" Tanimoto similarity measure > 1. This is now addressed by the OverflowControlledRef helper class that provides a protection layer for the hit count storage.

Counts of up to OVERFLOW_VALUE-1 hits can be stored unambiguously. If a SubDetHitStatistics counter is set to OVERFLOW_VALUE, that means there were OVERFLOW_VALUE or more hits.

Author
Andrei Gaponenko, 2006-2009

Definition in file SubDetHitStatistics.h.

Function Documentation

◆ operator<<()

template<class Ostream >
Ostream& operator<< ( Ostream &  os,
const SubDetHitStatistics m 
)

Definition at line 97 of file SubDetHitStatistics.h.

97  {
98  os<<"SubDetStat(";
99  for(unsigned i=0; i<SubDetHitStatistics::NUM_SUBDETECTORS; i++) {
102  }
103  return os<<")";
104 }
SubDetHitStatistics::SubDetType
SubDetType
Definition: SubDetHitStatistics.h:74
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
SubDetHitStatistics::NUM_SUBDETECTORS
@ NUM_SUBDETECTORS
Definition: SubDetHitStatistics.h:74
xAOD::unsigned
unsigned
Definition: RingSetConf_v1.cxx:662
lumiFormat.i
int i
Definition: lumiFormat.py:85
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231