ATLAS Offline Software
Loading...
Searching...
No Matches
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
11NAME: eflowTrackCaloPoints.h
12PACKAGE: offline/Reconstruction/eflowRec
13
14AUTHORS: R. Duxfield
15CREATED: 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
25class 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
43 double getEta(eflowCalo::LAYER layer) const {return getEtaPhiPos(layer).getEta();}
44 double getPhi(eflowCalo::LAYER layer) const {return getEtaPhiPos(layer).getPhiD();}
45
46 double getTileEta(CaloCell_ID::CaloSample layer) const {return getTileEtaPhiPos(layer).getEta();}
47 double getTilePhi(CaloCell_ID::CaloSample layer) const {return getTileEtaPhiPos(layer).getPhiD();}
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);
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
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
std::vector< size_t > vec
CaloSampling::CaloSample CaloSample
Definition CaloCell_ID.h:53
double getPhiD() const
Definition eflowUtil.h:92
double getEta() const
Definition eflowUtil.h:90
const eflowEtaPhiPosition & getEM2etaPhiPos() const
static Amg::Vector3D parToDirection(const Trk::TrackParameters *extrapolatedParameters)
eflowTrackCaloPoints(const std::map< eflowCalo::LAYER, const Trk::TrackParameters * > &trackParameters)
double getTileEta(CaloCell_ID::CaloSample layer) const
static Amg::Vector3D parToPosition(const Trk::TrackParameters *extrapolatedParameters)
eflowCalo::LAYER getEM1Layer() const
static const Amg::Vector3D m_nullVector
void copyEtaPhi(eflowCalo::LAYER fromLay, eflowCalo::LAYER toLay)
static const std::pair< float, float > m_defaultEtaPhiPair
double getPhi(eflowCalo::LAYER layer) const
Amg::Vector3D getPosition(eflowCalo::LAYER layer)
const eflowEtaPhiPosition & getEtaPhiPos(eflowCalo::LAYER layer) const
double getEta(eflowCalo::LAYER layer) const
double getTilePhi(CaloCell_ID::CaloSample layer) const
void setEtaPhi(eflowCaloENUM secondLayer, double eta, double phi)
const eflowEtaPhiPosition & getTileEtaPhiPos(CaloCell_ID::CaloSample layer) const
const std::pair< float, float > getEM2etaPhi() const
std::map< eflowCalo::LAYER, Amg::Vector3D > m_directions
const std::pair< float, float > operator[](eflowCalo::LAYER layer) const
std::map< CaloCell_ID::CaloSample, eflowEtaPhiPosition > m_tileEtaPhiPositions
bool haveLayer(eflowCalo::LAYER layer) const
Amg::Vector3D getDirection(eflowCalo::LAYER layer)
static const eflowEtaPhiPosition m_defaultEtaPhiPosition
void setEtaPhiTile(CaloCell_ID::CaloSample secondLayer, const Amg::Vector3D &vec)
eflowCalo::LAYER getEM2Layer() const
std::map< eflowCalo::LAYER, Amg::Vector3D > m_positions
std::map< eflowCalo::LAYER, eflowEtaPhiPosition > m_etaPhiPositions
eflowCalo::LAYER eflowCaloENUM
Eigen::Matrix< double, 3, 1 > Vector3D
ParametersBase< TrackParametersDim, Charged > TrackParameters