ATLAS Offline Software
eflowCellList.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef EFLOWCELLLIST_H
6 #define EFLOWCELLLIST_H
7 
8 /********************************************************************
9 
10 NAME: eflowCellList.h
11 PACKAGE: offline/Reconstruction/eflowRec
12 
13 AUTHORS: M.Hodgkinson, R Duxfield (based on R.Duxfields Root package)
14 CREATED: 18th Aug, 2005
15 
16 ********************************************************************/
17 
18 // Athena Headers
21 
22 // C++ Headers
23 #include <map>
24 #include <vector>
25 
26 class CaloCell;
28 
29 typedef std::map<eflowCellPosition,
30  std::vector<std::pair<const CaloCell*, int>>>::iterator CellIt;
31 
42 {
43 
44 public:
45  eflowCellList();
46  virtual ~eflowCellList() {}
47 
48  void setNewExtrapolatedTrack(const eflowTrackCaloPoints* trackCalo);
49 
50  void setNewExtrapolatedTrack(const eflowTrackCaloPoints& trackCalo);
51 
52  void addCell(std::pair<const CaloCell*, int> cell);
53 
54  void reorderWithoutLayers();
55 
56  CellIt begin() { return m_cellPositionToCellMap.begin(); }
57  CellIt end() { return m_cellPositionToCellMap.end(); }
58 
60  {
61  return m_cellPositionToCellMap.lower_bound(
62  eflowCellPosition(this, layer, r));
63  }
64 
66  {
67  return m_cellPositionToCellMap.find(eflowCellPosition(this, layer, r));
68  }
69 
70  int mapSize() { return m_cellPositionToCellMap.size(); }
72  {
74  }
76  void eraseList() { m_cellPositionToCellMap.clear(); }
77 
78  double etaFF(eflowCaloENUM layer) const { return m_etaFF[layer]; }
79  double phiFF(eflowCaloENUM layer) const { return m_phiFF[layer]; }
80 
81  double dR2(double eta, double phi, eflowCaloENUM layer) const;
82  double dR(double eta, double phi, eflowCaloENUM layer) const;
83 
84 private:
85  std::vector<double> m_etaFF;
86  std::vector<double> m_phiFF;
87  std::map<eflowCellPosition, std::vector<std::pair<const CaloCell*, int>>>
89 };
90 #endif
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
beamspotman.r
def r
Definition: beamspotman.py:676
eflowCellList::reorderWithoutLayers
void reorderWithoutLayers()
Definition: eflowCellList.cxx:72
eflowCellList::deleteFromList
void deleteFromList(CellIt &start, CellIt &end)
Definition: eflowCellList.h:71
eflowTrackCaloPoints
This class stores a map of calorimeter layers and track parameters (the result of the track extrapola...
Definition: eflowTrackCaloPoints.h:30
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
eflowCellList::m_etaFF
std::vector< double > m_etaFF
Definition: eflowCellList.h:85
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
eflowCellPosition.h
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
eflowCellList::phiFF
double phiFF(eflowCaloENUM layer) const
Definition: eflowCellList.h:79
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
eflowCellList::setNewExtrapolatedTrack
void setNewExtrapolatedTrack(const eflowTrackCaloPoints *trackCalo)
Definition: eflowCellList.cxx:35
skel.it
it
Definition: skel.GENtoEVGEN.py:423
eflowCellList::addCell
void addCell(std::pair< const CaloCell *, int > cell)
Definition: eflowCellList.cxx:53
eflowCellList::eflowCellList
eflowCellList()
Definition: eflowCellList.cxx:29
eflowCellList::~eflowCellList
virtual ~eflowCellList()
Definition: eflowCellList.h:46
eflowCellList::end
CellIt end()
Definition: eflowCellList.h:57
eflowCellList::begin
CellIt begin()
Definition: eflowCellList.h:56
eflowCellList
Concrete class derived class from pure virtual eflowAbstractCellList.
Definition: eflowCellList.h:42
eflowCellPosition
This class stores the eta,phi and layer of the calorimeter cell and defines a "<" operator which can ...
Definition: eflowCellPosition.h:36
eflowCellList::deleteFromList
void deleteFromList(CellIt &it)
Definition: eflowCellList.h:75
eflowCellList::etaFF
double etaFF(eflowCaloENUM layer) const
Definition: eflowCellList.h:78
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
eflowAbstractCellList.h
eflowCellList::eraseList
void eraseList()
Definition: eflowCellList.h:76
eflowCellList::dR2
double dR2(double eta, double phi, eflowCaloENUM layer) const
Definition: eflowCellList.cxx:106
eflowCellList::m_phiFF
std::vector< double > m_phiFF
Definition: eflowCellList.h:86
eflowAbstractCellList
Definition: eflowAbstractCellList.h:31
CellIt
std::map< eflowCellPosition, std::vector< std::pair< const CaloCell *, int > > >::iterator CellIt
Definition: eflowAbstractCellList.h:25
eflowCellList::mapSize
int mapSize()
Definition: eflowCellList.h:70
eflowCalo::LAYER
LAYER
Definition: eflowCaloRegions.h:36
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
CellIt
std::map< eflowCellPosition, std::vector< std::pair< const CaloCell *, int > > >::iterator CellIt
Definition: eflowCellList.h:27
eflowCellList::getLowerBound
CellIt getLowerBound(eflowCaloENUM layer, double r)
Definition: eflowCellList.h:59
eflowCellList::m_cellPositionToCellMap
std::map< eflowCellPosition, std::vector< std::pair< const CaloCell *, int > > > m_cellPositionToCellMap
Definition: eflowCellList.h:88
eflowCellList::dR
double dR(double eta, double phi, eflowCaloENUM layer) const
Definition: eflowCellList.cxx:118
eflowCellList::find
CellIt find(eflowCaloENUM layer, double r)
Definition: eflowCellList.h:65