ATLAS Offline Software
eflowTrackCaloPoints.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
6 #ifndef EFLOWREC_EFLOW_TRACK_CALO_POINTS_H
7 #define EFLOWREC_EFLOW_TRACK_CALO_POINTS_H
8 
9 /********************************************************************
10 
11 NAME: eflowTrackCaloPoints.h
12 PACKAGE: offline/Reconstruction/eflowRec
13 
14 AUTHORS: R. Duxfield
15 CREATED: 4th January, 2006
16 
17 ********************************************************************/
18 
19 #include <map>
21 #include "GeoPrimitives/GeoPrimitives.h" // compiles without, throws down warning: CHECKREQ---> The following packages are apparently not needed. (severity 2)
22 #include "TrkParameters/TrackParameters.h" // typedef
23 #include "eflowRec/eflowUtil.h"
24 
25 class MsgStream;
26 
31  public:
32 
33  eflowTrackCaloPoints(const std::map<eflowCalo::LAYER, const Trk::TrackParameters*> & trackParameters);
34  eflowTrackCaloPoints(const std::map<eflowCalo::LAYER, const Trk::TrackParameters*> & trackParameters,
35  std::map<CaloCell_ID::CaloSample,const Trk::TrackParameters*>& tileTrackParamaters);
38 
39  const std::pair<float, float> operator[] (eflowCalo::LAYER layer) const;
42 
45 
48 
49  const std::pair<float, float> getEM2etaPhi() const {return (*this)[getEM2Layer()]; }
51  double getEM2eta() const {return getEM2etaPhiPos().getEta(); }
52  double getEM1eta() const {return getEtaPhiPos(getEM1Layer()).getEta(); }
53  double getFCAL0eta() const {return getEtaPhiPos(eflowCalo::FCAL0).getEta(); }
54 
57 
58  static double defaultEta();
59  static double defaultPhi();
60 
61  inline bool haveLayer(eflowCalo::LAYER layer) const { return getEta(layer) != m_defaultEtaPhiPair.first; }
62 
63  void setEtaPhi(eflowCaloENUM secondLayer, double eta, double phi);
64  void setEtaPhiTile(CaloCell_ID::CaloSample secondLayer, const Amg::Vector3D& vec);
65  void setEtaPhi(eflowCalo::LAYER lay, const Amg::Vector3D& vec);
66  void copyEtaPhi(eflowCalo::LAYER fromLay, eflowCalo::LAYER toLay);
67 
68  static Amg::Vector3D parToPosition(const Trk::TrackParameters* extrapolatedParameters);
69  static Amg::Vector3D parToDirection(const Trk::TrackParameters* extrapolatedParameters);
70 
73 
74  private:
75 
77 
80 
81 
82  static const std::pair<float, float> m_defaultEtaPhiPair;
84 
85  std::map<eflowCalo::LAYER, Amg::Vector3D > m_positions;
86  std::map<eflowCalo::LAYER, Amg::Vector3D > m_directions;
87  std::map<eflowCalo::LAYER, eflowEtaPhiPosition> m_etaPhiPositions;
88  std::map<CaloCell_ID::CaloSample,eflowEtaPhiPosition> m_tileEtaPhiPositions;
89 };
90 
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 }
97 
98 
99 #endif
eflowCaloRegions.h
eflowTrackCaloPoints::defaultPhi
static double defaultPhi()
Definition: eflowTrackCaloPoints.cxx:29
eflowUtil.h
eflowTrackCaloPoints::m_directions
std::map< eflowCalo::LAYER, Amg::Vector3D > m_directions
Definition: eflowTrackCaloPoints.h:86
eflowTrackCaloPoints
This class stores a map of calorimeter layers and track parameters (the result of the track extrapola...
Definition: eflowTrackCaloPoints.h:30
eflowTrackCaloPoints::getEM1Layer
eflowCalo::LAYER getEM1Layer() const
Definition: eflowTrackCaloPoints.h:79
TrackParameters.h
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
eflowTrackCaloPoints::getPosition
Amg::Vector3D getPosition(eflowCalo::LAYER layer)
Definition: eflowTrackCaloPoints.cxx:97
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
eflowTrackCaloPoints::copyEtaPhi
void copyEtaPhi(eflowCalo::LAYER fromLay, eflowCalo::LAYER toLay)
Definition: eflowTrackCaloPoints.h:91
eflowTrackCaloPoints::eflowTrackCaloPoints
eflowTrackCaloPoints()
Definition: eflowTrackCaloPoints.h:36
GeoPrimitives.h
eflowTrackCaloPoints::haveLayer
bool haveLayer(eflowCalo::LAYER layer) const
Definition: eflowTrackCaloPoints.h:61
eflowTrackCaloPoints::getEM2eta
double getEM2eta() const
Definition: eflowTrackCaloPoints.h:51
eflowTrackCaloPoints::getPhi
double getPhi(eflowCalo::LAYER layer) const
Definition: eflowTrackCaloPoints.h:44
eflowTrackCaloPoints::~eflowTrackCaloPoints
~eflowTrackCaloPoints()
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
eflowCalo::EME2
@ EME2
Definition: eflowCaloRegions.h:46
eflowTrackCaloPoints::operator[]
const std::pair< float, float > operator[](eflowCalo::LAYER layer) const
Definition: eflowTrackCaloPoints.cxx:82
eflowTrackCaloPoints::m_defaultEtaPhiPair
static const std::pair< float, float > m_defaultEtaPhiPair
Definition: eflowTrackCaloPoints.h:82
eflowTrackCaloPoints::getFCAL0eta
double getFCAL0eta() const
Definition: eflowTrackCaloPoints.h:53
eflowCalo::EMB1
@ EMB1
Definition: eflowCaloRegions.h:45
Trk::ParametersBase
Definition: ParametersBase.h:55
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::getEM1eta
double getEM1eta() const
Definition: eflowTrackCaloPoints.h:52
eflowTrackCaloPoints::getTileEta
double getTileEta(CaloCell_ID::CaloSample layer) const
Definition: eflowTrackCaloPoints.h:46
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::getEM2etaPhi
const std::pair< float, float > getEM2etaPhi() const
Definition: eflowTrackCaloPoints.h:49
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
eflowTrackCaloPoints::getDirection
Amg::Vector3D getDirection(eflowCalo::LAYER layer)
Definition: eflowTrackCaloPoints.cxx:102
eflowTrackCaloPoints::parToPosition
static Amg::Vector3D parToPosition(const Trk::TrackParameters *extrapolatedParameters)
Definition: eflowTrackCaloPoints.cxx:107
eflowCalo::LAYER
LAYER
Definition: eflowCaloRegions.h:36
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::defaultEta
static double defaultEta()
Definition: eflowTrackCaloPoints.cxx:28
eflowTrackCaloPoints::getTilePhi
double getTilePhi(CaloCell_ID::CaloSample layer) const
Definition: eflowTrackCaloPoints.h:47
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