ATLAS Offline Software
Loading...
Searching...
No Matches
eflowRecTrack Class Reference

This class extends the information about a xAOD::Track. More...

#include <eflowRecTrack.h>

Classes

class  SortDescendingPt

Public Member Functions

 eflowRecTrack (const ElementLink< xAOD::TrackParticleContainer > &trackElemLink, const ToolHandle< eflowTrackExtrapolatorBaseAlgTool > &theTrackExtrapolatorTool)
 eflowRecTrack (const eflowRecTrack &originalEflowRecTrack)
eflowRecTrackoperator= (const eflowRecTrack &originalEflowRecTrack)
virtual ~eflowRecTrack ()
const xAOD::TrackParticlegetTrack () const
const eflowTrackCaloPointsgetTrackCaloPoints () const
ElementLink< xAOD::TrackParticleContainergetTrackElemLink () const
void addClusterMatch (eflowTrackClusterLink *clusterMatch)
void addDeltaRPrime (const float &dRPrime)
void addAlternativeClusterMatch (eflowTrackClusterLink *clusterMatch, const std::string &key)
eflowRingSubtractionManagergetCellSubtractionManager ()
int getType () const
const std::vector< eflowTrackClusterLink * > & getClusterMatches () const
const std::vector< float > & getDRPrimes () const
void clearClusterMatches ()
const std::vector< eflowTrackClusterLink * > * getAlternativeClusterMatches (const std::string &key) const
bool hasBin () const
void setHasBin (bool hasBin)
void setCaloDepthArray (const double *depthArray)
const std::vector< double > & getCaloDepthArray () const
bool isSubtracted () const
void setSubtracted ()
void setEExpect (double eExpect, double varEExpect)
double getEExpect () const
double getVarEExpect () const
int getTrackId () const
void setTrackId (int trackId)
int getLayerHED () const
void setLayerHED (int layerHED)
const std::vector< int > & getLayerCellOrderVector () const
void setLayerCellOrderVector (const std::vector< int > &layerToStoreVector)
const std::vector< float > & getRadiusCellOrderVector () const
void setRadiusCellOrderVector (const std::vector< float > &radiusToStoreVector)
const std::vector< float > & getAvgEDensityCellOrderVector () const
void setAvgEDensityCellOrderVector (const std::vector< float > &avgEdensityToStoreVector)
bool isInDenseEnvironment () const
void setIsInDenseEnvironment ()
bool isRecovered () const
void setIsRecovered ()
void setpull15 (double pull15)
double getpull15 () const
void insertTruthEnergyPair (const CaloCell *cell, double truthEnergy)
double getCellTruthEnergy (const CaloCell *cell) const
void addSubtractedCaloCell (ElementLink< CaloCellContainer > theCellLink, const double &weight)
const std::vector< std::pair< ElementLink< CaloCellContainer >, double > > & getSubtractedCaloCells () const

Private Attributes

int m_trackId
ElementLink< xAOD::TrackParticleContainerm_trackElemLink
const xAOD::TrackParticlem_track
int m_type
double m_pull15
int m_layerHED {}
std::vector< int > m_layerCellOrderVector
std::vector< float > m_radiusCellOrderVector
std::vector< float > m_avgEdensityCellOrderVector
double m_eExpect
double m_varEExpect
bool m_isInDenseEnvironment
bool m_isSubtracted
bool m_isRecovered
 Tells us whether this track underwent split shower revovery.
bool m_hasBin
std::vector< double > m_caloDepthArray
std::unique_ptr< eflowTrackCaloPointsm_trackCaloPoints
eflowRingSubtractionManager m_ringSubtractionManager
std::vector< eflowTrackClusterLink * > m_clusterMatches
std::vector< float > m_deltaRPrimes
 List of distance measurements between track and cluster used in first pass matching - i.e dRPrime.
std::map< std::string, std::vector< eflowTrackClusterLink * > > m_alternativeClusterMatches
std::vector< std::pair< const CaloCell *, double > > m_cellTruthEnergyList
std::map< Identifier, double > m_cellTruthEnergyStore
std::vector< std::pair< ElementLink< CaloCellContainer >, double > > m_subtractedCells

Detailed Description

This class extends the information about a xAOD::Track.

It stores an ElementLink to a track, a raw pointer to that track, the expected energy deposit (mean and width of the reference distribution) of the track in the calorimeter, the pull15 variable (used to decide whether to run the charged shower subtraction or not), a bool to tag whether this track is in an energy dense calorimeter environment (if it is, then the charged shower subtraction is not run for that track), a bool to signify if the track has already had its shower removed from the calorimeter clusters and a bool to signify if we found a reference e/p bin (which depends on the track eta,pt and LHED). In addition to these variables we store a pointer to an eflowTrackCaloPoints object, a reference to an eflowRingSubtractionManager object and a vector of pointers to eflowTrackClusterLink. There is also an option to store additional vectors in a map using a string as a key (this allows us to store sets of eflowTrackClusterLink for multiple track-cluster matching schemes).

Definition at line 46 of file eflowRecTrack.h.

Constructor & Destructor Documentation

◆ eflowRecTrack() [1/2]

eflowRecTrack::eflowRecTrack ( const ElementLink< xAOD::TrackParticleContainer > & trackElemLink,
const ToolHandle< eflowTrackExtrapolatorBaseAlgTool > & theTrackExtrapolatorTool )

Definition at line 20 of file eflowRecTrack.cxx.

22 :
23 m_trackId(-1), m_trackElemLink(trackElemLink), m_track(*trackElemLink), m_type(5),
24 m_pull15(0.0),
25 m_layerHED(-1),
26 m_eExpect(1.0),
27 m_varEExpect(0.0),
29 m_isSubtracted(false),
30 m_isRecovered(false),
31 m_hasBin(true),
32 m_trackCaloPoints(theTrackExtrapolatorTool->execute(m_track))
33{
34}
ElementLink< xAOD::TrackParticleContainer > m_trackElemLink
std::unique_ptr< eflowTrackCaloPoints > m_trackCaloPoints
bool m_isRecovered
Tells us whether this track underwent split shower revovery.
bool m_isInDenseEnvironment
const xAOD::TrackParticle * m_track

◆ eflowRecTrack() [2/2]

eflowRecTrack::eflowRecTrack ( const eflowRecTrack & originalEflowRecTrack)

Definition at line 36 of file eflowRecTrack.cxx.

37 : m_trackId (eflowRecTrack.m_trackId),
38 m_trackElemLink (eflowRecTrack.m_trackElemLink),
40 m_type (eflowRecTrack.m_type),
41 m_pull15 (eflowRecTrack.m_pull15),
42 m_layerHED (eflowRecTrack.m_layerHED),
43 m_eExpect (eflowRecTrack.m_eExpect),
44 m_varEExpect (eflowRecTrack.m_varEExpect),
45 m_isInDenseEnvironment (eflowRecTrack.m_isInDenseEnvironment),
46 m_isSubtracted (eflowRecTrack.m_isSubtracted),
47 m_isRecovered (eflowRecTrack.m_isRecovered),
48 m_hasBin (eflowRecTrack.m_hasBin),
49 m_trackCaloPoints (std::make_unique<eflowTrackCaloPoints>(*eflowRecTrack.m_trackCaloPoints))
50{
51}
eflowRecTrack(const ElementLink< xAOD::TrackParticleContainer > &trackElemLink, const ToolHandle< eflowTrackExtrapolatorBaseAlgTool > &theTrackExtrapolatorTool)

◆ ~eflowRecTrack()

eflowRecTrack::~eflowRecTrack ( )
virtualdefault

Member Function Documentation

◆ addAlternativeClusterMatch()

void eflowRecTrack::addAlternativeClusterMatch ( eflowTrackClusterLink * clusterMatch,
const std::string & key )
inline

Definition at line 61 of file eflowRecTrack.h.

61{ m_alternativeClusterMatches[key].push_back(clusterMatch); }
std::map< std::string, std::vector< eflowTrackClusterLink * > > m_alternativeClusterMatches

◆ addClusterMatch()

void eflowRecTrack::addClusterMatch ( eflowTrackClusterLink * clusterMatch)
inline

Definition at line 59 of file eflowRecTrack.h.

59{ m_clusterMatches.push_back(clusterMatch); }
std::vector< eflowTrackClusterLink * > m_clusterMatches

◆ addDeltaRPrime()

void eflowRecTrack::addDeltaRPrime ( const float & dRPrime)
inline

Definition at line 60 of file eflowRecTrack.h.

60{ m_deltaRPrimes.push_back(dRPrime);}
std::vector< float > m_deltaRPrimes
List of distance measurements between track and cluster used in first pass matching - i....

◆ addSubtractedCaloCell()

void eflowRecTrack::addSubtractedCaloCell ( ElementLink< CaloCellContainer > theCellLink,
const double & weight )
inline

Definition at line 115 of file eflowRecTrack.h.

115{ m_subtractedCells.push_back(std::make_pair(theCellLink,weight)); }
std::vector< std::pair< ElementLink< CaloCellContainer >, double > > m_subtractedCells

◆ clearClusterMatches()

void eflowRecTrack::clearClusterMatches ( )
inline

Definition at line 70 of file eflowRecTrack.h.

70{ m_clusterMatches.clear(); m_deltaRPrimes.clear(); }

◆ getAlternativeClusterMatches()

const std::vector< eflowTrackClusterLink * > * eflowRecTrack::getAlternativeClusterMatches ( const std::string & key) const

Definition at line 80 of file eflowRecTrack.cxx.

80 {
81
82 std::map<std::string,std::vector<eflowTrackClusterLink*> >::const_iterator thisIterator = m_alternativeClusterMatches.find(key);
83 if (thisIterator != m_alternativeClusterMatches.end()) return &m_alternativeClusterMatches.at(key);
84 else return nullptr;
85
86 return nullptr;
87
88}

◆ getAvgEDensityCellOrderVector()

const std::vector< float > & eflowRecTrack::getAvgEDensityCellOrderVector ( ) const
inline

Definition at line 99 of file eflowRecTrack.h.

std::vector< float > m_avgEdensityCellOrderVector

◆ getCaloDepthArray()

const std::vector< double > & eflowRecTrack::getCaloDepthArray ( ) const
inline

Definition at line 78 of file eflowRecTrack.h.

78{ return m_caloDepthArray; }
std::vector< double > m_caloDepthArray

◆ getCellSubtractionManager()

eflowRingSubtractionManager & eflowRecTrack::getCellSubtractionManager ( )
inline

Definition at line 63 of file eflowRecTrack.h.

eflowRingSubtractionManager m_ringSubtractionManager

◆ getCellTruthEnergy()

double eflowRecTrack::getCellTruthEnergy ( const CaloCell * cell) const

Definition at line 95 of file eflowRecTrack.cxx.

95 {
96 if (m_cellTruthEnergyStore.count(cell->ID()) == 0) return 0.0;
97 else return m_cellTruthEnergyStore.at(cell->ID());
98}
std::map< Identifier, double > m_cellTruthEnergyStore

◆ getClusterMatches()

const std::vector< eflowTrackClusterLink * > & eflowRecTrack::getClusterMatches ( ) const
inline

Definition at line 67 of file eflowRecTrack.h.

67{ return m_clusterMatches; }

◆ getDRPrimes()

const std::vector< float > & eflowRecTrack::getDRPrimes ( ) const
inline

Definition at line 68 of file eflowRecTrack.h.

68{ return m_deltaRPrimes;}

◆ getEExpect()

double eflowRecTrack::getEExpect ( ) const
inline

Definition at line 84 of file eflowRecTrack.h.

84{ return m_eExpect; }

◆ getLayerCellOrderVector()

const std::vector< int > & eflowRecTrack::getLayerCellOrderVector ( ) const
inline

Definition at line 93 of file eflowRecTrack.h.

93{ return m_layerCellOrderVector; }
std::vector< int > m_layerCellOrderVector

