ATLAS Offline Software
Loading...
Searching...
No Matches
BCM_Module.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
6
8
9#include "GeoModelKernel/GeoBox.h"
10#include "GeoModelKernel/GeoLogVol.h"
11#include "GeoModelKernel/GeoTransform.h"
12#include "GeoModelKernel/GeoNameTag.h"
13#include "GeoModelKernel/GeoIdentifierTag.h"
14#include "GeoModelKernel/GeoSimplePolygonBrep.h"
15
16#include "GaudiKernel/SystemOfUnits.h"
17
18GeoPhysVol* BCM_Module::Build(StoredMaterialManager* mat_mgr, const BCM_ModuleParameters* parameters, MsgStream* /*msg*/)
19{
20 //module outside dimensions
21
22 double ModLength = 132.969 - 0.4 + parameters->BackWallThickness();
23 double ModWidth = 33.02;
24 double ModHeight = 21.717;
25 double ModTailHeight = 7.747;
26 double ModHeadLength = 49.657;
27
28 double CuThick = 0.035;
29 double G10Thick = 0.4;
30 double WallThick = CuThick + G10Thick; //caution, CuThick, G10Thick, WallThick only valid for outside wall
31 double ReducedModWidth = ModWidth - 2 * WallThick;
32 double MainWallCuThick = 0.035;
33 double MainWallBackCuThick = 0.035;
34 double MainWallG10Thick = 1.4;
35 double MainWallThick = MainWallCuThick + MainWallG10Thick;
36
37 double LamelHoffset = parameters->LamelOffset_H();//34.860;//distance from center of lamel H to edge of module
38 double LamelIoffset = parameters->LamelOffset_I();//29.509;//distance from center of lamel I to edge of module
39 double LamelJoffset = parameters->LamelOffset_J();//20.205;//diatance form center of lamel J to edge of module
40 double LamelG10Thick = 1.4;
41 double LamelCuThick = 0.035;
42 double LamelHThick = LamelG10Thick + 2*LamelCuThick;
43
44 double diamondThick = 0.5;
45 double diamondSize = 10;
46 double safety = 0.001;
47 //outside box
48
49 const GeoMaterial* air = mat_mgr->getMaterial("std::Air");
50 const GeoMaterial* ether = mat_mgr->getMaterial("special::Ether");
51 const GeoMaterial* copper = mat_mgr->getMaterial("std::Copper");
52 const GeoMaterial* g10 = mat_mgr->getMaterial("std::G10");
53 //first try the Diamond
54 const GeoMaterial* diamond = mat_mgr->getMaterial("pix::Diamond");
55 if(diamond == nullptr)
56 {
57 diamond = mat_mgr->getMaterial("std::Carbon");
58// if(msg)
59// (*msg) << "BCM with graphite." << endmsg; //commented out by D.Dobos on request by M.Elsing
60 }
61// else
62// {
63// if(msg)
64// (*msg) << "BCM with diamond." << endmsg; //commented out by D.Dobos on request by M.Elsing
65// }
66
67
68// RUN2 IBL/pixel/DBM/beam pipe geometry upgrade
69//
70// Complex shape to avoid overlap with IST
71// 1 - keep the default encompassing box (as intermediate volume), but change material to ether
72// . box is not built by Geant4
73// . default volume and positions of sub-volumes are not modified
74// 2 - define a new complex encompassing box to avoid overlap with IST
75// . add the box defined in 1. as a child volume
76//
77
78// ----------------------------------------------------------------------------------
79// New complex envelope volume defined to avoid overlap with IST
80// ----------------------------------------------------------------------------------
81
82 GeoSimplePolygonBrep* complexEnvShape = new GeoSimplePolygonBrep(ModWidth/2+safety);
83 std::vector<double> xShape, yShape;
84
85 double width = ModHeight*.5+safety;
86 double length = ModLength*.5+safety;
87 xShape.push_back(length); yShape.push_back(width);
88 xShape.push_back(-length); yShape.push_back(width);
89 xShape.push_back(-length); yShape.push_back(-width+10.);
90 xShape.push_back(-length+10.); yShape.push_back(-width);
91 xShape.push_back(length); yShape.push_back(-width);
92
93 for(unsigned int iPt=0; iPt<xShape.size(); iPt++)
94 complexEnvShape->addVertex(xShape[iPt],yShape[iPt]);
95
96 const GeoLogVol* bcmModLog=new GeoLogVol("bcmModLog", complexEnvShape, air);
97 GeoPhysVol* bcmModPhys = new GeoPhysVol(bcmModLog);
98
99
100// ----------------------------------------------------------------------------------
101// Intermediate Ether envelope volume (same as the one defined in previous release)
102// ----------------------------------------------------------------------------------
103
104 const GeoBox* bcmModBox = new GeoBox(ModHeight/2+safety, ModWidth/2+safety, ModLength/2+safety);
105 const GeoLogVol* env_bcmModLog=new GeoLogVol("EnvBcmModLog", bcmModBox, ether);
106 GeoPhysVol* env_bcmModPhys = new GeoPhysVol(env_bcmModLog);
107
108
109 BCM_Wall wall;
110
111 //wall C
112 GeoPhysVol* WallC = wall.Build(ModLength/2, ReducedModWidth/2, G10Thick, CuThick, g10, copper, mat_mgr);
113
114 GeoTrf::Translation3D WallCPos(ModHeight/2 - WallThick/2, 0, 0);
115 GeoTrf::RotateY3D rmC(90.*Gaudi::Units::deg);
116 GeoTransform* xform = new GeoTransform(GeoTrf::Transform3D(WallCPos*rmC));
117 GeoNameTag* tag = new GeoNameTag("Wall C");
118 env_bcmModPhys->add(tag);
119 env_bcmModPhys->add(xform);
120 env_bcmModPhys->add(WallC);
121
122 //wall D
123 GeoPhysVol* WallD = wall.Build((ModTailHeight - WallThick - MainWallThick)/2, ReducedModWidth/2, CuThick, G10Thick, copper, g10, mat_mgr);
124
125 GeoTrf::Translate3D WallDPos(ModHeight/2 - WallThick - (ModTailHeight - WallThick - MainWallThick)/2, 0, WallThick/2 - ModLength/2);
126 xform = new GeoTransform(WallDPos);
127 tag = new GeoNameTag("Wall D");
128 env_bcmModPhys->add(tag);
129 env_bcmModPhys->add(xform);
130 env_bcmModPhys->add(WallD);
131
132 //wall H
133 GeoPhysVol* WallH = wall.Build((ModTailHeight - WallThick - MainWallThick)/2, ReducedModWidth/2, LamelCuThick, LamelG10Thick, LamelCuThick, copper, g10, copper, mat_mgr);
134
135 GeoTrf::Translate3D WallHPos(ModHeight/2 -WallThick - (ModTailHeight - WallThick - MainWallThick)/2, 0, ModLength/2 - LamelHoffset);
136 xform = new GeoTransform(WallHPos);
137 tag = new GeoNameTag("Wall H");
138 env_bcmModPhys->add(tag);
139 env_bcmModPhys->add(xform);
140 env_bcmModPhys->add(WallH);
141
142 //wall J
143 GeoPhysVol* WallJ = wall.Build((ModTailHeight - WallThick - MainWallThick - MainWallBackCuThick)/2, ReducedModWidth/2, LamelCuThick, LamelG10Thick, LamelCuThick, copper, g10, copper, mat_mgr);
144
145 GeoTrf::Translate3D WallJPos(ModHeight/2 -WallThick - (ModTailHeight - WallThick - MainWallThick - MainWallBackCuThick)/2, 0, ModLength/2 - LamelJoffset);
146 xform = new GeoTransform(WallJPos);
147 tag = new GeoNameTag("Wall J");
148 env_bcmModPhys->add(tag);
149 env_bcmModPhys->add(xform);
150 env_bcmModPhys->add(WallJ);
151
152 //wall E //if changing thickness of E one must also change length and position of MainWall and wallK (extra copper)
153 GeoPhysVol* WallE = wall.Build(ModHeight/2 - WallThick, ReducedModWidth/2, parameters->BackWallThickness(), CuThick, g10, copper, mat_mgr);
154
155 GeoTrf::Translate3D WallEPos(0, 0,ModLength/2 - (parameters->BackWallThickness()+CuThick)/2);
156 xform = new GeoTransform(WallEPos);
157 tag = new GeoNameTag("Wall E");
158 env_bcmModPhys->add(tag);
159 env_bcmModPhys->add(xform);
160 env_bcmModPhys->add(WallE);
161
162 //wall I
163 double heightI = ModHeight - ModTailHeight - WallThick;
164 GeoPhysVol* WallI = wall.Build(heightI/2, ReducedModWidth/2, LamelG10Thick, "bcmWallLog", g10);
165
166 GeoTrf::Translate3D WallIPos(WallThick + heightI/2 - ModHeight/2, 0, ModLength/2 - LamelIoffset);
167 xform = new GeoTransform(WallIPos);
168 tag = new GeoNameTag("Wall I");
169 env_bcmModPhys->add(tag);
170 env_bcmModPhys->add(xform);
171 env_bcmModPhys->add(WallI);
172
173 //wall F
174 GeoPhysVol* WallF = wall.Build(heightI/2, ReducedModWidth/2, CuThick, G10Thick, copper, g10, mat_mgr);
175
176 GeoTrf::Translate3D WallFPos(WallThick + heightI/2 - ModHeight/2, 0, ModLength/2 - ModHeadLength + WallThick/2);
177 xform = new GeoTransform(WallFPos);
178 tag = new GeoNameTag("Wall F");
179 env_bcmModPhys->add(tag);
180 env_bcmModPhys->add(xform);
181 env_bcmModPhys->add(WallF);
182
183 //wall G
184 GeoPhysVol* WallG = wall.Build(ModHeadLength/2, ReducedModWidth/2, CuThick, G10Thick, copper, g10, mat_mgr);
185
186 GeoTrf::Translation3D WallGPos(WallThick/2 - ModHeight/2, 0, ModLength/2 - ModHeadLength/2);
187 xform = new GeoTransform(GeoTrf::Transform3D(WallGPos*rmC));
188 tag = new GeoNameTag("Wall G");
189 env_bcmModPhys->add(tag);
190 env_bcmModPhys->add(xform);
191 env_bcmModPhys->add(WallG);
192
193 //main wall
194 GeoPhysVol* WallMain = wall.Build((ModLength - parameters->BackWallThickness() - CuThick)/2, ReducedModWidth/2, MainWallCuThick, MainWallG10Thick, copper, g10, mat_mgr);
195
196 GeoTrf::Translation3D WallMainPos(ModHeight/2 + MainWallThick/2 - ModTailHeight, 0, -(parameters->BackWallThickness() + CuThick)/2);
197 xform = new GeoTransform(GeoTrf::Transform3D(WallMainPos*rmC));
198 tag = new GeoNameTag("Wall Main");
199 env_bcmModPhys->add(tag);
200 env_bcmModPhys->add(xform);
201 env_bcmModPhys->add(WallMain);
202
203 //copper on the main wall (top side) wall K
204 //wall K
205 double lengthK = LamelHoffset - LamelHThick/2 - (parameters->BackWallThickness() + CuThick);
206 GeoPhysVol* WallK = wall.Build(lengthK/2, ReducedModWidth/2, CuThick, "bcmWallLog",copper);
207
208 GeoTrf::Translation3D WallKPos(ModHeight/2 + MainWallThick + CuThick/2 - ModTailHeight, 0, ModLength/2 - lengthK/2 - (parameters->BackWallThickness() + CuThick));
209 xform = new GeoTransform(GeoTrf::Transform3D(WallKPos*rmC));
210 tag = new GeoNameTag("Wall extra cupper");
211 env_bcmModPhys->add(tag);
212 env_bcmModPhys->add(xform);
213 env_bcmModPhys->add(WallK);
214
215 //diamond //bcmDiamondLog
216 GeoPhysVol* DiamondVolA = wall.Build(diamondSize/2, diamondSize/2, diamondThick, "bcmDiamondLog", diamond);
217
218 double diamond_x = ModHeight/2 + MainWallThick + diamondThick/2 - ModTailHeight;
219 GeoTrf::Translation3D DiamondPosA(diamond_x, parameters->DiamondPosition_Y(), parameters->DiamondPosition_Z());
220 xform = new GeoTransform(GeoTrf::Transform3D(DiamondPosA*rmC));
221 tag = new GeoNameTag("Diamond");
222 env_bcmModPhys->add(tag);
223 env_bcmModPhys->add(new GeoIdentifierTag(11950));
224 env_bcmModPhys->add(xform);
225 env_bcmModPhys->add(DiamondVolA);
226
227 GeoPhysVol* DiamondVolB = wall.Build(diamondSize/2, diamondSize/2, diamondThick, "bcmDiamondLog", diamond);
228
229 GeoTrf::Translation3D DiamondPosB(diamond_x + diamondThick + parameters->DiamondDelta_X(), parameters->DiamondPosition_Y() + parameters->DiamondDelta_Y(), parameters->DiamondPosition_Z() + parameters->DiamondDelta_Z());
230 xform = new GeoTransform(GeoTrf::Transform3D(DiamondPosB*rmC));
231 tag = new GeoNameTag("Diamond");
232 env_bcmModPhys->add(tag);
233 env_bcmModPhys->add(new GeoIdentifierTag(11951));
234 env_bcmModPhys->add(xform);
235 env_bcmModPhys->add(DiamondVolB);
236
237 //wall A
238 GeoPhysVol* WallA = wall.Build(ModTailHeight/2, (ModLength - ModHeadLength)/2, CuThick, G10Thick, copper, g10, mat_mgr);
239
240 GeoTrf::Translation3D WallAPos((ModHeight - ModTailHeight)/2 , (ReducedModWidth + WallThick)/2, -ModHeadLength/2);
241 GeoTrf::RotateX3D rmA(90.*Gaudi::Units::deg);
242 xform = new GeoTransform(GeoTrf::Transform3D(WallAPos*rmA));
243 tag = new GeoNameTag("Wall A");
244 env_bcmModPhys->add(tag);
245 env_bcmModPhys->add(xform);
246 env_bcmModPhys->add(WallA);
247
248 //wall AA
249 GeoPhysVol* WallAA = wall.Build(ModTailHeight/2, (ModLength - ModHeadLength)/2, G10Thick, CuThick, g10, copper, mat_mgr);
250
251 GeoTrf::Translation3D WallAAPos((ModHeight - ModTailHeight)/2 , -(ReducedModWidth + WallThick)/2, -ModHeadLength/2);
252 xform = new GeoTransform(GeoTrf::Transform3D(WallAAPos*rmA));
253 tag = new GeoNameTag("Wall AA");
254 env_bcmModPhys->add(tag);
255 env_bcmModPhys->add(xform);
256 env_bcmModPhys->add(WallAA);
257
258 //wall B
259 GeoPhysVol* WallB = wall.Build(ModHeight/2, ModHeadLength/2, CuThick, G10Thick, copper, g10, mat_mgr);
260
261 GeoTrf::Translation3D WallBPos(0, (ReducedModWidth + WallThick)/2, (ModLength - ModHeadLength)/2);
262 xform = new GeoTransform(GeoTrf::Transform3D(WallBPos*rmA));
263 tag = new GeoNameTag("Wall B");
264 env_bcmModPhys->add(tag);
265 env_bcmModPhys->add(xform);
266 env_bcmModPhys->add(WallB);
267
268 //wall BB
269 GeoPhysVol* WallBB = wall.Build(ModHeight/2, ModHeadLength/2, G10Thick, CuThick, g10, copper, mat_mgr);
270
271 GeoTrf::Translation3D WallBBPos(0, -(ReducedModWidth + WallThick)/2, (ModLength - ModHeadLength)/2);
272 xform = new GeoTransform(GeoTrf::Transform3D(WallBBPos*rmA));
273 tag = new GeoNameTag("Wall BB");
274 env_bcmModPhys->add(tag);
275 env_bcmModPhys->add(xform);
276 env_bcmModPhys->add(WallBB);
277
278
279 // --------------------------------------------------------------------------------------
280 // Add the BCM envelop inside the new complex encompassing volume
281 // --------------------------------------------------------------------------------------
282
283 GeoTrf::Transform3D rmEnv = GeoTrf::RotateY3D(90.*Gaudi::Units::deg)*GeoTrf::RotateZ3D(90.*Gaudi::Units::deg);
284 xform = new GeoTransform(rmEnv);
285 tag = new GeoNameTag("EnvBcmWallLog");
286 bcmModPhys->add(tag);
287 bcmModPhys->add(xform);
288 bcmModPhys->add(env_bcmModPhys);
289
290 return bcmModPhys;
291}
double length(const pvec &v)
const double width
Beam Condition Monitor module parameters.
GeoPhysVol * Build(StoredMaterialManager *mat_mgr, const BCM_ModuleParameters *parameters, MsgStream *msg)
Beam Condition Monitor wall builder.
Definition BCM_Wall.h:23
GeoPhysVol * Build(double halfX, double halfY, double thick, const std::string &logname, const GeoMaterial *material)
Definition BCM_Wall.cxx:15
This class holds one or more material managers and makes them storeable, under StoreGate.
virtual const GeoMaterial * getMaterial(const std::string &name)=0