ATLAS Offline Software
|
This class provides the client interface for accessing the detector description information common to LAr and Tile. It is used in the Calorimeter reconstruction (from CaloCell building down to combined reconstruction) More...
#include <CaloDetDescrManager.h>
Public Types | |
typedef std::vector< CaloDetDescrElement * > | calo_element_vec |
typedef calo_element_vec::size_type | calo_element_vec_size |
typedef CaloConstIteratorAdaptor< calo_element_vec::const_iterator > | calo_element_const_iterator |
typedef boost::iterator_range< calo_element_const_iterator > | calo_element_range |
typedef calo_element_vec::const_iterator | calo_nonconst_element_const_iterator |
typedef boost::iterator_range< calo_nonconst_element_const_iterator > | calo_nonconst_element_range |
typedef std::vector< CaloDetDescriptor * > | calo_descr_vec |
typedef calo_descr_vec::size_type | calo_descr_size |
typedef CaloConstIteratorAdaptor< calo_descr_vec::const_iterator > | calo_descr_const_iterator |
typedef boost::iterator_range< calo_descr_const_iterator > | calo_descr_range |
typedef calo_descr_vec::const_iterator | calo_nonconst_descr_const_iterator |
typedef boost::iterator_range< calo_nonconst_descr_const_iterator > | calo_nonconst_descr_range |
Public Member Functions | |
const CaloCell_ID * | getCaloCell_ID () const |
get calo cell ID helper More... | |
void | set_helper (const CaloCell_ID *idHelper) |
set calo Cell ID helper More... | |
void | set_helper (const CaloIdManager *idHelper) |
void | initialize () |
initialization of the manager, used by the Converter when it creates the Manager More... | |
void | print () const |
print out the contents More... | |
bool | isInitialized () const |
for backwards compatibility only More... | |
const std::string & | lar_geometry () const |
get lar geometry label, distinguish between full atlas and TB More... | |
void | set_lar_geometry (const std::string &geom) |
set lar geometry label, distinguish between full atlas and TB More... | |
const CaloIdManager * | getCalo_Mgr () const |
get calo ID manager More... | |
calo_element_vec_size | element_size () const |
total number of elements More... | |
calo_element_const_iterator | element_begin () const |
first element More... | |
calo_element_const_iterator | element_begin (CaloCell_ID::SUBCALO subCalo) const |
first element in subcalo More... | |
calo_element_const_iterator | element_end () const |
end of element vector More... | |
calo_element_const_iterator | element_end (CaloCell_ID::SUBCALO subCalo) const |
end of subcalo element list More... | |
calo_element_range | element_range () const |
Range over element vector. More... | |
calo_element_range | element_range (CaloCell_ID::SUBCALO subCalo) const |
Range over subcalo element list. More... | |
calo_nonconst_element_range | element_range_nonconst () |
Range over element vector, with non-const elements. More... | |
const CaloDetDescrElement * | get_element (const Identifier &cellId) const |
get element by its identifier More... | |
const CaloDetDescrElement * | get_element (IdentifierHash caloCellHash) const |
get element by hash identifier More... | |
const CaloDetDescrElement * | get_element (CaloCell_ID::SUBCALO subCalo, IdentifierHash subCaloCellHash) const |
get element by subcalo and hash identifier More... | |
const CaloDetDescrElement * | get_element (CaloCell_ID::SUBCALO subCalo, int sampling_or_module, bool barrel, double eta, double phi) const |
LAr only! get element by subcalo, sampling, barrel flag, eta, phi. More... | |
const CaloDetDescrElement * | get_element (CaloCell_ID::CaloSample sample, double eta, double phi) const |
LAr only! get element by sample, eta phi. More... | |
CaloDetDescrElement * | get_element_nonconst (const Identifier &cellId) |
get element by its identifier, non-const version. More... | |
CaloDetDescrElement * | get_element_nonconst (IdentifierHash caloCellHash) |
get element by hash identifier, non-const version. More... | |
const CaloDetDescrElement * | get_element_raw (CaloCell_ID::CaloSample sample, double eta, double phi) const |
Get element from raw quantities (to build real fixed size clusters) More... | |
void | cellsInZone (double eta_min, double eta_max, double phi_min, double phi_max, std::vector< IdentifierHash > &cell_list) const |
the only client is CaloCellList class More... | |
void | cellsInZone (double eta_min, double eta_max, double phi_min, double phi_max, CaloCell_ID::SUBCALO subCalo, std::vector< IdentifierHash > &cell_list) const |
the only client is CaloCellList class More... | |
void | cellsInZone (double eta_min, double eta_max, double phi_min, double phi_max, CaloCell_ID::CaloSample sample, std::vector< IdentifierHash > &cell_list) const |
the only client is CaloCellList class More... | |
void | cellsInZone (double eta_min, double eta_max, double phi_min, double phi_max, CaloCell_ID::SUBCALO subCalo, int sampling_or_module, std::vector< IdentifierHash > &cell_list) const |
the only client is CaloCellList class More... | |
void | cellsInZone (double eta, double phi, int ncell_eta, int ncell_phi, CaloCell_ID::SUBCALO subCalo, int sampling_or_module, bool barrel, std::vector< IdentifierHash > &cell_list) const |
the only client is CaloCellList class More... | |
void | cellsInZone (double eta_min, double eta_max, double phi_min, double phi_max, const CaloDetDescriptor *descr, std::vector< IdentifierHash > &cell_list) const |
the only client is CaloCellList class More... | |
bool | is_in (double eta, double phi, CaloCell_ID::CaloSample sample, double &etadist) const |
return true if direction eta,phi crosses ANY of the corresponding descriptors More... | |
calo_descr_const_iterator | calo_descriptors_begin () const |
first descriptor in the vector More... | |
calo_descr_const_iterator | calo_descriptors_end () const |
end of descriptors vector More... | |
calo_descr_size | calo_descriptors_size () const |
number of descriptors More... | |
calo_descr_range | calo_descriptors_range () const |
Range over descriptors. More... | |
calo_nonconst_descr_range | calo_descriptors_range_nonconst () |
Range over descriptors, with non-const elements. More... | |
const CaloDetDescriptor * | get_descriptor (const Identifier ®ionId) const |
get descriptor by region identifier More... | |
const CaloDetDescriptor * | get_descriptor (CaloCell_ID::SUBCALO subCalo, int sampling_or_module, bool barrel, double eta, double phi) const |
get descriptor by subcalo, sampling, barrel flag, eta, phi More... | |
const CaloDetDescriptor * | get_descriptor (CaloCell_ID::CaloSample sample, double eta, double phi) const |
get descriptor by sample, eta and phi More... | |
CaloDetDescriptor * | get_descriptor_nonconst (const Identifier ®ionId) |
get descriptor by region identifier, non-const version. More... | |
const CaloDetDescriptor * | get_descriptor_raw (CaloCell_ID::CaloSample sample, double eta, double phi) const |
get descriptor by sample, eta and phi raw More... | |
calo_descr_const_iterator | tile_descriptors_begin () const |
first tile descriptor (they are in separate vector) More... | |
calo_descr_const_iterator | tile_descriptors_end () const |
end of tile descriptors vector More... | |
calo_descr_size | tile_descriptors_size () const |
number of tile descriptors More... | |
calo_descr_range | tile_descriptors_range () const |
Range over tile descriptors. More... | |
calo_nonconst_descr_range | tile_descriptors_range_nonconst () |
Range over tile descriptors, with non-const elements. More... | |
void | set_helper (const CaloCell_Base_ID *idHelper) |
set calo Cell ID helper More... | |
void | add (CaloDetDescrElement *element) |
add Calo DD element to the elements vector More... | |
void | add (CaloDetDescriptor *descr) |
add new LAr descriptor to the descriptors vector Takes ownership of the object. More... | |
void | add (std::unique_ptr< CaloDetDescriptor > descr) |
add new LAr descriptor to the descriptors vector More... | |
void | add_tile (CaloDetDescriptor *descr) |
add tile descriptor to the tile descriptors vector More... | |
Static Public Member Functions | |
static void | build_sample (CaloCell_ID::SUBCALO subCalo, bool barrel, int sampling_or_module, CaloCell_ID::CaloSample &sample) |
translate between the 2 ways to label a sub-detector: More... | |
static void | decode_sample (CaloCell_ID::SUBCALO &subCalo, bool &barrel, int &sampling_or_module, CaloCell_ID::CaloSample sample) |
translate between the 2 ways to label a sub-detector: More... | |
Private Member Functions | |
CaloDetDescrElement * | release_element (IdentifierHash hash) |
const CaloDetDescrElement * | get_element_FCAL (const CaloDetDescriptor *reg, double eta, double phi) const |
LArFCAl private methode to get element. More... | |
const CaloDetDescrElement * | get_element_FCAL_raw (const CaloDetDescriptor *reg, double eta, double phi) const |
LArFCAl private methode to get element from raw eta,phi. More... | |
Private Attributes | |
const CaloCell_Base_ID * | m_cell_id |
Calo Cell ID helper. More... | |
const CaloIdManager * | m_calo_mgr |
Calo ID Manager helper. More... | |
calo_element_vec | m_element_vec |
vector of Calo DD elements More... | |
calo_descr_vec | m_descr_vec |
vector of descriptors More... | |
std::vector< IdentifierHash > | m_subCalo_min |
offsets for subcalo's elements More... | |
std::vector< IdentifierHash > | m_subCalo_max |
offsets for subcalo's elements More... | |
std::vector< calo_element_const_iterator > | m_subCalo_begin |
offsets for subcalo's elements More... | |
std::vector< calo_element_const_iterator > | m_subCalo_end |
offsets for subcalo's elements More... | |
calo_descr_vec | m_tile_descr_vec |
vector of descriptors More... | |
std::string | m_lar_geometry |
LAr geometry label (full atlas/TB) for backwards compatibility. More... | |
This class provides the client interface for accessing the detector description information common to LAr and Tile. It is used in the Calorimeter reconstruction (from CaloCell building down to combined reconstruction)
For subdetector specific functionality one should use special managers 4 for LAr (in LArReadoutgeometry package) and one for Tile (in TileDetDescr package), essentially upstream of CaloCell building.
MAJOR FUNCTIONALITIES :
1) 2 enums and 3 coordinate systems :
For historical reasons, there are 2 ways to label a piece of the Calorimeter: the CaloCell_ID::CaloSample enum is by far the recommended one. The methods CaloDetDescrManager::build_sample and CaloDetDescrManager::decode_sample provide the translation.
The CaloCell_ID::SUBCALO subCalo + bool barrel + int sampling_or_module combination is meaningless for Tiles, but used in many places in the LAr code, so was kept for backward compatibility. The boolean "barrel" is needed because there is an emb/emec ambiguity (in the enum definition) and eta overlap: if true, will search EMB/TILES, if false will search EMEC/HEC/FCAL.
Also note the different coordinates : in EMB people generally use "eta, phi, radius", in EMEC/HEC people generally use "eta, phi, Z", in Tiles/FCAL people generally use cartesian coordinates. To avoid confusion, the coordinate system used is explicit in all methods signature.
2) Access to the "big" array of CaloDetDescrElement :
These are stored internally according to the IdentifierHash caloCellHash. All navigation/convertion between the this complete hash and the subcalo (em/hec/fcal/tile) are provided by the CaloCell_ID helper.
3) Methods cellsInZone :
Given a zone in eta/phi, a sub detector and a sampling (or module for FCAL), these methods return the list of CALO IdentifierHash. In case of failiure, the vector will be empty.
WARNING : eta_min and eta_max can have NEGATIVE values and are not abs() (in contrast to CaloDescriptors, where eta() is always positive and has to be multiplied by sign() )
WARNING: For the FCAL this involves a loop over all the Fcal cells, so this is a little bit slower if Fcal layers are required
4) Given an eta/phi and a sampling or a depth, where-am-I ?
These method return CaloDetDescrElement* (to get, e.g., cell size), or return the entrance into the calorimeter (r or z, for barrel or endcap).
WARNING : if eta/phi is outside the Calo range, or no Element or descriptor is found for some reason, returns a NULL pointer or a radius=0 !
WARNING : the methods get_barrel_element and get_ec_element only work in the barrel/endcap regions.
5) Methods is_in :
Obviously, will return true if direction eta,phi crosses ANY of the corresponding descriptors
6) Methods get_entrance and get_surface (needed for TrackToCalo):
Trk::Surfaces are not built by the CaloDetDescrManager to avoid any dependency from Calorimeter onto Tracking : this is done in the Reconstruction/RecoTools/TrackToCalo package. But this class provides the surface parameters
By convention, for each CaloSample the radius/z correspond to the entrance of the sampling, and are "flat" in the sense that there is no eta dependance. This is valid for PS, Strips, HEC, FCAL and Tiles, but not for EMB2,EMB3,EMEC2,EMEC3
Clients who want a more precise (and eta dependant) entrance radius can overwrite the default one by the result of the methods get_entrance_radius/get_entrance_z .
Clients who want to add an offset, use the middle rather than entrace or use a parametrised depth are invited to use the CaloDepthTool, which is in Reconstruction/RecoTool/TrackToCalo
7) Access to the CaloDetDescriptors :
In LAr, there is 1 CaloDetDescriptor per region of homogeneus granularity. Their primary goal if to speedup loops by grouping cells within regions, and save spave by caching what they have in common. You may need to access them to get, for example, the grannularity.
Definition at line 471 of file CaloDetDescrManager.h.
|
inherited |
Definition at line 324 of file CaloDetDescrManager.h.
|
inherited |
Definition at line 325 of file CaloDetDescrManager.h.
|
inherited |
Definition at line 322 of file CaloDetDescrManager.h.
|
inherited |
Definition at line 321 of file CaloDetDescrManager.h.
|
inherited |
Definition at line 185 of file CaloDetDescrManager.h.
|
inherited |
Definition at line 186 of file CaloDetDescrManager.h.
|
inherited |
Definition at line 182 of file CaloDetDescrManager.h.
|
inherited |
Definition at line 183 of file CaloDetDescrManager.h.
|
inherited |
Definition at line 329 of file CaloDetDescrManager.h.
|
inherited |
Definition at line 330 of file CaloDetDescrManager.h.
|
inherited |
Definition at line 189 of file CaloDetDescrManager.h.
|
inherited |
Definition at line 190 of file CaloDetDescrManager.h.
|
inherited |
add Calo DD element to the elements vector
Definition at line 755 of file CaloDetDescrManager.cxx.
|
inherited |
add new LAr descriptor to the descriptors vector Takes ownership of the object.
For new code, prefer the next version that takes a unique_ptr.
Definition at line 760 of file CaloDetDescrManager.cxx.
|
inherited |
add new LAr descriptor to the descriptors vector
Definition at line 765 of file CaloDetDescrManager.cxx.
|
inherited |
add tile descriptor to the tile descriptors vector
Definition at line 771 of file CaloDetDescrManager.cxx.
|
staticinherited |
translate between the 2 ways to label a sub-detector:
Definition at line 1425 of file CaloDetDescrManager.cxx.
|
inherited |
first descriptor in the vector
Definition at line 517 of file CaloDetDescrManager.cxx.
|
inherited |
end of descriptors vector
Definition at line 523 of file CaloDetDescrManager.cxx.
|
inherited |
Range over descriptors.
Definition at line 535 of file CaloDetDescrManager.cxx.
|
inherited |
Range over descriptors, with non-const elements.
Definition at line 541 of file CaloDetDescrManager.cxx.
|
inherited |
number of descriptors
Definition at line 529 of file CaloDetDescrManager.cxx.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
the only client is CaloCellList class
Definition at line 1062 of file CaloDetDescrManager.cxx.
|
inherited |
|
staticinherited |
translate between the 2 ways to label a sub-detector:
Definition at line 1468 of file CaloDetDescrManager.cxx.
|
inherited |
first element
Definition at line 111 of file CaloDetDescrManager.cxx.
|
inherited |
first element in subcalo
Definition at line 137 of file CaloDetDescrManager.cxx.
|
inherited |
end of element vector
Definition at line 117 of file CaloDetDescrManager.cxx.
|
inherited |
end of subcalo element list
Definition at line 144 of file CaloDetDescrManager.cxx.
|
inherited |
Range over element vector.
Definition at line 123 of file CaloDetDescrManager.cxx.
|
inherited |
|
inherited |
Range over element vector, with non-const elements.
Definition at line 130 of file CaloDetDescrManager.cxx.
|
inherited |
total number of elements
Definition at line 105 of file CaloDetDescrManager.cxx.
|
inherited |
|
inherited |
get descriptor by subcalo, sampling, barrel flag, eta, phi
Definition at line 599 of file CaloDetDescrManager.cxx.
|
inherited |
|
inherited |
get descriptor by region identifier, non-const version.
Definition at line 589 of file CaloDetDescrManager.cxx.
|
inherited |
|
inherited |
LAr only! get element by sample, eta phi.
This is slower for FCAL
Definition at line 256 of file CaloDetDescrManager.cxx.
|
inherited |
get element by subcalo and hash identifier
subCalo | [IN] subsystem |
subCaloCellHash | [IN] sub calo hash |
Definition at line 173 of file CaloDetDescrManager.cxx.
|
inherited |
LAr only! get element by subcalo, sampling, barrel flag, eta, phi.
This is slower for FCAL
Definition at line 185 of file CaloDetDescrManager.cxx.
|
inherited |
get element by its identifier
cellId | [IN] element identifier |
Definition at line 159 of file CaloDetDescrManager.cxx.
|
inlineinherited |
get element by hash identifier
caloCellHash | [IN] hash identifier for the element |
Definition at line 509 of file CaloDetDescrManager.h.
|
privateinherited |
LArFCAl private methode to get element.
Definition at line 443 of file CaloDetDescrManager.cxx.
|
privateinherited |
LArFCAl private methode to get element from raw eta,phi.
Definition at line 479 of file CaloDetDescrManager.cxx.
|
inherited |
get element by its identifier, non-const version.
cellId | [IN] element identifier |
Definition at line 166 of file CaloDetDescrManager.cxx.
|
inlineinherited |
get element by hash identifier, non-const version.
caloCellHash | [IN] hash identifier for the element |
Definition at line 517 of file CaloDetDescrManager.h.
|
inherited |
Get element from raw quantities (to build real fixed size clusters)
Definition at line 349 of file CaloDetDescrManager.cxx.
|
inherited |
get calo ID manager
Definition at line 99 of file CaloDetDescrManager.cxx.
const CaloCell_ID * CaloDetDescrManager::getCaloCell_ID | ( | ) | const |
|
inherited |
initialization of the manager, used by the Converter when it creates the Manager
Definition at line 49 of file CaloDetDescrManager.cxx.
|
inherited |
return true if direction eta,phi crosses ANY of the corresponding descriptors
eta | [IN] eta direction |
phi | [IN] phi direction |
sample | [IN] Calo Sample |
etadist | [OUT] distance in eta to the neares edge |
Definition at line 1348 of file CaloDetDescrManager.cxx.
|
inlineinherited |
for backwards compatibility only
Definition at line 165 of file CaloDetDescrManager.h.
|
inlineinherited |
get lar geometry label, distinguish between full atlas and TB
Definition at line 168 of file CaloDetDescrManager.h.
|
inherited |
|
privateinherited |
Definition at line 776 of file CaloDetDescrManager.cxx.
|
inherited |
set calo Cell ID helper
Definition at line 783 of file CaloDetDescrManager.cxx.
void CaloDetDescrManager::set_helper | ( | const CaloCell_ID * | idHelper | ) |
set calo Cell ID helper
Definition at line 1596 of file CaloDetDescrManager.cxx.
void CaloDetDescrManager::set_helper | ( | const CaloIdManager * | idHelper | ) |
Definition at line 1602 of file CaloDetDescrManager.cxx.
|
inlineinherited |
set lar geometry label, distinguish between full atlas and TB
Definition at line 171 of file CaloDetDescrManager.h.
|
inherited |
first tile descriptor (they are in separate vector)
Definition at line 547 of file CaloDetDescrManager.cxx.
|
inherited |
end of tile descriptors vector
Definition at line 553 of file CaloDetDescrManager.cxx.
|
inherited |
Range over tile descriptors.
Definition at line 565 of file CaloDetDescrManager.cxx.
|
inherited |
Range over tile descriptors, with non-const elements.
Definition at line 572 of file CaloDetDescrManager.cxx.
|
inherited |
number of tile descriptors
Definition at line 559 of file CaloDetDescrManager.cxx.
|
privateinherited |
Calo ID Manager helper.
Definition at line 425 of file CaloDetDescrManager.h.
|
privateinherited |
Calo Cell ID helper.
Definition at line 422 of file CaloDetDescrManager.h.
|
privateinherited |
vector of descriptors
Definition at line 432 of file CaloDetDescrManager.h.
|
privateinherited |
vector of Calo DD elements
Definition at line 429 of file CaloDetDescrManager.h.
|
privateinherited |
LAr geometry label (full atlas/TB) for backwards compatibility.
Definition at line 453 of file CaloDetDescrManager.h.
|
privateinherited |
offsets for subcalo's elements
Definition at line 442 of file CaloDetDescrManager.h.
|
privateinherited |
offsets for subcalo's elements
Definition at line 445 of file CaloDetDescrManager.h.
|
privateinherited |
offsets for subcalo's elements
Definition at line 439 of file CaloDetDescrManager.h.
|
privateinherited |
offsets for subcalo's elements
Definition at line 436 of file CaloDetDescrManager.h.
|
privateinherited |
vector of descriptors
Definition at line 449 of file CaloDetDescrManager.h.