ATLAS Offline Software
EMBDetDescr.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
8 #include "GeoModelKernel/CellBinning.h"
9 
10 
11 namespace {
12 
13 
14 struct Boundary {
15  double min;
16  double max;
17  unsigned int nDiv;
18  unsigned int firstDiv;
19 };
20 
21 const Boundary
22 etaBoundariesBarrel [4][2] = {{{0.000, 1.525, 61,0},{0.000, 0.000, 0,0}}, //
23  {{0.003125, 1.400, 447,1},{1.400, 1.475, 3,0}}, //
24  {{0.000, 1.400, 56,0},{1.400, 1.475, 1,0}}, //
25  {{0.000, 1.350, 27,0},{0.000, 0.000, 0,0}}}; //
26 
27 } // anonymous namespace
28 
29 
30 
31 
32 EMBDetDescr::EMBDetDescr (const EMBDetectorManager *detManager, unsigned int sampling, unsigned int region, const CellBinning &phiBinning)
33  :m_manager(detManager),m_samplingIndex(sampling),m_regionIndex(region),m_phiBinning(phiBinning),m_etaBinning(etaBoundariesBarrel[sampling][region].min,
34  etaBoundariesBarrel[sampling][region].max,
35  etaBoundariesBarrel[sampling][region].nDiv,
36  etaBoundariesBarrel[sampling][region].firstDiv)
37 {
38 
39  for (unsigned int i=0;i<m_etaBinning.getFirstDivisionNumber()+m_etaBinning.getNumDivisions();i++) {
40  if (i<m_etaBinning.getFirstDivisionNumber()) {
41  m_offset.push_back(0);
42  m_halfLength.push_back(0);
43  }
44  else {
45  double front, back;
46  switch (sampling) {
47  case 0:
50  break;
51  case 1:
54  break;
55  case 2:
57  back = m_manager->getBasicReadoutNumbers()->getRMX23(std::min((unsigned int) 52,i));
58  break;
59  case 3:
60  front = (m_manager->getBasicReadoutNumbers()->getRMX23(std::min((unsigned int)52,2*i))+m_manager->getBasicReadoutNumbers()->getRMX23(std::min((unsigned int)52,2*i+1)))/2.0;
62  break;
63  default:
64  throw std::range_error("Attempt to construct EMEB DetDescr with illegal sampling index");
65 
66  }
67  m_offset.push_back((front+back)/2.);
68  m_halfLength.push_back((back-front)/2.);
69  }
70  }
71 }
72 
73 
75 = default;
76 
77 
max
#define max(a, b)
Definition: cfImp.cxx:41
EMBBasicReadoutNumbers.h
EMBDetDescr::m_manager
const EMBDetectorManager * m_manager
Definition: EMBDetDescr.h:94
EMBDetDescr::m_halfLength
std::vector< double > m_halfLength
Vector of half-lengths for the cells, one for each eta index.
Definition: EMBDetDescr.h:106
EMBDetDescr.h
EMBDetDescr::~EMBDetDescr
~EMBDetDescr()
Destructor.
EMBDetDescr::EMBDetDescr
EMBDetDescr(const EMBDetectorManager *detManager, unsigned int sampling, unsigned int region, const CellBinning &phiBinning)
Constructor.
Definition: EMBDetDescr.cxx:32
EMBDetectorManager
A manager class providing access to readout geometry information for the electromagnetic barrel calor...
Definition: EMBDetectorManager.h:32
EMBDetDescr::m_etaBinning
CellBinning m_etaBinning
Definition: EMBDetDescr.h:98
lumiFormat.i
int i
Definition: lumiFormat.py:92
EMBBasicReadoutNumbers::getRMX23
double getRMX23(unsigned int i) const
Gets the Sampling2-3 separation radii array (BarrelLong Div.RMX23)
Definition: EMBBasicReadoutNumbers.h:131
EMBBasicReadoutNumbers::getRoutAc
double getRoutAc() const
Gets the accordeon outer Radius (BarrelGeometry.ROUT_AC)
Definition: EMBBasicReadoutNumbers.h:111
min
#define min(a, b)
Definition: cfImp.cxx:40
EMBBasicReadoutNumbers::getPresamplerRadius
double getPresamplerRadius() const
Gets the presampler active radius (Presampler Geometry.RACTIVE)
Definition: EMBBasicReadoutNumbers.h:101
EMBBasicReadoutNumbers::getRinAc
double getRinAc() const
Gets the accordeon inner Radius (BarrelGeometry.RIN_AC)
Definition: EMBBasicReadoutNumbers.h:106
EMBDetDescr::m_offset
std::vector< double > m_offset
Vector of cell center positions for the cells, one for each eta index.
Definition: EMBDetDescr.h:124
EMBDetectorManager.h
EMBDetectorManager::getBasicReadoutNumbers
const EMBBasicReadoutNumbers * getBasicReadoutNumbers() const
Collection of useful numerical data for the description of the barrel cells.
Definition: EMBDetectorManager.h:149
EMBBasicReadoutNumbers::getEMBSamplingSepInnerRMax
double getEMBSamplingSepInnerRMax(unsigned int i) const
Sampling Separation between Layer 1 & 2 vs eta index (reg 0)
Definition: EMBBasicReadoutNumbers.h:116