ATLAS Offline Software
Loading...
Searching...
No Matches
BLM_Module Class Reference

Beam Loss Monitor module builder. More...

#include <BLM_Module.h>

Collaboration diagram for BLM_Module:

Public Member Functions

GeoPhysVol * Build (StoredMaterialManager *mat_mgr, const BLM_ModuleParameters *parameters, MsgStream *msg)

Detailed Description

Beam Loss Monitor module builder.

Author
Bostjan Macek bostj.nosp@m.an.m.nosp@m.acek@.nosp@m.cern.nosp@m..ch

Definition at line 21 of file BLM_Module.h.

Member Function Documentation

◆ Build()

GeoPhysVol * BLM_Module::Build ( StoredMaterialManager * mat_mgr,
const BLM_ModuleParameters * parameters,
MsgStream * msg )

Definition at line 22 of file BLM_Module.cxx.

23{
24 double CuThick = 0.015;
25 double LamelThick15 = 1;
26 double LamelThick234 = 1.4;
27
28 //module outside dimentions
29 double ModWidth = BLM_Wall::s_width;
30 double ModLength = BLM_Wall::s_holder_length;
31 double ModHeight = BLM_Wall::s_holder_height + 10*CuThick + 2*LamelThick15 + 3*LamelThick234 +2;//2 stands for screw head dimensions
32 double diamondThick = 0.5;
33 double diamondSize = 8;
34
35 //materials
36 const GeoMaterial* air = mat_mgr->getMaterial("std::Air");
37 const GeoMaterial* copper = mat_mgr->getMaterial("std::Copper");
38 const GeoMaterial* g10 = mat_mgr->getMaterial("std::G10");
39 const GeoMaterial* diamond = mat_mgr->getMaterial("pix::Diamond");
40 if(diamond == nullptr){
41 diamond = mat_mgr->getMaterial("std::Carbon");
42 }
43
44 const GeoMaterial* stainless_steel = mat_mgr->getMaterial("std::Iron");
45 const GeoMaterial* peek = mat_mgr->getMaterial("pix::Peek");
46 if(peek == nullptr){
47 if(msg) (*msg) << "BLM _ PEEK _ MISSING." << endmsg;
48 GeoMaterial* peektmp = new GeoMaterial("PEEK", 1.3*GeoModelKernelUnits::gram/Gaudi::Units::cm3);
49 GeoElement* hydrogen = new GeoElement("Hydrogen", "H", 1.0, 1.010);
50 GeoElement* oxygen = new GeoElement("Oxygen", "O", 8.0, 16.000);
51 GeoElement* carbon = new GeoElement("Carbon", "C", 6.0, 12.010);
52 peektmp->add(hydrogen, 0.042);
53 peektmp->add(oxygen, 0.167);
54 peektmp->add(carbon, 0.791);
55 peektmp->lock();
56 peek = peektmp;
57 }
58
59
60 const GeoBox* blmModBox = new GeoBox(ModWidth/2, ModHeight/2, ModLength/2);
61 const GeoLogVol* blmModLog=new GeoLogVol("blmModLog", blmModBox, air);
62 GeoPhysVol* blmModPhys = new GeoPhysVol(blmModLog);
63
64 BLM_Wall wall;
65
66 //holder
67 GeoPhysVol* holder = wall.BuildHolder(peek);
68 GeoTrf::Translate3D holderPos(0, BLM_Wall::s_holder_height-ModHeight/2-BLM_Wall::s_holder_thickness/2, 0);
69 GeoTransform* xform = new GeoTransform(GeoTrf::Transform3D(std::move(holderPos)));
70 GeoNameTag* tag = new GeoNameTag("Holder");
71 blmModPhys->add(tag);
72 blmModPhys->add(xform);
73 blmModPhys->add(holder);
74
75 //layer1
76 GeoPhysVol* layer1a = wall.BuildLayerI(CuThick, copper, false);
77 GeoPhysVol* layer1b = wall.BuildLayerI(LamelThick15, g10, false);
78 GeoPhysVol* layer1c = wall.BuildLayerI(CuThick, copper, true);
79 GeoTrf::Translate3D layer1Posa(0, BLM_Wall::s_holder_height-ModHeight/2+CuThick/2, ModLength/2-BLM_Wall::s_extended_length/2);
80 GeoTrf::Translate3D layer1Posb(0, BLM_Wall::s_holder_height-ModHeight/2+CuThick+LamelThick15/2, ModLength/2-BLM_Wall::s_extended_length/2);
81 GeoTrf::Translate3D layer1Posc(0, BLM_Wall::s_holder_height-ModHeight/2+3*CuThick/2+LamelThick15, ModLength/2-BLM_Wall::s_extended_length/2);
82 GeoTransform* yforma = new GeoTransform(GeoTrf::Transform3D(std::move(layer1Posa)));
83 GeoTransform* yformb = new GeoTransform(GeoTrf::Transform3D(std::move(layer1Posb)));
84 GeoTransform* yformc = new GeoTransform(GeoTrf::Transform3D(std::move(layer1Posc)));
85 tag = new GeoNameTag("Layer1");
86 blmModPhys->add(tag);
87 blmModPhys->add(yforma);
88 blmModPhys->add(layer1a);
89 blmModPhys->add(tag);
90 blmModPhys->add(yformb);
91 blmModPhys->add(layer1b);
92 blmModPhys->add(tag);
93 blmModPhys->add(yformc);
94 blmModPhys->add(layer1c);
95
96 //layer2
97 GeoPhysVol* layer2a = wall.BuildLayerII(CuThick, copper);
98 GeoPhysVol* layer2b = wall.BuildLayerII(LamelThick234, g10);
99 GeoPhysVol* layer2c = wall.BuildLayerII(CuThick, copper);
100 GeoTrf::Translate3D layer2Posa(0, BLM_Wall::s_holder_height-ModHeight/2+5*CuThick/2+LamelThick15, ModLength/2-BLM_Wall::s_length/2);
101 GeoTrf::Translate3D layer2Posb(0, BLM_Wall::s_holder_height-ModHeight/2+3*CuThick+LamelThick15+LamelThick234/2, ModLength/2-BLM_Wall::s_length/2);
102 GeoTrf::Translate3D layer2Posc(0, BLM_Wall::s_holder_height-ModHeight/2+7*CuThick/2+LamelThick15+LamelThick234, ModLength/2-BLM_Wall::s_length/2);
103 yforma = new GeoTransform(GeoTrf::Transform3D(std::move(layer2Posa)));
104 yformb = new GeoTransform(GeoTrf::Transform3D(std::move(layer2Posb)));
105 yformc = new GeoTransform(GeoTrf::Transform3D(std::move(layer2Posc)));
106 tag = new GeoNameTag("Layer2");
107 blmModPhys->add(tag);
108 blmModPhys->add(yforma);
109 blmModPhys->add(layer2a);
110 blmModPhys->add(tag);
111 blmModPhys->add(yformb);
112 blmModPhys->add(layer2b);
113 blmModPhys->add(tag);
114 blmModPhys->add(yformc);
115 blmModPhys->add(layer2c);
116
117 //layer3
118 GeoPhysVol* layer3a = wall.BuildLayerIII(CuThick, copper);
119 GeoPhysVol* layer3b = wall.BuildLayerIII(LamelThick234, g10);
120 GeoPhysVol* layer3c = wall.BuildLayerIII(CuThick, copper);
121 GeoTrf::Translate3D layer3Posa(0, BLM_Wall::s_holder_height-ModHeight/2+9*CuThick/2+LamelThick15+LamelThick234, ModLength/2-BLM_Wall::s_length/2);
122 GeoTrf::Translate3D layer3Posb(0, BLM_Wall::s_holder_height-ModHeight/2+5*CuThick+LamelThick15+3*LamelThick234/2, ModLength/2-BLM_Wall::s_length/2);
123 GeoTrf::Translate3D layer3Posc(0, BLM_Wall::s_holder_height-ModHeight/2+11*CuThick/2+LamelThick15+2*LamelThick234, ModLength/2-BLM_Wall::s_length/2);
124 yforma = new GeoTransform(GeoTrf::Transform3D(std::move(layer3Posa)));
125 yformb = new GeoTransform(GeoTrf::Transform3D(std::move(layer3Posb)));
126 yformc = new GeoTransform(GeoTrf::Transform3D(std::move(layer3Posc)));
127 tag = new GeoNameTag("Layer3");
128 blmModPhys->add(tag);
129 blmModPhys->add(yforma);
130 blmModPhys->add(layer3a);
131 blmModPhys->add(tag);
132 blmModPhys->add(yformb);
133 blmModPhys->add(layer3b);
134 blmModPhys->add(tag);
135 blmModPhys->add(yformc);
136 blmModPhys->add(layer3c);
137
138 //layer4
139 GeoPhysVol* layer4a = wall.BuildLayerIV(CuThick, copper);
140 GeoPhysVol* layer4b = wall.BuildLayerIV(LamelThick234, g10);
141 GeoPhysVol* layer4c = wall.BuildLayerIV(CuThick, copper);
142 GeoTrf::Translate3D layer4Posa(0, BLM_Wall::s_holder_height-ModHeight/2+13*CuThick/2+LamelThick15+2*LamelThick234, ModLength/2-BLM_Wall::s_length/2);
143 GeoTrf::Translate3D layer4Posb(0, BLM_Wall::s_holder_height-ModHeight/2+7*CuThick+LamelThick15+5*LamelThick234/2, ModLength/2-BLM_Wall::s_length/2);
144 GeoTrf::Translate3D layer4Posc(0, BLM_Wall::s_holder_height-ModHeight/2+15*CuThick/2+LamelThick15+3*LamelThick234, ModLength/2-BLM_Wall::s_length/2);
145 yforma = new GeoTransform(GeoTrf::Transform3D(std::move(layer4Posa)));
146 yformb = new GeoTransform(GeoTrf::Transform3D(std::move(layer4Posb)));
147 yformc = new GeoTransform(GeoTrf::Transform3D(std::move(layer4Posc)));
148 tag = new GeoNameTag("Layer4");
149 blmModPhys->add(tag);
150 blmModPhys->add(yforma);
151 blmModPhys->add(layer4a);
152 blmModPhys->add(tag);
153 blmModPhys->add(yformb);
154 blmModPhys->add(layer4b);
155 blmModPhys->add(tag);
156 blmModPhys->add(yformc);
157 blmModPhys->add(layer4c);
158
159 //layer5
160 GeoPhysVol* layer5a = wall.BuildLayerV(CuThick, copper);
161 GeoPhysVol* layer5b = wall.BuildLayerV(LamelThick15, g10);
162 GeoPhysVol* layer5c = wall.BuildLayerV(CuThick, copper);
163 GeoTrf::Translate3D layer5Posa(0, BLM_Wall::s_holder_height-ModHeight/2+17*CuThick/2+LamelThick15+3*LamelThick234, ModLength/2-BLM_Wall::s_length/2);
164 GeoTrf::Translate3D layer5Posb(0, BLM_Wall::s_holder_height-ModHeight/2+9*CuThick+3*LamelThick15/2+3*LamelThick234, ModLength/2-BLM_Wall::s_length/2);
165 GeoTrf::Translate3D layer5Posc(0, BLM_Wall::s_holder_height-ModHeight/2+19*CuThick/2+2*LamelThick15+3*LamelThick234, ModLength/2-BLM_Wall::s_length/2);
166 yforma = new GeoTransform(GeoTrf::Transform3D(std::move(layer5Posa)));
167 yformb = new GeoTransform(GeoTrf::Transform3D(std::move(layer5Posb)));
168 yformc = new GeoTransform(GeoTrf::Transform3D(std::move(layer5Posc)));
169 tag = new GeoNameTag("Layer5");
170 blmModPhys->add(tag);
171 blmModPhys->add(yforma);
172 blmModPhys->add(layer5a);
173 blmModPhys->add(tag);
174 blmModPhys->add(yformb);
175 blmModPhys->add(layer5b);
176 blmModPhys->add(tag);
177 blmModPhys->add(yformc);
178 blmModPhys->add(layer5c);
179
180 //screws
181 GeoPhysVol* screw1 = wall.BuildScrew(10, stainless_steel);
182 GeoPhysVol* screw2 = wall.BuildScrew(10, stainless_steel);
183 GeoPhysVol* screw3 = wall.BuildScrew(10, stainless_steel);
184 GeoPhysVol* screw4 = wall.BuildScrew(10, stainless_steel);
185 GeoPhysVol* screw5 = wall.BuildScrew(10, stainless_steel);
186 GeoPhysVol* screw6 = wall.BuildScrew(10, stainless_steel);
187 GeoPhysVol* screw7 = wall.BuildScrew(BLM_Wall::s_holder_thickness, stainless_steel);
188 GeoPhysVol* screw8 = wall.BuildScrew(BLM_Wall::s_holder_thickness, stainless_steel);
189 GeoTrf::RotateX3D screwRot(90.*Gaudi::Units::deg);
190 GeoTrf::RotateX3D screwRot1(180.*Gaudi::Units::deg);
191 GeoTrf::Translation3D screwPos1(ModWidth/2-BLM_Wall::s_hole_position, BLM_Wall::s_holder_height-ModHeight/2+10*CuThick+2*LamelThick15+3*LamelThick234+1, ModLength/2-BLM_Wall::s_hole_position);
192 GeoTrf::Translation3D screwPos2(BLM_Wall::s_hole_position-ModWidth/2, BLM_Wall::s_holder_height-ModHeight/2+10*CuThick+2*LamelThick15+3*LamelThick234+1, ModLength/2-BLM_Wall::s_hole_position);
193 GeoTrf::Translation3D screwPos3(ModWidth/2-BLM_Wall::s_hole_position, BLM_Wall::s_holder_height-ModHeight/2+10*CuThick+2*LamelThick15+3*LamelThick234+1, ModLength/2-BLM_Wall::s_length+BLM_Wall::s_hole_position);
194 GeoTrf::Translation3D screwPos4(BLM_Wall::s_hole_position-ModWidth/2, BLM_Wall::s_holder_height-ModHeight/2+10*CuThick+2*LamelThick15+3*LamelThick234+1, ModLength/2-BLM_Wall::s_length+BLM_Wall::s_hole_position);
195 GeoTrf::Translation3D screwPos5(ModWidth/2-BLM_Wall::s_hole_position, BLM_Wall::s_holder_height-ModHeight/2+10*CuThick+2*LamelThick15+3*LamelThick234+1, ModLength/2-BLM_Wall::s_extended_length+2.1);
196 GeoTrf::Translation3D screwPos6(BLM_Wall::s_hole_position-ModWidth/2, BLM_Wall::s_holder_height-ModHeight/2+10*CuThick+2*LamelThick15+3*LamelThick234+1, ModLength/2-BLM_Wall::s_extended_length+2.1);
197 GeoTrf::Translation3D screwPos7(ModWidth/2-BLM_Wall::s_hole_position, 3.5-ModHeight/2, BLM_Wall::s_holder_thickness-ModLength/2+1);
198 GeoTrf::Translation3D screwPos8(BLM_Wall::s_hole_position-ModWidth/2, 3.5-ModHeight/2, BLM_Wall::s_holder_thickness-ModLength/2+1);
199 GeoTransform* xform1 = new GeoTransform(GeoTrf::Transform3D(screwPos1*screwRot));
200 GeoTransform* xform2 = new GeoTransform(GeoTrf::Transform3D(screwPos2*screwRot));
201 GeoTransform* xform3 = new GeoTransform(GeoTrf::Transform3D(screwPos3*screwRot));
202 GeoTransform* xform4 = new GeoTransform(GeoTrf::Transform3D(screwPos4*screwRot));
203 GeoTransform* xform5 = new GeoTransform(GeoTrf::Transform3D(screwPos5*screwRot));
204 GeoTransform* xform6 = new GeoTransform(GeoTrf::Transform3D(screwPos6*screwRot));
205 GeoTransform* xform7 = new GeoTransform(GeoTrf::Transform3D(screwPos7*screwRot1));
206 GeoTransform* xform8 = new GeoTransform(GeoTrf::Transform3D(screwPos8*screwRot1));
207 tag = new GeoNameTag("Screw");
208 blmModPhys->add(tag);
209 blmModPhys->add(xform1);
210 blmModPhys->add(screw1);
211 blmModPhys->add(tag);
212 blmModPhys->add(xform2);
213 blmModPhys->add(screw2);
214 blmModPhys->add(tag);
215 blmModPhys->add(xform3);
216 blmModPhys->add(screw3);
217 blmModPhys->add(tag);
218 blmModPhys->add(xform4);
219 blmModPhys->add(screw4);
220 blmModPhys->add(tag);
221 blmModPhys->add(xform5);
222 blmModPhys->add(screw5);
223 blmModPhys->add(tag);
224 blmModPhys->add(xform6);
225 blmModPhys->add(screw6);
226 blmModPhys->add(tag);
227 blmModPhys->add(xform7);
228 blmModPhys->add(screw7);
229 blmModPhys->add(tag);
230 blmModPhys->add(xform8);
231 blmModPhys->add(screw8);
232
233 //clamp
234 GeoPhysVol* clamp = wall.BuildClamp(g10);
235 GeoTrf::Translate3D clampPos(0, BLM_Wall::s_holder_height-ModHeight/2+10*CuThick+2*LamelThick15+3*LamelThick234-BLM_Wall::s_clamp_thickness/2, ModLength/2-BLM_Wall::s_extended_length+2.1+2.5-BLM_Wall::s_clamp_length/2);
236 yforma = new GeoTransform(GeoTrf::Transform3D(std::move(clampPos)));
237 tag = new GeoNameTag("Clamp");
238 blmModPhys->add(tag);
239 blmModPhys->add(yforma);
240 blmModPhys->add(clamp);
241
242 //diamond//blmDiamondLog
243 GeoPhysVol* DiamondVol = wall.BuildBlock(8, diamondThick, diamondSize, "blmDiamondLog", diamond);
244 GeoTrf::Translate3D DiamondPos(parameters->DiamondPosition_X(), BLM_Wall::s_holder_height-ModHeight/2+CuThick+LamelThick15+diamondThick/2, ModLength/2-diamondSize/2-5+parameters->DiamondPosition_Z());
245 xform = new GeoTransform(GeoTrf::Transform3D(std::move(DiamondPos)));
246 tag = new GeoNameTag("Diamond");
247 blmModPhys->add(tag);
248 blmModPhys->add(new GeoIdentifierTag(2009));
249 blmModPhys->add(xform);
250 blmModPhys->add(DiamondVol);
251
252 return blmModPhys;
253}
#define endmsg
static constexpr double s_width
Definition BLM_Wall.h:33
GeoPhysVol * BuildLayerIV(double thick, const GeoMaterial *material)
Definition BLM_Wall.cxx:248
GeoPhysVol * BuildLayerII(double thick, const GeoMaterial *material)
Definition BLM_Wall.cxx:180
GeoPhysVol * BuildLayerV(double thick, const GeoMaterial *material)
Definition BLM_Wall.cxx:278
GeoPhysVol * BuildClamp(const GeoMaterial *material)
Definition BLM_Wall.cxx:15
static constexpr double s_clamp_thickness
Definition BLM_Wall.h:44
GeoPhysVol * BuildScrew(double length, const GeoMaterial *material)
Definition BLM_Wall.cxx:46
static constexpr double s_holder_height
Definition BLM_Wall.h:39
static constexpr double s_extended_length
Definition BLM_Wall.h:35
static constexpr double s_holder_thickness
Definition BLM_Wall.h:42
GeoPhysVol * BuildLayerIII(double thick, const GeoMaterial *material)
Definition BLM_Wall.cxx:221
GeoPhysVol * BuildHolder(const GeoMaterial *material)
Definition BLM_Wall.cxx:60
static constexpr double s_clamp_length
Definition BLM_Wall.h:43
static constexpr double s_holder_length
Definition BLM_Wall.h:38
GeoPhysVol * BuildBlock(double X, double Y, double Z, const std::string &logname, const GeoMaterial *material)
Definition BLM_Wall.cxx:37
GeoPhysVol * BuildLayerI(double thick, const GeoMaterial *material, bool hole)
Definition BLM_Wall.cxx:106
static constexpr double s_hole_position
Definition BLM_Wall.h:37
static constexpr double s_length
Definition BLM_Wall.h:34
virtual const GeoMaterial * getMaterial(const std::string &name)=0
MsgStream & msg
Definition testRead.cxx:32

The documentation for this class was generated from the following files: