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

Concrete class derived class from pure virtual eflowAbstractCellList. More...

#include <eflowCellList.h>

Inheritance diagram for eflowCellList:
Collaboration diagram for eflowCellList:

Public Member Functions

 eflowCellList ()
 
virtual ~eflowCellList ()
 
void setNewExtrapolatedTrack (const eflowTrackCaloPoints *trackCalo)
 
void setNewExtrapolatedTrack (const eflowTrackCaloPoints &trackCalo)
 
void addCell (std::pair< const CaloCell *, int > cell)
 
void reorderWithoutLayers ()
 
CellIt begin ()
 
CellIt end ()
 
CellIt getLowerBound (eflowCaloENUM layer, double r)
 
CellIt find (eflowCaloENUM layer, double r)
 
int mapSize ()
 
void deleteFromList (CellIt &start, CellIt &end)
 
void deleteFromList (CellIt &it)
 
void eraseList ()
 
double etaFF (eflowCaloENUM layer) const
 
double phiFF (eflowCaloENUM layer) const
 
double dR2 (double eta, double phi, eflowCaloENUM layer) const
 
double dR (double eta, double phi, eflowCaloENUM layer) const
 

Private Attributes

std::vector< double > m_etaFF
 
std::vector< double > m_phiFF
 
std::map< eflowCellPosition, std::vector< std::pair< const CaloCell *, int > > > m_cellPositionToCellMap
 

Detailed Description

Concrete class derived class from pure virtual eflowAbstractCellList.

This stores information about the calorimeter cells - the main data type is a map between an eflowCellPosition and a pair linking the CaloCell pointer and the index of its xAOD::CaloCluster in the calorimeter cluster container. A DR2 function is provided to calculate the distance between an eflowCellPosition and the track impact point in a given calorimeter layer (eflowCellList also stores a list of track eta,phi impact points for each calorimeter later).

Definition at line 41 of file eflowCellList.h.

Constructor & Destructor Documentation

◆ eflowCellList()

eflowCellList::eflowCellList ( )

Definition at line 29 of file eflowCellList.cxx.

◆ ~eflowCellList()

virtual eflowCellList::~eflowCellList ( )
inlinevirtual

Definition at line 46 of file eflowCellList.h.

46 {}

Member Function Documentation

◆ addCell()

void eflowCellList::addCell ( std::pair< const CaloCell *, int >  cell)
virtual

Implements eflowAbstractCellList.

Definition at line 53 of file eflowCellList.cxx.

54 {
55  eflowCellPosition myPos(this, cell.first);
56 
57  CellIt inmap = m_cellPositionToCellMap.find(myPos);
58 
59  if (inmap != m_cellPositionToCellMap.end())
60  inmap->second.push_back(cell);
61  else {
62  std::vector<std::pair<const CaloCell*, int>> myVec;
63  myVec.push_back(cell);
65  std::map<eflowCellPosition,
66  std::vector<std::pair<const CaloCell*, int>>>::value_type(myPos,
67  myVec));
68  }
69 }

◆ begin()

CellIt eflowCellList::begin ( )
inlinevirtual

Implements eflowAbstractCellList.

Definition at line 56 of file eflowCellList.h.

56 { return m_cellPositionToCellMap.begin(); }

◆ deleteFromList() [1/2]

void eflowCellList::deleteFromList ( CellIt it)
inlinevirtual

Implements eflowAbstractCellList.

Definition at line 75 of file eflowCellList.h.

75 { m_cellPositionToCellMap.erase(it); }

◆ deleteFromList() [2/2]

void eflowCellList::deleteFromList ( CellIt start,
CellIt end 
)
inlinevirtual

Implements eflowAbstractCellList.

Definition at line 71 of file eflowCellList.h.

72  {
74  }

◆ dR()

double eflowCellList::dR ( double  eta,
double  phi,
eflowCaloENUM  layer 
) const
virtual

Implements eflowAbstractCellList.

Definition at line 118 of file eflowCellList.cxx.

119 {
120  return (eflowCalo::Unknown != layer) ? sqrt(dR2(eta, phi, layer)) : -999.0;
121 }

◆ dR2()

double eflowCellList::dR2 ( double  eta,
double  phi,
eflowCaloENUM  layer 
) const
virtual

Implements eflowAbstractCellList.

Definition at line 106 of file eflowCellList.cxx.

107 {
108  if (eflowCalo::Unknown != layer) {
109  double dEta = eta - m_etaFF[layer];
111  return dEta * dEta + dPhi * dPhi;
112  } else {
113  return -999.0;
114  }
115 }

◆ end()

CellIt eflowCellList::end ( )
inlinevirtual

Implements eflowAbstractCellList.

Definition at line 57 of file eflowCellList.h.

57 { return m_cellPositionToCellMap.end(); }

◆ eraseList()

void eflowCellList::eraseList ( )
inline

Definition at line 76 of file eflowCellList.h.

76 { m_cellPositionToCellMap.clear(); }

◆ etaFF()

double eflowCellList::etaFF ( eflowCaloENUM  layer) const
inlinevirtual

Implements eflowAbstractCellList.

Definition at line 78 of file eflowCellList.h.

78 { return m_etaFF[layer]; }

◆ find()

CellIt eflowCellList::find ( eflowCaloENUM  layer,
double  r 
)
inline

Definition at line 65 of file eflowCellList.h.

66  {
67  return m_cellPositionToCellMap.find(eflowCellPosition(this, layer, r));
68  }

◆ getLowerBound()

CellIt eflowCellList::getLowerBound ( eflowCaloENUM  layer,
double  r 
)
inlinevirtual

