ATLAS Offline Software
Public Types | Public Member Functions | Protected Member Functions | List of all members
CaloCompositeCellBase< NAV > Class Template Referenceabstract

base class for methods and store of cell links More...

#include <CaloCompositeCellBase.h>

Inheritance diagram for CaloCompositeCellBase< NAV >:
Collaboration diagram for CaloCompositeCellBase< NAV >:

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 CaloCellContainergetCellContainer (const CaloCell *pCell) const
 Retrieve the pointer to the original cell container for a given cell. More...
 
const CaloCellContainergetCellContainer (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...
 

Detailed Description

template<class NAV>
class CaloCompositeCellBase< NAV >

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 .

Author
Peter Loch loch@.nosp@m.phys.nosp@m.ics.a.nosp@m.rizo.nosp@m.na.ed.nosp@m.u
Date
August 25, 2005 (first implementation)
Version
0

Definition at line 12 of file CaloCompositeCellBase.h.

Member Typedef Documentation

◆ cell_iterator

template<class NAV >
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.

Constructor & Destructor Documentation

◆ CaloCompositeCellBase()

template<class NAV >
CaloCompositeCellBase< NAV >::CaloCompositeCellBase ( )

Constructor.

◆ ~CaloCompositeCellBase()

template<class NAV >
virtual CaloCompositeCellBase< NAV >::~CaloCompositeCellBase ( )
virtual

Destructor.

Member Function Documentation

◆ addCell() [1/2]

template<class NAV >
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)

Parameters
pContainerinput pointer to a CaloCellContainer (unchanged)
pCellinput pointer to a CaloCell (unchanged)
weightsignal weight asociated with this cell
iCellinput 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.

◆ addCell() [2/2]

template<class NAV >
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.

Parameters
pContainerinput pointer to a CaloCellContainer (unchanged)
iCellinput index of CaloCell in CaloCellConatiner (unchanged)
weightsignal weight asociated with this cell

Faster as index is already available, but has to rely on client to provide the correct (and valid) index.

◆ addUniqueCell()

template<class NAV >
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.

Parameters
theContainerinput pointer to a CaloCellContainer (unchanged)
theIndexinput index of CaloCell in CaloCellConatiner (unchanged)
weightsignal weight asociated with this cell
size_hintif 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.

◆ addUniqueCellNoKine()

template<class NAV >
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.

Parameters
theContainerinput pointer to a CaloCellContainer (unchanged)
theIndexinput index of CaloCell in CaloCellConatiner (unchanged)
weightsignal weight asociated with this cell
size_hintif 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_begin()

template<class NAV >
cell_iterator CaloCompositeCellBase< NAV >::cell_begin ( ) const

Retrieve a STL-type begin() iterator for the cell store.

◆ cell_end()

template<class NAV >
cell_iterator CaloCompositeCellBase< NAV >::cell_end ( ) const

Retrieve a STL-type end() iterator for the cell store.

◆ getCellContainer() [1/2]

template<class NAV >
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.

Parameters
iterCelliterator to the cell (unchanged)

Returns 0 if cell not in store.

◆ getCellContainer() [2/2]

template<class NAV >
const CaloCellContainer* CaloCompositeCellBase< NAV >::getCellContainer ( const CaloCell pCell) const

Retrieve the pointer to the original cell container for a given cell.

Parameters
pCellpointer to the cell (unchanged)

Returns 0 if cell not in store.

◆ getCellIndex() [1/2]

template<class NAV >
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.

Parameters
iterCelliterator to the cell (unchanged)
iCellreference 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.

◆ getCellIndex() [2/2]

template<class NAV >
bool CaloCompositeCellBase< NAV >::getCellIndex ( const CaloCell pCell,
size_t &  iCell 
) const

Retrieve the index of a given cell in the cell container.

Parameters
pCellpointer to the cell (unchanged)
iCellreference 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.

◆ getCellWeight() [1/3]

template<class NAV >
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.

Parameters
iterCelliterator pointing to a cell

◆ getCellWeight() [2/3]

template<class NAV >
double CaloCompositeCellBase< NAV >::getCellWeight ( const CaloCell pCell) const

Retrieve the kinematic weight of a given cell.

Parameters
pCellpointer to the cell (unchanged)

Returns 0. if cell not in store.

◆ getCellWeight() [3/3]

template<class NAV >
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.

Parameters
pContainerpointer to cell container (unchanged)
iCellindex to cell in container (unchanged)

◆ getNumberOfCells()

template<class NAV >
unsigned int CaloCompositeCellBase< NAV >::getNumberOfCells ( ) const

Return the number of cells in the store.

◆ removeCell() [1/2]

template<class NAV >
void CaloCompositeCellBase< NAV >::removeCell ( const CaloCell pCell)

Remove a cell with kinematic update.

Parameters
pCellpointer 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.

◆ removeCell() [2/2]

template<class NAV >
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.

Parameters
pContainerpointer to cell container (unchanged)
iCellindex to cell in container (unchanged)

◆ removeCells()

template<class NAV >
void CaloCompositeCellBase< NAV >::removeCells ( )

Remove all cells without kinematic update.

◆ reweightCell() [1/3]

template<class NAV >
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.

Parameters
iterCellinput iterator referring to a cell (unchanged)
weightinput 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.

◆ reweightCell() [2/3]

template<class NAV >
void CaloCompositeCellBase< NAV >::reweightCell ( const CaloCell pCell,
double  weight 
)

Reweight a cell with kinematic update.

Parameters
pCellinput pointer to a CaloCell object (unchanged)
weightinput 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.

◆ reweightCell() [3/3]

template<class NAV >
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.

Parameters
pContainerinput pointer to a CaloCellContainer object (unchanged)
iCellinput index of a CaloCell in CaloCellContainer (unchanged)
weightinput new signal weight associated with this cell

Changes the kinematic weight of a cell in the cluster. No action if not a valid pointer.

◆ updateKine()

template<class NAV >
virtual void CaloCompositeCellBase< NAV >::updateKine ( const CaloCell pCell,
double  weight 
)
protectedpure virtual

update kinematics

Implemented in CaloCluster.


The documentation for this class was generated from the following file: