ATLAS Offline Software
CaloDetDescrElement_g.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ISF_FASTCALOGPU_CALODETDESCRELEMENT_G_H
6 #define ISF_FASTCALOGPU_CALODETDESCRELEMENT_G_H
7 
8 # include "Identifier_g.h"
9 
11 public:
12  CUDA_HOSTDEV CaloDetDescrElement_Gpu(const long long identify, const long long hash_id, const int calosample, const float eta, const float phi, const float deta, const float dphi, const float r, const float eta_raw, const float phi_raw, const float r_raw, const float dr, const float x, const float y, const float z, const float x_raw, const float y_raw, const float z_raw, const float dx, const float dy, const float dz) {
14  m_hash_id = hash_id;
15  m_calosample = calosample;
16  m_eta = eta;
17  m_phi = phi;
18  m_deta = deta;
19  m_dphi = dphi;
20  m_r = r;
23  m_r_raw = r_raw;
24  m_dr = dr;
25  m_x = x;
26  m_y = y;
27  m_z = z;
28  m_x_raw = x_raw;
29  m_y_raw = y_raw;
30  m_z_raw = z_raw;
31  m_dx = dx;
32  m_dy = dy;
33  m_dz = dz;
34  };
35 
37  m_identify = 0;
38  m_hash_id = 0;
39  m_calosample = 0;
40  m_eta = 0;
41  m_phi = 0;
42  m_deta = 0;
43  m_dphi = 0;
44  m_r = 0;
45  m_eta_raw = 0;
46  m_phi_raw = 0;
47  m_r_raw = 0;
48  m_dr = 0;
49  m_x = 0;
50  m_y = 0;
51  m_z = 0;
52  m_x_raw = 0;
53  m_y_raw = 0;
54  m_z_raw = 0;
55  m_dx = 0;
56  m_dy = 0;
57  m_dz = 0;
58  };
59 
63 
66  CUDA_HOSTDEV float eta() const;
69  CUDA_HOSTDEV float phi() const;
72  CUDA_HOSTDEV float r() const;
75  CUDA_HOSTDEV float eta_raw() const;
78  CUDA_HOSTDEV float phi_raw() const;
81  CUDA_HOSTDEV float r_raw() const;
84  CUDA_HOSTDEV float dphi() const;
87  CUDA_HOSTDEV float deta() const;
90  CUDA_HOSTDEV float dr() const;
91 
94  CUDA_HOSTDEV float x() const;
97  CUDA_HOSTDEV float y() const;
100  CUDA_HOSTDEV float z() const;
103  CUDA_HOSTDEV float x_raw() const;
106  CUDA_HOSTDEV float y_raw() const;
109  CUDA_HOSTDEV float z_raw() const;
112  CUDA_HOSTDEV float dx() const;
115  CUDA_HOSTDEV float dy() const;
118  CUDA_HOSTDEV float dz() const;
119 
123  CUDA_HOSTDEV long long get_compact() const;
124 
125  CUDA_HOSTDEV unsigned long long calo_hash() const;
126 
127  CUDA_HOSTDEV int getSampling() const;
128 
129  // ACH protected:
130  //
131  long long m_identify;
132  long long m_hash_id;
133 
135 
138  float m_eta;
141  float m_phi;
142 
145  float m_sinTh;
148  float m_cosTh;
149 
152  float m_deta;
155  float m_dphi;
156 
160  float m_volume;
161 
164  float m_sinPhi;
165 
168  float m_cosPhi;
169 
172  float m_r;
175  float m_eta_raw;
178  float m_phi_raw;
181  float m_r_raw;
184  float m_dr;
185 
188  float m_x;
191  float m_y;
194  float m_z;
197  float m_x_raw;
200  float m_y_raw;
203  float m_z_raw;
206  float m_dx;
209  float m_dy;
212  float m_dz;
213 };
214 
216  Identifier_Gpu id( (unsigned long long)m_identify );
217  return id;
218 }
219 
221  return m_identify;
222 }
223 
224 CUDA_HOSTDEV inline unsigned long long CaloDetDescrElement_Gpu::calo_hash() const { return m_hash_id; }
225 
227 CUDA_HOSTDEV inline float CaloDetDescrElement_Gpu::eta() const { return m_eta; }
228 CUDA_HOSTDEV inline float CaloDetDescrElement_Gpu::phi() const { return m_phi; }
229 CUDA_HOSTDEV inline float CaloDetDescrElement_Gpu::r() const { return m_r; }
232 CUDA_HOSTDEV inline float CaloDetDescrElement_Gpu::r_raw() const { return m_r_raw; }
233 CUDA_HOSTDEV inline float CaloDetDescrElement_Gpu::deta() const { return m_deta; }
234 CUDA_HOSTDEV inline float CaloDetDescrElement_Gpu::dphi() const { return m_dphi; }
235 CUDA_HOSTDEV inline float CaloDetDescrElement_Gpu::dr() const { return m_dr; }
236 
237 CUDA_HOSTDEV inline float CaloDetDescrElement_Gpu::x() const { return m_x; }
238 CUDA_HOSTDEV inline float CaloDetDescrElement_Gpu::y() const { return m_y; }
239 CUDA_HOSTDEV inline float CaloDetDescrElement_Gpu::z() const { return m_z; }
240 CUDA_HOSTDEV inline float CaloDetDescrElement_Gpu::x_raw() const { return m_x_raw; }
241 CUDA_HOSTDEV inline float CaloDetDescrElement_Gpu::y_raw() const { return m_y_raw; }
242 CUDA_HOSTDEV inline float CaloDetDescrElement_Gpu::z_raw() const { return m_z_raw; }
243 CUDA_HOSTDEV inline float CaloDetDescrElement_Gpu::dx() const { return m_dx; }
244 CUDA_HOSTDEV inline float CaloDetDescrElement_Gpu::dy() const { return m_dy; }
245 CUDA_HOSTDEV inline float CaloDetDescrElement_Gpu::dz() const { return m_dz; }
246 
247 #endif
CaloDetDescrElement_Gpu::m_z
float m_z
cartesian coordinates : Z
Definition: CaloDetDescrElement_g.h:194
CaloDetDescrElement_Gpu::m_y_raw
float m_y_raw
cartesian coordinates : Y raw
Definition: CaloDetDescrElement_g.h:200
CaloDetDescrElement_Gpu::z
CUDA_HOSTDEV float z() const
cell z
Definition: CaloDetDescrElement_g.h:239
CaloDetDescrElement_Gpu::identify
CUDA_HOSTDEV Identifier_Gpu identify() const
cell identifier
Definition: CaloDetDescrElement_g.h:215
CaloDetDescrElement_Gpu::phi_raw
CUDA_HOSTDEV float phi_raw() const
cell phi_raw
Definition: CaloDetDescrElement_g.h:231
CaloDetDescrElement_Gpu::m_cosPhi
float m_cosPhi
cache to allow fast px py pz computation
Definition: CaloDetDescrElement_g.h:168
CaloDetDescrElement_Gpu::m_dz
float m_dz
cartesian coordinates : delta Z
Definition: CaloDetDescrElement_g.h:212
CaloDetDescrElement_Gpu::r
CUDA_HOSTDEV float r() const
cell r
Definition: CaloDetDescrElement_g.h:229
Identifier_g.h
CaloDetDescrElement_Gpu
Definition: CaloDetDescrElement_g.h:10
CaloDetDescrElement_Gpu::m_y
float m_y
cartesian coordinates : Y
Definition: CaloDetDescrElement_g.h:191
CUDA_HOSTDEV
#define CUDA_HOSTDEV
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloGpu/ISF_FastCaloGpu/Hit.h:12
CaloDetDescrElement_Gpu::m_volume
float m_volume
cylindric coordinates : r
Definition: CaloDetDescrElement_g.h:160
CaloDetDescrElement_Gpu::m_sinTh
float m_sinTh
this one is cached for algorithm working in transverse Energy
Definition: CaloDetDescrElement_g.h:145
CaloDetDescrElement_Gpu::m_r
float m_r
cylindric coordinates : r
Definition: CaloDetDescrElement_g.h:172
CaloDetDescrElement_Gpu::m_x
float m_x
cartesian coordinates : X
Definition: CaloDetDescrElement_g.h:188
CaloDetDescrElement_Gpu::m_identify
long long m_identify
Definition: CaloDetDescrElement_g.h:131
CaloDetDescrElement_Gpu::phi
CUDA_HOSTDEV float phi() const
cell phi
Definition: CaloDetDescrElement_g.h:228
CaloDetDescrElement_Gpu::getSampling
CUDA_HOSTDEV int getSampling() const
Definition: CaloDetDescrElement_g.h:226
CaloDetDescrElement_Gpu::deta
CUDA_HOSTDEV float deta() const
cell deta
Definition: CaloDetDescrElement_g.h:233
CaloDetDescrElement_Gpu::m_dy
float m_dy
cartesian coordinates : delta Y
Definition: CaloDetDescrElement_g.h:209
CaloDetDescrElement_Gpu::CaloDetDescrElement_Gpu
CUDA_HOSTDEV CaloDetDescrElement_Gpu()
Definition: CaloDetDescrElement_g.h:36
CaloDetDescrElement_Gpu::eta
CUDA_HOSTDEV float eta() const
cell eta
Definition: CaloDetDescrElement_g.h:227
CaloDetDescrElement_Gpu::dr
CUDA_HOSTDEV float dr() const
cell dr
Definition: CaloDetDescrElement_g.h:235
CaloDetDescrElement_Gpu::~CaloDetDescrElement_Gpu
CUDA_HOSTDEV ~CaloDetDescrElement_Gpu()
virtual destructor
Definition: CaloDetDescrElement_g.h:62
CaloDetDescrElement_Gpu::m_dphi
float m_dphi
cylindric coordinates : delta phi
Definition: CaloDetDescrElement_g.h:155
CaloDetDescrElement_Gpu::dz
CUDA_HOSTDEV float dz() const
cell dz
Definition: CaloDetDescrElement_g.h:245
CaloDetDescrElement_Gpu::z_raw
CUDA_HOSTDEV float z_raw() const
cell z_raw
Definition: CaloDetDescrElement_g.h:242
CaloDetDescrElement_Gpu::dphi
CUDA_HOSTDEV float dphi() const
cell dphi
Definition: CaloDetDescrElement_g.h:234
CaloDetDescrElement_Gpu::x_raw
CUDA_HOSTDEV float x_raw() const
cell x_raw
Definition: CaloDetDescrElement_g.h:240
CaloDetDescrElement_Gpu::m_r_raw
float m_r_raw
cylindric coordinates : r_raw
Definition: CaloDetDescrElement_g.h:181
Identifier_Gpu
Definition: Identifier_g.h:15
CaloDetDescrElement_Gpu::m_phi_raw
float m_phi_raw
cylindric coordinates : phi_raw
Definition: CaloDetDescrElement_g.h:178
CaloDetDescrElement_Gpu::y
CUDA_HOSTDEV float y() const
cell y
Definition: CaloDetDescrElement_g.h:238
CaloDetDescrElement_Gpu::m_eta_raw
float m_eta_raw
cylindric coordinates : eta_raw
Definition: CaloDetDescrElement_g.h:175
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:194
CaloDetDescrElement_Gpu::dy
CUDA_HOSTDEV float dy() const
cell dy
Definition: CaloDetDescrElement_g.h:244
CaloDetDescrElement_Gpu::m_dr
float m_dr
cylindric coordinates : delta r
Definition: CaloDetDescrElement_g.h:184
CaloDetDescrElement_Gpu::r_raw
CUDA_HOSTDEV float r_raw() const
cell r_raw
Definition: CaloDetDescrElement_g.h:232
CaloDetDescrElement_Gpu::m_calosample
int m_calosample
Definition: CaloDetDescrElement_g.h:134
CaloDetDescrElement_Gpu::m_cosTh
float m_cosTh
this one is cached for algorithm working in transverse Energy
Definition: CaloDetDescrElement_g.h:148
CaloDetDescrElement_Gpu::m_hash_id
long long m_hash_id
Definition: CaloDetDescrElement_g.h:132
CaloDetDescrElement_Gpu::get_compact
CUDA_HOSTDEV long long get_compact() const
Definition: CaloDetDescrElement_g.h:220
CaloDetDescrElement_Gpu::calo_hash
CUDA_HOSTDEV unsigned long long calo_hash() const
Definition: CaloDetDescrElement_g.h:224
CaloDetDescrElement_Gpu::x
CUDA_HOSTDEV float x() const
cell x
Definition: CaloDetDescrElement_g.h:237
CaloDetDescrElement_Gpu::CaloDetDescrElement_Gpu
CUDA_HOSTDEV CaloDetDescrElement_Gpu(const long long identify, const long long hash_id, const int calosample, const float eta, const float phi, const float deta, const float dphi, const float r, const float eta_raw, const float phi_raw, const float r_raw, const float dr, const float x, const float y, const float z, const float x_raw, const float y_raw, const float z_raw, const float dx, const float dy, const float dz)
Definition: CaloDetDescrElement_g.h:12
CaloDetDescrElement_Gpu::m_dx
float m_dx
cartesian coordinates : delta X
Definition: CaloDetDescrElement_g.h:206
CaloDetDescrElement_Gpu::eta_raw
CUDA_HOSTDEV float eta_raw() const
cell eta_raw
Definition: CaloDetDescrElement_g.h:230
CaloDetDescrElement_Gpu::m_deta
float m_deta
cylindric coordinates : delta eta
Definition: CaloDetDescrElement_g.h:152
CaloDetDescrElement_Gpu::dx
CUDA_HOSTDEV float dx() const
cell dx
Definition: CaloDetDescrElement_g.h:243
CaloDetDescrElement_Gpu::m_eta
float m_eta
cylindric coordinates : eta
Definition: CaloDetDescrElement_g.h:138
CaloDetDescrElement_Gpu::m_z_raw
float m_z_raw
cartesian coordinates : Z raw
Definition: CaloDetDescrElement_g.h:203
CaloDetDescrElement_Gpu::m_phi
float m_phi
cylindric coordinates : phi
Definition: CaloDetDescrElement_g.h:141
CaloDetDescrElement_Gpu::m_x_raw
float m_x_raw
cartesian coordinates : X raw
Definition: CaloDetDescrElement_g.h:197
CaloDetDescrElement_Gpu::y_raw
CUDA_HOSTDEV float y_raw() const
cell y_raw
Definition: CaloDetDescrElement_g.h:241
CaloDetDescrElement_Gpu::m_sinPhi
float m_sinPhi
cache to allow fast px py pz computation
Definition: CaloDetDescrElement_g.h:164