Implements eflowAbstractCellList.

Definition at line 59 of file eflowCellList.h.

60  {
61  return m_cellPositionToCellMap.lower_bound(
62  eflowCellPosition(this, layer, r));
63  }

◆ mapSize()

int eflowCellList::mapSize ( )
inline

Definition at line 70 of file eflowCellList.h.

70 { return m_cellPositionToCellMap.size(); }

◆ phiFF()

double eflowCellList::phiFF ( eflowCaloENUM  layer) const
inlinevirtual

Implements eflowAbstractCellList.

Definition at line 79 of file eflowCellList.h.

79 { return m_phiFF[layer]; }

◆ reorderWithoutLayers()

void eflowCellList::reorderWithoutLayers ( )
virtual

Implements eflowAbstractCellList.

Definition at line 72 of file eflowCellList.cxx.

73 {
74  /* Collect all cells in layer EMB2 and higher, i.e. start with dR = 0 to the
75  * track in EMB2 */
76  CellIt it = m_cellPositionToCellMap.lower_bound(
79  while (it != end) {
80  /* Create a CellPosition in EMB1 that has the same dR to the track as in its
81  * original layer */
82  eflowCellPosition tempPos(this, eflowCalo::EMB1, it->first.dR());
83 
84  /* (Try to) insert the new CellPosition into the map. The resulting iterator
85  * either points to the inserted or to the already existing element (but we
86  * don't care). */
87  std::map<eflowCellPosition,
88  std::vector<std::pair<const CaloCell*, int>>>::iterator itInserted =
90  .insert(
91  std::make_pair(tempPos, std::vector<std::pair<const CaloCell*, int>>(0)))
92  .first;
93 
94  /* Append the cell/index pairs of the original CellPosition to the (either
95  * newly inserted or already existing) element */
96  std::vector<std::pair<const CaloCell*, int>>& pairVector(it->second);
97  itInserted->second.insert(
98  itInserted->second.end(), pairVector.begin(), pairVector.end());
99 
100  /* Remove the original CellPosition from the map */
101  m_cellPositionToCellMap.erase(it++);
102  }
103 }

◆ setNewExtrapolatedTrack() [1/2]

void eflowCellList::setNewExtrapolatedTrack ( const eflowTrackCaloPoints trackCalo)

Definition at line 41 of file eflowCellList.cxx.

42 {
43  for (int i = 0; i < eflowCalo::nRegions; i++) {
45  m_etaFF[layer] = trackCalo.getEta(layer);
46  m_phiFF[layer] = trackCalo.getPhi(layer);
47  }
48 
50 }

◆ setNewExtrapolatedTrack() [2/2]

void eflowCellList::setNewExtrapolatedTrack ( const eflowTrackCaloPoints trackCalo)
virtual

Implements eflowAbstractCellList.

Definition at line 35 of file eflowCellList.cxx.

36 {
37  setNewExtrapolatedTrack(*trackCalo);
38 }

Member Data Documentation

◆ m_cellPositionToCellMap

std::map<eflowCellPosition, std::vector<std::pair<const CaloCell*, int> > > eflowCellList::m_cellPositionToCellMap
private

Definition at line 88 of file eflowCellList.h.

◆ m_etaFF

std::vector<double> eflowCellList::m_etaFF
private

Definition at line 85 of file eflowCellList.h.

◆ m_phiFF

std::vector<double> eflowCellList::m_phiFF
private

Definition at line 86 of file eflowCellList.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
beamspotman.r
def r
Definition: beamspotman.py:676
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:67
eflowCalo::EMB2
@ EMB2
Definition: eflowCaloRegions.h:45
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
eflowCalo::Unknown
@ Unknown
Definition: eflowCaloRegions.h:50
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:396
xAOD::P4Helpers::deltaPhi
double deltaPhi(double phiA, double phiB)
delta Phi in range [-pi,pi[
Definition: xAODP4Helpers.h:69
eflowCellList::end
CellIt end()
Definition: eflowCellList.h:57
eflowCellPosition
This class stores the eta,phi and layer of the calorimeter cell and defines a "<" operator which can ...
Definition: eflowCellPosition.h:36
eflowTrackCaloPoints::getPhi
double getPhi(eflowCalo::LAYER layer) const
Definition: eflowTrackCaloPoints.h:44
lumiFormat.i
int i
Definition: lumiFormat.py:85
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
TauGNNUtils::Variables::Track::dPhi
bool dPhi(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Definition: TauGNNUtils.cxx:538
eflowCalo::EMB1
@ EMB1
Definition: eflowCaloRegions.h:45
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
eflowCalo::nRegions
static const int nRegions
Definition: eflowCaloRegions.h:45
CellIt
std::map< eflowCellPosition, std::vector< std::pair< const CaloCell *, int > > >::iterator CellIt
Definition: eflowAbstractCellList.h:25
eflowCalo::LAYER
LAYER
Definition: eflowCaloRegions.h:36
eflowTrackCaloPoints::getEta
double getEta(eflowCalo::LAYER layer) const
Definition: eflowTrackCaloPoints.h:43
eflowCellList::m_cellPositionToCellMap
std::map< eflowCellPosition, std::vector< std::pair< const CaloCell *, int > > > m_cellPositionToCellMap
Definition: eflowCellList.h:88
TauGNNUtils::Variables::Track::dEta
bool dEta(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Definition: TauGNNUtils.cxx:527
value_type
Definition: EDM_MasterSearch.h:11
eflowCaloENUM
eflowCalo::LAYER eflowCaloENUM
Definition: eflowCaloRegions.h:49