ATLAS Offline Software
CaloDetectorElements.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
10 
12 
14 
15 #include "GaudiKernel/SystemOfUnits.h"
16 
17 namespace {
18 
19 // estimate deta,dphi of Fcal cells (code from Dag Gillberg)
20 void fcal_deta_dphi (const CaloDetDescrElement& elt,
21  float& deta,
22  float& dphi)
23 {
24  // half width of fcal cells
25  const double Dx = 0.5 * elt.dx();
26  const double Dy = 0.5 * elt.dy();
27  const double phi = elt.phi();
28  const double r = elt.r();
29  const double dxcphi = Dx*std::cos(phi);
30  const double dxsphi = Dx*std::sin(phi);
31  const double dycphi = Dy*std::cos(phi);
32  const double dysphi = Dy*std::sin(phi);
33  // approximate width orthogonal to radial vector
34  const double DrT = std::sqrt(dxsphi*dxsphi+dycphi*dycphi);
35  // total width in phi
36  const double inv_r = 1. / r;
37  dphi = 2.*DrT * inv_r;
38 
39  // extension in radius
40  double dr = std::sqrt(dxcphi*dxcphi+dysphi*dysphi);
41 
42  // half-width in eta..
43  // sinh(eta) = z/r = f
44  // d(f) = d(z)/r (+) z/r/r*d(r)
45  // cosh(eta)*deta = df
46  // deta = df / cosh(eta) = df / sqrt(1+f*f)
47  // to avoid overlaps between cells, assume a plane geometry with dz =0
48  double f=elt.z() * inv_r;
49  double df = elt.z()*dr*inv_r*inv_r;
50  deta = 2.*std::abs(df) /std::sqrt(f*f+1.);
51 }
52 
53 
54 } // anonymous namespace
55 
56 
57 // -- EMBDetectorElement --
59  , const IdentifierHash onl1
60  , const IdentifierHash onl2
61  , const CaloDetDescriptor* descriptor
62  , EMBCellConstLink& embCell
63  , const EMBDetectorRegion* embRegion
64  , bool isTestBeam
65  , const GeoAlignmentStore* geoAlignStore
66  , const CaloElementPositionShift* posShift)
67  : CaloDetDescrElement(subcaloHash,onl1,onl2,descriptor)
68  , m_cell(embCell)
69  , m_region(embRegion)
70 {
71  init_description(geoAlignStore,posShift);
72  if(isTestBeam) propagateRaw();
73 }
74 
76  , const CaloElementPositionShift* posShift)
77 {
78  m_eta_raw = static_cast<float> ((m_cell->getEtaMin() + m_cell->getEtaMax())/2.);
79  if(m_cell->getEndcapIndex()==0)
80  m_eta_raw *= -1;
81 
82  const double phi_loc = (m_cell->getPhiLocalLower() + m_cell->getPhiLocalUpper())/2.;
83 
84  double x_loc, y_loc, z_loc, r_loc;
85  const Amg::Transform3D &xfDef = m_region->getDefAbsoluteTransform(geoAlignStore);
86  const Amg::Transform3D &xfAbs = m_region->getAbsoluteTransform(geoAlignStore);
87 
88  z_loc = (m_cell->getZMaxLocal(EMBCell::CENTER) + m_cell->getZMinLocal(EMBCell::CENTER))/2.;
89  r_loc = m_cell->getRLocal(EMBCell::CENTER);
90 
91  x_loc = r_loc*std::cos(phi_loc);
92  y_loc = r_loc*std::sin(phi_loc);
93 
94  Amg::Vector3D globalDefCoords = xfDef*Amg::Vector3D(x_loc,y_loc,z_loc);
95  Amg::Vector3D globalAbsCoords = posShift
96  ? xfAbs*Amg::Vector3D(x_loc+posShift->dx,y_loc+posShift->dy,z_loc+posShift->dz)
97  : xfAbs*Amg::Vector3D(x_loc,y_loc,z_loc);
98 
99  m_x_raw = static_cast<float> (globalDefCoords.x());
100  m_y_raw = static_cast<float> (globalDefCoords.y());
101  m_z_raw = static_cast<float> (globalDefCoords.z());
102 
103  m_x = static_cast<float> (globalAbsCoords.x());
104  m_y = static_cast<float> (globalAbsCoords.y());
105  m_z = static_cast<float> (globalAbsCoords.z());
106 
107  const double r_raw= std::sqrt(globalDefCoords.x()*globalDefCoords.x()+globalDefCoords.y()*globalDefCoords.y());
108  m_r_raw = static_cast<float> (r_raw);
109 
110  const double r = std::sqrt(globalAbsCoords.x()*globalAbsCoords.x()+globalAbsCoords.y()*globalAbsCoords.y());
111  m_r=static_cast<float>(r);
112 
113 
114  if (r>0) {
115  const double big_r = std::sqrt(globalAbsCoords.x()*globalAbsCoords.x()+globalAbsCoords.y()*globalAbsCoords.y()+globalAbsCoords.z()*globalAbsCoords.z());
116  const double inv_big_r = 1. / big_r;
117  const double inv_r = 1. / r;
118  m_eta = static_cast<float> (-std::log((big_r-globalAbsCoords.z()) * inv_r));
119  m_sinTh = static_cast<float> (r * inv_big_r);
120  m_cosTh = static_cast<float> (globalAbsCoords.z() * inv_big_r);
121  m_cosPhi=globalAbsCoords.x() * inv_r;
122  m_sinPhi=globalAbsCoords.y() * inv_r;
123  }
124  else {
125  m_eta = 0.;
126  m_sinTh = 0.;
127  }
128 
129  m_phi_raw = static_cast<float> (std::atan2(globalDefCoords.y(),globalDefCoords.x()));
130  m_phi = static_cast<float> (std::atan2(globalAbsCoords.y(),globalAbsCoords.x()));
131 
132  m_deta = static_cast<float> (std::abs(m_cell->getEtaMax() - m_cell->getEtaMin()));
133  m_dphi = static_cast<float> (std::abs(m_cell->getPhiLocalUpper() - m_cell->getPhiLocalLower()));
134 
135  // TO DO, find better value
136  m_dr = static_cast<float> (std::abs(m_cell->getRLocal(EMBCell::FRONT) - m_cell->getRLocal(EMBCell::BACK))/2.);
137 
138  // -- from CaloDDE --
139  m_dx = 0.;
140  m_dy = 0.;
141  m_dz = 0.;
142  // -- from CaloDDE --
143 
144 }
145 
147 {
148  return m_region->getSamplingIndex();
149 }
150 
151 // -- EMECDetectorElement --
152 
154  , const IdentifierHash onl1
155  , const IdentifierHash onl2
156  , const CaloDetDescriptor* descriptor
157  , EMECCellConstLink& emecCell
158  , const EMECDetectorRegion* emecRegion
159  , bool isTestBeam
160  , const GeoAlignmentStore* geoAlignStore
161  , const CaloElementPositionShift* posShift)
162  : CaloDetDescrElement(subcaloHash,onl1,onl2,descriptor)
163  , m_cell(emecCell)
164  , m_region(emecRegion)
165 {
166  init_description(isTestBeam,geoAlignStore,posShift);
168  if(isTestBeam) propagateRaw();
169 }
170 
172  , const GeoAlignmentStore* geoAlignStore
173  , const CaloElementPositionShift* posShift)
174 {
175  m_eta_raw = static_cast<float> ((m_cell->getEtaMin() + m_cell->getEtaMax())/2.);
176  if(m_cell->getEndcapIndex()==0)
177  m_eta_raw *= -1;
178 
179  m_phi_raw = static_cast<float> ((m_cell->getPhiLocalLower() + m_cell->getPhiLocalUpper())/2.);
180 
181  double x_loc, y_loc, z_loc, r_loc;
182  const Amg::Transform3D &xfDef = m_region->getDefAbsoluteTransform(geoAlignStore);
183 
184 // we need to apply the famous ZShift.
185  Amg::Transform3D xfNominal;
186  if(m_cell->getEndcapIndex()==0)
187  xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0.,m_region->getProjectivityDisplacement()*Gaudi::Units::cm))*xfDef; // Negative EMEC
188  else
189  xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0.,-m_region->getProjectivityDisplacement()*Gaudi::Units::cm))*xfDef; // Positive EMEC
190 
191  if(isTestBeam){
192  xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0.,3689.5*Gaudi::Units::mm));
193  }
194 
195  const Amg::Transform3D &xfAbs = m_region->getAbsoluteTransform(geoAlignStore);
196 
197  z_loc = m_cell->getZLocal(EMECCell::CENTER);
198  r_loc = (m_cell->getRMinLocal(EMECCell::CENTER) + m_cell->getRMaxLocal(EMECCell::CENTER))/2.;
199 
200  x_loc = r_loc*std::cos(m_phi_raw);
201  y_loc = r_loc*std::sin(m_phi_raw);
202 
203  Amg::Vector3D globalNomCoords = xfNominal*Amg::Vector3D(x_loc,y_loc,z_loc);
204  Amg::Vector3D globalAbsCoords = (posShift!=nullptr ?
205  xfAbs*Amg::Vector3D(x_loc+posShift->dx,y_loc+posShift->dy,z_loc+posShift->dz) :
206  xfAbs*Amg::Vector3D(x_loc,y_loc,z_loc));
207 
208  m_x_raw = static_cast<float> (globalNomCoords.x());
209  m_y_raw = static_cast<float> (globalNomCoords.y());
210  m_z_raw = static_cast<float> (globalNomCoords.z());
211 
212  m_x = static_cast<float> (globalAbsCoords.x());
213  m_y = static_cast<float> (globalAbsCoords.y());
214  m_z = static_cast<float> (globalAbsCoords.z());
215 
216 
217  const double r_raw= sqrt(globalNomCoords.x()*globalNomCoords.x()+globalNomCoords.y()*globalNomCoords.y());
218  m_r_raw = static_cast<float> (r_raw);
219 
220  const double r = sqrt(globalAbsCoords.x()*globalAbsCoords.x()+globalAbsCoords.y()*globalAbsCoords.y());
221  m_r=static_cast<float>(r);
222 
223 
224  if (r>0) {
225  const double big_r = std::sqrt(globalAbsCoords.x()*globalAbsCoords.x()+globalAbsCoords.y()*globalAbsCoords.y()+globalAbsCoords.z()*globalAbsCoords.z());
226  const double inv_big_r = 1. / big_r;
227  const double inv_r = 1. /r;
228  m_eta = static_cast<float> (-log((big_r-globalAbsCoords.z()) * inv_r));
229  m_sinTh = static_cast<float> (r * inv_big_r);
230  m_cosTh = static_cast<float> (globalAbsCoords.z() * inv_big_r);
231  m_cosPhi=globalAbsCoords.x() * inv_r;
232  m_sinPhi=globalAbsCoords.y() * inv_r;
233  }
234  else {
235  m_eta = 0.;
236  m_sinTh = 0.;
237  }
238 
239  m_phi = static_cast<float> (std::atan2(globalAbsCoords.y(),globalAbsCoords.x()));
240 
241  m_deta = static_cast<float> (std::abs(m_cell->getEtaMax() - m_cell->getEtaMin()));
242  m_dphi = static_cast<float> (std::abs(m_cell->getPhiLocalLower() - m_cell->getPhiLocalUpper()));
243  m_dz = static_cast<float> (std::abs(m_cell->getZLocal(EMECCell::BACK) - m_cell->getZLocal(EMECCell::FRONT))/2.);
244 
245  // -- from CaloDDE --
246  m_dx = 0.;
247  m_dy = 0.;
248  m_dr = 0.;
249  // -- from CaloDDE --
250 }
251 
253 {
254  // Interpretation of PHI coming from LAr Readout Geometry
255  if(m_cell->getEndcapIndex()==1)
256  { // Positive EMEC
257  if(m_cell->getPhiLocalUpper()<M_PI)
258  m_phi_raw = static_cast<float> ((m_cell->getPhiLocalLower() + m_cell->getPhiLocalUpper())/2.);
259  else
260  m_phi_raw = static_cast<float> ((m_cell->getPhiLocalLower() + m_cell->getPhiLocalUpper())/2. - 2.0*M_PI);
261  }
262  else
263  { // Negative EMEC
264  if(m_cell->getPhiLocalLower()<0)
265  m_phi_raw = static_cast<float> (-M_PI - (m_cell->getPhiLocalLower() + m_cell->getPhiLocalUpper())/2.);
266  else
267  m_phi_raw = static_cast<float> (M_PI - (m_cell->getPhiLocalLower() + m_cell->getPhiLocalUpper())/2.);
268  }
269 }
270 
272 {
273  return m_region->getSamplingIndex();
274 }
275 
276 // -- HECDetectorElement --
278  , const IdentifierHash onl1
279  , const IdentifierHash onl2
280  , const CaloDetDescriptor* descriptor
281  , HECCellConstLink& hecCell
282  , const HECDetectorRegion* hecRegion
283  , bool isTestBeam
284  , const GeoAlignmentStore* geoAlignStore
285  , const CaloElementPositionShift* posShift)
286  : CaloDetDescrElement(subcaloHash,onl1,onl2,descriptor)
287  , m_cell(hecCell)
288  , m_region(hecRegion)
289 {
290  init_description(isTestBeam,geoAlignStore,posShift);
292 
293  if(isTestBeam)
294  propagateRaw();
295 }
296 
298  , const GeoAlignmentStore* geoAlignStore
299  , const CaloElementPositionShift* posShift)
300 {
301  // take PHI_RAW from LAr Readout geometry and use it xor calculations of x_loc and y_loc
302  m_phi_raw = static_cast<float> ((m_cell->getPhiLocalLower() + m_cell->getPhiLocalUpper())/2.);
303 
304  m_eta_raw = static_cast<float> ((m_cell->getEtaMaxNominal() + m_cell->getEtaMinNominal())/2.);
305  if(m_cell->getEndcapIndex()==0)
306  m_eta_raw *= -1;
307 
308  double x_loc, y_loc, z_loc, r_loc;
309  r_loc = (m_cell->getRMaxLocalNominal(HECCell::CENTER) + m_cell->getRMinLocalNominal(HECCell::CENTER))/2.;
310  z_loc = m_cell->getZLocal(HECCell::CENTER);
311 
312 
313  const Amg::Transform3D &xfDef = m_region->getDefAbsoluteTransform(geoAlignStore);
314 
315  // we need to apply the famous ZShift.
316  Amg::Transform3D xfNominal;
317  if(m_cell->getEndcapIndex()==0)
318  xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0.,m_region->getProjectivityDisplacement()*Gaudi::Units::cm))*xfDef; // Negative HEC
319  else
320  xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0.,-m_region->getProjectivityDisplacement()*Gaudi::Units::cm))*xfDef; // Positive HEC
321 
322  if(isTestBeam){
323  xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0., 4277.*Gaudi::Units::mm));
324  }
325 
326  const Amg::Transform3D &xfAbs = m_region->getAbsoluteTransform(geoAlignStore);
327 
328  x_loc = r_loc*std::cos(m_phi_raw);
329  y_loc = r_loc*std::sin(m_phi_raw);
330 
331  Amg::Vector3D globalNomCoords = xfNominal*Amg::Vector3D(x_loc,y_loc,z_loc);
332  Amg::Vector3D globalAbsCoords = (posShift!=nullptr ?
333  xfAbs*Amg::Vector3D(x_loc+posShift->dx,y_loc+posShift->dy,z_loc+posShift->dz) :
334  xfAbs*Amg::Vector3D(x_loc,y_loc,z_loc));
335 
336  m_x_raw = static_cast<float> (globalNomCoords.x());
337  m_y_raw = static_cast<float> (globalNomCoords.y());
338  m_z_raw = static_cast<float> (globalNomCoords.z());
339 
340  m_x = static_cast<float> (globalAbsCoords.x());
341  m_y = static_cast<float> (globalAbsCoords.y());
342  m_z = static_cast<float> (globalAbsCoords.z());
343 
344 
345  const double r_raw= std::sqrt(globalNomCoords.x()*globalNomCoords.x()+globalNomCoords.y()*globalNomCoords.y());
346  m_r_raw = static_cast<float> (r_raw);
347 
348  const double r = std::sqrt(globalAbsCoords.x()*globalAbsCoords.x()+globalAbsCoords.y()*globalAbsCoords.y());
349  m_r=static_cast<float>(r);
350 
351 
352  if (r>0) {
353  const double big_r = std::sqrt(globalAbsCoords.x()*globalAbsCoords.x()+globalAbsCoords.y()*globalAbsCoords.y()+globalAbsCoords.z()*globalAbsCoords.z());
354  const double inv_r = 1. / r;
355  const double inv_big_r = 1. / big_r;
356  m_eta = static_cast<float> (-std::log((big_r-globalAbsCoords.z()) * inv_r));
357  m_sinTh = static_cast<float> (r * inv_big_r);
358  m_cosTh = static_cast<float> (globalAbsCoords.z() * inv_big_r);
359  m_cosPhi=globalAbsCoords.x() * inv_r;
360  m_sinPhi=globalAbsCoords.y() * inv_r;
361  }
362  else {
363  m_eta = 0.;
364  m_sinTh = 0.;
365  }
366 
367  m_phi = static_cast<float> (std::atan2(globalAbsCoords.y(),globalAbsCoords.x()));
368 
369  m_deta = static_cast<float> (m_cell->getEtaMaxNominal() - m_cell->getEtaMinNominal());
370  m_dphi = static_cast<float> (std::abs(m_cell->getPhiLocalUpper() - m_cell->getPhiLocalLower()));
371  m_dz = static_cast<float> (std::abs(m_cell->getZLocal(HECCell::FRONT)-m_cell->getZLocal(HECCell::BACK))/2.);
372 
373  // -- from CaloDDE --
374  m_dx = 0.;
375  m_dy = 0.;
376  m_dr = 0.;
377  // -- from CaloDDE --
378 }
379 
381 {
382  // Interpretation of PHI coming from LAr Readout Geometry
383  if(m_cell->getEndcapIndex()==1)
384  { // Positive HEC
385  if(m_cell->getPhiLocalUpper()<M_PI)
386  m_phi_raw = static_cast<float> ((m_cell->getPhiLocalLower() + m_cell->getPhiLocalUpper())/2.);
387  else
388  m_phi_raw = static_cast<float> ((m_cell->getPhiLocalLower() + m_cell->getPhiLocalUpper())/2. - 2.0*M_PI);
389  }
390  else
391  { // Negative HEC
392  if(m_cell->getPhiLocalLower()<0)
393  m_phi_raw = static_cast<float> (-M_PI - (m_cell->getPhiLocalLower() + m_cell->getPhiLocalUpper())/2.);
394  else
395  m_phi_raw = static_cast<float> (M_PI - (m_cell->getPhiLocalLower() + m_cell->getPhiLocalUpper())/2.);
396  }
397 
398  if(m_phi_raw>M_PI)
399  m_phi_raw = static_cast<float> (m_phi_raw - (2.0*M_PI));
400  else if(m_phi_raw<-M_PI)
401  m_phi_raw = static_cast<float> (m_phi_raw + (2.0*M_PI));
402 }
403 
405 {
406  return m_region->getSamplingIndex();
407 }
408 
409 // -- FCALDetectorElement --
410 
412  , const IdentifierHash onl1
413  , const IdentifierHash onl2
414  , const CaloDetDescriptor* descriptor
415  , const FCALTile* fcalTile
416  , const FCALModule* fcalModule
417  , bool isTestBeam
418  , const GeoAlignmentStore* geoAlignStore
419  , const CaloElementPositionShift* posShift)
420  : CaloDetDescrElement(subcaloHash,onl1,onl2,descriptor)
421  , m_tile(fcalTile)
422  , m_module(fcalModule)
423 {
424  init_description(isTestBeam,geoAlignStore,posShift);
425  if(isTestBeam) propagateRaw();
426 }
427 
429  , const GeoAlignmentStore* geoAlignStore
430  , const CaloElementPositionShift* posShift)
431 {
432  double x_loc = m_tile->getX();
433  double y_loc = m_tile->getY();
434  // double z_loc = -m_module->getFullDepthZ(*m_tile)/2.;
435  double z_loc = 0.;
436 
437  const Amg::Transform3D &xfDef = m_module->getDefAbsoluteTransform(geoAlignStore);
438 // we need to apply the famous ZShift.
439  Amg::Transform3D xfNominal;
442  else
444 
445  if(isTestBeam){
447  xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0., 4668.5*Gaudi::Units::mm));
449  xfNominal = Amg::Translation3D(Amg::Vector3D(0.,0., 5128.3*Gaudi::Units::mm));
450  else {
451  std::cout<<"Wrong FCAL module for TB, using FCAL1 !!!"<<std::endl;
452  xfNominal = Amg::Translation3D( Amg::Vector3D(0.,0.,4668.5*Gaudi::Units::mm));
453  }
454  }
455 
456  const Amg::Transform3D &xfAbs = m_module->getAbsoluteTransform(geoAlignStore);
457 
458  Amg::Vector3D globalDefCoords = xfNominal*Amg::Vector3D(x_loc,y_loc,z_loc);
459  Amg::Vector3D globalAbsCoords = (posShift!=nullptr ?
460  xfAbs*Amg::Vector3D(x_loc+posShift->dx,y_loc+posShift->dy,z_loc+posShift->dz) :
461  xfAbs*Amg::Vector3D(x_loc,y_loc,z_loc));
462 
463  m_x_raw = static_cast<float> (globalDefCoords.x());
464  m_y_raw = static_cast<float> (globalDefCoords.y());
465  m_z_raw = static_cast<float> (globalDefCoords.z());
466 
467  m_x = static_cast<float> (globalAbsCoords.x());
468  m_y = static_cast<float> (globalAbsCoords.y());
469  m_z = static_cast<float> (globalAbsCoords.z());
470 
471  m_dx =static_cast<float> ( m_module->getFullWidthX(*m_tile));
472  m_dy =static_cast<float> ( m_module->getFullWidthY(*m_tile));
473  m_dz =static_cast<float> ( m_module->getFullDepthZ(*m_tile)/2.);
474 
475  m_deta = 0.;
476  m_dphi = 0.;
477  m_dr = 0.;
478 
479  // From Calo DDE
480  const double r = std::sqrt(globalAbsCoords.x()*globalAbsCoords.x()+globalAbsCoords.y()*globalAbsCoords.y());
481  m_r=static_cast<float>(r);
482 
483 
484  if (r>0) {
485  const double big_r = std::sqrt(globalAbsCoords.x()*globalAbsCoords.x()+globalAbsCoords.y()*globalAbsCoords.y()+globalAbsCoords.z()*globalAbsCoords.z());
486  const double inv_big_r = 1. / big_r;
487  const double inv_r = 1. / r;
488  m_eta = static_cast<float> (-log((big_r-globalAbsCoords.z()) * inv_r));
489  m_sinTh = static_cast<float> (r * inv_big_r);
490  m_cosTh = static_cast<float> (globalAbsCoords.z() * inv_big_r);
491  m_cosPhi=globalAbsCoords.x() * inv_r;
492  m_sinPhi=globalAbsCoords.y() * inv_r;
493  }
494  else {
495  m_eta = 0.;
496  m_sinTh = 0.;
497  }
498 
499  m_phi_raw = static_cast<float> (std::atan2(globalDefCoords.y(),globalDefCoords.x()));
500  m_phi = static_cast<float> (std::atan2(globalAbsCoords.y(),globalAbsCoords.x()));
501 
502 // -- from CaloDDE --
503  const double r_raw= sqrt(globalDefCoords.x()*globalDefCoords.x()+globalDefCoords.y()*globalDefCoords.y());
504  m_r_raw = static_cast<float> (r_raw);
505 
506  if (m_r_raw>0.001)
507  {
508  const double big_r_raw = std::sqrt(globalDefCoords.x()*globalDefCoords.x()+globalDefCoords.y()*globalDefCoords.y()+globalDefCoords.z()*globalDefCoords.z());
509  // bug !!
510  // m_sinTh = m_r/big_r_raw;
511  m_eta_raw = static_cast<float> (-std::log((big_r_raw-globalDefCoords.z())/r_raw));
512  }
513  else
514  {
515  m_eta_raw = 0.;
516  }
517 
518  m_phi = static_cast<float> (std::atan2(globalAbsCoords.y(),globalAbsCoords.x()));
519  m_phi_raw= static_cast<float> (std::atan2(globalDefCoords.y(),globalDefCoords.x()));
520  // -- from CaloDDE --
521 
522 
523  if (m_r>0.) {
524  // estimate deta,dphi of Fcal cells
525  fcal_deta_dphi (*this, m_deta, m_dphi);
526  }
527 
528 }
529 
531 {
532  return m_module->getModuleIndex();
533 }
534 
536  const IdentifierHash onl1,
537  const IdentifierHash onl2,
538  const CaloDetDescriptor* descriptor):
539  CaloDetDescrElement(subcaloHash,onl1,onl2,descriptor)
540 {
541 }
542 
544  double phi,
545  double r)
546 {
547  m_eta = static_cast<float> (eta);
548  m_r= static_cast<float> (r);
549 
550  m_phi = static_cast<float> (phi);
551  if(phi<-M_PI)
552  m_phi = static_cast<float> (phi + 2.0*M_PI);
553  else if(phi>M_PI)
554  m_phi = static_cast<float> (phi - 2.0*M_PI);
555 
556  m_cosPhi=static_cast<float> (std::cos(m_phi));
557  m_sinPhi=static_cast<float> (std::sin(m_phi));
558  m_sinTh=static_cast<float> (1/std::cosh(eta));
559  m_cosTh=static_cast<float> (std::tanh(eta));
560  m_x = static_cast<float> (r*m_cosPhi);
561  m_y = static_cast<float> (r*m_sinPhi);
562  m_z = static_cast<float> (r*std::sinh(eta));
563 
564 }
565 
567  double phi_raw,
568  double r_raw)
569 {
570  m_eta_raw = static_cast<float> (eta_raw);
571  m_r_raw = static_cast<float> (r_raw);
572 
573  m_phi_raw = static_cast<float> (phi_raw);
574  if(phi_raw<-M_PI)
575  m_phi_raw = static_cast<float> (phi_raw + 2.0*M_PI);
576  else if(phi_raw>M_PI)
577  m_phi_raw = static_cast<float> (phi_raw - 2.0*M_PI);
578 
579  m_x_raw = static_cast<float> (r_raw*std::cos(m_phi_raw));
580  m_y_raw = static_cast<float> (r_raw*std::sin(m_phi_raw));
581  m_z_raw = static_cast<float> (r_raw*std::sinh(eta_raw));
582 
583 }
584 
587  IdentifierHash(),
588  IdentifierHash(),
589  nullptr)
590 {
591 }
592 
594 {
595  return m_id;
596 }
597 
599 {
600  // Compute x,y coordinates of scintillator centre
601  m_x = static_cast<float> (m_r*std::cos(m_phi));
602  m_y = static_cast<float> (m_r*std::sin(m_phi));
603 }
604 
605 
613 (const std::vector<const CaloDetDescrElement*>& fromelts)
614 {
615  if (fromelts.empty())
616  return updateNull();
617  else if (fromelts.size() == 1)
618  return updateSingle (fromelts[0]);
619  else if (fromelts[0]->getSubCalo() == CaloCell_Base_ID::LARFCAL)
620  return updateFCAL(fromelts);
621  else
622  return updateBE (fromelts);
623 }
624 
625 
631 {
632  m_eta = 0;
633  m_phi = 0;
634  m_sinTh = 0;
635  m_cosTh = 0;
636  m_deta = 0;
637  m_dphi = 0;
638  m_volume = 0;
639  m_sinPhi = 0;
640  m_cosPhi = 0;
641  m_r = 0;
642  m_eta_raw = 0;
643  m_phi_raw = 0;
644  m_r_raw = 0;
645  m_dr = 0;
646  m_x = 0;
647  m_y = 0;
648  m_z = 0;
649  m_x_raw = 0;
650  m_y_raw = 0;
651  m_z_raw = 0;
652  m_dx = 0;
653  m_dy = 0;
654  m_dz = 0;
655 
656  return StatusCode::SUCCESS;
657 }
658 
659 
665 {
666  m_eta = fromelt->eta();
667  m_phi = fromelt->phi();
668  m_sinTh = fromelt->sinTh();
669  m_cosTh = fromelt->cosTh();
670  m_deta = fromelt->deta();
671  m_dphi = fromelt->dphi();
672  m_volume = fromelt->volume();
673  m_sinPhi = fromelt->cosPhi();
674  m_cosPhi = fromelt->sinPhi();
675  m_r = fromelt->r();
676  m_eta_raw = fromelt->eta_raw();
677  m_phi_raw = fromelt->phi_raw();
678  m_r_raw = fromelt->r_raw();
679  m_dr = fromelt->dr();
680  m_x = fromelt->x();
681  m_y = fromelt->y();
682  m_z = fromelt->z();
683  m_x_raw = fromelt->x_raw();
684  m_y_raw = fromelt->y_raw();
685  m_z_raw = fromelt->z_raw();
686  m_dx = fromelt->dx();
687  m_dy = fromelt->dy();
688  m_dz = fromelt->dz();
689 
690  return StatusCode::SUCCESS;
691 }
692 
693 
703 (const std::vector<const CaloDetDescrElement*>& fromelts)
704 {
705  bool is_barrel = (fromelts[0]->dr() > 0);
706 
707  double eta_raw_min = 99999;
708  double eta_raw_max = -99999;
709  double phi_raw_min = 99999;
710  double phi_raw_max = -99999;
711  double rz_raw_min = 99999;
712  double rz_raw_max = -99999;
713  double volume = 0;
714 
715  double etasum = 0;
716  double detasum = 0;
717  double phisum = 0;
718  double dphisum = 0;
719  double rzsum = 0;
720  double drzsum = 0;
721 
722  for (const CaloDetDescrElement* fromelt : fromelts) {
723  double rz, rz_raw, drz;
724  if (is_barrel) {
725  rz = fromelt->r();
726  rz_raw = fromelt->r_raw();
727  drz = fromelt->dr();
728  }
729  else {
730  rz = fromelt->z();
731  rz_raw = fromelt->z_raw();
732  drz = fromelt->dz();
733  }
734 
735  eta_raw_min = std::min (eta_raw_min,
736  (double)fromelt->eta_raw() - fromelt->deta()/2);
737  eta_raw_max = std::max (eta_raw_max,
738  (double)fromelt->eta_raw() + fromelt->deta()/2);
739 
740  phi_raw_min = std::min (phi_raw_min,
741  (double)fromelt->phi_raw() - fromelt->dphi()/2);
742  phi_raw_max = std::max (phi_raw_max,
743  (double)fromelt->phi_raw() + fromelt->dphi()/2);
744 
745  rz_raw_min = std::min (rz_raw_min, rz_raw - drz / 2);
746  rz_raw_max = std::max (rz_raw_min, rz_raw + drz / 2);
747 
748  etasum += fromelt->deta() * fromelt->eta();
749  detasum += fromelt->deta();
750 
751  phisum += fromelt->dphi() * fromelt->phi();
752  dphisum += fromelt->dphi();
753 
754  rzsum += drz * rz;
755  drzsum += drz;
756 
757  volume += fromelt->volume();
758  }
759 
760  m_volume = volume;
761 
762  double eta_raw = (eta_raw_min + eta_raw_max) / 2;
763  double phi_raw = (phi_raw_min + phi_raw_max) / 2;
764  double rz_raw = (rz_raw_min + rz_raw_max) / 2;
765 
766  m_deta = eta_raw_max - eta_raw_min;
767  m_eta_raw = eta_raw;
768 
769  m_dphi = phi_raw_max - phi_raw_min;
770  m_phi_raw = phi_raw;
771 
772  m_dx = 0;
773  m_dy = 0;
774 
775  m_volume = volume;
776 
777  double eta = etasum / detasum;
778  double phi = phisum / dphisum;
779 
780  m_eta = eta;
781  m_phi = phi;
782 
783  m_cosPhi = std::cos(phi);
784  m_sinPhi = std::sin(phi);
785  m_sinTh = 1/std::cosh(eta);
786  m_cosTh = std::tanh(eta);
787 
788  double r = 0;
789  double r_raw = 0;
790  if (is_barrel) {
791  r_raw = rz_raw;
792  r = rzsum / drzsum;
793 
794  m_dr = rz_raw_max - rz_raw_min;
795  m_dz = 0;
796 
797  m_z_raw = rz_raw * std::sinh(eta_raw);
798  m_z = r * sinh(eta);
799  }
800  else {
801  r_raw = rz_raw / std::sinh(eta_raw);
802  double z = rzsum / drzsum;
803  r = z / std::sinh(eta);
804 
805  m_dz = rz_raw_max - rz_raw_min;
806  m_dr = 0;
807 
808  m_z_raw = rz_raw;
809  m_z = z;
810  }
811 
814  m_r_raw = r_raw;
815 
816  m_x = r * std::cos(phi);
817  m_y = r * std::sin(phi);
818  m_r = r;
819 
820  return StatusCode::SUCCESS;
821 }
822 
823 
833 (const std::vector<const CaloDetDescrElement*>& fromelts)
834 {
835  double x_raw_min = 99999;
836  double x_raw_max = -99999;
837  double y_raw_min = 99999;
838  double y_raw_max = -99999;
839  double z_raw_min = 99999;
840  double z_raw_max = -99999;
841  double volume = 0;
842 
843 #if 0
844  double xsum = 0;
845  double dxsum = 0;
846  double ysum = 0;
847  double dysum = 0;
848  double zsum = 0;
849  double dzsum = 0;
850 #endif
851 
852  // Set the supercell center to be the geometric center of the
853  // offline cells. Warning: the fcal supercells are asymmetric;
854  // this isn't the same as the COG!
855 
856  for (const CaloDetDescrElement* fromelt : fromelts) {
857  x_raw_min = std::min (x_raw_min,
858  (double)fromelt->x_raw() - fromelt->dx()/2);
859  x_raw_max = std::max (x_raw_max,
860  (double)fromelt->x_raw() + fromelt->dx()/2);
861 
862  y_raw_min = std::min (y_raw_min,
863  (double)fromelt->y_raw() - fromelt->dy()/2);
864  y_raw_max = std::max (y_raw_max,
865  (double)fromelt->y_raw() + fromelt->dy()/2);
866 
867  z_raw_min = std::min (z_raw_min,
868  (double)fromelt->z_raw() - fromelt->dz()/2);
869  z_raw_max = std::max (z_raw_max,
870  (double)fromelt->z_raw() + fromelt->dz()/2);
871 
872 #if 0
873  xsum += fromelt->dx() * fromelt->x();
874  dxsum += fromelt->dx();
875 
876  ysum += fromelt->dy() * fromelt->y();
877  dysum += fromelt->dy();
878 
879  zsum += fromelt->dz() * fromelt->z();
880  dzsum += fromelt->dz();
881 #endif
882 
883  volume += fromelt->volume();
884  }
885 
886  m_volume = volume;
887 
888  double x_raw = (x_raw_min + x_raw_max) / 2;
889  double y_raw = (y_raw_min + y_raw_max) / 2;
890  double z_raw = (z_raw_min + z_raw_max) / 2;
891 
892  m_x_raw = x_raw;
893  m_y_raw = y_raw;
894  m_z_raw = z_raw;
895 
896  m_deta = 0;
897  m_dphi = 0;
898  m_dr = 0;
899 
900  m_dx = x_raw_max - x_raw_min;
901  m_dy = y_raw_max - y_raw_min;
902  m_dz = z_raw_max - z_raw_min;
903 
904 #if 0
905  double x = xsum / dxsum;
906  double y = ysum / dysum;
907  double z = zsum / dzsum;
908 #endif
909  double x = m_x_raw + fromelts[0]->x() - fromelts[0]->x_raw();
910  double y = m_y_raw + fromelts[0]->y() - fromelts[0]->y_raw();
911  double z = m_z_raw + fromelts[0]->z() - fromelts[0]->z_raw();
912 
913  m_x = x;
914  m_y = y;
915  m_z = z;
916 
917  m_phi_raw = std::atan2 (y_raw, x_raw);
918  m_phi = std::atan2 (y, x);
919 
920  const double r_raw = hypot (x_raw, y_raw);
921  const double r = hypot (x, y);
922  const double inv_r = 1. / r;
923 
924  m_r_raw = r_raw;
925  m_r = r;
926 
927  const double big_r = std::sqrt (x*x + y*y + z*z);
928  const double big_r_raw = std::sqrt (x_raw*x_raw + y_raw*y_raw + z_raw*z_raw);
929  const double inv_big_r = 1. / big_r;
930 
931  m_eta = -std::log ((big_r - z) * inv_r);
932  m_eta_raw = -std::log ((big_r_raw - z_raw) / r_raw);
933  m_sinTh = r * inv_big_r;
934  m_cosTh = z * inv_big_r;
935  m_cosPhi = x * inv_r;
936  m_sinPhi = y * inv_r;
937 
938  if (m_r>0.) {
939  // estimate deta,dphi of Fcal cells
940  fcal_deta_dphi (*this, m_deta, m_dphi);
941  }
942 
943  return StatusCode::SUCCESS;
944 }
945 
946 
948  const IdentifierHash onl1,
949  const IdentifierHash onl2,
950  const CaloDetDescriptor* descriptor):
951  CaloDetDescrElement(subcaloHash,onl1,onl2,descriptor)
952 {
953 }
954 
956  double phi,
957  double r)
958 {
959  m_eta = static_cast<float> (eta);
960  m_r= static_cast<float> (r);
961 
962  m_phi = static_cast<float> (phi);
963  if(phi<-M_PI)
964  m_phi = static_cast<float> (phi + 2.0*M_PI);
965  else if(phi>M_PI)
966  m_phi = static_cast<float> (phi - 2.0*M_PI);
967 
968  // m_x = r*cos(m_phi);
969  // m_y = r*sin(m_phi);
970  //m_z = r*sinh(eta);
971 
972  m_cosPhi=static_cast<float> (std::cos(m_phi));
973  m_sinPhi=static_cast<float> (std::sin(m_phi));
974  m_sinTh=static_cast<float> (1/std::cosh(eta));
975  m_cosTh=static_cast<float> (std::tanh(eta));
976  m_x = static_cast<float> (r*m_cosPhi);
977  m_y = static_cast<float> (r*m_sinPhi);
978  m_z = static_cast<float> (r*std::sinh(eta));
979 
980 
981  // double big_r = sqrt(m_x*m_x+m_y*m_y+m_z*m_z);
982  //if(big_r > 0.001)
983  // m_sinTh = m_r/big_r;
984  // else
985  // m_sinTh = 0;
986 }
987 
989  double phi_raw,
990  double r_raw)
991 {
992  m_eta_raw = static_cast<float> (eta_raw);
993  m_r_raw = static_cast<float> (r_raw);
994 
995  m_phi_raw = static_cast<float> (phi_raw);
996  if(phi_raw<-M_PI)
997  m_phi_raw = static_cast<float> (phi_raw + 2.0*M_PI);
998  else if(phi_raw>M_PI)
999  m_phi_raw = static_cast<float> (phi_raw - 2.0*M_PI);
1000 
1001  m_x_raw = static_cast<float> (r_raw*std::cos(m_phi_raw));
1002  m_y_raw = static_cast<float> (r_raw*std::sin(m_phi_raw));
1003  m_z_raw = static_cast<float> (r_raw*std::sinh(eta_raw));
1004 
1005  // double big_r = sqrt(m_x_raw*m_x_raw+m_y_raw*m_y_raw+m_z_raw*m_z_raw);
1006  // if(big_r > 0.001)
1007  // m_sinTh = m_r_raw/big_r;
1008  // else
1009  // m_sinTh = 0;
1010 }
1011 
1013  double dphi,
1014  double dr)
1015 {
1016  m_deta = static_cast<float> (deta);
1017  m_dphi = static_cast<float> (dphi);
1018  m_dr= static_cast<float> (dr);
1019 }
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
GeoAlignmentStore
Ensure that the extensions for the Vector3D are properly loaded.
Definition: GeoAlignmentStore.h:24
beamspotman.r
def r
Definition: beamspotman.py:676
FCALTile::getY
double getY() const
Gets the Y position of the Tile.
Definition: FCALTile.cxx:51
CaloCell_Base_ID::LARFCAL
@ LARFCAL
Definition: CaloCell_Base_ID.h:46
CaloElementPositionShift::dz
float dz
Definition: CaloDetectorElements.h:43
CaloDetDescrElement::propagateRaw
void propagateRaw()
In test beam configurations force XXX=XXX_RAW.
Definition: CaloDetDescrElement.cxx:154
CaloDetDescrElement::m_cosTh
float m_cosTh
this one is cached for algorithm working in transverse Energy
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:260
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
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
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
CaloSuperCellDetectorElement::updateNull
StatusCode updateNull()
Set this element's geometry to default values.
Definition: CaloDetectorElements.cxx:630
FCALModule::FCAL2
@ FCAL2
Definition: FCALModule.h:37
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
CaloDetDescrElement::y
float y() const
cell y
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:365
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
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
EMBDetectorRegion::getDefAbsoluteTransform
const Amg::Transform3D & getDefAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
Definition: EMBDetectorRegion.cxx:35
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
FCALModule::getAbsoluteTransform
const Amg::Transform3D & getAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
Definition: FCALModule.cxx:94
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
CaloDetDescrElement::m_eta_raw
float m_eta_raw
cylindric coordinates : eta_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:286
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
FCALModule::POS
@ POS
Definition: FCALModule.h:38
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
FCALDetectorElement::m_module
const FCALModule * m_module
FCAL Module description from LArReadoutGeometry.
Definition: CaloDetectorElements.h:301
EMBDetectorRegion::getSamplingIndex
unsigned int getSamplingIndex() const
Returns the Sampling Layer Index.
Definition: EMBDetectorRegion.h:119
M_PI
#define M_PI
Definition: ActiveFraction.h:11
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
CaloDetDescrElement::m_phi_raw
float m_phi_raw
cylindric coordinates : phi_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:289
FCALTile::getX
double getX() const
Gets the X Position of the Tile.
Definition: FCALTile.cxx:46
EMECDetectorRegion
Definition: EMECDetectorRegion.h:30
python.TurnDataReader.dr
dr
Definition: TurnDataReader.py:112
EMECDetectorRegion::getProjectivityDisplacement
double getProjectivityDisplacement() const
Definition: EMECDetectorRegion.h:221
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
CaloDetDescrElement::m_phi
float m_phi
cylindric coordinates : phi
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:252
HECDetectorRegion.h
EMECDetectorRegion::getAbsoluteTransform
const Amg::Transform3D & getAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
Definition: EMECDetectorRegion.cxx: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
EMECCell::FRONT
@ FRONT
Definition: EMECCell.h:36
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
CaloDetDescrElement::eta_raw
float eta_raw() const
cell eta_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:350
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
HECCell::BACK
@ BACK
Definition: HECCell.h:34
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
FCALTile
A tile of the forward calorimeter readout geometry.
Definition: FCALTile.h:27
CaloDetDescrElement::m_dy
float m_dy
cartesian coordinates : delta Y
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:320
HECDetectorRegion::getProjectivityDisplacement
double getProjectivityDisplacement() const
Definition: HECDetectorRegion.h:216
EMECCell::CENTER
@ CENTER
Definition: EMECCell.h:36
HECCell::FRONT
@ FRONT
Definition: HECCell.h:34
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
CaloDetDescrElement::m_y_raw
float m_y_raw
cartesian coordinates : Y raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:311
HECDetectorRegion
Description of a region of homogenous granularity in the hadronic endcap calorimeter.
Definition: HECDetectorRegion.h:31
CaloDetDescrElement::m_x_raw
float m_x_raw
cartesian coordinates : X raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:308
HECDetectorElement::m_cell
HECCellConstLink m_cell
HEC Cell description from LArReadoutGeometry.
Definition: CaloDetectorElements.h:225
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
FCALModule::getFullDepthZ
double getFullDepthZ(const FCALTile &) const
Gets Tile (full) Depth.
Definition: FCALModule.cxx:89
EMECCell::BACK
@ BACK
Definition: EMECCell.h:36
FCALModule::getDefAbsoluteTransform
const Amg::Transform3D & getDefAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
Definition: FCALModule.cxx:102
EMBDetectorElement::m_cell
EMBCellConstLink m_cell
EMB Cell description from LArReadoutGeometry.
Definition: CaloDetectorElements.h:88
EMBDetectorElement::EMBDetectorElement
EMBDetectorElement()=delete
default constructor hidden
CaloDetDescrElement::m_r_raw
float m_r_raw
cylindric coordinates : r_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:292
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
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
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
EMBDetectorRegion::getAbsoluteTransform
const Amg::Transform3D & getAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
Definition: EMBDetectorRegion.cxx:27
FCALModule::getFullWidthX
double getFullWidthX(const FCALTile &tile) const
Gets Tile Full Width in X.
Definition: FCALModule.cxx:79
CaloPhiRange.h
CaloPhiRange class declaration.
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
hist_file_dump.f
f
Definition: hist_file_dump.py:135
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
EMECDetectorElement::m_region
const EMECDetectorRegion * m_region
EMEC Region description from LArReadoutGeometry.
Definition: CaloDetectorElements.h:156
FCALModule::getModuleIndex
FCALModule::Module getModuleIndex() const
Returns the Module (1,2, or 3)
Definition: FCALModule.cxx:74
MbtsDetectorElement::customID
virtual Identifier customID() const
Definition: CaloDetectorElements.cxx:593
HECDetectorRegion::getAbsoluteTransform
const Amg::Transform3D & getAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
Definition: HECDetectorRegion.cxx:37
HECDetectorElement::init_interpretation
void init_interpretation()
Fill all missing fields of CaloDetDescrElement which have not been filled by init_description()
Definition: CaloDetectorElements.cxx:380
GeoAlignmentStore.h
EMBCell::BACK
@ BACK
Definition: EMBCell.h:33
CaloDetDescrElement::m_cosPhi
float m_cosPhi
cache to allow fast px py pz computation
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:279
CaloDetDescrElement::volume
float volume() const
cell volume
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:381
FCALModule::getProjectivityDisplacement
double getProjectivityDisplacement() const
Definition: FCALModule.h:175
EMECDetectorRegion::getSamplingIndex
unsigned int getSamplingIndex() const
Returns the Sampling Layer Index.
Definition: EMECDetectorRegion.h:164
CaloElementPositionShift::dy
float dy
Definition: CaloDetectorElements.h:42
FCALModule
Definition: FCALModule.h:33
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
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
EMECDetectorRegion::getDefAbsoluteTransform
const Amg::Transform3D & getDefAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
Definition: EMECDetectorRegion.cxx:60
CaloDetDescrElement::x
float x() const
cell x
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:363
DummyDetDescrElement::set_cylindric_size
void set_cylindric_size(double deta, double dphi, double dr)
set cylindric size deta/dphi/dr
Definition: CaloDetectorElements.cxx:1012
FCALModule::getEndcapIndex
FCALModule::Endcap getEndcapIndex() const
Returns the side (O=Negative, 1=Positive)
Definition: FCALModule.cxx:69
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
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
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::HECDetectorElement
HECDetectorElement()=delete
default constructor hidden
FCALModule::getFullWidthY
double getFullWidthY(const FCALTile &tile) const
Gets Tile Full Width in Y.
Definition: FCALModule.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::dx
float dx() const
cell dx
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:375
HECCell::CENTER
@ CENTER
Definition: HECCell.h:34
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
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition: GeoPrimitives.h:44
HECDetectorRegion::getDefAbsoluteTransform
const Amg::Transform3D & getDefAbsoluteTransform(const GeoAlignmentStore *alignStore=nullptr) const
Returns the absolute transform of this element.
Definition: HECDetectorRegion.cxx:45
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
EMECDetectorElement::EMECDetectorElement
EMECDetectorElement()=delete
default constructor hidden
FCALModule::FCAL1
@ FCAL1
Definition: FCALModule.h:37
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
EMBCell::CENTER
@ CENTER
Definition: EMBCell.h:33
CaloDetDescrElement::sinTh
float sinTh() const
for algorithm working in transverse Energy
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:383
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
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::sinPhi
float sinPhi() const
for fast px py pz computation
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:389
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
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
python.TriggerAPI.TriggerAPISession.df
df
Definition: TriggerAPISession.py:432
FCALDetectorElement::FCALDetectorElement
FCALDetectorElement()=delete
default constructor hidden
HECDetectorRegion::getSamplingIndex
unsigned int getSamplingIndex() const
Returns the Sampling Layer Index (0-3)
Definition: HECDetectorRegion.h:165
EMBDetectorElement::init_description
void init_description(const GeoAlignmentStore *geoAlignStore, const CaloElementPositionShift *posShift)
initialize base description
Definition: CaloDetectorElements.cxx:75
CaloDetectorElements.h
Calo Subsystem specific Detector Elements + Dummy element for testing.
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
Identifier
Definition: IdentifierFieldParser.cxx:14
EMBCell::FRONT
@ FRONT
Definition: EMBCell.h:33