ATLAS Offline Software
Loading...
Searching...
No Matches
Trigger
TrigTruthEvent
TrigInDetTruthEvent
TrigInDetTruthEvent
TrigInDetTrackTruthMap.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
6
/**************************************************************************
7
**
8
** File: TrigInDetTrackTruthMap.h
9
**
10
** Description: - Stores a vector of pointers to GenParticles which match
11
** a TrigInDetTrack and associated matching quality
12
** quantities (nr of common hits only, for now)
13
**
14
** Author: R.Goncalo
15
**
16
** Created: Sat Jan 18 19:55:56 GMT 2006
17
** Modified: RG - 19 Jun 06 - changed the class to deal with persistency
18
** it now behaves a bit like a:
19
** map<ElementLink to TrigInDetTrack, TrigInDetTrackTruth>
20
**
21
**************************************************************************/
22
#ifndef TRIGINDETTRACK_TRUTH_MAP_H
23
#define TRIGINDETTRACK_TRUTH_MAP_H
24
25
#include "
AthenaKernel/CLASS_DEF.h
"
26
27
#include "
AthContainers/DataVector.h
"
28
#include "AthLinks/ElementLinkVector.h"
29
30
#include "
TrigInDetEvent/TrigInDetTrack.h
"
31
#include "
TrigInDetEvent/TrigInDetTrackCollection.h
"
32
#include "
TrigInDetTruthEvent/TrigInDetTrackTruth.h
"
33
#include "
AtlasHepMC/GenParticle.h
"
34
35
#include <iostream>
36
37
38
class
TrigInDetTrackTruthMap
{
39
40
41
public
:
42
44
TrigInDetTrackTruthMap
() :
45
m_elink_vec
(0),
46
m_truth_vec
(0)
47
{ };
48
49
// Destructor
50
virtual
~TrigInDetTrackTruthMap
() { };
51
52
54
void
addMatch
(
const
TrigInDetTrackCollection
* trkColl,
55
unsigned
int
trk_indx,
56
TrigInDetTrackTruth
& p_trk_tru);
57
59
// returns true if truth association exists for track
60
bool
hasTruth
(
const
TrigInDetTrack
* p_trig_trk)
const
;
61
62
// returns the track truth association object
63
const
TrigInDetTrackTruth
*
truth
(
const
TrigInDetTrack
* p_trig_trk)
const
;
64
65
// to make the map more useful: return the link to GenParticle which better
66
// matches this track according to number of common hits
67
const
HepMcParticleLink
*
bestMatchSi
(
const
TrigInDetTrack
* p_trig_trk)
const
;
68
const
HepMcParticleLink
*
bestMatchTRT
(
const
TrigInDetTrack
* p_trig_trk)
const
;
69
70
// return number of hits for best match
71
int
bestMatchSiHits
(
const
TrigInDetTrack
* p_trig_trk)
const
;
72
int
bestMatchTRTHits
(
const
TrigInDetTrack
* p_trig_trk)
const
;
73
74
void
print
()
const
;
75
76
size_t
size
()
const
;
77
const
TrigInDetTrackTruth
*
truthi
(
size_t
i)
const
;
78
const
ElementLink<TrigInDetTrackCollection>
trackiLink
(
size_t
i)
const
;
79
const
TrigInDetTrack
*
tracki
(
size_t
i)
const
;
80
81
private
:
82
friend
class
TrigInDetTrackTruthMapCnv_p1
;
83
friend
class
TrigInDetTrackTruthMap_old_cnv
;
84
85
// used to be map for fast lookup, but changed to use ElemLink as key
86
// std::vector< ElementLink< DataVector<TrigInDetTrack> > > m_elink_vec;
87
//std::vector< ElementLink< TrigInDetTrackCollection > > m_elink_vec;
88
ElementLinkVector< TrigInDetTrackCollection >
m_elink_vec
;
89
std::vector< TrigInDetTrackTruth >
m_truth_vec
;
90
};
91
92
CLASS_DEF
(
TrigInDetTrackTruthMap
, 78130186 , 1 )
93
#endif
CLASS_DEF.h
macros to associate a CLID to a type
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition
Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:67
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
GenParticle.h
TrigInDetTrackCollection.h
TrigInDetTrackTruth.h
TrigInDetTrack.h
ElementLinkVector< TrigInDetTrackCollection >
ElementLink
ElementLink implementation for ROOT usage.
Definition
AthLinks/ElementLink.h:123
HepMcParticleLink
a link optimized in size for a GenParticle in a McEventCollection
Definition
HepMcParticleLink.h:72
TrigInDetTrackCollection
Definition
TrigInDetTrackCollection.h:13
TrigInDetTrackTruthMap
Definition
TrigInDetTrackTruthMap.h:38
TrigInDetTrackTruthMap::~TrigInDetTrackTruthMap
virtual ~TrigInDetTrackTruthMap()
Definition
TrigInDetTrackTruthMap.h:50
TrigInDetTrackTruthMap::TrigInDetTrackTruthMapCnv_p1
friend class TrigInDetTrackTruthMapCnv_p1
Definition
TrigInDetTrackTruthMap.h:82
TrigInDetTrackTruthMap::bestMatchSi
const HepMcParticleLink * bestMatchSi(const TrigInDetTrack *p_trig_trk) const
Definition
TrigInDetTrackTruthMap.cxx:114
TrigInDetTrackTruthMap::bestMatchSiHits
int bestMatchSiHits(const TrigInDetTrack *p_trig_trk) const
Definition
TrigInDetTrackTruthMap.cxx:123
TrigInDetTrackTruthMap::hasTruth
bool hasTruth(const TrigInDetTrack *p_trig_trk) const
methods to get truth-match objects
Definition
TrigInDetTrackTruthMap.cxx:58
TrigInDetTrackTruthMap::print
void print() const
Definition
TrigInDetTrackTruthMap.cxx:153
TrigInDetTrackTruthMap::bestMatchTRTHits
int bestMatchTRTHits(const TrigInDetTrack *p_trig_trk) const
Definition
TrigInDetTrackTruthMap.cxx:143
TrigInDetTrackTruthMap::trackiLink
const ElementLink< TrigInDetTrackCollection > trackiLink(size_t i) const
Definition
TrigInDetTrackTruthMap.cxx:258
TrigInDetTrackTruthMap::tracki
const TrigInDetTrack * tracki(size_t i) const
Definition
TrigInDetTrackTruthMap.cxx:251
TrigInDetTrackTruthMap::m_elink_vec
ElementLinkVector< TrigInDetTrackCollection > m_elink_vec
Definition
TrigInDetTrackTruthMap.h:88
TrigInDetTrackTruthMap::bestMatchTRT
const HepMcParticleLink * bestMatchTRT(const TrigInDetTrack *p_trig_trk) const
Definition
TrigInDetTrackTruthMap.cxx:134
TrigInDetTrackTruthMap::truth
const TrigInDetTrackTruth * truth(const TrigInDetTrack *p_trig_trk) const
Definition
TrigInDetTrackTruthMap.cxx:82
TrigInDetTrackTruthMap::TrigInDetTrackTruthMap
TrigInDetTrackTruthMap()
Constructors: POOL needs default constructor.
Definition
TrigInDetTrackTruthMap.h:44
TrigInDetTrackTruthMap::truthi
const TrigInDetTrackTruth * truthi(size_t i) const
Definition
TrigInDetTrackTruthMap.cxx:244
TrigInDetTrackTruthMap::addMatch
void addMatch(const TrigInDetTrackCollection *trkColl, unsigned int trk_indx, TrigInDetTrackTruth &p_trk_tru)
accessors to fill map
Definition
TrigInDetTrackTruthMap.cxx:32
TrigInDetTrackTruthMap::m_truth_vec
std::vector< TrigInDetTrackTruth > m_truth_vec
Definition
TrigInDetTrackTruthMap.h:89
TrigInDetTrackTruthMap::size
size_t size() const
Definition
TrigInDetTrackTruthMap.cxx:237
TrigInDetTrackTruthMap::TrigInDetTrackTruthMap_old_cnv
friend class TrigInDetTrackTruthMap_old_cnv
Definition
TrigInDetTrackTruthMap.h:83
TrigInDetTrackTruth
Definition
TrigInDetTrackTruth.h:36
TrigInDetTrack
represents a LVL2 ID track
Definition
TrigInDetTrack.h:34
Generated on
for ATLAS Offline Software by
1.14.0