|
ATLAS Offline Software
|
Go to the documentation of this file.
14 #ifndef INDETRECSTATISTICS_TrackStatHelper_H
15 #define INDETRECSTATISTICS_TrackStatHelper_H
136 TrackStatHelper (
const std::string&,
const std::string&,
bool careAboutTruth =
true);
141 std::vector<const Trk::Track *> &,
142 const std::vector <std::pair<HepMC::ConstGenParticlePtr,int> > &,
149 const unsigned int *,
150 const unsigned int *)
const;
189 template <
int N_Categories,
int N_Types,
int N_Regions,
typename T_Int=
long>
193 for (
unsigned int cat_i=0; cat_i < N_Categories; ++cat_i ) {
194 for (
unsigned int type_i=0; type_i < N_Types; ++type_i) {
195 for (
unsigned int eta_i=0; eta_i < N_Regions; ++eta_i) {
201 template <
typename T_IntB>
203 for (
unsigned int cat_i=0; cat_i < N_Categories; ++cat_i ) {
204 for (
unsigned int type_i=0; type_i < N_Types; ++type_i) {
205 for (
unsigned int eta_i=0; eta_i < N_Regions; ++eta_i) {
206 m_counter[cat_i][type_i][eta_i] +=
a.m_counter[cat_i][type_i][eta_i];
215 template <
int N_Categories,
int N_Types,
int N_Regions,
int N_SubCategories,
typename T_Int=
long>
219 for (
unsigned int cat_i=0; cat_i < N_Categories; ++cat_i ) {
220 for (
unsigned int type_i=0; type_i < N_Types; ++type_i) {
221 for (
unsigned int eta_i=0; eta_i < N_Regions; ++eta_i) {
222 for (
unsigned int sub_i=0; sub_i < N_SubCategories; ++sub_i) {
223 m_counter[cat_i][type_i][eta_i][sub_i]=0;
229 template <
typename T_IntB>
231 for (
unsigned int cat_i=0; cat_i < N_Categories; ++cat_i ) {
232 for (
unsigned int type_i=0; type_i < N_Types; ++type_i) {
233 for (
unsigned int eta_i=0; eta_i < N_Regions; ++eta_i) {
234 for (
unsigned int sub_i=0; sub_i < N_SubCategories; ++sub_i) {
235 m_counter[cat_i][type_i][eta_i][sub_i] +=
a.m_counter[cat_i][type_i][eta_i][sub_i];
242 T_Int
m_counter[N_Categories][N_Types][N_Regions][N_SubCategories];
333 mutable std::bitset<Trk::TrackInfo::NumberOfTrackProperties> m_patternProperties
ATLAS_THREAD_SAFE;
342 #endif // INDETRECSTATISTICS_TrackStatHelper_H
@ kNumberOfInnermostPixelLayerHits
static const char *const s_summaryTypeName[kNSummaryTypes]
table column labels for summary
Counter4D & operator+=(const Counter4D< N_Categories, N_Types, N_Regions, N_SubCategories, T_IntB > &a)
@ TRACK_LOWTRUTHPROB2_SIGNAL
@ TRACK_LOWTRUTHPROB_SIGNAL
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
static std::string getSummaryTypeHeader()
const std::string & key() const
Returns TrackCollection Key.
std::string m_TrackCollectionKey
StoreGate Track Collection Key.
@ TRACK_NOHEPMCPARTICLELINK
@ kNumberOfOutliersOnTrack
@ kTracks_rec
number of reconstructed tracks for a given type and eta region
Counter & operator+=(const Counter< N_Categories, N_Types, N_Regions, T_IntB > &a)
void printRegion2(MsgStream &out, enum eta_region, float denominator) const
void printSecondary(MsgStream &out) const
Prints all of the statistics information, calls printRegion, printTrackSummaryRegion,...
@ kNumberOfTRTHighThresholdOutliers
@ kNumberOfTRTHighThresholdHits
@ TRACK_MATCHED_SECONDARY
float matchTrackCut
Truth probability has to be greater than this for track to be considered matched
HitsCounterAtomic m_hits ATLAS_THREAD_SAFE
void printRegion1(MsgStream &out, enum eta_region) const
Prints ntracks per event,efficiencies,fake rates, and general hit information for given eta region.
void setSummaryStat(track_types track_i, eta_region region_i, const Trk::TrackSummary *summary, TrackSummaryCounter &trackSummarySum) const
bool printTrackSummaryRegion(MsgStream &out, enum track_types, enum eta_region) const
Sets up detailed statistics part of table, calls printTrackSummaryRegion.
std::string m_TrackTruthCollectionKey
StoreGate Track Truth Collection Key.
std::atomic< bool > m_author_found[Trk::TrackInfo::NumberOfTrackFitters]
Number of tracking authors found.
TracksCounterAtomic m_tracks ATLAS_THREAD_SAFE
@ kTracks_gen
number of generated tracks for a given type and eta region, looping over genevents to include possibl...
void SetCuts(const struct cuts &)
Sets the cuts such as the eta regions (barrel, transition,endcap) and the hit fraction fake cuts and ...
std::atomic< long > m_events
Number of events.
@ kHits_pri
number of hits from primary tracks for a given type and eta region
@ kTrackSummarySum
Track Summary Values for each track type, region and summary type.
void print(MsgStream &out) const
Prints all of the statistics information, calls printRegion, printTrackSummaryRegion,...
void printRegionSecondary(MsgStream &out, enum eta_region, float denominator) const
Prints ntracks per event,efficiencies,fake rates, and general hit information for given eta region.
@ kNTrackSummaryBAD
Number of tracks with track summary bad for given type,eta,summary type.
@ kNTrackSummaryOK
Number of tracks with track summary OK for given type,eta,summary type.
std::atomic< bool > m_truthMissing
Flag for if track truth is missing.
std::bitset< Trk::TrackInfo::NumberOfTrackRecoInfo > m_recoInfo ATLAS_THREAD_SAFE
const GenParticle * ConstGenParticlePtr
const std::string & Truthkey() const
Returns Truth TrackCollection Key.
A summary of the information contained by a track.
std::bitset< Trk::TrackInfo::NumberOfTrackProperties > m_patternProperties ATLAS_THREAD_SAFE
static const Trk::SummaryType s_summaryTypes[kNSummaryTypes]
summary types for which statistics are gathered
@ kTracks_gen_signal
number of generated tracks for a given type and eta region, just from first genevent
int ClassifyParticle(const HepMC::ConstGenParticlePtr &particle, const double prob) const
classifies gen particle as primary, secondary or truncated
std::multimap< HepMcParticleLink, float > recoToTruthMap
map containing reco track and matched truth track barcode
bool PassTrackCuts(const Trk::TrackParameters *para) const
defines 'good' reco tracks
T_Int m_counter[N_Categories][N_Types][N_Regions]
float maxEtaTransition
Maxiumu eta for transition region.
float fakeTrackCut
fraction of hits per track that come from single matched truth track.
@ kHits_sec
number of hits from secondary tracks for a given type and eta region
TrackSummaryCounterAtomic m_trackSummarySum ATLAS_THREAD_SAFE
TrackStatHelper(const std::string &, const std::string &, bool careAboutTruth=true)
Constructor.
@ kNumberOfSCTDoubleHoles
@ kHits_rec
number of reconstructed hits for a given type and eta region
@ TRACK_MULTMATCH_SECONDARY
void addEvent(const TrackCollection *, std::vector< const Trk::Track * > &, const std::vector< std::pair< HepMC::ConstGenParticlePtr, int > > &, const TrackTruthCollection *, const AtlasDetectorID *const, const PixelID *, const SCT_ID *, const Trk::IExtendedTrackSummaryTool *, bool, const unsigned int *, const unsigned int *) const
Adds hit, track and matching information for each event.
void reset()
Resets the track collection information, called in the constructor.
float maxEtaEndcap
Maximum eta for endcap.
T_Int m_counter[N_Categories][N_Types][N_Regions][N_SubCategories]
float fakeTrackCut2
2nd value for fraction of hits per track that come from single matched truth track.
SummaryType
enumerates the different types of information stored in Summary.
@ NumberOfTrackFitters
maximum number of enums
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
void printTrackSummaryAverage(MsgStream &out, enum track_types, enum eta_region, int summary_type) const
Prints information from TrackSummaryTool.
@ TRACK_MULTMATCH_PRIMARY