ATLAS Offline Software
Loading...
Searching...
No Matches
SubDetHitStatistics.h File Reference

A struture to keep per-subdetector numbers of hits for truth matching. More...

#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.