◆ getLayerHED()

int eflowRecTrack::getLayerHED ( ) const
inline

Definition at line 90 of file eflowRecTrack.h.

90{ return m_layerHED; }

◆ getpull15()

double eflowRecTrack::getpull15 ( ) const
inline

Definition at line 110 of file eflowRecTrack.h.

110{ return m_pull15; }

◆ getRadiusCellOrderVector()

const std::vector< float > & eflowRecTrack::getRadiusCellOrderVector ( ) const
inline

Definition at line 96 of file eflowRecTrack.h.

std::vector< float > m_radiusCellOrderVector

◆ getSubtractedCaloCells()

const std::vector< std::pair< ElementLink< CaloCellContainer >, double > > & eflowRecTrack::getSubtractedCaloCells ( ) const
inline

Definition at line 116 of file eflowRecTrack.h.

116{ return m_subtractedCells; }

◆ getTrack()

const xAOD::TrackParticle * eflowRecTrack::getTrack ( ) const
inline

Definition at line 54 of file eflowRecTrack.h.

54{ return m_track; }

◆ getTrackCaloPoints()

const eflowTrackCaloPoints & eflowRecTrack::getTrackCaloPoints ( ) const
inline

Definition at line 56 of file eflowRecTrack.h.

56{ return *m_trackCaloPoints; }

◆ getTrackElemLink()

ElementLink< xAOD::TrackParticleContainer > eflowRecTrack::getTrackElemLink ( ) const
inline

Definition at line 58 of file eflowRecTrack.h.

58{ return m_trackElemLink; }

◆ getTrackId()

int eflowRecTrack::getTrackId ( ) const
inline

Definition at line 86 of file eflowRecTrack.h.

86{ return m_trackId; }

◆ getType()

int eflowRecTrack::getType ( ) const
inline

Definition at line 65 of file eflowRecTrack.h.

65{ return m_type; }

◆ getVarEExpect()

double eflowRecTrack::getVarEExpect ( ) const
inline

Definition at line 85 of file eflowRecTrack.h.

85{ return m_varEExpect; }

◆ hasBin()

bool eflowRecTrack::hasBin ( ) const
inline

Definition at line 74 of file eflowRecTrack.h.

74{ return m_hasBin; }

◆ insertTruthEnergyPair()

void eflowRecTrack::insertTruthEnergyPair ( const CaloCell * cell,
double truthEnergy )

Definition at line 90 of file eflowRecTrack.cxx.

90 {
91 if (m_cellTruthEnergyStore.count(cell->ID()) == 0) m_cellTruthEnergyStore[cell->ID()] = truthEnergy;
92 else m_cellTruthEnergyStore[cell->ID()] += truthEnergy;
93}

◆ isInDenseEnvironment()

bool eflowRecTrack::isInDenseEnvironment ( ) const
inline

Definition at line 103 of file eflowRecTrack.h.

103{ return m_isInDenseEnvironment;}

◆ isRecovered()

bool eflowRecTrack::isRecovered ( ) const
inline

Definition at line 106 of file eflowRecTrack.h.

106{ return m_isRecovered;}

◆ isSubtracted()

bool eflowRecTrack::isSubtracted ( ) const
inline

Definition at line 80 of file eflowRecTrack.h.

80{ return m_isSubtracted; }

◆ operator=()

eflowRecTrack & eflowRecTrack::operator= ( const eflowRecTrack & originalEflowRecTrack)

Definition at line 53 of file eflowRecTrack.cxx.

