![]() |
ATLAS Offline Software
|
Helpers for creating calorimeter objects for unit tests. More...
#include <CaloTester.h>
Public Member Functions | |
| CaloTester () | |
| Constructor. | |
| StatusCode | record_mgr () |
| Record the CaloDetDescrManager in the detector store. | |
| const CaloDetDescriptor * | find_dd (int hashid) |
| Return a region descriptor corresponding to a given cell. | |
| const CaloDetDescriptor * | find_dd (const Identifier &cell_id) |
| Return a region descriptor corresponding to a given cell. | |
| std::unique_ptr< CaloCell > | make_cell (int hashid) |
| Create a calorimeter cell. | |
| std::vector< CaloCell * > | get_cells () |
| Return a vector of all cells. | |
| std::vector< const CaloCell * > | get_const_cells () |
| Return a vector of all cells as const pointers. | |
| std::unique_ptr< CaloCellContainer > | make_ccc () |
| Return a CaloCellContainer for all cells. | |
| CaloDetDescrManager & | mgr () |
| Return the CaloDetDescrManager. | |
| const CaloHelpersTest & | helpers () const |
| Return the ID helpers. | |
| const LArEM_ID & | emID () const |
| Return the LArEM ID helper. | |
| const LArHEC_ID & | hecID () const |
| Return the LArHEC ID helper. | |
| const LArFCAL_ID & | fcalID () const |
| Return the LArFCAL ID helper. | |
| const LArMiniFCAL_ID & | minifcalID () const |
| Return the LArMiniFCAL ID helper. | |
| const TileID & | tileID () const |
| Return the Tile ID helper. | |
| const CaloCell_ID & | caloID () const |
| Return the Calorimeter ID helper. | |
Private Member Functions | |
| void | make_cells () |
| Create all calo cells and save in internal list. | |
Private Attributes | |
| CaloHelpersTest | m_helpers |
| The ID helpers. | |
| std::vector< std::unique_ptr< CaloDetDescrElement > > | m_tileddes |
| All Tile detdescr elements. | |
| std::vector< std::unique_ptr< CaloCell > > | m_cells |
The cells made by make_cells(). | |
| CaloDetDescrManager * | m_mgr |
| The manager object. | |
| std::unique_ptr< CaloDetDescrManager > | m_mgr_up |
| Owning pointer to the manager object. | |
Helpers for creating calorimeter objects for unit tests.
Helpers to create ID helpers, detector description, and cells for use in unit tests, etc. Builds an idealized geometry.
Warning: DD built here is known to be incorrect for tile/fcal. Some parts of DD are likely to be incomplete for all subcalorimeters. Use with care.
Definition at line 40 of file CaloTester.h.
| CaloTester::CaloTester | ( | ) |
Constructor.
The constructor will create the ID helpers. A CaloDetDescrManager instance will also be created, but it will not be recorded in the detector store unless record_mgr is called.
Definition at line 28 of file CaloTester.cxx.
|
inline |
|
inline |
|
inline |
| const CaloDetDescriptor * CaloTester::find_dd | ( | const Identifier & | cell_id | ) |
Return a region descriptor corresponding to a given cell.
| reg_id | Cell identifier. |
The desciptor will be created if needed and registered with the manager.
Definition at line 120 of file CaloTester.cxx.
| const CaloDetDescriptor * CaloTester::find_dd | ( | int | hashid | ) |
Return a region descriptor corresponding to a given cell.
| hashid | Cell hash id. |
The desciptor will be created if needed and registered with the manager.
Definition at line 61 of file CaloTester.cxx.
| std::vector< CaloCell * > CaloTester::get_cells | ( | ) |
Return a vector of all cells.
The cells remain owned by the Tester object.
Definition at line 186 of file CaloTester.cxx.
| std::vector< const CaloCell * > CaloTester::get_const_cells | ( | ) |
Return a vector of all cells as const pointers.
The cells remain owned by the Tester object.
Definition at line 204 of file CaloTester.cxx.
|
inline |
|
inline |
| std::unique_ptr< CaloCellContainer > CaloTester::make_ccc | ( | ) |
Return a CaloCellContainer for all cells.
This will be a view container; the cells remain owned by the Tester object.
Definition at line 223 of file CaloTester.cxx.
| std::unique_ptr< CaloCell > CaloTester::make_cell | ( | int | hashid | ) |
Create a calorimeter cell.
| hashid | Cell hash id. |
Definition at line 130 of file CaloTester.cxx.
|
private |
Create all calo cells and save in internal list.
Definition at line 173 of file CaloTester.cxx.
|
inline |
|
inline |
| StatusCode CaloTester::record_mgr | ( | ) |
Record the CaloDetDescrManager in the detector store.
Record the CaloDetDescrManager in the ConditionStore.
This may create the detector store as a side effect.
Definition at line 41 of file CaloTester.cxx.
|
inline |
Definition at line 132 of file CaloTester.h.
|
private |
The cells made by make_cells().
Definition at line 153 of file CaloTester.h.
|
private |
The ID helpers.
Definition at line 146 of file CaloTester.h.
|
private |
The manager object.
Definition at line 156 of file CaloTester.h.
|
private |
Owning pointer to the manager object.
This is set at the start, and cleared if the object is recorded in SG.
Definition at line 160 of file CaloTester.h.
|
private |
All Tile detdescr elements.
The manager does not take ownership of these.
Definition at line 150 of file CaloTester.h.