ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
eflowTrackCaloPoints Class Reference

This class stores a map of calorimeter layers and track parameters (the result of the track extrapolation to the calorimeter layers). More...

#include <eflowTrackCaloPoints.h>

Collaboration diagram for eflowTrackCaloPoints:

Public Member Functions

 eflowTrackCaloPoints (const std::map< eflowCalo::LAYER, const Trk::TrackParameters * > &trackParameters)
 
 eflowTrackCaloPoints (const std::map< eflowCalo::LAYER, const Trk::TrackParameters * > &trackParameters, std::map< CaloCell_ID::CaloSample, const Trk::TrackParameters * > &tileTrackParamaters)
 
 eflowTrackCaloPoints ()
 
 ~eflowTrackCaloPoints ()
 
const std::pair< float, float > operator[] (eflowCalo::LAYER layer) const
 
const eflowEtaPhiPositiongetEtaPhiPos (eflowCalo::LAYER layer) const
 
const eflowEtaPhiPositiongetTileEtaPhiPos (CaloCell_ID::CaloSample layer) const
 
double getEta (eflowCalo::LAYER layer) const
 
double getPhi (eflowCalo::LAYER layer) const
 
double getTileEta (CaloCell_ID::CaloSample layer) const
 
double getTilePhi (CaloCell_ID::CaloSample layer) const
 
const std::pair< float, float > getEM2etaPhi () const
 
const eflowEtaPhiPositiongetEM2etaPhiPos () const
 
double getEM2eta () const
 
double getEM1eta () const
 
double getFCAL0eta () const
 
Amg::Vector3D getPosition (eflowCalo::LAYER layer)
 
Amg::Vector3D getDirection (eflowCalo::LAYER layer)
 
bool haveLayer (eflowCalo::LAYER layer) const
 
void setEtaPhi (eflowCaloENUM secondLayer, double eta, double phi)
 
void setEtaPhiTile (CaloCell_ID::CaloSample secondLayer, const Amg::Vector3D &vec)
 
void setEtaPhi (eflowCalo::LAYER lay, const Amg::Vector3D &vec)
 
void copyEtaPhi (eflowCalo::LAYER fromLay, eflowCalo::LAYER toLay)
 

Static Public Member Functions

static double defaultEta ()
 
static double defaultPhi ()
 
static Amg::Vector3D parToPosition (const Trk::TrackParameters *extrapolatedParameters)
 
static Amg::Vector3D parToDirection (const Trk::TrackParameters *extrapolatedParameters)
 

Public Attributes

bool m_isEM1Barrel
 
bool m_isEM2Barrel
 

Private Member Functions

eflowCalo::LAYER getEM2Layer () const
 
eflowCalo::LAYER getEM1Layer () const
 

Private Attributes

std::map< eflowCalo::LAYER, Amg::Vector3Dm_positions
 
std::map< eflowCalo::LAYER, Amg::Vector3Dm_directions
 
std::map< eflowCalo::LAYER, eflowEtaPhiPositionm_etaPhiPositions
 
std::map< CaloCell_ID::CaloSample, eflowEtaPhiPositionm_tileEtaPhiPositions
 

Static Private Attributes

static const Amg::Vector3D m_nullVector = Amg::Vector3D(0.0, 0.0, 0.0)
 
static const std::pair< float, float > m_defaultEtaPhiPair = pair<float, float>(-999.0, -999.0)
 
static const eflowEtaPhiPosition m_defaultEtaPhiPosition = eflowEtaPhiPosition(-999.,-999.)
 

Detailed Description

This class stores a map of calorimeter layers and track parameters (the result of the track extrapolation to the calorimeter layers).

It also stores maps from calorimeter layers to positions, directions and eflowEtaPhiPositions.

Definition at line 30 of file eflowTrackCaloPoints.h.

Constructor & Destructor Documentation

◆ eflowTrackCaloPoints() [1/3]

eflowTrackCaloPoints::eflowTrackCaloPoints ( const std::map< eflowCalo::LAYER, const Trk::TrackParameters * > &  trackParameters)

Definition at line 31 of file eflowTrackCaloPoints.cxx.

31  :
32  m_isEM1Barrel(trackParameters.begin()->first == eflowCalo::EMB1) {
33 
34  /* Fill etaPhiPositions map */
35  std::map<eflowCalo::LAYER, const Trk::TrackParameters*>::const_iterator itPars = trackParameters.begin();
36  std::map<eflowCalo::LAYER, const Trk::TrackParameters*>::const_iterator endPars = trackParameters.end();
37  m_isEM2Barrel = false;
38  for (; itPars != endPars; ++itPars) {
39  setEtaPhi(itPars->first, parToPosition(itPars->second));
40  if (itPars->first == eflowCalo::EMB2) m_isEM2Barrel = true;
41  m_positions[itPars->first] = parToPosition(itPars->second);
42  m_directions[itPars->first] = parToDirection(itPars->second);
43  }
44 
45 }

◆ eflowTrackCaloPoints() [2/3]

eflowTrackCaloPoints::eflowTrackCaloPoints ( const std::map< eflowCalo::LAYER, const Trk::TrackParameters * > &  trackParameters,
std::map< CaloCell_ID::CaloSample, const Trk::TrackParameters * > &  tileTrackParamaters 
)

Definition at line 47 of file eflowTrackCaloPoints.cxx.

48  :
49  m_isEM1Barrel(trackParameters.begin()->first == eflowCalo::EMB1){
50  /* Fill etaPhiPositions map */
51  std::map<eflowCalo::LAYER, const Trk::TrackParameters*>::const_iterator itPars = trackParameters.begin();
52  std::map<eflowCalo::LAYER, const Trk::TrackParameters*>::const_iterator endPars = trackParameters.end();
53  m_isEM2Barrel = false;
54  for (; itPars != endPars; ++itPars) {
55  setEtaPhi(itPars->first, parToPosition(itPars->second));
56  if (itPars->first == eflowCalo::EMB2) m_isEM2Barrel = true;
57  m_positions[itPars->first] = parToPosition(itPars->second);
58  m_directions[itPars->first] = parToDirection(itPars->second);
59  }
60 
61  for (auto firstTileParam : tileTrackParamaters) setEtaPhiTile(firstTileParam.first,parToPosition(firstTileParam.second));
62 
63  }

◆ eflowTrackCaloPoints() [3/3]

eflowTrackCaloPoints::eflowTrackCaloPoints ( )
inline

Definition at line 36 of file eflowTrackCaloPoints.h.

36 : m_isEM1Barrel(false), m_isEM2Barrel(false) {}

◆ ~eflowTrackCaloPoints()

eflowTrackCaloPoints::~eflowTrackCaloPoints ( )
default

Member Function Documentation

◆ copyEtaPhi()

void eflowTrackCaloPoints::copyEtaPhi ( eflowCalo::LAYER  fromLay,
eflowCalo::LAYER  toLay 
)
inline

Definition at line 91 of file eflowTrackCaloPoints.h.

91  {
92  std::map<eflowCalo::LAYER, eflowEtaPhiPosition>::const_iterator it = m_etaPhiPositions.find(fromLay);
93  if (it != m_etaPhiPositions.end()) {
94  m_etaPhiPositions[toLay] = it->second;
95  }
96 }

◆ defaultEta()

double eflowTrackCaloPoints::defaultEta ( )
static

Definition at line 28 of file eflowTrackCaloPoints.cxx.

28 {return (double)m_defaultEtaPhiPair.first;}

◆ defaultPhi()

double eflowTrackCaloPoints::defaultPhi ( )
static

Definition at line 29 of file eflowTrackCaloPoints.cxx.

29 {return (double)m_defaultEtaPhiPair.second;}

◆ getDirection()

Amg::Vector3D eflowTrackCaloPoints::getDirection ( eflowCalo::LAYER  layer)

Definition at line 102 of file eflowTrackCaloPoints.cxx.

102  {
103  std::map<eflowCalo::LAYER, Amg::Vector3D>::const_iterator it = m_directions.find(layer);
104  return (it == m_directions.end()) ? m_nullVector : it->second;
105 }

◆ getEM1eta()

double eflowTrackCaloPoints::getEM1eta ( ) const
inline

Definition at line 52 of file eflowTrackCaloPoints.h.

52 {return getEtaPhiPos(getEM1Layer()).getEta(); }

