106{
110 msg(MSG::INFO) <<
"Building Pixel Detector" <<
endmsg;
112
113
114 msg(MSG::INFO) <<
" B-Layer basic eta pitch: " <<
m_geometryManager->DesignPitchZ()/Gaudi::Units::micrometer <<
"um" <<
endmsg;
115 msg(MSG::INFO) <<
" B-Layer sensor thickness: " <<
m_geometryManager->PixelBoardThickness()/Gaudi::Units::micrometer <<
"um" <<
endmsg;
116 }
117
121
122
123
124
125
126 if ((barrelPresent && endcapAPresent) ||
127 (barrelPresent && endcapCPresent) ||
128 (endcapAPresent && endcapCPresent)) {
129 msg(MSG::ERROR) <<
"SR1 geometry can only have 1 part" <<
endmsg;
130 }
131
132 if (!barrelPresent && !endcapAPresent && !endcapCPresent) {
133 msg(MSG::ERROR) <<
"SR1 geometry must have 1 part" <<
endmsg;
134 }
135
136 GeoVPhysVol* physVol = nullptr;
137 GeoAlignableTransform *
transform =
nullptr;
138
139 GeoPixelServices * pixServices = nullptr;
142 }
143
144
146
147 if (barrelPresent) {
148
149
150
153 physVol = brl.Build();
154
155 GeoTrf::Transform3D barrelTransform =
m_geometryManager->partTransform(
"Barrel");
156 transform =
new GeoAlignableTransform(topTransform*barrelTransform);
157
158
159 GeoNameTag*
tag =
new GeoNameTag(
"Pixel");
160 world->add(tag);
161 world->add(new GeoIdentifierTag(0));
162 world->add(physVol);
163 world->add(transform);
164
165 }
166
167
168
169 if (endcapAPresent || endcapCPresent) {
171
174
175
176
177 if (endcapAPresent) {
178
180 physVol = pec.Build();
181
182 GeoTrf::Transform3D endcapATransform =
m_geometryManager->partTransform(
"EndcapA");
183 transform =
new GeoAlignableTransform(topTransform * endcapATransform * GeoTrf::TranslateZ3D(zpos));
184
185 GeoNameTag*
tag =
new GeoNameTag(
"Pixel");
186 world->add(tag);
187 world->add(new GeoIdentifierTag(2));
188 world->add(transform);
189 world->add(physVol);
190 }
191
192
193 if (endcapCPresent) {
194
196 physVol = pec.Build();
197
198 GeoTrf::Transform3D endcapCTransform =
m_geometryManager->partTransform(
"EndcapC");
199 transform =
new GeoAlignableTransform(topTransform * endcapCTransform * GeoTrf::TranslateZ3D(-zpos) * GeoTrf::RotateY3D(180*Gaudi::Units::deg));
200
201 GeoNameTag*
tag =
new GeoNameTag(
"Pixel");
202 world->add(tag);
203 world->add(new GeoIdentifierTag(-2));
204 world->add(transform);
205 world->add(physVol);
206 }
207
208 }
209
210
211 if(pixServices) delete pixServices;
212
213
214 if (!physVol) {
215 msg(MSG::ERROR) <<
"Unexpected condition. Top level volume has zero pointer" <<
endmsg;
216 }
217
218
221
222
223
224
226
227
229
230
234 }
235
236
241 if (barrelPresent) {
245 }
246 if (endcapAPresent) {
250 }
251 if (endcapCPresent) {
255 }
256 }
257}
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.