|
ATLAS Offline Software
|
Go to the documentation of this file.
16 #include "GaudiKernel/ServiceHandle.h"
45 DataObjID id1 (
"testDetDescr");
47 auto mgr_cc=std::make_unique<CondCont<CaloDetDescrManager> >(rcu, id1);
49 CHECK_WITH_CONTEXT(condStore->record(std::move(mgr_cc),
"CaloDetDescrManager"),
"CaloTester");
51 return StatusCode::SUCCESS;
67 int subcalo =
helper.sub_calo (
id);
74 int sampling =
helper.sampling (
id);
75 int posneg =
helper.pos_neg (
id);
76 int region =
helper.region (
id);
77 reg_id =
helper.region_id (subcalo, posneg, sampling, region);
82 auto ddp = std::make_unique<CaloDetDescriptor> (reg_id,
87 float eta0 =
helper.eta0 (reg_id);
90 if (ddp->calo_sign() >= 0) {
91 ddp->setLArRegMin (eta0);
92 ddp->setLArRegMax (
eta1);
93 ddp->setCaloEtaMin (eta0);
94 ddp->setCaloEtaMax (
eta1);
97 ddp->setLArRegMin (-
eta1);
98 ddp->setLArRegMax (-eta0);
99 ddp->setCaloEtaMin (-
eta1);
100 ddp->setCaloEtaMax (-eta0);
103 ddp->setLArEtaMin (eta0);
104 ddp->setLArPhiMin (0);
133 auto ddep = std::make_unique<DummyDetDescrElement> (hashid -
134 descr->caloCellMin(),
145 float phi =
descr->calo_phi_min() + (iphi - iphi_min) *
descr->dphi();
147 if (
descr->calo_sign() > 0) {
148 eta =
descr->calo_eta_min() + (ieta - ieta_min) *
descr->deta();
151 eta =
descr->calo_eta_max() - (ieta - ieta_min) *
descr->deta();
154 ddep->set_cylindric (
eta,
phi,
r);
155 ddep->set_cylindric_size (
descr->deta(),
descr->dphi(), 0);
177 for (
size_t i = 0;
i < hashmax;
i++)
191 std::vector<CaloCell*>
cells;
193 for (
const std::unique_ptr<CaloCell>&
cell :
m_cells) {
209 std::vector<const CaloCell*>
cells;
211 for (
const std::unique_ptr<CaloCell>&
cell :
m_cells) {
230 ccc->push_back (
cell.get());
232 ccc->initializeLookUpTable();
std::unique_ptr< CaloDetDescrManager > m_mgr_up
Owning pointer to the manager object.
std::vector< std::unique_ptr< CaloCell > > m_cells
The cells made by make_cells().
#define CHECK_WITH_CONTEXT(...)
Evaluate an expression and check for errors, with an explicitly specified context name.
const CaloDetDescriptor * find_dd(int hashid)
Return a region descriptor corresponding to a given cell.
IdentifierHash calo_cell_hash(const Identifier cellId) const
create hash id from 'global' cell id
void make_cells()
Create all calo cells and save in internal list.
Hold mappings of ranges to condition objects.
Scalar phi() const
phi method
int phi_min(const Identifier regId) const
min value of phi index (-999 == failure)
std::unique_ptr< CaloCell > make_cell(int hashid)
Create a calorimeter cell.
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Scalar eta() const
pseudorapidity method
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
const TileID & tileID() const
setEt setPhi setE277 setWeta2 eta1
void add(CaloDetDescrElement *element)
add Calo DD element to the elements vector
bool is_tile(const Identifier id) const
test if the id belongs to the Tiles
std::unique_ptr< CaloCellContainer > make_ccc()
Return a CaloCellContainer for all cells.
std::vector< std::unique_ptr< CaloDetDescrElement > > m_tileddes
All Tile detdescr elements.
Identifier identify() const override final
cell identifier
void set_helper(const CaloCell_ID *idHelper)
set calo Cell ID helper
::StatusCode StatusCode
StatusCode definition for legacy code.
CaloHelpersTest m_helpers
The ID helpers.
int eta(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
StatusCode record_mgr()
Record the CaloDetDescrManager in the detector store.
int eta_min(const Identifier regId) const
min value of eta index (-999 == failure)
Helpers for checking error return status codes and reporting errors.
int phi(const Identifier id) const
LAr field values (NOT_VALID == invalid request)
CaloDetDescrManager * m_mgr
The manager object.
A no-op implementation of IRCUSvc, for use in unit tests.
const CaloCell_ID & caloID() const
This class provides the client interface for accessing the detector description information common to...
This is a base class for LAr and Tile Descriptors The primary goal is to speed up loops over all the ...
std::vector< const CaloCell * > get_const_cells()
Return a vector of all cells as const pointers.
Helpers for creating calorimeter objects for unit tests.
std::vector< CaloCell * > get_cells()
Return a vector of all cells.
void initialize()
initialization of the manager, used by the Converter when it creates the Manager
static EventIDRange infiniteTime()
Produces an EventIDRange that is inifinite in Time and invalid in RunLumi.
Helper base class for offline cell identifiers.
Calo Subsystem specific Detector Elements + Dummy element for testing.
size_type calo_cell_hash_max(void) const
cell 'global' hash table max size
const CaloDetDescriptor * get_descriptor(const Identifier ®ionId) const
get descriptor by region identifier