◆ getEM1Layer()

eflowCalo::LAYER eflowTrackCaloPoints::getEM1Layer ( ) const
inlineprivate

Definition at line 79 of file eflowTrackCaloPoints.h.

◆ getEM2eta()

double eflowTrackCaloPoints::getEM2eta ( ) const
inline

Definition at line 51 of file eflowTrackCaloPoints.h.

51 {return getEM2etaPhiPos().getEta(); }

◆ getEM2etaPhi()

const std::pair<float, float> eflowTrackCaloPoints::getEM2etaPhi ( ) const
inline

Definition at line 49 of file eflowTrackCaloPoints.h.

49 {return (*this)[getEM2Layer()]; }

◆ getEM2etaPhiPos()

const eflowEtaPhiPosition& eflowTrackCaloPoints::getEM2etaPhiPos ( ) const
inline

Definition at line 50 of file eflowTrackCaloPoints.h.

50 {return getEtaPhiPos(getEM2Layer()); }

◆ getEM2Layer()

eflowCalo::LAYER eflowTrackCaloPoints::getEM2Layer ( ) const
inlineprivate

Definition at line 78 of file eflowTrackCaloPoints.h.

◆ getEta()

double eflowTrackCaloPoints::getEta ( eflowCalo::LAYER  layer) const
inline

Definition at line 43 of file eflowTrackCaloPoints.h.

43 {return getEtaPhiPos(layer).getEta();}

◆ getEtaPhiPos()

const eflowEtaPhiPosition & eflowTrackCaloPoints::getEtaPhiPos ( eflowCalo::LAYER  layer) const

Definition at line 86 of file eflowTrackCaloPoints.cxx.

86  {
87  std::map< eflowCalo::LAYER, eflowEtaPhiPosition>::const_iterator it = m_etaPhiPositions.find(layer);
88  return (it == m_etaPhiPositions.end()) ? m_defaultEtaPhiPosition : it->second;
89 }

◆ getFCAL0eta()

double eflowTrackCaloPoints::getFCAL0eta ( ) const
inline

Definition at line 53 of file eflowTrackCaloPoints.h.

◆ getPhi()

double eflowTrackCaloPoints::getPhi ( eflowCalo::LAYER  layer) const
inline

Definition at line 44 of file eflowTrackCaloPoints.h.

44 {return getEtaPhiPos(layer).getPhiD();}

◆ getPosition()

Amg::Vector3D eflowTrackCaloPoints::getPosition ( eflowCalo::LAYER  layer)

Definition at line 97 of file eflowTrackCaloPoints.cxx.

97  {
98  std::map<eflowCalo::LAYER, Amg::Vector3D>::const_iterator it = m_positions.find(layer);
99  return (it == m_positions.end()) ? m_nullVector : it->second;
100 }

◆ getTileEta()

double eflowTrackCaloPoints::getTileEta ( CaloCell_ID::CaloSample  layer) const
inline

Definition at line 46 of file eflowTrackCaloPoints.h.

46 {return getTileEtaPhiPos(layer).getEta();}

◆ getTileEtaPhiPos()

const eflowEtaPhiPosition & eflowTrackCaloPoints::getTileEtaPhiPos ( CaloCell_ID::CaloSample  layer) const

Definition at line 91 of file eflowTrackCaloPoints.cxx.

91  {
92  std::map< CaloCell_ID::CaloSample , eflowEtaPhiPosition>::const_iterator it = m_tileEtaPhiPositions.find(layer);
93  return (it == m_tileEtaPhiPositions.end()) ? m_defaultEtaPhiPosition : it->second;
94 }

◆ getTilePhi()

double eflowTrackCaloPoints::getTilePhi ( CaloCell_ID::CaloSample  layer) const
inline

Definition at line 47 of file eflowTrackCaloPoints.h.

47 {return getTileEtaPhiPos(layer).getPhiD();}

◆ haveLayer()

bool eflowTrackCaloPoints::haveLayer ( eflowCalo::LAYER  layer) const
inline

Definition at line 61 of file eflowTrackCaloPoints.h.

61 { return getEta(layer) != m_defaultEtaPhiPair.first; }

◆ operator[]()