53 {
54 if (this == &originalEflowRecTrack) return *this;
55 //if not assigning to self, then we copy the data to the new object
56 else{
57 m_trackId = originalEflowRecTrack.m_trackId;
58 m_trackElemLink = originalEflowRecTrack.m_trackElemLink;
60 m_type = originalEflowRecTrack.m_type;
61 m_pull15 = originalEflowRecTrack.m_pull15;
62 m_eExpect = originalEflowRecTrack.m_eExpect;
63 m_varEExpect = originalEflowRecTrack.m_varEExpect;
64 m_isInDenseEnvironment = originalEflowRecTrack.m_isInDenseEnvironment;
65 m_isSubtracted = originalEflowRecTrack.m_isSubtracted;
66 m_isRecovered = originalEflowRecTrack.m_isRecovered;
67 m_hasBin = originalEflowRecTrack.m_hasBin;
68 m_trackCaloPoints = std::make_unique<eflowTrackCaloPoints>(*originalEflowRecTrack.m_trackCaloPoints);
69 m_layerHED = originalEflowRecTrack.m_layerHED;
70 return *this;
71 }//if not assigning to self, then we have copied the data to the new object
72}

◆ setAvgEDensityCellOrderVector()

void eflowRecTrack::setAvgEDensityCellOrderVector ( const std::vector< float > & avgEdensityToStoreVector)
inline

Definition at line 100 of file eflowRecTrack.h.

100{ m_avgEdensityCellOrderVector = avgEdensityToStoreVector; }

◆ setCaloDepthArray()

void eflowRecTrack::setCaloDepthArray ( const double * depthArray)

Definition at line 76 of file eflowRecTrack.cxx.

76 {
77 m_caloDepthArray.assign(depthArray, depthArray + eflowDepthCalculator::NDepth() + 1);
78}

◆ setEExpect()

void eflowRecTrack::setEExpect ( double eExpect,
double varEExpect )
inline

Definition at line 83 of file eflowRecTrack.h.

83{ m_eExpect = eExpect; m_varEExpect = varEExpect; }

◆ setHasBin()

void eflowRecTrack::setHasBin ( bool hasBin)
inline

Definition at line 75 of file eflowRecTrack.h.

75{ m_hasBin = hasBin; }
bool hasBin() const

◆ setIsInDenseEnvironment()

void eflowRecTrack::setIsInDenseEnvironment ( )
inline

Definition at line 104 of file eflowRecTrack.h.

104{ m_isInDenseEnvironment = true; }

◆ setIsRecovered()

void eflowRecTrack::setIsRecovered ( )
inline

Definition at line 107 of file eflowRecTrack.h.

107{ m_isRecovered= true; }

◆ setLayerCellOrderVector()

void eflowRecTrack::setLayerCellOrderVector ( const std::vector< int > & layerToStoreVector)
inline

Definition at line 94 of file eflowRecTrack.h.

94{ m_layerCellOrderVector = layerToStoreVector; }

◆ setLayerHED()

void eflowRecTrack::setLayerHED ( int layerHED)
inline

Definition at line 91 of file eflowRecTrack.h.

91{ m_layerHED = layerHED; }

◆ setpull15()

void eflowRecTrack::setpull15 ( double pull15)
inline

Definition at line 109 of file eflowRecTrack.h.

109{ m_pull15 = pull15; }

◆ setRadiusCellOrderVector()

void eflowRecTrack::setRadiusCellOrderVector ( const std::vector< float > & radiusToStoreVector)
inline

Definition at line 97 of file eflowRecTrack.h.

97{ m_radiusCellOrderVector = radiusToStoreVector; }

◆ setSubtracted()

void eflowRecTrack::setSubtracted ( )

Definition at line 100 of file eflowRecTrack.cxx.

100 {
101 if (isSubtracted()){
102 REPORT_MESSAGE_WITH_CONTEXT(MSG::WARNING, "eflowRecTrack")
103 << "Invoke setSubtracted() on track that is subtracted already!" << endmsg;
104 return;
105 }//if track was already subtracted then print a warning to the user about that and return
106 m_isSubtracted = true;
107}
#define endmsg
#define REPORT_MESSAGE_WITH_CONTEXT(LVL, CONTEXT_NAME)
Report a message, with an explicitly specified context name.
bool isSubtracted() const

◆ setTrackId()

void eflowRecTrack::setTrackId ( int trackId)
inline

Definition at line 87 of file eflowRecTrack.h.

87{ m_trackId = trackId; }

Member Data Documentation

◆ m_alternativeClusterMatches

