70 {
72
75
76
81
82 double extSupThick =
r->externalSupPanelThickness;
83 double extAlSupThick =
r->externalAlSupPanelThickness;
84 double rpcLayerThickness =
r->rpcLayerThickness;
85 double centSupThick =
r->centralSupPanelThickness;
86 double centAlSupThick =
r->centralAlSupPanelThickness;
87
88
90
92 rpcLayerThickness = rpc3GapLayerThickness;
93 }
94
98 }
99
101
102
103 if (cutoutson && !vcutdef.empty()) {
104 Cutout *
cut =
nullptr;
105 GeoShape *cutoutShape = nullptr;
106 GeoTrf::Transform3D cutTrans{GeoTrf::Transform3D::Identity()};
107 for (
unsigned i = 0;
i < vcutdef.size();
i++) {
110 cutTrans = GeoTrf::Translate3D(0.0,
cut->dx, -
length / 2 +
cut->dy +
cut->lengthY / 2.);
111 srpc = &(srpc->subtract((*cutoutShape) << cutTrans));
112 }
113 }
114
115 const GeoMaterial *mrpc = matManager.
getMaterial(
"std::Air");
116 GeoLogVol *lrpc =
new GeoLogVol(
logVolName, srpc, mrpc);
117 GeoIntrusivePtr<GeoFullPhysVol> prpc = new GeoFullPhysVol(lrpc);
118
119 if (minimalgeo == 1)
120 return prpc;
121
122 if (geometry_version.compare(0, 1,"M") != 0) {
123
125 assert(0);
126
127
128
129
130
132
133
134
135 GeoTrd *slpan =
new GeoTrd(extSupThick / 2, extSupThick / 2,
width / 2,
longWidth / 2,
length / 2);
136 GeoTrd *sholpan =
137 new GeoTrd(extSupThick / 2 - extAlSupThick, extSupThick / 2 - extAlSupThick,
width / 2 - extAlSupThick,
longWidth / 2 - extAlSupThick,
length / 2 - extAlSupThick);
138 const GeoShape *sallpan = slpan;
139 const GeoShape *sholpan2 = sholpan;
140 const GeoMaterial *mallpan = matManager.
getMaterial(
"std::Aluminium");
141 GeoLogVol *lallpan = new GeoLogVol("RPC_AL_extsuppanel", sallpan, mallpan);
142 PVLink pallpan = new GeoPhysVol(lallpan);
143 const GeoMaterial *mholpan = matManager.
getMaterial(
"muo::RpcAlHonC");
144 GeoLogVol *lholpan = new GeoLogVol("RPC_honeyc_extsuppanel", sholpan2, mholpan);
145 PVLink pholpan = new GeoPhysVol(lholpan);
146 pallpan->add(pholpan);
147
148
149 if (cutoutson && !vcutdef.empty()) {
150 Cutout *
cut =
nullptr;
151 GeoTrf::Transform3D cutTrans{GeoTrf::Transform3D::Identity()};
152 for (
unsigned i = 0;
i < vcutdef.size();
i++) {
155 cutTrans = GeoTrf::Translate3D(0.0,
cut->dx, -
length / 2 +
cut->dy +
cut->lengthY / 2.);
156
157 GeoCutVolAction cutAction(*cutoutShape, cutTrans);
158 pallpan->apply(&cutAction);
159 pallpan = cutAction.getPV();
160 }
161 }
162
164 newpos += extSupThick / 2.;
165 GeoTransform *tlpan = new GeoTransform(GeoTrf::TranslateX3D(newpos));
167 log << MSG::VERBOSE <<
" Rpc:: put ext.sup panel at " << newpos <<
" from centre" <<
endmsg;
168 }
170 prpc->add(tlpan);
171 prpc->add(pallpan);
172 }
173
174
175 newpos += extSupThick / 2.;
176 }
177
178
179 std::unique_ptr<RpcLayer>
rl = std::make_unique<RpcLayer>(
name,
this);
180 PVLink plowergg;
181 if (cutoutson && !vcutdef.empty()) {
182 plowergg =
rl->build(matManager, mysql, cutoutson, vcutdef);
183 } else {
184 plowergg =
rl->build(matManager, mysql);
185 }
186
187 newpos += rpcLayerThickness / 2.;
188 GeoTransform *tlgg = new GeoTransform(GeoTrf::TranslateX3D(newpos));
190 log << MSG::VERBOSE <<
" Rpc:: put lower RPC layer at " << newpos <<
" from centre " <<
endmsg;
191 }
193 prpc->add(new GeoIdentifierTag(1));
194 prpc->add(tlgg);
195 prpc->add(plowergg);
196 }
197
198
199 newpos += rpcLayerThickness / 2.;
200 GeoTrd *scpan =
new GeoTrd(centSupThick / 2, centSupThick / 2,
width / 2,
longWidth / 2,
length / 2);
201 GeoTrd *shocpan =
new GeoTrd(centSupThick / 2 - centAlSupThick, centSupThick / 2 - centAlSupThick,
width / 2 - centAlSupThick,
longWidth / 2 - centAlSupThick,
202 length / 2 - centAlSupThick);
203
204 const GeoShape *salcpan = scpan;
205 const GeoShape *shocpan2 = shocpan;
206 GeoLogVol *lalcpan = new GeoLogVol("RPC_AL_midsuppanel", salcpan, mallpan);
207 PVLink palcpan = new GeoPhysVol(lalcpan);
208 const GeoMaterial *mhocpan = matManager.
getMaterial(
"muo::RpcPapHonC");
209 GeoLogVol *lhocpan = new GeoLogVol("RPC_honeyc_midsuppanel", shocpan2, mhocpan);
210 PVLink phocpan = new GeoPhysVol(lhocpan);
211 palcpan->add(phocpan);
212
213
214 if (cutoutson && !vcutdef.empty()) {
215 Cutout *
cut =
nullptr;
216 GeoTrf::Transform3D cutTrans{GeoTrf::Transform3D::Identity()};
217 for (
unsigned i = 0;
i < vcutdef.size();
i++) {
220 cutTrans = GeoTrf::Translate3D(0.0,
cut->dx, -
length / 2 +
cut->dy +
cut->lengthY / 2.);
221
222 GeoCutVolAction cutAction(*cutoutShape, cutTrans);
223 palcpan->apply(&cutAction);
224 palcpan = cutAction.getPV();
225 }
226 }
227
229 newpos += centSupThick / 2.;
230 GeoTransform *tcpan = new GeoTransform(GeoTrf::TranslateX3D(newpos));
232 log << MSG::VERBOSE <<
" Rpc:: put central sup panel at " << newpos <<
" from centre" <<
endmsg;
233 }
235 prpc->add(tcpan);
236 prpc->add(palcpan);
237 }
238 newpos += centSupThick / 2.;
239 }
240
241
242 std::unique_ptr<RpcLayer> ru = std::make_unique<RpcLayer>(
name,
this);
243 PVLink puppergg;
244 if (cutoutson && !vcutdef.empty()) {
245
246
248 int ijob = 0;
249 for (
unsigned int i = 0;
i < vcutdef.size();
i++) {
251 ijob = vcutdef[
i]->ijob;
252
253
254 if (
name ==
"RPC06" && ijob == 3) {
255 if (subtype == 2) {
257 } else if (subtype == 13) {
258 vcutdef[
i]->dy = this->
length - vcutdef[
i]->lengthY;
259 }
260 }
261
262
263 if (
name ==
"RPC07") {
264 if (subtype == 5) {
265 if (ijob == 24)
266 vcutdef[
i]->dy = this->
length - vcutdef[
i]->lengthY;
267 if (ijob == 32)
269 } else if (subtype == 9) {
270 if (ijob == 32)
271 vcutdef[
i]->dy = this->
length - vcutdef[
i]->lengthY;
272 if (ijob == 24)
274 }
275 }
276
277
278 if (subtype == 6) {
279 if (ijob == 29 &&
name ==
"RPC07")
280 vcutdef[
i]->dy = this->
length - vcutdef[
i]->lengthY;
281 if (ijob == 21 &&
name ==
"RPC08")
283 } else if (subtype == 11) {
284 if (ijob == 29 &&
name ==
"RPC07")
286 if (ijob == 21 &&
name ==
"RPC08")
287 vcutdef[
i]->dy = this->
length - vcutdef[
i]->lengthY - vcutdef[
i]->dy;
288 }
289 }
290
291 puppergg = ru->build(matManager, mysql, cutoutson, vcutdef);
292 } else {
293 puppergg = ru->build(matManager, mysql);
294 }
295
296 newpos += rpcLayerThickness / 2.;
297 GeoTransform *tugg = new GeoTransform(GeoTrf::TranslateX3D(newpos));
299 log << MSG::VERBOSE <<
" Rpc:: put upper RPC layer at " << newpos <<
" from centre " <<
endmsg;
300 }
302 prpc->add(new GeoIdentifierTag(2));
303 prpc->add(tugg);
305 GeoTransform *rugg = new GeoTransform(GeoTrf::RotateY3D(180 * Gaudi::Units::deg));
306 prpc->add(rugg);
307 }
308 prpc->add(puppergg);
309 }
310
311
313 newpos += rpcLayerThickness / 2.;
314 RpcLayer rthird (
name,
this);
315 PVLink pthirdgg;
316 if (cutoutson && !vcutdef.empty()) {
317 pthirdgg = rthird.build(matManager, mysql, cutoutson, vcutdef);
318 } else {
319 pthirdgg = rthird.build(matManager, mysql);
320 }
321
322 newpos += rpcLayerThickness / 2.;
323 GeoTransform *tthirdgg = new GeoTransform(GeoTrf::TranslateX3D(newpos));
325 log << MSG::VERBOSE <<
" Rpc:: put upper RPC layer at " << newpos <<
" from centre " <<
endmsg;
327 prpc->add(new GeoIdentifierTag(3));
328 prpc->add(tthirdgg);
329 prpc->add(pthirdgg);
330 }
331 }
332 }
333 return prpc;
334 }
GeoIntrusivePtr< T > GeoRef
const std::string & getGeometryVersion() const
Technology * GetTechnology(const std::string &name)
virtual const GeoMaterial * getMaterial(const std::string &name)=0
IMessageSvc * getMessageSvc(bool quiet=false)
cut
This script demonstrates how to call a C++ class from Python Also how to use PyROOT is shown.