ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetDetDescr
PixelGeoModel
src
PixelDetectorFactoryDC2.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
6
#include "
PixelDetectorFactoryDC2.h
"
7
8
// Envelope, as a starting point of the geometry
9
//#include "GeoPixelEnvelope.h"
10
#include "
PixelDetectorDC1DC2.h
"
11
#include "
PixelSwitches.h
"
12
13
// GeoModel includes
14
#include "GeoModelKernel/GeoNameTag.h"
15
#include "GeoModelKernel/GeoPhysVol.h"
16
#include "GeoModelKernel/GeoAlignableTransform.h"
17
18
// InDetReadoutGeometry
19
#include "
ReadoutGeometryBase/SiCommonItems.h
"
20
#include "
ReadoutGeometryBase/InDetDD_Defs.h
"
21
#include "
PixelReadoutGeometry/PixelModuleDesign.h
"
22
23
#include "
PixelGeoModelAthenaComps.h
"
24
25
#include "
InDetIdentifier/PixelID.h
"
26
27
using
InDetDD::PixelDetectorManager
;
28
using
InDetDD::SiCommonItems
;
29
30
using namespace
PixelGeoDC2
;
31
32
33
PixelDetectorFactoryDC2::PixelDetectorFactoryDC2
(
PixelGeoModelAthenaComps
* athenaComps,
34
const
PixelSwitches
& switches)
35
:
InDetDD
::
DetectorFactoryBase
(athenaComps),
36
m_detectorManager
(nullptr)
37
{
38
// Create the detector manager
39
m_detectorManager
=
new
PixelDetectorManager
(
detStore
());
40
41
// Create the geometry manager.
42
m_geometryManager
=
new
OraclePixGeoManager
();
43
44
// Pass the switches
45
m_geometryManager
->SetServices(switches.
services
());
46
m_geometryManager
->SetG3CompatibleDigits(switches.
g3CompatibleDigits
());
47
m_geometryManager
->SetDC1Geometry(switches.
dc1Geometry
());
48
m_geometryManager
->SetAlignable(switches.
alignable
());
49
m_geometryManager
->SetInitialLayout(switches.
initialLayout
());
50
51
// Create SiCommonItems ans store it in geometry manager.
52
// These are items that are shared by all elements
53
std::unique_ptr<SiCommonItems> commonItems{std::make_unique<SiCommonItems>(athenaComps->
getIdHelper
())};
54
m_geometryManager
->setCommonItems(commonItems.get());
55
56
m_detectorManager
->setCommonItems(std::move(commonItems));
57
58
bool
initialLayoutIdDict = (
m_detectorManager
->tag() ==
"initial_layout"
);
59
if
(
m_geometryManager
->InitialLayout() != initialLayoutIdDict ) {
60
if
(
msgLvl
(MSG::WARNING))
61
msg
(MSG::WARNING) <<
"IdDict tag is \""
<<
m_detectorManager
->tag()
62
<<
"\" which is inconsistent with the layout choosen!"
63
<<
endmsg
;
64
}
65
66
67
//
68
// Set Version information
69
//
70
std::string versionTag =
m_geometryManager
->versionTag();
71
std::string versionName =
"DC2"
;
72
std::string layout =
"Final"
;
73
std::string
description
=
"DC2 Geometry"
;
74
int
versionMajorNumber = 2;
75
int
versionMinorNumber = 2;
76
int
versionPatchNumber = 0;
77
78
if
(
m_geometryManager
->G3CompatibleDigits()) {
79
description
+=
", G3 Compatible Digits"
;
80
versionMinorNumber = 1;
81
}
82
83
if
(
m_geometryManager
->InitialLayout()) {
84
layout =
"Initial"
;
85
}
86
87
// We determine if we are running DC1 geoemtry via
88
// Barrel version number in NOVA
89
if
(
m_geometryManager
->DC1Geometry()) {
90
versionName =
"DC1"
;
91
description
=
"DC1 Geometry (300um B-Layer pixels)"
;
92
versionMajorNumber = 1;
93
versionMinorNumber = 2;
94
if
(
m_geometryManager
->G3CompatibleDigits()) {
95
description
+=
", G3 Compatible Digits"
;
96
versionMinorNumber = 1;
97
}
98
}
99
100
InDetDD::Version
version(versionTag,
101
versionName,
102
layout,
103
description
,
104
versionMajorNumber,
105
versionMinorNumber,
106
versionPatchNumber);
107
m_detectorManager
->setVersion(version);
108
109
}
110
111
112
PixelDetectorFactoryDC2::~PixelDetectorFactoryDC2
()
113
{
114
115
}
116
117
118
119
//## Other Operations (implementation)
120
void
PixelDetectorFactoryDC2::create
(GeoPhysVol *world)
121
{
122
if
(
msgLvl
(MSG::INFO)) {
123
msg
(MSG::INFO) <<
"Building Pixel Detector"
<<
endmsg
;
124
msg
(MSG::INFO) <<
" "
<<
m_detectorManager
->getVersion().fullDescription() <<
endmsg
;
125
126
// Printout the parameters that are different in DC1 and DC2.
127
msg
(MSG::INFO) <<
" B-Layer basic eta pitch: "
<<
m_geometryManager
->DesignPitchZ(
true
)/Gaudi::Units::micrometer <<
"um"
<<
endmsg
;
128
}
129
m_geometryManager
->SetCurrentLD(0);
130
m_geometryManager
->SetBarrel();
131
if
(
msgLvl
(MSG::INFO))
132
msg
(MSG::INFO) <<
" B-Layer sensor thickness: "
<<
m_geometryManager
->PixelBoardThickness()/Gaudi::Units::micrometer <<
"um"
<<
endmsg
;
133
134
//
135
// Create the Pixel Envelope...
136
GeoPixelEnvelope
pe (
m_detectorManager
,
m_geometryManager
);
137
GeoVPhysVol* pephys = pe.Build() ;
138
GeoAlignableTransform * transform =
new
GeoAlignableTransform(GeoTrf::Transform3D::Identity());
139
140
//
141
// Add this to the world
142
//
143
GeoNameTag *tag =
new
GeoNameTag(
"Pixel"
);
144
world->add(tag);
145
world->add(transform);
146
world->add(pephys);
147
148
// Store alignable transform
149
Identifier
id
=
m_geometryManager
->getIdHelper()->wafer_id(0,0,0,0);
150
m_detectorManager
->addAlignableTransform(2,
id
, transform, pephys);
151
152
//
153
// Add this to the list of top level physical volumes:
154
//
155
m_detectorManager
->addTreeTop(pephys);
156
157
158
// Initialize the neighbours
159
m_detectorManager
->initNeighbours();
160
161
// Set maximum rows/columns in numerology
162
for
(
int
iDesign = 0; iDesign <
m_detectorManager
->numDesigns(); iDesign++) {
163
m_detectorManager
->numerology().setMaxNumPhiCells(
m_detectorManager
->getPixelDesign(iDesign)->rows());
164
m_detectorManager
->numerology().setMaxNumEtaCells(
m_detectorManager
->getPixelDesign(iDesign)->columns());
165
}
166
167
// Register the callbacks and keys and the level corresponding to the key.
168
if
(
m_geometryManager
->Alignable()) {
169
m_detectorManager
->addFolder(
"/Indet/Align"
);
170
m_detectorManager
->addChannel(
"/Indet/Align/ID"
, 2,
InDetDD::global
);
171
m_detectorManager
->addChannel(
"/Indet/Align/PIX"
, 1,
InDetDD::global
);
172
m_detectorManager
->addChannel(
"/Indet/Align/PIXB1"
, 0,
InDetDD::local
);
173
m_detectorManager
->addChannel(
"/Indet/Align/PIXB2"
, 0,
InDetDD::local
);
174
m_detectorManager
->addChannel(
"/Indet/Align/PIXB3"
, 0,
InDetDD::local
);
175
m_detectorManager
->addChannel(
"/Indet/Align/PIXEA1"
, 0,
InDetDD::local
);
176
m_detectorManager
->addChannel(
"/Indet/Align/PIXEA2"
, 0,
InDetDD::local
);
177
m_detectorManager
->addChannel(
"/Indet/Align/PIXEA3"
, 0,
InDetDD::local
);
178
m_detectorManager
->addChannel(
"/Indet/Align/PIXEC1"
, 0,
InDetDD::local
);
179
m_detectorManager
->addChannel(
"/Indet/Align/PIXEC2"
, 0,
InDetDD::local
);
180
m_detectorManager
->addChannel(
"/Indet/Align/PIXEC3"
, 0,
InDetDD::local
);
181
}
182
}
183
184
const
PixelDetectorManager
*
PixelDetectorFactoryDC2::getDetectorManager
()
const
185
{
186
return
m_detectorManager
;
187
}
188
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
InDetDD_Defs.h
PixelDetectorDC1DC2.h
PixelDetectorFactoryDC2.h
PixelGeoModelAthenaComps.h
PixelID.h
This is an Identifier helper class for the Pixel subdetector.
PixelModuleDesign.h
PixelSwitches.h
SiCommonItems.h
InDetDD::DetectorFactoryBase::DetectorFactoryBase
DetectorFactoryBase(InDetDD::AthenaComps *athenaComps)
Definition
InDetDetectorFactoryBase.h:23
InDetDD::DetectorFactoryBase::msgLvl
bool msgLvl(MSG::Level lvl)
Definition
InDetDetectorFactoryBase.h:38
InDetDD::DetectorFactoryBase::detStore
StoreGateSvc * detStore()
Definition
InDetDetectorFactoryBase.h:27
InDetDD::PixelDetectorManager
Dedicated detector manager extending the functionality of the SiDetectorManager with dedicated pixel ...
Definition
PixelDetectorManager.h:47
InDetDD::SiCommonItems
Helper class to concentrate common items, such as the pointer to the IdHelper, the lorentzAngle tool ...
Definition
SiCommonItems.h:45
InDetDD::Version
Class to hold version information consisting of tag, name layout and description as strings,...
Definition
Version.h:24
PixelDetectorFactoryDC2::m_geometryManager
PixelGeoDC2::PixelGeometryManager * m_geometryManager
Definition
PixelDetectorFactoryDC2.h:46
PixelDetectorFactoryDC2::getDetectorManager
virtual const InDetDD::PixelDetectorManager * getDetectorManager() const
Definition
PixelDetectorFactoryDC2.cxx:184
PixelDetectorFactoryDC2::create
virtual void create(GeoPhysVol *world)
Definition
PixelDetectorFactoryDC2.cxx:120
PixelDetectorFactoryDC2::~PixelDetectorFactoryDC2
~PixelDetectorFactoryDC2()
Definition
PixelDetectorFactoryDC2.cxx:112
PixelDetectorFactoryDC2::PixelDetectorFactoryDC2
PixelDetectorFactoryDC2(PixelGeoModelAthenaComps *athenaComps, const PixelSwitches &switches)
Definition
PixelDetectorFactoryDC2.cxx:33
PixelDetectorFactoryDC2::m_detectorManager
InDetDD::PixelDetectorManager * m_detectorManager
Definition
PixelDetectorFactoryDC2.h:45
PixelGeoDC2::GeoPixelEnvelope
Definition
PixelDetectorDC1DC2.h:189
PixelGeoDC2::OraclePixGeoManager
Definition
PixelDetectorDC1DC2.h:612
PixelGeoModelAthenaComps
Class to hold various Athena components.
Definition
PixelGeoModelAthenaComps.h:16
PixelGeoModelAthenaComps::getIdHelper
const PixelID * getIdHelper() const
Definition
PixelGeoModelAthenaComps.cxx:59
PixelSwitches
Definition
PixelSwitches.h:13
PixelSwitches::g3CompatibleDigits
bool g3CompatibleDigits() const
Definition
PixelSwitches.cxx:26
PixelSwitches::services
bool services() const
Definition
PixelSwitches.cxx:20
PixelSwitches::initialLayout
bool initialLayout() const
Definition
PixelSwitches.cxx:30
PixelSwitches::dc1Geometry
bool dc1Geometry() const
Definition
PixelSwitches.cxx:34
PixelSwitches::alignable
bool alignable() const
Definition
PixelSwitches.cxx:38
description
std::string description
glabal timer - how long have I taken so far?
Definition
hcg.cxx:93
Identifier
Definition
IdentifierFieldParser.cxx:14
InDetDD
Message Stream Member.
Definition
FakeTrackBuilder.h:8
InDetDD::global
@ global
Definition
InDetDD_Defs.h:16
InDetDD::local
@ local
Definition
InDetDD_Defs.h:16
PixelGeoDC2
Definition
PixelDetectorDC1DC2.h:32
msg
MsgStream & msg
Definition
testRead.cxx:32
Generated on
for ATLAS Offline Software by
1.17.0