ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArGeoModel
LArReadoutGeometry
src
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
5
#include "
LArReadoutGeometry/EMBDetDescr.h
"
6
#include "
LArReadoutGeometry/EMBBasicReadoutNumbers.h
"
7
#include "
LArReadoutGeometry/EMBDetectorManager.h
"
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:
48
front = m_manager->getBasicReadoutNumbers()->getPresamplerRadius();
49
back = m_manager->getBasicReadoutNumbers()->getRinAc();
50
break;
51
case 1:
52
front = m_manager->getBasicReadoutNumbers()->getRinAc();
53
back = region==0 ? m_manager->getBasicReadoutNumbers()->getEMBSamplingSepInnerRMax(i) : m_manager->getBasicReadoutNumbers()->getEMBSamplingSepInnerRMax(447);
54
break;
55
case 2:
56
front = region==0 ? m_manager->getBasicReadoutNumbers()->getEMBSamplingSepInnerRMax(std::max((unsigned int) 0,8*i+7)) : m_manager->getBasicReadoutNumbers()->getEMBSamplingSepInnerRMax(447);
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;
61
back = m_manager->getBasicReadoutNumbers()->getRoutAc();
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
74
EMBDetDescr::~EMBDetDescr
()
75
=
default
;
76
77
EMBBasicReadoutNumbers.h
EMBDetDescr.h
EMBDetectorManager.h
min
#define min(a, b)
Definition
cfImp.cxx:40
max
#define max(a, b)
Definition
cfImp.cxx:41
EMBDetDescr::m_phiBinning
CellBinning m_phiBinning
Definition
EMBDetDescr.h:97
EMBDetDescr::EMBDetDescr
EMBDetDescr(const EMBDetectorManager *detManager, unsigned int sampling, unsigned int region, const CellBinning &phiBinning)
Constructor.
Definition
EMBDetDescr.cxx:32
EMBDetDescr::m_etaBinning
CellBinning m_etaBinning
Definition
EMBDetDescr.h:98
EMBDetDescr::m_samplingIndex
unsigned int m_samplingIndex
Definition
EMBDetDescr.h:95
EMBDetDescr::~EMBDetDescr
~EMBDetDescr()
Destructor.
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::m_offset
std::vector< double > m_offset
Vector of cell center positions for the cells, one for each eta index.
Definition
EMBDetDescr.h:124
EMBDetDescr::m_regionIndex
unsigned int m_regionIndex
Definition
EMBDetDescr.h:96
EMBDetDescr::m_manager
const EMBDetectorManager * m_manager
Definition
EMBDetDescr.h:94
EMBDetectorManager
A manager class providing access to readout geometry information for the electromagnetic barrel calor...
Definition
EMBDetectorManager.h:32
Generated on
for ATLAS Offline Software by
1.17.0