ATLAS Offline Software
|
Helpers for creating calorimeter objects for unit tests. More...
#include <CaloTester.h>
Public Member Functions | |
CaloTester () | |
Constructor. More... | |
StatusCode | record_mgr () |
Record the CaloDetDescrManager in the detector store. More... | |
const CaloDetDescriptor * | find_dd (int hashid) |
Return a region descriptor corresponding to a given cell. More... | |
const CaloDetDescriptor * | find_dd (const Identifier &cell_id) |
Return a region descriptor corresponding to a given cell. More... | |
std::unique_ptr< CaloCell > | make_cell (int hashid) |
Create a calorimeter cell. More... | |
std::vector< CaloCell * > | get_cells () |
Return a vector of all cells. More... | |
std::vector< const CaloCell * > | get_const_cells () |
Return a vector of all cells as const pointers. More... | |
std::unique_ptr< CaloCellContainer > | make_ccc () |
Return a CaloCellContainer for all cells. More... | |
CaloDetDescrManager & | mgr () |
Return the CaloDetDescrManager. More... | |
const CaloHelpersTest & | helpers () const |
Return the ID helpers. More... | |
const LArEM_ID & | emID () const |
Return the LArEM ID helper. More... | |
const LArHEC_ID & | hecID () const |
Return the LArHEC ID helper. More... | |
const LArFCAL_ID & | fcalID () const |
Return the LArFCAL ID helper. More... | |
const LArMiniFCAL_ID & | minifcalID () const |
Return the LArMiniFCAL ID helper. More... | |
const TileID & | tileID () const |
Return the Tile ID helper. More... | |
const CaloCell_ID & | caloID () const |
Return the Calorimeter ID helper. More... | |
Private Member Functions | |
void | make_cells () |
Create all calo cells and save in internal list. More... | |
Private Attributes | |
CaloHelpersTest | m_helpers |
The ID helpers. More... | |
std::vector< std::unique_ptr< CaloDetDescrElement > > | m_tileddes |
All Tile detdescr elements. More... | |
std::vector< std::unique_ptr< CaloCell > > | m_cells |
The cells made by make_cells() . More... | |
CaloDetDescrManager * | m_mgr |
The manager object. More... | |
std::unique_ptr< CaloDetDescrManager > | m_mgr_up |
Owning pointer to the manager object. More... | |
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 |
Return the Calorimeter ID helper.
Definition at line 136 of file CaloTester.h.
Return the LArEM ID helper.
Definition at line 116 of file CaloTester.h.
|
inline |
Return the LArFCAL ID helper.
Definition at line 124 of file CaloTester.h.
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.
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.
Return the LArHEC ID helper.
Definition at line 120 of file CaloTester.h.
|
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 |
|
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.
Return the Tile ID helper.
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.