Loading [MathJax]/jax/output/SVG/config.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
13 #ifndef CALODETECTORELEMENT_H
14 #define CALODETECTORELEMENT_H
15 
18 #include "Identifier/Identifier.h"
21 
66 {
67  protected:
68 
75  CaloDetDescrElement(const IdentifierHash subcaloHash,
76  const IdentifierHash onl1,
77  const IdentifierHash onl2,
79 
80  public:
84 
87  float eta() const;
90  float phi() const;
93  float r() const;
96  float eta_raw() const;
99  float phi_raw() const;
102  float r_raw() const;
105  float dphi() const;
108  float deta() const;
111  float dr() const;
112 
115  float x() const;
118  float y() const;
121  float z() const;
124  float x_raw() const;
127  float y_raw() const;
130  float z_raw() const;
133  float dx() const;
136  float dy() const;
139  float dz() const;
140 
143  float volume() const;
144 
147  float sinTh() const;
148 
151  float cosTh() const;
152 
155  float cotTh() const;
156 
159  float sinPhi() const;
160 
163  float cosPhi() const;
164 
167  void set_volume(double volume);
170  void set_online(const IdentifierHash onl1, const IdentifierHash onl2);
171 
174  Identifier identify () const override final;
175 
188 
193 
197 
200  virtual void print() const;
201 
207  CaloCell_ID::SUBCALO getSubCalo() const ;
208 
211  bool is_lar_em() const;
214  bool is_lar_em_barrel() const;
217  bool is_lar_em_endcap() const;
226  bool is_lar_hec() const;
229  bool is_lar_fcal() const;
232  bool is_tile() const;
233 
236  virtual int getLayer() const;
237 
238  private:
242 
245 
246  protected:
249  float m_eta;
252  float m_phi;
253 
256  float m_sinTh;
257 
260  float m_cosTh;
261 
264  float m_deta;
267  float m_dphi;
268 
271  float m_volume;
272 
275  float m_sinPhi;
276 
279  float m_cosPhi;
280 
283  float m_r;
286  float m_eta_raw;
289  float m_phi_raw;
292  float m_r_raw;
295  float m_dr;
296 
299  float m_x;
302  float m_y;
305  float m_z;
308  float m_x_raw;
311  float m_y_raw;
314  float m_z_raw;
317  float m_dx;
320  float m_dy;
323  float m_dz;
324 
328 
335 
338  void propagateRaw();
339 
340  // For MBTS
341  virtual Identifier customID() const;
342 };
343 
344 inline float CaloDetDescrElement::eta() const
345 { return m_eta;}
346 inline float CaloDetDescrElement::phi() const
347 { return m_phi;}
348 inline float CaloDetDescrElement::r() const
349 { return m_r;}
350 inline float CaloDetDescrElement::eta_raw() const
351 { return m_eta_raw;}
352 inline float CaloDetDescrElement::phi_raw() const
353 { return m_phi_raw;}
354 inline float CaloDetDescrElement::r_raw() const
355 { return m_r_raw;}
356 inline float CaloDetDescrElement::deta() const
357 { return m_deta;}
358 inline float CaloDetDescrElement::dphi() const
359 { return m_dphi;}
360 inline float CaloDetDescrElement::dr() const
361 { return m_dr;}
362 
363 inline float CaloDetDescrElement::x() const
364 { return m_x;}
365 inline float CaloDetDescrElement::y() const
366 { return m_y;}
367 inline float CaloDetDescrElement::z() const
368 { return m_z;}
369 inline float CaloDetDescrElement::x_raw() const
370 { return m_x_raw;}
371 inline float CaloDetDescrElement::y_raw() const
372 { return m_y_raw;}
373 inline float CaloDetDescrElement::z_raw() const
374 { return m_z_raw;}
375 inline float CaloDetDescrElement::dx() const
376 { return m_dx;}
377 inline float CaloDetDescrElement::dy() const
378 { return m_dy;}
379 inline float CaloDetDescrElement::dz() const
380 { return m_dz;}
381 inline float CaloDetDescrElement::volume() const
382 { return m_volume;}
383 inline float CaloDetDescrElement::sinTh() const
384 { return m_sinTh;}
385 inline float CaloDetDescrElement::cosTh() const
386 { return m_cosTh;}
387 inline float CaloDetDescrElement::cotTh() const
388 { return m_cosTh/m_sinTh;}
389 inline float CaloDetDescrElement::sinPhi() const
390 { return m_sinPhi;}
391 inline float CaloDetDescrElement::cosPhi() const
392 { return m_cosPhi;}
393 
396 {
397  return m_sample;
398 }
399 
401 { m_volume = static_cast<float> (volume);}
402 
403 inline IdentifierHash
405 { return m_onl1; }
406 
407 inline IdentifierHash
409 { return m_onl2; }
410 
411 inline IdentifierHash
413 {
414  return m_caloHash;
415 }
416 
417 inline IdentifierHash
419 { return m_descriptor ?
421  m_caloHash;}
422 
423 inline IdentifierHash
425 { return subcalo_hash(); }
426 
427 inline const CaloDetDescriptor*
429 { return m_descriptor; }
430 
431 
432 inline
434 {
435  if(m_descriptor)
436  return m_descriptor->getSubCalo();
437  else
438  return CaloCell_ID::NOT_VALID;
439 }
440 
441 inline
443 {
444  if(m_descriptor)
445  return m_descriptor->is_tile();
446  else
447  return false;
448 }
449 
450 
451 #endif
CaloDetDescrElement::deta
float deta() const
cell deta
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:356
CaloDetDescrElement::cosPhi
float cosPhi() const
for fast px py pz computation
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:391
CaloDetDescrElement::onl2
IdentifierHash onl2() const
cell online identifier 2
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:408
GetLCDefs::Unknown
@ Unknown
Definition: GetLCDefs.h:21
CaloDetDescrElement::is_lar_em_endcap_inner
bool is_lar_em_endcap_inner() const
cell belongs to the inner wheel of EM end cap
Definition: CaloDetDescrElement.cxx:113
columnar::final
CM final
Definition: ColumnAccessor.h:106
CaloDetDescrElement::cotTh
float cotTh() const
for fast px py pz computation
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:387
CaloDetDescrElement::propagateRaw
void propagateRaw()
In test beam configurations force XXX=XXX_RAW.
Definition: CaloDetDescrElement.cxx:153
CaloDetDescrElement::m_cosTh
float m_cosTh
this one is cached for algorithm working in transverse Energy
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:260
CaloDetDescriptor::getSubCalo
CaloCell_ID::SUBCALO getSubCalo() const
get subcalo
Definition: CaloDetDescriptor.h:533
CaloDetDescrElement::m_dphi
float m_dphi
cylindric coordinates : delta phi
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:267
CaloDetDescrElement::m_z_raw
float m_z_raw
cartesian coordinates : Z raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:314
CaloDetDescrElement::is_lar_em_endcap_outer
bool is_lar_em_endcap_outer() const
cell belongs to the outer wheel of EM end cap
Definition: CaloDetDescrElement.cxx:121
CaloDetDescrElement::y
float y() const
cell y
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:365
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
CaloDetDescrElement::m_eta_raw
float m_eta_raw
cylindric coordinates : eta_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:286
CaloDetDescrElement::m_volume
float m_volume
cell volume
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:271
CaloDetDescrElement::dr
float dr() const
cell dr
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:360
CaloDetDescrElement::m_sinPhi
float m_sinPhi
cache to allow fast px py pz computation
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:275
CaloDetDescrElement::m_phi_raw
float m_phi_raw
cylindric coordinates : phi_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:289
CaloDetDescrElement::is_lar_em_endcap
bool is_lar_em_endcap() const
cell belongs to EM end cap
Definition: CaloDetDescrElement.cxx:105
Identifiable.h
CaloDetDescrElement::m_phi
float m_phi
cylindric coordinates : phi
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:252
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
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
protected
#define protected
Definition: DetDescrConditionsDict_dict_fixes.cxx:14
CaloDetDescrElement::eta_raw
float eta_raw() const
cell eta_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:350
CaloCell_ID.h
CaloDetDescrElement::print
virtual void print() const
print element contents
Definition: CaloDetDescrElement.cxx:74
CaloDetDescrElement::m_z
float m_z
cartesian coordinates : Z
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:305
CaloDetDescrElement::getSubCalo
CaloCell_ID::SUBCALO getSubCalo() const
cell subcalo
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:433
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
CaloDetDescrElement::set_volume
void set_volume(double volume)
set cell volume
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:400
CaloDetDescriptor::caloCellMin
IdentifierHash caloCellMin() const
minimal hash identifier for calo cells in the region
Definition: CaloDetDescriptor.h:538
CaloDetDescriptor.h
Definition of CaloDetDescriptor.
CaloDetDescrElement::m_dy
float m_dy
cartesian coordinates : delta Y
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:320
CaloDetDescrElement::identify
Identifier identify() const override final
cell identifier
Definition: CaloDetDescrElement.cxx:63
CaloDetDescrElement::m_sample
CaloCell_ID::CaloSample m_sample
@bried the sampling for this element
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:327
CaloDetDescrElement::calo_hash
IdentifierHash calo_hash() const
cell calo hash
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:412
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
CaloDetDescrElement::m_y_raw
float m_y_raw
cartesian coordinates : Y raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:311
CaloDetDescrElement::m_x_raw
float m_x_raw
cartesian coordinates : X raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:308
CaloDetDescrElement::m_descriptor
const CaloDetDescriptor * m_descriptor
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:243
CaloDetDescrElement::m_onl1
IdentifierHash m_onl1
Tiles need 2 online hashed id.
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:331
CaloCell_Base_ID::SUBCALO
SUBCALO
enumeration of sub calorimeters
Definition: CaloCell_Base_ID.h:46
CaloDetDescrElement::m_r_raw
float m_r_raw
cylindric coordinates : r_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:292
CaloDetDescrElement::set_online
void set_online(const IdentifierHash onl1, const IdentifierHash onl2)
set cell online identifiers (Tile)
Definition: CaloDetDescrElement.cxx:146
CaloDetDescrElement::m_dx
float m_dx
cartesian coordinates : delta X
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:317
CaloDetDescrElement::m_r
float m_r
cylindric coordinates : r
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:283
CaloDetDescrElement::m_onl2
IdentifierHash m_onl2
Tiles need 2 online hashed id.
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:334
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
CaloDetDescrElement::is_lar_fcal
bool is_lar_fcal() const
cell belongs to FCAL
Definition: CaloDetDescrElement.cxx:137
CaloDetDescrElement::is_tile
bool is_tile() const
cell belongs to Tile
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:442
CaloDetDescrElement::m_cosPhi
float m_cosPhi
cache to allow fast px py pz computation
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:279
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
CaloDetDescrElement::volume
float volume() const
cell volume
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:381
IdentifierHash.h
CaloDetDescrElement::identifyHash
IdentifierHash identifyHash() const override final
cell subcalo hash same as subcalo_hash(), but kept for backward compatibility
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:424
CaloDetDescrElement::x_raw
float x_raw() const
cell x_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:369
CaloDetDescrElement::z_raw
float z_raw() const
cell z_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:373
CaloDetDescrElement::x
float x() const
cell x
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:363
CaloDetDescrElement::r_raw
float r_raw() const
cell r_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:354
CaloDetDescrElement::m_x
float m_x
cartesian coordinates : X
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:299
CaloDetDescrElement::dphi
float dphi() const
cell dphi
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:358
CaloDetDescrElement::is_lar_em
bool is_lar_em() const
cell belongs to EM calorimeter
Definition: CaloDetDescrElement.cxx:89
CaloDetDescrElement::is_lar_em_barrel
bool is_lar_em_barrel() const
cell belongs to EM barrel
Definition: CaloDetDescrElement.cxx:97
calibdata.delete
list delete
Definition: calibdata.py:46
CaloDetDescrElement::getLayer
virtual int getLayer() const
cell layer
Definition: CaloDetDescrElement.cxx:84
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
CaloDetDescrElement::customID
virtual Identifier customID() const
Definition: CaloDetDescrElement.cxx:164
Identifiable
This class provides an abstract interface to an Identifiable object.
Definition: Identifiable.h:27
CaloDetDescrElement::dx
float dx() const
cell dx
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:375
CaloDetDescrElement::getSampling
CaloCell_ID::CaloSample getSampling() const
cell sampling
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:395
CaloDetDescrElement::z
float z() const
cell z
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:367
CaloDetDescrElement::cosTh
float cosTh() const
for fast px py pz computation
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:385
CaloDetDescrElement::descriptor
const CaloDetDescriptor * descriptor() const
cell descriptor
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:428
CaloDetDescrElement::m_caloHash
IdentifierHash m_caloHash
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:244
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
CaloDetDescrElement::sinTh
float sinTh() const
for algorithm working in transverse Energy
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:383
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
CaloDetDescrElement::y_raw
float y_raw() const
cell y_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:371
CaloDetDescrElement::is_lar_hec
bool is_lar_hec() const
cell belongs to HEC
Definition: CaloDetDescrElement.cxx:129
CaloDetDescrElement::sinPhi
float sinPhi() const
for fast px py pz computation
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:389
CaloCell_Base_ID::NOT_VALID
@ NOT_VALID
Definition: CaloCell_Base_ID.h:46
CaloDetDescrElement::m_deta
float m_deta
cylindric coordinates : delta eta
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:264
CaloDetDescrElement::dy
float dy() const
cell dy
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:377
CaloDetDescrElement::m_eta
float m_eta
cylindric coordinates : eta
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:249
CaloDetDescriptor::is_tile
bool is_tile() const
descriptor belongs to Tile
Definition: CaloDetDescriptor.h:496
CaloDetDescrElement::subcalo_hash
IdentifierHash subcalo_hash() const
cell subcalo hash
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:418
CaloDetDescrElement::CaloDetDescrElement
CaloDetDescrElement()=delete
Constructor, hidden.
CaloDetDescrElement::m_sinTh
float m_sinTh
this one is cached for algorithm working in transverse Energy
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:256
CaloDetDescrElement::phi_raw
float phi_raw() const
cell phi_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:352
CaloDetDescrElement::~CaloDetDescrElement
virtual ~CaloDetDescrElement()
virtual destructor
Identifier
Definition: IdentifierFieldParser.cxx:14