Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
11 #include "CaloDetDescr/CaloDetDescrElement.h"
18 MinMax() :
min(99999),
max(-999999) {}
19 void add (
double x,
double dx)
36 double phi_for_descr (
double phi)
46 if (
desc->is_tile()) {
49 if (
d ==
desc)
return mgr->calo_descriptors_size() +
i;
55 return desc->calo_hash();
63 if (!calo_helper->
is_tile (cell_id)) {
65 return mgr->get_descriptor (reg_id);
68 int clayer = calo_helper->
sample (cell_id);
71 if (
d->identify() != reg_id)
continue;
72 int dlayer =
d->layer();
73 if (clayer == dlayer)
return d;
74 if (is_sc && dlayer == 0 && clayer != 2)
return d;
83 if (!calo_helper->
is_tile (reg_id)) {
85 return mgr->get_descriptor (reg_id);
89 if (
d->identify() == reg_id)
return d;
95 ,
const DescrMinMax&
mm
101 if (
desc->calo_eta_max() == 0) {
103 desc->setCaloEtaMin (
mm.eta.min);
104 desc->setCaloEtaMax (
mm.eta.max);
105 desc->setCaloPhiMin (
mm.phi.min);
106 desc->setCaloPhiMax (
mm.phi.max);
107 desc->setCaloRMin (
mm.r.min);
108 desc->setCaloRMax (
mm.r.max);
109 desc->setCaloZMin (
mm.z.min);
110 desc->setCaloZMax (
mm.z.max);
112 std::vector<Identifier> cell_regions =
114 assert (!cell_regions.empty());
117 get_reg_descriptor (cell_regions[0], cellmgr);
120 if (
desc->is_tile()) {
121 desc->set_eta_phi_granularity (celldesc->
n_eta(),
127 std::vector<double> depths;
130 desc->set_depth_in (depths);
132 desc->set_depth_out (depths);
139 desc->setLArEtaMin (
mm.eta.min);
140 desc->setLArPhiMin (
mm.phi.min);
141 if (
desc->calo_sign() > 0) {
142 desc->setLArRegMin (
mm.eta.min);
143 desc->setLArRegMax (
mm.eta.max);
146 desc->setLArRegMin (-
mm.eta.max);
147 desc->setLArRegMax (-
mm.eta.min);
159 if (! calo_helper->
is_tile (reg_id)) {
203 std::vector<Identifier>
ids =
205 assert (!
ids.empty());
210 std::vector<const CaloDetDescrElement*> fromelts;
211 fromelts.reserve (
ids.size());
216 cell_idhelper->
sample(
id) == 2 &&
217 idhelper->
sample(elt->identify()) != 2)
220 assert (fromelt !=
nullptr);
221 fromelts.push_back (fromelt);
223 if(selt->
update(fromelts).isFailure()) {
224 return StatusCode::FAILURE;
227 return StatusCode::SUCCESS;
234 size_t maxdesc =
mgr->calo_descriptors_size() +
mgr->tile_descriptors_size();
235 std::vector<DescrMinMax> descr_minmax (maxdesc);
241 int ndx = descr_index (
desc,
mgr);
242 assert (ndx >= 0 && ndx < (
int)descr_minmax.size());
243 DescrMinMax&
mm = descr_minmax[ndx];
245 int dz_den =
desc->is_lar_hec() ? 1 : 2;
247 mm.eta.add (std::abs(elt->eta_raw()), elt->deta()/2);
248 mm.phi.add (phi_for_descr (elt->phi_raw()), elt->dphi()/2);
249 mm.r.add (elt->r(), elt->dr()/2);
250 mm.z.add (std::abs(elt->z_raw()), elt->dz()/dz_den);
256 updateDescriptor (
desc, descr_minmax[
i], cellmgr, scidTool);
260 updateDescriptor (
desc, descr_minmax[
i], cellmgr, scidTool);
This is a collection of helper functions for building Calo Super Cell detector manager,...
bool is_supercell(const Identifier id) const
Test if the identifier represents a supercell.
void get_depth_out(std::vector< double > &calo_depth) const
get vector of out depths
Scalar phi() const
phi method
Scalar eta() const
pseudorapidity method
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Identifier region_id(const int subCalo, const int barec_or_posneg, const int sampling_or_fcalmodule, const int region_or_dummy) const
Make a region ID from constituting fields and subCalo index; for (Mini)FCAL and Tiles,...
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
double dphi() const
delta phi
int n_calo_depth() const
number of calo depths
void updateDescriptors(CaloSuperCellDetDescrManager *mgr, const CaloDetDescrManager *cellmgr, const ICaloSuperCellIDTool *scidTool)
int calo_sample(const Identifier id) const
returns an int taken from Sampling enum and describing the subCalo to which the Id belongs.
bool is_tile(const Identifier id) const
test if the id belongs to the Tiles
bool is_valid() const
Check if id is in a valid state.
Definition of CaloDetDescrManager.
void createElements(CaloSuperCellDetDescrManager *mgr)
id_range reg_range(void) const
Range over set of region Identifiers (LAr + Tiles)
Definition of CaloDetDescriptor.
void get_depth_in(std::vector< double > &calo_depth) const
get vector of in depths
int sample(const Identifier id) const
Tile field values (NOT_VALID == invalid request)
int n_phi() const
phi granularity
::StatusCode StatusCode
StatusCode definition for legacy code.
void createDescriptors(CaloSuperCellDetDescrManager *mgr)
Helper class for offline supercell identifiers.
int sub_calo(const Identifier id) const
returns an int taken from SUBCALO enum and describing the subCalo to which the Id belongs.
bool add(const std::string &hname, TKey *tobj)
IdentifierHash subcalo_cell_hash(const Identifier cellId, int &subCalo) const
create hash id from 'global' cell id
double deta() const
delta eta
id_range cell_range(void) const
Range over full set of Identifiers (LAr + Tiles)
const Amg::Transform3D & transform() const
Get the current transformation matrix.
Element to represent a SuperCell.
StatusCode update(const std::vector< const CaloDetDescrElement * > &fromelts)
Update this element's geometry from the given list of offline elements.
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 ...
int n_eta() const
eta granularity
const CaloCell_ID * getCaloCell_ID() const
get calo cell ID helper
StatusCode updateElements(CaloSuperCellDetDescrManager *mgr, const CaloDetDescrManager *cellmgr, const ICaloSuperCellIDTool *scidTool)
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Helper base class for offline cell identifiers.
const Tile_Base_ID * tile_idHelper() const
access to Tile idHelper
Calo Subsystem specific Detector Elements + Dummy element for testing.