ATLAS Offline Software
Loading...
Searching...
No Matches
CaloDetDescrElement.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "CaloDetDescr/CaloDetDescrElement.h"
6
7#include <iostream>
8#include <iomanip>
9#include <cmath>
10
12 const IdentifierHash onl1,
13 const IdentifierHash onl2,
17 ? IdentifierHash(subcaloHash + descriptor->caloCellMin())
18 : subcaloHash)
19 , m_eta(0.)
20 , m_phi(0.)
21 , m_sinTh(0.)
22 , m_cosTh(0.)
23 , m_deta(0.)
24 , m_dphi(0.)
25 , m_volume(0.)
26 , m_sinPhi(0.)
27 , m_cosPhi(0.)
28 , m_r(0.)
29 , m_eta_raw(0.)
30 , m_phi_raw(0.)
31 , m_r_raw(0.)
32 , m_dr(0.)
33 , m_x(0.)
34 , m_y(0.)
35 , m_z(0.)
36 , m_x_raw(0.)
37 , m_y_raw(0.)
38 , m_z_raw(0.)
39 , m_dx(0.)
40 , m_dy(0.)
41 , m_dz(0.)
42 , m_onl1(onl1)
43 , m_onl2(onl2)
44{
45 if(is_tile()) {
46 // Tile
48 m_descriptor->getSampling() +
49 m_descriptor->get_calo_helper()->tile_idHelper()->sampling(identify()));
50 } else if (m_descriptor) {
51 // LAr
52 m_sample=m_descriptor->getSampling();
53 } else{
54 // MBTS
55 m_sample=CaloCell_ID::Unknown;
56 }
57}
58
60= default;
61
64{
65 if(m_descriptor){
66 return (m_descriptor->get_calo_helper())->cell_id(calo_hash());
67 }
68 else{ // MBTS
69 return (customID());
70 }
71}
72
73void
75{
76 std::cout << std::endl << " CaloDetDescrElement print: "
77 << std::endl << std::endl;
78
79 std::cout << "Eta = " << m_eta << std::endl;
80 std::cout << "Phi = " << m_phi << std::endl;
81 std::cout << "r = " << m_r << std::endl;
82}
83
85{
86 return 0;
87}
88
90{
91 if(m_descriptor){
92 return m_descriptor->is_lar_em();
93 }
94 return false;
95}
96
98{
99 if(m_descriptor){
100 return m_descriptor->is_lar_em_barrel();
101 }
102 return false;
103}
104
106{
107 if(m_descriptor){
108 return m_descriptor->is_lar_em_endcap();
109 }
110 return false;
111}
112
114{
115 if(m_descriptor){
116 return m_descriptor->is_lar_em_endcap_inner();
117 }
118 return false;
119}
120
122{
123 if(m_descriptor){
124 return m_descriptor->is_lar_em_endcap_outer();
125 }
126 return false;
127}
128
130{
131 if(m_descriptor){
132 return m_descriptor->is_lar_hec();
133 }
134 return false;
135}
136
138{
139 if(m_descriptor){
140 return m_descriptor->is_lar_fcal();
141 }
142 return false;
143}
144
145void
152
154{
155 m_x = m_x_raw;
156 m_y = m_y_raw;
157 m_z = m_z_raw;
158
161 m_r = m_r_raw;
162}
163
165{
166 return {};
167}
CaloSampling::CaloSample CaloSample
Definition CaloCell_ID.h:53
virtual int getLayer() const
cell layer
void propagateRaw()
In test beam configurations force XXX=XXX_RAW.
void set_online(const IdentifierHash onl1, const IdentifierHash onl2)
set cell online identifiers (Tile)
virtual void print() const
print element contents
bool is_lar_em() const
cell belongs to EM calorimeter
Identifier identify() const override final
cell identifier
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 is a "hash" representation of an Identifier.