std::map<std::string,std::vector<eflowTrackClusterLink*> > eflowRecTrack::m_alternativeClusterMatches
private

Definition at line 147 of file eflowRecTrack.h.

◆ m_avgEdensityCellOrderVector

std::vector<float> eflowRecTrack::m_avgEdensityCellOrderVector
private

Definition at line 129 of file eflowRecTrack.h.

◆ m_caloDepthArray

std::vector<double> eflowRecTrack::m_caloDepthArray
private

Definition at line 140 of file eflowRecTrack.h.

◆ m_cellTruthEnergyList

std::vector<std::pair<const CaloCell*, double> > eflowRecTrack::m_cellTruthEnergyList
private

Definition at line 150 of file eflowRecTrack.h.

◆ m_cellTruthEnergyStore

std::map<Identifier,double> eflowRecTrack::m_cellTruthEnergyStore
private

Definition at line 151 of file eflowRecTrack.h.

◆ m_clusterMatches

std::vector<eflowTrackClusterLink*> eflowRecTrack::m_clusterMatches
private

Definition at line 144 of file eflowRecTrack.h.

◆ m_deltaRPrimes

std::vector<float> eflowRecTrack::m_deltaRPrimes
private

List of distance measurements between track and cluster used in first pass matching - i.e dRPrime.

Definition at line 146 of file eflowRecTrack.h.

◆ m_eExpect

double eflowRecTrack::m_eExpect
private

Definition at line 131 of file eflowRecTrack.h.

◆ m_hasBin

bool eflowRecTrack::m_hasBin
private

Definition at line 138 of file eflowRecTrack.h.

◆ m_isInDenseEnvironment

bool eflowRecTrack::m_isInDenseEnvironment
private

Definition at line 134 of file eflowRecTrack.h.

◆ m_isRecovered

bool eflowRecTrack::m_isRecovered
private

Tells us whether this track underwent split shower revovery.

Definition at line 137 of file eflowRecTrack.h.

◆ m_isSubtracted

bool eflowRecTrack::m_isSubtracted
private

Definition at line 135 of file eflowRecTrack.h.

◆ m_layerCellOrderVector

std::vector<int> eflowRecTrack::m_layerCellOrderVector
private

Definition at line 127 of file eflowRecTrack.h.

◆ m_layerHED

int eflowRecTrack::m_layerHED {}
private

Definition at line 126 of file eflowRecTrack.h.

126{};

◆ m_pull15

double eflowRecTrack::m_pull15
private

Definition at line 124 of file eflowRecTrack.h.

◆ m_radiusCellOrderVector

std::vector<float> eflowRecTrack::m_radiusCellOrderVector
private

Definition at line 128 of file eflowRecTrack.h.

◆ m_ringSubtractionManager

eflowRingSubtractionManager eflowRecTrack::m_ringSubtractionManager
private

Definition at line 143 of file eflowRecTrack.h.

◆ m_subtractedCells

std::vector<std::pair<ElementLink<CaloCellContainer>, double> > eflowRecTrack::m_subtractedCells
private

Definition at line 154 of file eflowRecTrack.h.

◆ m_track

const xAOD::TrackParticle* eflowRecTrack::m_track
private

Definition at line 122 of file eflowRecTrack.h.

◆ m_trackCaloPoints

std::unique_ptr<eflowTrackCaloPoints> eflowRecTrack::m_trackCaloPoints
private

Definition at line 142 of file eflowRecTrack.h.

◆ m_trackElemLink

ElementLink<xAOD::TrackParticleContainer> eflowRecTrack::m_trackElemLink
private

Definition at line 121 of file eflowRecTrack.h.

◆ m_trackId

int eflowRecTrack::m_trackId
private

Definition at line 120 of file eflowRecTrack.h.

◆ m_type

int eflowRecTrack::m_type
private

Definition at line 123 of file eflowRecTrack.h.

◆ m_varEExpect

double eflowRecTrack::m_varEExpect
private

Definition at line 132 of file eflowRecTrack.h.


The documentation for this class was generated from the following files: