ATLAS Offline Software
Loading...
Searching...
No Matches
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
12
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);
171
174 Identifier identify () const override final;
175
188
192 IdentifierHash identifyHash() const override final;
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;
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
344inline float CaloDetDescrElement::eta() const
345{ return m_eta;}
346inline float CaloDetDescrElement::phi() const
347{ return m_phi;}
348inline float CaloDetDescrElement::r() const
349{ return m_r;}
351{ return m_eta_raw;}
353{ return m_phi_raw;}
354inline float CaloDetDescrElement::r_raw() const
355{ return m_r_raw;}
356inline float CaloDetDescrElement::deta() const
357{ return m_deta;}
358inline float CaloDetDescrElement::dphi() const
359{ return m_dphi;}
360inline float CaloDetDescrElement::dr() const
361{ return m_dr;}
362
363inline float CaloDetDescrElement::x() const
364{ return m_x;}
365inline float CaloDetDescrElement::y() const
366{ return m_y;}
367inline float CaloDetDescrElement::z() const
368{ return m_z;}
369inline float CaloDetDescrElement::x_raw() const
370{ return m_x_raw;}
371inline float CaloDetDescrElement::y_raw() const
372{ return m_y_raw;}
373inline float CaloDetDescrElement::z_raw() const
374{ return m_z_raw;}
375inline float CaloDetDescrElement::dx() const
376{ return m_dx;}
377inline float CaloDetDescrElement::dy() const
378{ return m_dy;}
379inline float CaloDetDescrElement::dz() const
380{ return m_dz;}
381inline float CaloDetDescrElement::volume() const
382{ return m_volume;}
383inline float CaloDetDescrElement::sinTh() const
384{ return m_sinTh;}
385inline float CaloDetDescrElement::cosTh() const
386{ return m_cosTh;}
387inline float CaloDetDescrElement::cotTh() const
388{ return m_cosTh/m_sinTh;}
389inline float CaloDetDescrElement::sinPhi() const
390{ return m_sinPhi;}
391inline float CaloDetDescrElement::cosPhi() const
392{ return m_cosPhi;}
393
396{
397 return m_sample;
398}
399
401{ m_volume = static_cast<float> (volume);}
402
403inline IdentifierHash
405{ return m_onl1; }
406
407inline IdentifierHash
409{ return m_onl2; }
410
411inline IdentifierHash
413{
414 return m_caloHash;
415}
416
417inline IdentifierHash
422
423inline IdentifierHash
426
427inline const CaloDetDescriptor*
430
431
432inline
434{
435 if(m_descriptor)
436 return m_descriptor->getSubCalo();
437 else
439}
440
441inline
443{
444 if(m_descriptor)
445 return m_descriptor->is_tile();
446 else
447 return false;
448}
449
450
451#endif
CaloCell_ID::CaloSample CaloSample
Definition of CaloDetDescriptor.
#define protected
@ Unknown
Definition TruthClasses.h:9
Helper class for offline cell identifiers.
Definition CaloCell_ID.h:34
CaloCell_Base_ID::SUBCALO SUBCALO
Definition CaloCell_ID.h:50
CaloSampling::CaloSample CaloSample
Definition CaloCell_ID.h:53
virtual int getLayer() const
cell layer
float cosPhi() const
for fast px py pz computation
void propagateRaw()
In test beam configurations force XXX=XXX_RAW.
void set_online(const IdentifierHash onl1, const IdentifierHash onl2)
set cell online identifiers (Tile)
float sinTh() const
for algorithm working in transverse Energy
IdentifierHash identifyHash() const override final
cell subcalo hash same as subcalo_hash(), but kept for backward compatibility
virtual void print() const
print element contents
bool is_lar_em() const
cell belongs to EM calorimeter
CaloCell_ID::CaloSample getSampling() const
cell sampling
Identifier identify() const override final
cell identifier
CaloDetDescrElement(const IdentifierHash subcaloHash, const IdentifierHash onl1, const IdentifierHash onl2, const CaloDetDescriptor *descriptor)
Constructor.
float sinPhi() const
for fast px py pz computation
bool is_lar_em_endcap_outer() const
cell belongs to the outer wheel of EM end cap
IdentifierHash onl2() const
cell online identifier 2
float m_sinPhi
cache to allow fast px py pz computation
virtual Identifier customID() const
virtual ~CaloDetDescrElement()
virtual destructor
bool is_lar_em_endcap() const
cell belongs to EM end cap
bool is_lar_hec() const
cell belongs to HEC
float m_sinTh
this one is cached for algorithm working in transverse Energy
float m_cosPhi
cache to allow fast px py pz computation
bool is_lar_em_barrel() const
cell belongs to EM barrel
float m_cosTh
this one is cached for algorithm working in transverse Energy
IdentifierHash m_onl2
Tiles need 2 online hashed id.
bool is_lar_em_endcap_inner() const
cell belongs to the inner wheel of EM end cap
bool is_lar_fcal() const
cell belongs to FCAL
CaloCell_ID::CaloSample m_sample
@bried the sampling for this element
CaloDetDescrElement()=delete
Constructor, hidden.
IdentifierHash m_onl1
Tiles need 2 online hashed id.
const CaloDetDescriptor * descriptor() const
cell descriptor
IdentifierHash onl1() const
cell online identifier 1
This is a base class for LAr and Tile Descriptors The primary goal is to speed up loops over all the ...
This class provides an abstract interface to an Identifiable object.
This is a "hash" representation of an Identifier.
#define private