ATLAS Offline Software
CaloDetectorElements.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
13 #ifndef CALODETDESCR_CALODETECTORELEMENTS_H
14 #define CALODETDESCR_CALODETECTORELEMENTS_H
15 
16 #include "CaloDetDescr/CaloDetDescrElement.h"
17 
26 
27 // MBTS
28 #include "Identifier/Identifier.h"
29 
30 class CaloDetDescriptor;
31 class GeoAlignmentStore;
32 
39 typedef struct
40 {
41  float dx;
42  float dy;
43  float dz;
45 
52 {
53  public:
64  EMBDetectorElement(const IdentifierHash subcaloHash
65  , const IdentifierHash onl1
66  , const IdentifierHash onl2
68  , EMBCellConstLink& embCell
69  , const EMBDetectorRegion* embRegion
70  , bool isTestBeam
71  , const GeoAlignmentStore* geoAlignStore = nullptr
72  , const CaloElementPositionShift* posShift = nullptr);
73 
77  inline EMBCellConstLink getEMBCell() const {return m_cell;}
78 
82  virtual int getLayer() const override;
83 
84  private:
93 
97  EMBDetectorElement() = delete;
102 
106  void init_description(const GeoAlignmentStore* geoAlignStore
107  , const CaloElementPositionShift* posShift);
108 };
109 
116 {
117  public:
128  EMECDetectorElement(const IdentifierHash subcaloHash
129  , const IdentifierHash onl1
130  , const IdentifierHash onl2
132  , EMECCellConstLink& emecCell
133  , const EMECDetectorRegion* emecRegion
134  , bool isTestBeam
135  , const GeoAlignmentStore* geoAlignStore = nullptr
136  , const CaloElementPositionShift* posShift = nullptr);
137 
141  inline EMECCellConstLink getEMECCell() const {return m_cell;}
142 
146  virtual int getLayer() const override;
147 
148  private:
157 
166 
170  void init_description(bool isTestBeam
171  , const GeoAlignmentStore* geoAlignStore
172  , const CaloElementPositionShift* posShift);
173 
178  void init_interpretation();
179 
180 };
181 
182 
189 {
190  public:
201  HECDetectorElement(const IdentifierHash subcaloHash
202  , const IdentifierHash onl1
203  , const IdentifierHash onl2
205  , HECCellConstLink& hecCell
206  , const HECDetectorRegion* hecRegion
207  , bool isTestBeam
208  , const GeoAlignmentStore* geoAlignStore = nullptr
209  , const CaloElementPositionShift* posShift = nullptr);
210 
214  inline HECCellConstLink getHECCell() const {return m_cell;}
215 
219  virtual int getLayer() const override;
220 
221  private:
230 
234  HECDetectorElement() = delete;
239 
243  void init_description(bool isTestBeam
244  , const GeoAlignmentStore* geoAlignStore
245  , const CaloElementPositionShift* posShift);
246 
251  void init_interpretation();
252 
253 };
254 
261 {
262  public:
273  FCALDetectorElement(const IdentifierHash subcaloHash
274  , const IdentifierHash onl1
275  , const IdentifierHash onl2
277  , const FCALTile* fcalTile
278  , const FCALModule* fcalModule
279  , bool isTestBeam
280  , const GeoAlignmentStore* geoAlignStore = nullptr
281  , const CaloElementPositionShift* posShift = nullptr);
282 
286  inline const FCALTile* getFCALTile() const {return m_tile;}
287 
291  virtual int getLayer() const override;
292 
293  private:
297  const FCALTile* m_tile;
302 
311 
315  void init_description(bool isTestBeam
316  , const GeoAlignmentStore* geoAlignStore
317  , const CaloElementPositionShift* posShift);
318 
319 };
320 
327 {
328  public:
332  TileDetectorElement(const IdentifierHash subcaloHash
333  , const IdentifierHash onl1
334  , const IdentifierHash onl2
335  , const CaloDetDescriptor* descriptor);
336 
340  void set_cylindric_raw(double eta_raw
341  , double phi_raw
342  , double r_raw);
343 
347  void set_cylindric(double eta
348  , double phi
349  , double r);
350 
354  inline void set_deta(double deta) {m_deta = static_cast<float> (deta);}
358  inline void set_dphi(double dphi) {m_dphi = static_cast<float> (dphi);}
362  inline void set_dz(double dz) {m_dz = static_cast<float> (dz);}
366  inline void set_dr(double dr) {m_dr = static_cast<float> (dr);}
370  inline void set_z(double z) {m_z = static_cast<float> (z);}
374  inline void set_r(double r) {
375  m_r = static_cast<float> (r);
376  m_x = static_cast<float> (m_cosPhi * r);
377  m_y = static_cast<float> (m_sinPhi * r);
378  }
379 };
380 
387 {
388  public:
393 
394  // Initialize data members
395  inline void set_id(const Identifier& id) {m_id = id;}
396  inline void set_z(double z) {m_z = static_cast<float> (z);}
397  inline void set_dz(double dz) {m_dz = static_cast<float> (dz);}
398  inline void set_r(double r) {m_r = static_cast<float> (r);}
399  inline void set_dr(double dr) {m_dr = static_cast<float> (dr);}
400  inline void set_eta(double eta) {m_eta = static_cast<float> (eta);}
401  inline void set_deta(double deta) {m_deta = static_cast<float> (deta);}
402  inline void set_phi(double phi) {m_phi = static_cast<float> (phi);}
403  inline void set_dphi(double dphi) {m_dphi = static_cast<float> (dphi);}
404 
405  // Compute derived quantities
406  void compute_derived();
407 
408  private:
410 
411  virtual Identifier customID() const;
412 };
413 
414 
415 
422  : public CaloDetDescrElement
423 {
424 public:
433  : CaloDetDescrElement (subcaloHash, 0, 0, descriptor) {}
434 
435 
441  StatusCode update (const std::vector<const CaloDetDescrElement*>& fromelts);
442 
443 
444 private:
449 
450 
455 
456 
462  StatusCode
463  updateBE (const std::vector<const CaloDetDescrElement*>& fromelts);
464 
465 
471  StatusCode
472  updateFCAL (const std::vector<const CaloDetDescrElement*>& fromelts);
473 };
474 
475 
482 {
483  public:
486  DummyDetDescrElement(const IdentifierHash subcaloHash,
487  const IdentifierHash onl1,
488  const IdentifierHash onl2,
490 
493  void set_cylindric(double eta,
494  double phi,
495  double r);
496 
499  void set_cylindric_raw(double eta_raw,
500  double phi_raw,
501  double r_raw);
502 
505  void set_cylindric_size(double deta,
506  double dphi,
507  double dr);
508 };
509 
510 #endif
CaloDetDescrElement::deta
float deta() const
cell deta
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:356
GeoAlignmentStore
Ensure that the extensions for the Vector3D are properly loaded.
Definition: GeoAlignmentStore.h:24
CaloDetDescrElement::onl2
IdentifierHash onl2() const
cell online identifier 2
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:408
MbtsDetectorElement::set_dz
void set_dz(double dz)
Definition: CaloDetectorElements.h:397
TileDetectorElement::set_dphi
void set_dphi(double dphi)
set cylindric size dphi
Definition: CaloDetectorElements.h:358
CaloElementPositionShift::dz
float dz
Definition: CaloDetectorElements.h:43
MbtsDetectorElement::set_id
void set_id(const Identifier &id)
Definition: CaloDetectorElements.h:395
EMECDetectorElement
LAr EMEC Detector Element.
Definition: CaloDetectorElements.h:116
CaloDetDescrElement::m_dphi
float m_dphi
cylindric coordinates : delta phi
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:267
HECDetectorElement::init_description
void init_description(bool isTestBeam, const GeoAlignmentStore *geoAlignStore, const CaloElementPositionShift *posShift)
initialize base description
Definition: CaloDetectorElements.cxx:297
MbtsDetectorElement::compute_derived
void compute_derived()
Definition: CaloDetectorElements.cxx:598
CaloSuperCellDetectorElement::updateNull
StatusCode updateNull()
Set this element's geometry to default values.
Definition: CaloDetectorElements.cxx:630
TileDetectorElement::TileDetectorElement
TileDetectorElement(const IdentifierHash subcaloHash, const IdentifierHash onl1, const IdentifierHash onl2, const CaloDetDescriptor *descriptor)
Constructor, takes all necessary parameters for the base class constructor.
Definition: CaloDetectorElements.cxx:535
EMBDetectorRegion.h
FCALDetectorElement::getLayer
virtual int getLayer() const override
get layer
Definition: CaloDetectorElements.cxx:530
EMECDetectorElement::getLayer
virtual int getLayer() const override
get layer
Definition: CaloDetectorElements.cxx:271
HECDetectorElement::getLayer
virtual int getLayer() const override
get layer
Definition: CaloDetectorElements.cxx:404
MbtsDetectorElement::MbtsDetectorElement
MbtsDetectorElement()
Constructor, initializes base class constructor parameters with default values.
Definition: CaloDetectorElements.cxx:585
MbtsDetectorElement::set_phi
void set_phi(double phi)
Definition: CaloDetectorElements.h:402
CaloElementPositionShift
dx,dy,dz displacement of the calorimeter cell caused by sagging
Definition: CaloDetectorElements.h:40
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
CaloSuperCellDetectorElement::updateBE
StatusCode updateBE(const std::vector< const CaloDetDescrElement * > &fromelts)
Update this element's geometry from a list of elements.
Definition: CaloDetectorElements.cxx:703
CaloSuperCellDetectorElement::updateSingle
StatusCode updateSingle(const CaloDetDescrElement *fromelt)
Copy this element's geometry from the given offline element.
Definition: CaloDetectorElements.cxx:664
CaloDetDescrElement::dr
float dr() const
cell dr
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:360
FCALDetectorElement::m_module
const FCALModule * m_module
FCAL Module description from LArReadoutGeometry.
Definition: CaloDetectorElements.h:301
EMBDetectorElement::m_region
const EMBDetectorRegion * m_region
EMB Region description from LArReadoutGeometry.
Definition: CaloDetectorElements.h:92
CaloDetDescrElement::m_sinPhi
float m_sinPhi
cache to allow fast px py pz computation
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:275
EMECDetectorRegion
Definition: EMECDetectorRegion.h:30
CaloDetDescrElement::m_phi
float m_phi
cylindric coordinates : phi
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:252
FCALDetectorElement::getFCALTile
const FCALTile * getFCALTile() const
FCAL Tile description from LArReadoutGeometry.
Definition: CaloDetectorElements.h:286
MbtsDetectorElement::set_deta
void set_deta(double deta)
Definition: CaloDetectorElements.h:401
MbtsDetectorElement::set_dphi
void set_dphi(double dphi)
Definition: CaloDetectorElements.h:403
HECDetectorRegion.h
EMECDetectorElement::getEMECCell
EMECCellConstLink getEMECCell() const
EMEC Cell description from LArReadoutGeometry.
Definition: CaloDetectorElements.h:141
EMBDetectorElement
LAr EMB Detector Element.
Definition: CaloDetectorElements.h:52
CaloDetDescrElement::m_dr
float m_dr
cylindric coordinates : delta r
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:295
CaloDetDescrElement::m_dz
float m_dz
cartesian coordinates : delta Z
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:323
CaloElementPositionShift::dx
float dx
Definition: CaloDetectorElements.h:41
DummyDetDescrElement::set_cylindric_raw
void set_cylindric_raw(double eta_raw, double phi_raw, double r_raw)
set raw cylindric coordinates
Definition: CaloDetectorElements.cxx:988
TileDetectorElement::set_deta
void set_deta(double deta)
set cylindric size deta
Definition: CaloDetectorElements.h:354
CaloDetDescrElement::eta_raw
float eta_raw() const
cell eta_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:350
HECDetectorElement
LAr HEC Detector Element.
Definition: CaloDetectorElements.h:189
CaloDetDescrElement::m_z
float m_z
cartesian coordinates : Z
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:305
CaloDetDescrElement::dz
float dz() const
cell dz
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:379
CaloDetDescrElement::onl1
IdentifierHash onl1() const
cell online identifier 1
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:404
TileDetectorElement::set_dr
void set_dr(double dr)
set cylindric size dr
Definition: CaloDetectorElements.h:366
FCALTile
A tile of the forward calorimeter readout geometry.
Definition: FCALTile.h:27
EMBCell.h
TileDetectorElement::set_dz
void set_dz(double dz)
set cartezian size dz
Definition: CaloDetectorElements.h:362
MbtsDetectorElement::set_z
void set_z(double z)
Definition: CaloDetectorElements.h:396
CaloSuperCellDetectorElement::CaloSuperCellDetectorElement
CaloSuperCellDetectorElement(const IdentifierHash subcaloHash, const CaloDetDescriptor *descriptor)
Constructor, initializes base class constructor parameters with default values.
Definition: CaloDetectorElements.h:431
CaloSuperCellDetectorElement::updateFCAL
StatusCode updateFCAL(const std::vector< const CaloDetDescrElement * > &fromelts)
Update this element's geometry from a list of elements.
Definition: CaloDetectorElements.cxx:833
EMECDetectorElement::m_cell
EMECCellConstLink m_cell
EMEC Cell description from LArReadoutGeometry.
Definition: CaloDetectorElements.h:152
HECDetectorElement::m_region
const HECDetectorRegion * m_region
HEC Region description from LArReadoutGeometry.
Definition: CaloDetectorElements.h:229
EMECDetectorElement::init_description
void init_description(bool isTestBeam, const GeoAlignmentStore *geoAlignStore, const CaloElementPositionShift *posShift)
initialize base description
Definition: CaloDetectorElements.cxx:171
TileDetectorElement
Tile Detector Element.
Definition: CaloDetectorElements.h:327
HECDetectorRegion
Description of a region of homogenous granularity in the hadronic endcap calorimeter.
Definition: HECDetectorRegion.h:31
HECDetectorElement::m_cell
HECCellConstLink m_cell
HEC Cell description from LArReadoutGeometry.
Definition: CaloDetectorElements.h:225
FCALTile.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MbtsDetectorElement::set_dr
void set_dr(double dr)
Definition: CaloDetectorElements.h:399
FCALDetectorElement
LAr FCAL Detector Element.
Definition: CaloDetectorElements.h:261
EMBDetectorElement::m_cell
EMBCellConstLink m_cell
EMB Cell description from LArReadoutGeometry.
Definition: CaloDetectorElements.h:88
EMBDetectorElement::EMBDetectorElement
EMBDetectorElement()=delete
default constructor hidden
MbtsDetectorElement::set_eta
void set_eta(double eta)
Definition: CaloDetectorElements.h:400
CaloDetDescrElement::m_r
float m_r
cylindric coordinates : r
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:283
EMBDetectorElement::getLayer
virtual int getLayer() const override
get layer
Definition: CaloDetectorElements.cxx:146
EMECDetectorElement::init_interpretation
void init_interpretation()
Fill all missing fields of CaloDetDescrElement which have not been filled by init_description()
Definition: CaloDetectorElements.cxx:252
TileDetectorElement::set_cylindric_raw
void set_cylindric_raw(double eta_raw, double phi_raw, double r_raw)
set raw cylindric coordinates
Definition: CaloDetectorElements.cxx:566
EMECCell.h
TileDetectorElement::set_cylindric
void set_cylindric(double eta, double phi, double r)
set cylindric coordinates
Definition: CaloDetectorElements.cxx:543
FCALDetectorElement::m_tile
const FCALTile * m_tile
FCAL Tile description from LArReadoutGeometry.
Definition: CaloDetectorElements.h:297
DummyDetDescrElement::DummyDetDescrElement
DummyDetDescrElement(const IdentifierHash subcaloHash, const IdentifierHash onl1, const IdentifierHash onl2, const CaloDetDescriptor *descriptor)
Constructor, takes all necessary parameters for the base class constructor.
Definition: CaloDetectorElements.cxx:947
DummyDetDescrElement::set_cylindric
void set_cylindric(double eta, double phi, double r)
set cylindric coordinates
Definition: CaloDetectorElements.cxx:955
TileDetectorElement::set_r
void set_r(double r)
set r
Definition: CaloDetectorElements.h:374
EMECDetectorElement::m_region
const EMECDetectorRegion * m_region
EMEC Region description from LArReadoutGeometry.
Definition: CaloDetectorElements.h:156
MbtsDetectorElement::customID
virtual Identifier customID() const
Definition: CaloDetectorElements.cxx:593
HECDetectorElement::init_interpretation
void init_interpretation()
Fill all missing fields of CaloDetDescrElement which have not been filled by init_description()
Definition: CaloDetectorElements.cxx:380
CaloDetDescrElement::m_cosPhi
float m_cosPhi
cache to allow fast px py pz computation
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:279
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
TileDetectorElement::set_z
void set_z(double z)
set z
Definition: CaloDetectorElements.h:370
CaloElementPositionShift::dy
float dy
Definition: CaloDetectorElements.h:42
FCALModule
Definition: FCALModule.h:33
EMBDetectorElement::getEMBCell
EMBCellConstLink getEMBCell() const
EMB Cell description from LArReadoutGeometry.
Definition: CaloDetectorElements.h:77
EMECDetectorElement::operator=
EMECDetectorElement & operator=(const EMECDetectorElement &right)=delete
copy constructor hidden
DummyDetDescrElement::set_cylindric_size
void set_cylindric_size(double deta, double dphi, double dr)
set cylindric size deta/dphi/dr
Definition: CaloDetectorElements.cxx:1012
EMBDetectorElement::operator=
EMBDetectorElement & operator=(const EMBDetectorElement &right)=delete
copy constructor hidden
CaloDetDescrElement::r_raw
float r_raw() const
cell r_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:354
DummyDetDescrElement
Dummy Detector Element for testing.
Definition: CaloDetectorElements.h:482
CaloDetDescrElement::m_x
float m_x
cartesian coordinates : X
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:299
CaloSuperCellDetectorElement
Element to represent a SuperCell.
Definition: CaloDetectorElements.h:423
CaloDetDescrElement::dphi
float dphi() const
cell dphi
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:358
CaloSuperCellDetectorElement::update
StatusCode update(const std::vector< const CaloDetDescrElement * > &fromelts)
Update this element's geometry from the given list of offline elements.
Definition: CaloDetectorElements.cxx:613
HECDetectorElement::operator=
HECDetectorElement & operator=(const HECDetectorElement &right)=delete
copy constructor hidden
HECDetectorElement::HECDetectorElement
HECDetectorElement()=delete
default constructor hidden
CaloDetDescriptor
This is a base class for LAr and Tile Descriptors The primary goal is to speed up loops over all the ...
Definition: CaloDetDescriptor.h:58
MbtsDetectorElement
Mbts Detector Element.
Definition: CaloDetectorElements.h:387
CaloDetDescrElement::z
float z() const
cell z
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:367
EMECDetectorElement::EMECDetectorElement
EMECDetectorElement()=delete
default constructor hidden
CaloDetDescrElement::descriptor
const CaloDetDescriptor * descriptor() const
cell descriptor
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:428
CaloDetDescrElement::m_y
float m_y
cartesian coordinates : Y
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:302
CaloDetDescrElement::eta
float eta() const
cell eta
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:344
CaloDetDescrElement::phi
float phi() const
cell phi
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:346
HECDetectorElement::getHECCell
HECCellConstLink getHECCell() const
HEC Cell description from LArReadoutGeometry.
Definition: CaloDetectorElements.h:214
CaloDetDescrElement::r
float r() const
cell r
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:348
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
HECCell.h
FCALDetectorElement::operator=
FCALDetectorElement & operator=(const FCALDetectorElement &right)=delete
copy constructor hidden
CaloDetDescrElement::m_deta
float m_deta
cylindric coordinates : delta eta
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:264
EMBDetectorRegion
Definition: EMBDetectorRegion.h:28
CaloDetDescrElement::m_eta
float m_eta
cylindric coordinates : eta
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:249
FCALDetectorElement::init_description
void init_description(bool isTestBeam, const GeoAlignmentStore *geoAlignStore, const CaloElementPositionShift *posShift)
initialize base description
Definition: CaloDetectorElements.cxx:428
MbtsDetectorElement::m_id
Identifier m_id
Definition: CaloDetectorElements.h:409
EMECDetectorRegion.h
FCALDetectorElement::FCALDetectorElement
FCALDetectorElement()=delete
default constructor hidden
FCALModule.h
MbtsDetectorElement::set_r
void set_r(double r)
Definition: CaloDetectorElements.h:398
EMBDetectorElement::init_description
void init_description(const GeoAlignmentStore *geoAlignStore, const CaloElementPositionShift *posShift)
initialize base description
Definition: CaloDetectorElements.cxx:75
CaloDetDescrElement::phi_raw
float phi_raw() const
cell phi_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:352
Identifier
Definition: IdentifierFieldParser.cxx:14