const pair< float, float > eflowTrackCaloPoints::operator[] ( eflowCalo::LAYER  layer) const

Definition at line 82 of file eflowTrackCaloPoints.cxx.

82  {
83  eflowEtaPhiPosition thisPosition = getEtaPhiPos(layer);
84  return pair<float, float>(thisPosition.getEta(), thisPosition.getPhiD());
85 }

◆ parToDirection()

Amg::Vector3D eflowTrackCaloPoints::parToDirection ( const Trk::TrackParameters extrapolatedParameters)
static

Definition at line 111 of file eflowTrackCaloPoints.cxx.

111  {
112  return (trackPars != nullptr) ? trackPars->momentum() : m_nullVector;
113 }

◆ parToPosition()

Amg::Vector3D eflowTrackCaloPoints::parToPosition ( const Trk::TrackParameters extrapolatedParameters)
static

Definition at line 107 of file eflowTrackCaloPoints.cxx.

107  {
108  return (trackPars != nullptr) ? trackPars->position() : m_nullVector;
109 }

◆ setEtaPhi() [1/2]

void eflowTrackCaloPoints::setEtaPhi ( eflowCalo::LAYER  lay,
const Amg::Vector3D vec 
)

Definition at line 67 of file eflowTrackCaloPoints.cxx.

67  {
68  m_etaPhiPositions[lay] = (vec != m_nullVector) ? eflowEtaPhiPosition(vec.eta(), vec.phi())
70 }

◆ setEtaPhi() [2/2]

void eflowTrackCaloPoints::setEtaPhi ( eflowCaloENUM  secondLayer,
double  eta,
double  phi 
)

Definition at line 78 of file eflowTrackCaloPoints.cxx.

◆ setEtaPhiTile()

void eflowTrackCaloPoints::setEtaPhiTile ( CaloCell_ID::CaloSample  secondLayer,
const Amg::Vector3D vec 
)

Definition at line 72 of file eflowTrackCaloPoints.cxx.

72  {
75 }

Member Data Documentation

◆ m_defaultEtaPhiPair

const pair< float, float > eflowTrackCaloPoints::m_defaultEtaPhiPair = pair<float, float>(-999.0, -999.0)
staticprivate

Definition at line 82 of file eflowTrackCaloPoints.h.

◆ m_defaultEtaPhiPosition

const eflowEtaPhiPosition eflowTrackCaloPoints::m_defaultEtaPhiPosition = eflowEtaPhiPosition(-999.,-999.)
staticprivate

Definition at line 83 of file eflowTrackCaloPoints.h.

◆ m_directions

std::map<eflowCalo::LAYER, Amg::Vector3D > eflowTrackCaloPoints::m_directions
private

Definition at line 86 of file eflowTrackCaloPoints.h.

◆ m_etaPhiPositions

std::map<eflowCalo::LAYER, eflowEtaPhiPosition> eflowTrackCaloPoints::m_etaPhiPositions
private

Definition at line 87 of file eflowTrackCaloPoints.h.

◆ m_isEM1Barrel

bool eflowTrackCaloPoints::m_isEM1Barrel

Definition at line 71 of file eflowTrackCaloPoints.h.

◆ m_isEM2Barrel

bool eflowTrackCaloPoints::m_isEM2Barrel

Definition at line 72 of file eflowTrackCaloPoints.h.

◆ m_nullVector

const Amg::Vector3D eflowTrackCaloPoints::m_nullVector = Amg::Vector3D(0.0, 0.0, 0.0)
staticprivate

Definition at line 76 of file eflowTrackCaloPoints.h.

◆ m_positions

std::map<eflowCalo::LAYER, Amg::Vector3D > eflowTrackCaloPoints::m_positions
private

Definition at line 85 of file eflowTrackCaloPoints.h.

◆ m_tileEtaPhiPositions

std::map<CaloCell_ID::CaloSample,eflowEtaPhiPosition> eflowTrackCaloPoints::m_tileEtaPhiPositions
private

Definition at line 88 of file eflowTrackCaloPoints.h.


