ATLAS Offline Software
CaloCompositeCellBase.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 CALOEVENT_CALOCOMPOSITECELLBASE_H
6 #define CALOEVENT_CALOCOMPOSITECELLBASE_H
7 
8 #include "CaloEvent/CaloCell.h"
10 
11 template<class NAV>
12 class CaloCompositeCellBase : public NAV
13 {
14  public:
15 
20 
26  typedef typename NAV::object_iter cell_iterator;
27 
47  void addCell(const CaloCellContainer* pContainer,
48  const CaloCell* pCell,
49  double weight,
50  size_t iCell=static_cast<size_t>(-1));
63  void addCell(const CaloCellContainer* pContainer,
64  size_t& iCell,
65  double weight);
66 
84  void addUniqueCell(const CaloCellContainer* theContainer,
85  size_t theIndex,
86  double weight,
87  size_t size_hint = 0);
88 
106  void addUniqueCellNoKine(const CaloCellContainer* theContainer,
107  size_t theIndex,
108  double weight,
109  size_t size_hint = 0);
110 
119  void reweightCell(const CaloCell* pCell,double weight);
134  void reweightCell(const CaloCellContainer* pContainer,
135  size_t& iCell,
136  double weight);
149  void reweightCell(cell_iterator& iterCell,
150  double weight);
162  void removeCell(const CaloCell* pCell);
170  void removeCell(const CaloCellContainer* pContainer,
171  size_t& iCell);
172 
174  void removeCells();
175 
182  double getCellWeight(const CaloCell* pCell) const;
190  double getCellWeight(const CaloCellContainer* pContainer,
191  size_t& iCell) const;
198  double getCellWeight(cell_iterator& iterCell) const;
206  const CaloCellContainer*
207  getCellContainer(const CaloCell* pCell) const;
217  const CaloCellContainer*
218  getCellContainer(cell_iterator& iterCell) const;
219 
232  bool getCellIndex(const CaloCell* pCell,
233  size_t& iCell) const;
234 
249  bool getCellIndex(cell_iterator& iterCell,
250  size_t& iCell) const;
251 
256 
258  unsigned int getNumberOfCells() const;
259 
260  protected:
261 
263  virtual void updateKine(const CaloCell* pCell, double weight) = 0;
264 
277 };
278 
280 #endif
CaloCompositeCellBase::addCell
void addCell(const CaloCellContainer *pContainer, const CaloCell *pCell, double weight, size_t iCell=static_cast< size_t >(-1))
Add a cell with global kinematic update (slow)
CaloCompositeCellBase::getCellIndex
bool getCellIndex(cell_iterator &iterCell, size_t &iCell) const
Retrieve the index of a given cell in the cell container.
CaloCompositeCellBase::reweightCell
void reweightCell(const CaloCell *pCell, double weight)
Reweight a cell with kinematic update.
CaloCompositeCellBase::getCellContainer
const CaloCellContainer * getCellContainer(cell_iterator &iterCell) const
Retrieve the pointer to the original cell container for a given cell.
CaloCompositeCellBase::~CaloCompositeCellBase
virtual ~CaloCompositeCellBase()
Destructor.
CaloCompositeCellBase::getCellIndex
bool getCellIndex(const CaloCell *pCell, size_t &iCell) const
Retrieve the index of a given cell in the cell container.
CaloCell.h
CaloCompositeCellBase::reweightCell
void reweightCell(const CaloCellContainer *pContainer, size_t &iCell, double weight)
Reweight a cell with kinematic update.
CaloCompositeCellBase::getCellContainer
const CaloCellContainer * getCellContainer(const CaloCell *pCell) const
Retrieve the pointer to the original cell container for a given cell.
CaloCompositeCellBase::cell_end
cell_iterator cell_end() const
Retrieve a STL-type end() iterator for the cell store.
CaloCompositeCellBase::addCell
void addCell(const CaloCellContainer *pContainer, size_t &iCell, double weight)
Add a cell with global kinematic update (fast)
CaloCompositeCellBase::getNumberOfCells
unsigned int getNumberOfCells() const
Return the number of cells in the store.
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
CaloCompositeCellBase::removeCell
void removeCell(const CaloCellContainer *pContainer, size_t &iCell)
Remove a cell with kinematic update.
CaloCompositeCellBase::removeCells
void removeCells()
Remove all cells without kinematic update.
CaloCompositeCellBase::updateKine
virtual void updateKine(const CaloCell *pCell, double weight)=0
update kinematics
CaloCompositeCellBase::getCellWeight
double getCellWeight(const CaloCellContainer *pContainer, size_t &iCell) const
Retrieve the kinematic weight of a given cell.
CaloCompositeCellBase::cell_begin
cell_iterator cell_begin() const
Retrieve a STL-type begin() iterator for the cell store.
CaloCellContainer.h
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
CaloCompositeCellBase::cell_iterator
NAV::object_iter cell_iterator
Iterator type for cell store.
Definition: CaloCompositeCellBase.h:26
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
CaloCompositeCellBase.icc
CaloCompositeCellBase::addUniqueCellNoKine
void addUniqueCellNoKine(const CaloCellContainer *theContainer, size_t theIndex, double weight, size_t size_hint=0)
Add a cell with no kinematic update (fast)
CaloCompositeCellBase::addUniqueCell
void addUniqueCell(const CaloCellContainer *theContainer, size_t theIndex, double weight, size_t size_hint=0)
Add a cell with global kinematic update (fast)
CaloCompositeCellBase::CaloCompositeCellBase
CaloCompositeCellBase()
Constructor.
CaloCompositeCellBase::reweightCell
void reweightCell(cell_iterator &iterCell, double weight)
Reweight a cell with kinematic update.
CaloCompositeCellBase::getCellWeight
double getCellWeight(cell_iterator &iterCell) const
Retrieve the kinematic weight of a given cell.
CaloCompositeCellBase
base class for methods and store of cell links
Definition: CaloCompositeCellBase.h:13
CaloCompositeCellBase::removeCell
void removeCell(const CaloCell *pCell)
Remove a cell with kinematic update.
CaloCompositeCellBase::getCellWeight
double getCellWeight(const CaloCell *pCell) const
Retrieve the kinematic weight of a given cell.