ATLAS Offline Software
|
base class for methods and store of cell links More...
#include <CaloCompositeCellBase.h>
Public Types | |
typedef NAV::object_iter | cell_iterator |
Iterator type for cell store. More... | |
Public Member Functions | |
CaloCompositeCellBase () | |
Constructor. More... | |
virtual | ~CaloCompositeCellBase () |
Destructor. More... | |
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) More... | |
void | addCell (const CaloCellContainer *pContainer, size_t &iCell, double weight) |
Add a cell with global kinematic update (fast) More... | |
void | addUniqueCell (const CaloCellContainer *theContainer, size_t theIndex, double weight, size_t size_hint=0) |
Add a cell with global kinematic update (fast) More... | |
void | addUniqueCellNoKine (const CaloCellContainer *theContainer, size_t theIndex, double weight, size_t size_hint=0) |
Add a cell with no kinematic update (fast) More... | |
void | reweightCell (const CaloCell *pCell, double weight) |
Reweight a cell with kinematic update. More... | |
void | reweightCell (const CaloCellContainer *pContainer, size_t &iCell, double weight) |
Reweight a cell with kinematic update. More... | |
void | reweightCell (cell_iterator &iterCell, double weight) |
Reweight a cell with kinematic update. More... | |
void | removeCell (const CaloCell *pCell) |
Remove a cell with kinematic update. More... | |
void | removeCell (const CaloCellContainer *pContainer, size_t &iCell) |
Remove a cell with kinematic update. More... | |
void | removeCells () |
Remove all cells without kinematic update. More... | |
double | getCellWeight (const CaloCell *pCell) const |
Retrieve the kinematic weight of a given cell. More... | |
double | getCellWeight (const CaloCellContainer *pContainer, size_t &iCell) const |
Retrieve the kinematic weight of a given cell. More... | |
double | getCellWeight (cell_iterator &iterCell) const |
Retrieve the kinematic weight of a given cell. More... | |
const CaloCellContainer * | getCellContainer (const CaloCell *pCell) const |
Retrieve the pointer to the original cell container for a given cell. More... | |
const CaloCellContainer * | getCellContainer (cell_iterator &iterCell) const |
Retrieve the pointer to the original cell container for a given cell. More... | |
bool | getCellIndex (const CaloCell *pCell, size_t &iCell) const |
Retrieve the index of a given cell in the cell container. More... | |
bool | getCellIndex (cell_iterator &iterCell, size_t &iCell) const |
Retrieve the index of a given cell in the cell container. More... | |
cell_iterator | cell_begin () const |
Retrieve a STL-type begin() iterator for the cell store. More... | |
cell_iterator | cell_end () const |
Retrieve a STL-type end() iterator for the cell store. More... | |
unsigned int | getNumberOfCells () const |
Return the number of cells in the store. More... | |
Protected Member Functions | |
virtual void | updateKine (const CaloCell *pCell, double weight)=0 |
update kinematics More... | |
base class for methods and store of cell links
This templated abstract base class provides the methods and store for the cell links in composite calorimeter reconstruction objects. Its principal clients are CaloCluster and CaloTower .
Definition at line 12 of file CaloCompositeCellBase.h.
typedef NAV::object_iter CaloCompositeCellBase< NAV >::cell_iterator |
Iterator type for cell store.
Extracted from the template parameter class prescription. Is generally equal to the standard size_t.
Definition at line 26 of file CaloCompositeCellBase.h.
CaloCompositeCellBase< NAV >::CaloCompositeCellBase | ( | ) |
Constructor.
|
virtual |
Destructor.
void CaloCompositeCellBase< NAV >::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)
pContainer | input pointer to a CaloCellContainer (unchanged) |
pCell | input pointer to a CaloCell (unchanged) |
weight | signal weight asociated with this cell |
iCell | input index of the CaloCell in the CaloCellContainer. This may be omitted, but if supplied, a potentially slow search of the CaloCellContainer for the CaloCell may be avoided. |
Adding a cell usually changes the global kinematics. The concrete implementation is left to the updateKine method, which needs to be implemented by derived classes.
Adding cells without updating the global kinematics is also possible by using the corresponding putElement method in the Navigable<CaloCellContainer,double> base class.
void CaloCompositeCellBase< NAV >::addCell | ( | const CaloCellContainer * | pContainer, |
size_t & | iCell, | ||
double | weight | ||
) |
Add a cell with global kinematic update (fast)
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
pContainer | input pointer to a CaloCellContainer (unchanged) |
iCell | input index of CaloCell in CaloCellConatiner (unchanged) |
weight | signal weight asociated with this cell |
Faster as index is already available, but has to rely on client to provide the correct (and valid) index.
void CaloCompositeCellBase< NAV >::addUniqueCell | ( | const CaloCellContainer * | theContainer, |
size_t | theIndex, | ||
double | weight, | ||
size_t | size_hint = 0 |
||
) |
Add a cell with global kinematic update (fast)
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
theContainer | input pointer to a CaloCellContainer (unchanged) |
theIndex | input index of CaloCell in CaloCellConatiner (unchanged) |
weight | signal weight asociated with this cell |
size_hint | if non-zero, a hint about many cells are likely to be in the cluster. |
Faster as index is already available, but has to rely on client to provide the correct (and valid) index.
The caller also guarantees that the cell is not already in the cluster.
void CaloCompositeCellBase< NAV >::addUniqueCellNoKine | ( | const CaloCellContainer * | theContainer, |
size_t | theIndex, | ||
double | weight, | ||
size_t | size_hint = 0 |
||
) |
Add a cell with no kinematic update (fast)
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
theContainer | input pointer to a CaloCellContainer (unchanged) |
theIndex | input index of CaloCell in CaloCellConatiner (unchanged) |
weight | signal weight asociated with this cell |
size_hint | if non-zero, a hint about many cells are likely to be in the cluster. |
Faster as index is already available, but has to rely on client to provide the correct (and valid) index.
The caller also guarantees that the cell is not already in the cluster.
cell_iterator CaloCompositeCellBase< NAV >::cell_begin | ( | ) | const |
Retrieve a STL-type begin() iterator for the cell store.
cell_iterator CaloCompositeCellBase< NAV >::cell_end | ( | ) | const |
Retrieve a STL-type end() iterator for the cell store.
const CaloCellContainer* CaloCompositeCellBase< NAV >::getCellContainer | ( | cell_iterator & | iterCell | ) | const |
Retrieve the pointer to the original cell container for a given cell.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
iterCell | iterator to the cell (unchanged) |
Returns 0 if cell not in store.
const CaloCellContainer* CaloCompositeCellBase< NAV >::getCellContainer | ( | const CaloCell * | pCell | ) | const |
Retrieve the pointer to the original cell container for a given cell.
pCell | pointer to the cell (unchanged) |
Returns 0 if cell not in store.
bool CaloCompositeCellBase< NAV >::getCellIndex | ( | cell_iterator & | iterCell, |
size_t & | iCell | ||
) | const |
Retrieve the index of a given cell in the cell container.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
iterCell | iterator to the cell (unchanged) |
iCell | reference to a modifiable index variable |
Returns true
and a valid index if cell is found in store. If cell is not found, the value of the index is unchanged (typically 0 if initialized properly by client).
Note that the index refers to the index of the cell in the cell container, not the index of the cell in the local store.
bool CaloCompositeCellBase< NAV >::getCellIndex | ( | const CaloCell * | pCell, |
size_t & | iCell | ||
) | const |
Retrieve the index of a given cell in the cell container.
pCell | pointer to the cell (unchanged) |
iCell | reference to a modifiable index variable |
Returns true
and a valid index if cell is found in store. If cell is not found, the value of the index is unchanged (typically 0 if initialized properly by client).
Note that the index refers to the index of the cell in the cell container, not the index of the cell in the local store.
double CaloCompositeCellBase< NAV >::getCellWeight | ( | cell_iterator & | iterCell | ) | const |
Retrieve the kinematic weight of a given cell.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
iterCell | iterator pointing to a cell |
double CaloCompositeCellBase< NAV >::getCellWeight | ( | const CaloCell * | pCell | ) | const |
Retrieve the kinematic weight of a given cell.
pCell | pointer to the cell (unchanged) |
Returns 0. if cell not in store.
double CaloCompositeCellBase< NAV >::getCellWeight | ( | const CaloCellContainer * | pContainer, |
size_t & | iCell | ||
) | const |
Retrieve the kinematic weight of a given cell.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
pContainer | pointer to cell container (unchanged) |
iCell | index to cell in container (unchanged) |
unsigned int CaloCompositeCellBase< NAV >::getNumberOfCells | ( | ) | const |
Return the number of cells in the store.
void CaloCompositeCellBase< NAV >::removeCell | ( | const CaloCell * | pCell | ) |
Remove a cell with kinematic update.
pCell | pointer to a CaloCell object (unchanged) |
Removes the cell pointed to by the input argument. The effect on the global kinematics is defined by the updateKine implementation in the derived classes.
The Navigable<CaloCellContainer,double> base class provides a remove method which can be used if no kinematic update is required.
void CaloCompositeCellBase< NAV >::removeCell | ( | const CaloCellContainer * | pContainer, |
size_t & | iCell | ||
) |
Remove a cell with kinematic update.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
pContainer | pointer to cell container (unchanged) |
iCell | index to cell in container (unchanged) |
void CaloCompositeCellBase< NAV >::removeCells | ( | ) |
Remove all cells without kinematic update.
void CaloCompositeCellBase< NAV >::reweightCell | ( | cell_iterator & | iterCell, |
double | weight | ||
) |
Reweight a cell with kinematic update.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
iterCell | input iterator referring to a cell (unchanged) |
weight | input new signal weight associated with this cell |
Changes the kinematic weight of a cell in the cluster. There is no check on the validity of the iterator.
void CaloCompositeCellBase< NAV >::reweightCell | ( | const CaloCell * | pCell, |
double | weight | ||
) |
Reweight a cell with kinematic update.
pCell | input pointer to a CaloCell object (unchanged) |
weight | input new signal weight associated with this cell |
Changes the kinematic weight of a cell in the cluster. No action if cell not in cluster. In particular, the cell is not added.
void CaloCompositeCellBase< NAV >::reweightCell | ( | const CaloCellContainer * | pContainer, |
size_t & | iCell, | ||
double | weight | ||
) |
Reweight a cell with kinematic update.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
pContainer | input pointer to a CaloCellContainer object (unchanged) |
iCell | input index of a CaloCell in CaloCellContainer (unchanged) |
weight | input new signal weight associated with this cell |
Changes the kinematic weight of a cell in the cluster. No action if not a valid pointer.
|
protectedpure virtual |
update kinematics
Implemented in CaloCluster.