The documentation for this class was generated from the following files:
eflowTrackCaloPoints::m_directions
std::map< eflowCalo::LAYER, Amg::Vector3D > m_directions
Definition: eflowTrackCaloPoints.h:86
eflowTrackCaloPoints::getEM1Layer
eflowCalo::LAYER getEM1Layer() const
Definition: eflowTrackCaloPoints.h:79
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
eflowCalo::FCAL0
@ FCAL0
Definition: eflowCaloRegions.h:49
eflowTrackCaloPoints::m_nullVector
static const Amg::Vector3D m_nullVector
Definition: eflowTrackCaloPoints.h:76
eflowCalo::EMB2
@ EMB2
Definition: eflowCaloRegions.h:45
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
eflowEtaPhiPosition::getEta
double getEta() const
Definition: eflowUtil.h:90
eflowTrackCaloPoints::m_isEM2Barrel
bool m_isEM2Barrel
Definition: eflowTrackCaloPoints.h:72
eflowTrackCaloPoints::setEtaPhiTile
void setEtaPhiTile(CaloCell_ID::CaloSample secondLayer, const Amg::Vector3D &vec)
Definition: eflowTrackCaloPoints.cxx:72
eflowTrackCaloPoints::m_tileEtaPhiPositions
std::map< CaloCell_ID::CaloSample, eflowEtaPhiPosition > m_tileEtaPhiPositions
Definition: eflowTrackCaloPoints.h:88
eflowEtaPhiPosition::getPhiD
double getPhiD() const
Definition: eflowUtil.h:92
skel.it
it
Definition: skel.GENtoEVGEN.py:396
eflowTrackCaloPoints::getTileEtaPhiPos
const eflowEtaPhiPosition & getTileEtaPhiPos(CaloCell_ID::CaloSample layer) const
Definition: eflowTrackCaloPoints.cxx:91
eflowTrackCaloPoints::m_etaPhiPositions
std::map< eflowCalo::LAYER, eflowEtaPhiPosition > m_etaPhiPositions
Definition: eflowTrackCaloPoints.h:87
eflowEtaPhiPosition
Definition: eflowUtil.h:85
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
eflowCalo::EME2
@ EME2
Definition: eflowCaloRegions.h:46
eflowTrackCaloPoints::m_defaultEtaPhiPair
static const std::pair< float, float > m_defaultEtaPhiPair
Definition: eflowTrackCaloPoints.h:82
eflowCalo::EMB1
@ EMB1
Definition: eflowCaloRegions.h:45
eflowTrackCaloPoints::m_isEM1Barrel
bool m_isEM1Barrel
Definition: eflowTrackCaloPoints.h:71
eflowTrackCaloPoints::setEtaPhi
void setEtaPhi(eflowCaloENUM secondLayer, double eta, double phi)
Definition: eflowTrackCaloPoints.cxx:78
eflowTrackCaloPoints::getEM2Layer
eflowCalo::LAYER getEM2Layer() const
Definition: eflowTrackCaloPoints.h:78
eflowTrackCaloPoints::m_positions
std::map< eflowCalo::LAYER, Amg::Vector3D > m_positions
Definition: eflowTrackCaloPoints.h:85
eflowTrackCaloPoints::getEM2etaPhiPos
const eflowEtaPhiPosition & getEM2etaPhiPos() const
Definition: eflowTrackCaloPoints.h:50
eflowTrackCaloPoints::parToPosition
static Amg::Vector3D parToPosition(const Trk::TrackParameters *extrapolatedParameters)
Definition: eflowTrackCaloPoints.cxx:107
eflowTrackCaloPoints::getEtaPhiPos
const eflowEtaPhiPosition & getEtaPhiPos(eflowCalo::LAYER layer) const
Definition: eflowTrackCaloPoints.cxx:86
eflowTrackCaloPoints::m_defaultEtaPhiPosition
static const eflowEtaPhiPosition m_defaultEtaPhiPosition
Definition: eflowTrackCaloPoints.h:83
eflowTrackCaloPoints::getEta
double getEta(eflowCalo::LAYER layer) const
Definition: eflowTrackCaloPoints.h:43
eflowTrackCaloPoints::parToDirection
static Amg::Vector3D parToDirection(const Trk::TrackParameters *extrapolatedParameters)
Definition: eflowTrackCaloPoints.cxx:111
eflowCalo::EME1
@ EME1
Definition: eflowCaloRegions.h:46