BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
BesSCM.cc
Go to the documentation of this file.
1//---------------------------------------------------------------------------//
2//// BOOST --- BESIII Object_Oreiented Simulation Tool //
3////---------------------------------------------------------------------------//
4////Descpirtion: BES beam pipe
5////Author: Liuhm
6////Created: May 21, 2003
7////Comment:
8////---------------------------------------------------------------------------//
9////
10#include "BesSCM.hh"
11
12#include "G4Box.hh"
13#include "G4Tubs.hh"
14#include "G4Trap.hh"
15#include "G4UnionSolid.hh"
16#include "G4SubtractionSolid.hh"
17#include "G4LogicalVolume.hh"
18#include "G4VPhysicalVolume.hh"
19#include "G4ThreeVector.hh"
20#include "G4Material.hh"
21#include "G4PVPlacement.hh"
22#include "globals.hh"
23#include "G4VisAttributes.hh"
24#include "G4Color.hh"
25#include "BesSubdetector.hh"
26#include "BesSCMParameter.hh"
27#include "G4SystemOfUnits.hh"
28#include "G4PhysicalConstants.hh"
29
31{
32 scmPar = new BesSCMParameter();
33 scmPar->ReadData();
34 for(G4int i=0; i<3; i++)
35 {
36 innerCryo[i] = scmPar->getInnerCryo(i);
37 l1Adia[i] = scmPar->getL1Adia(i);
38 innerShield[i] = scmPar->getInnerShield(i);
39 l2Adia[i] = scmPar->getL2Adia(i);
40 outerShield[i] = scmPar->getOuterShield(i);
41 l3Adia[i] = scmPar->getL3Adia(i);
42 l1insu[i] = scmPar->getL1insu(i);
43 coil[i] = scmPar->getCoil(i);
44 l2insu[i] = scmPar->getL2insu(i);
45 supp[i] = scmPar->getSupp(i);
46 l4Adia[i] = scmPar->getL4Adia(i);
47 outerCryo[i] = scmPar->getOuterCryo(i);
48 }
49 for(G4int i=0; i<5; i++)
50 {
51 endShield[i] = scmPar->getEndShield(i);
52 endCoil[i] = scmPar->getEndCoil(i);
53 endCryo[i] = scmPar->getEndCryo(i);
54 rein[i] = scmPar->getRein(i);
55 }
56
57 for(G4int i=0; i<6; i++)
58 {
59 pipe1[i] = scmPar->getPipe1(i);
60 pipe2[i] = scmPar->getPipe2(i);
61 pipe3[i] = scmPar->getPipe3(i);
62 }
63
64 for(G4int i=0; i<13; i++)
65 {
66 hole[i] = scmPar->getHole(i);
67 }
68
69 logicalinnCryo = 0;
70 physicalinnCryo = 0;
71
72 logicall1Adia = 0;
73 physicall1Adia = 0;
74
75 logicalinnShield = 0;
76 physicalinnShield = 0;
77
78 logicall2Adia = 0;
79 physicall2Adia = 0;
80
81 logicaloutShield = 0;
82 physicaloutShield = 0;
83
84 logicall3Adia = 0;
85 physicall3Adia = 0;
86
87 logicalendShield = 0;
88 physicalendShield1 = 0;
89 physicalendShield2 = 0;
90
91 logicall1insu = 0;
92 physicall1insu = 0;
93
94 logicalcoil = 0;
95 physicalcoil = 0;
96
97 logicall2insu = 0;
98 physicall2insu = 0;
99
100 logicalsupp = 0;
101 physicalsupp = 0;
102
103 logicall4Adia = 0;
104 physicall4Adia = 0;
105
106 logicalendCoil = 0;
107 physicalendCoil1 = 0;
108 physicalendCoil2 = 0;
109
110 logicalouterCryo = 0;
111 physicalouterCryo = 0;
112
113 logicalendCryo = 0;
114 physicalendCryo1 = 0;
115 physicalendCryo2 = 0;
116
117 logicalrein = 0;
118 physicalrein1 = 0;
119 physicalrein2 = 0;
120
121 logicalpipe1 = 0;
122 physicalpipe1 = 0;
123
124 logicalpipe2 = 0;
125 physicalpipe2 = 0;
126
127 logicalpipe3 = 0;
128 physicalpipe3 = 0;
129
130 liquidhelium = 0;
131 Steel = 0;
132 fibre = 0;
133}
134
136{
137 G4double density, a, z,fractionmass;
138 G4int nel;
139 G4String name, symbol;
140 density = 0.1248*g/cm3;
141 a = 4.00*g/mole;
142 liquidhelium = new G4Material(name="liquidhelium",z=2.0,a,density);
143
144 density = 7.14*g/cm3;
145 a = 52.00*g/mole;
146 G4Material* Chromium = new G4Material(name="Chromium",z=24.0,a,density);
147
148 density = 7.87*g/cm3;
149 a = 55.845*g/mole;
150 G4Material* Iron = new G4Material(name="Iron",z=26.0,a,density);
151
152 density = 8.91*g/cm3;
153 a = 58.693*g/mole;
154 G4Material* Nickel = new G4Material(name="Nickel",z=28.0,a,density);
155
156 density = 7.47*g/cm3;
157 a = 54.938*g/mole;
158 G4Material* Manganese = new G4Material(name="Manganese",z=25.0,a,density);
159
160 density = 7.801*g/cm3;
161 Steel = new G4Material(name="Steel",density,nel=4);
162 Steel->AddMaterial(Iron, fractionmass = 0.69);
163 Steel->AddMaterial(Chromium, fractionmass = 0.19);
164 Steel->AddMaterial(Manganese, fractionmass = 0.02);
165 Steel->AddMaterial(Nickel, fractionmass = 0.10);
166
167 a = 12.01*g/mole;
168 G4Element* C = new G4Element(name="Carbon" ,symbol="C" , z= 6., a);
169 a = 1.01*g/mole;
170 G4Element* H = new G4Element(name="Hydrogen",symbol="H" , z= 1., a);
171 a = 16.00*g/mole;
172 G4Element* O = new G4Element(name="Oxygen" ,symbol="O" , z= 8., a);
173
174 density = 2.25*mg/cm3;
175 fibre = new G4Material(name="fibre",density,nel=3);
176 fibre->AddElement(C, fractionmass = 0.625);
177 fibre->AddElement(H, fractionmass = 0.042);
178 fibre->AddElement(O, fractionmass = 0.333);
179}
180
181void BesSCM::Construct(G4LogicalVolume* logicalbes)
182{
184
185 G4RotationMatrix* xRot = new G4RotationMatrix;
186 xRot->rotateX(90*deg);
187 //the chimney of SCM from outer to inner
188 G4Tubs* hole1 = new G4Tubs("hole1",hole[0],hole[1],hole[2]/2,0,360);
189 G4LogicalVolume* logicalhole1 = new G4LogicalVolume(hole1, Steel,"logicalhole1");
190 //G4VPhysicalVolume* physicalhole1 =
191 new G4PVPlacement(xRot,G4ThreeVector(0,(outerCryo[1]+hole[2]/2)*mm,1640*mm),logicalhole1,"physicalhole1",logicalbes,false,0);
192
193 G4Tubs* hole2 = new G4Tubs("hole2",hole[3],hole[4],hole[5]/2,0,360);
194 G4LogicalVolume* logicalhole2 = new G4LogicalVolume(hole2, Steel,"logicalhole2");
195 //G4VPhysicalVolume* physicalhole2 =
196 new G4PVPlacement(xRot,G4ThreeVector(0,(outerCryo[1]+hole[2]+hole[5]/2)*mm,1640*mm),logicalhole2,"physicalhole2",logicalbes,false,0);
197
198 G4Tubs* hole3 = new G4Tubs("hole3",hole[6],hole[7],hole[12]/2,0,360);
199 G4LogicalVolume* logicalhole3 = new G4LogicalVolume(hole3, Steel,"logicalhole3");
200 //G4VPhysicalVolume* physicalhole3 =
201 new G4PVPlacement(xRot,G4ThreeVector(0,(outerCryo[1]+hole[2]+hole[12]/2)*mm,1640*mm),logicalhole3,"physicalhole3",logicalbes,false,0);
202
203 G4Tubs* hole4 = new G4Tubs("hole4",hole[8],hole[9],hole[12]/2,0,360);
204 G4LogicalVolume* logicalhole4 = new G4LogicalVolume(hole4, G4Material::GetMaterial("Aluminium"),"logicalhole4");
205 //G4VPhysicalVolume* physicalhole4 =
206 new G4PVPlacement(xRot,G4ThreeVector(0,(l3Adia[1]+pipe2[1]+pipe2[4]+hole[12]/2)*mm,1640*mm),logicalhole4,"physicalhole4",logicalbes,false,0);
207
208 G4Box* hole5 = new G4Box("hole5",hole[10]/2,hole[11]/2,hole[12]/2);
209 G4LogicalVolume* logicalhole5 = new G4LogicalVolume(hole5, G4Material::GetMaterial("Aluminium"),"logicalhole5");
210 //G4VPhysicalVolume* physicalhole5 =
211 new G4PVPlacement(xRot,G4ThreeVector(0,(l3Adia[1]+pipe2[1]+pipe2[4]+hole[12]/2)*mm,1640*mm),logicalhole5,"physicalhole5",logicalbes,false,0);
212
213
214 G4Tubs* solidSCM_tmp = new G4Tubs("solidSCM_tmp",innerCryo[0]*mm,1700*mm,(outerCryo[2]+2*endCryo[2])/2.0*mm,0,360);
215 G4Tubs* hole_tmp1 = new G4Tubs("hole_tmp1",0,hole[1],(1700.-1617.5+2)/2.*mm,0,360);
216 G4SubtractionSolid* solidSCM = new G4SubtractionSolid("solidSCM",solidSCM_tmp,hole_tmp1,xRot,G4ThreeVector(0,(1700.+1617.5+2)/2*mm,1640*mm) );
217 logicalSCM = new G4LogicalVolume(solidSCM, G4Material::GetMaterial("Air"),"logicalSCM");
218 physicalSCM = new G4PVPlacement(0,G4ThreeVector(0,0,0),logicalSCM,"physicalSCM",logicalbes,false,0);
219
220 G4Tubs* tub1 = new G4Tubs("tub1",innerCryo[0]*mm,innerCryo[1]*mm,innerCryo[2]/2.0*mm,0,360);
221 logicalinnCryo = new G4LogicalVolume(tub1, Steel,"logicalinnCryo");
222 physicalinnCryo = new G4PVPlacement(0,G4ThreeVector(0,0,0),logicalinnCryo,"physicalinnCryo",logicalSCM,false,0);
223
224 G4Tubs* tub2 = new G4Tubs("tub2",l1Adia[0]*mm,l1Adia[1]*mm,l1Adia[2]/2.0*mm,0,360);
225 logicall1Adia = new G4LogicalVolume(tub2, fibre,"logicall1Adia");
226 physicall1Adia = new G4PVPlacement(0,G4ThreeVector(0,0,0),logicall1Adia,"physicall1Adia",logicalSCM,false,0);
227
228 G4Tubs* tub3 = new G4Tubs("tub3",innerShield[0]*mm,innerShield[1]*mm,innerShield[2]/2.0*mm,0,360);
229 logicalinnShield = new G4LogicalVolume(tub3, G4Material::GetMaterial("Aluminium"),"logicalinnShield");
230 physicalinnShield = new G4PVPlacement(0,G4ThreeVector(0,0,0),logicalinnShield,"physicalinnShield",logicalSCM,false,0);
231
232 G4Tubs* tub4 = new G4Tubs("tub4",l2Adia[0]*mm,l2Adia[1]*mm,l2Adia[2]/2.0*mm,0,360);
233 logicall2Adia = new G4LogicalVolume(tub4, fibre,"logicall2Adia");
234 physicall2Adia = new G4PVPlacement(0,G4ThreeVector(0,0,0),logicall2Adia,"physicall2Adia",logicalSCM,false,0);
235
236 G4Tubs* hole_tmp3 = new G4Tubs("hole_tmp3",0,hole[8]*mm,25*mm,0,360);
237 G4Tubs* tub5_tmp = new G4Tubs("tub5_tmp",outerShield[0]*mm,outerShield[1]*mm,outerShield[2]/2.0*mm,0,360);
238 G4SubtractionSolid* tub5 = new G4SubtractionSolid("tub5",tub5_tmp,hole_tmp3,xRot,G4ThreeVector(0,(outerShield[0]+outerShield[1])/2*mm,1640*mm) );
239 logicaloutShield = new G4LogicalVolume(tub5, G4Material::GetMaterial("Aluminium"),"logicaloutShield");
240 physicaloutShield = new G4PVPlacement(0,G4ThreeVector(0,0,0),logicaloutShield,"physicaloutShield",logicalSCM,false,0);
241
242 G4Tubs* tub6_tmp = new G4Tubs("tub6_tmp",l3Adia[0]*mm,l3Adia[1]*mm,l3Adia[2]/2.0*mm,0,360);
243 G4SubtractionSolid* tub6 = new G4SubtractionSolid("tub6",tub6_tmp,hole_tmp3,xRot,G4ThreeVector(0,(l3Adia[0]+l3Adia[1])/2*mm,1640*mm) );
244 logicall3Adia = new G4LogicalVolume(tub6, fibre,"logicall3Adia");
245 physicall3Adia = new G4PVPlacement(0,G4ThreeVector(0,0,0),logicall3Adia,"physicall3Adia",logicalSCM,false,0);
246
247 G4Tubs* tub7 = new G4Tubs("tub7",endShield[0]*mm,endShield[1]*mm,endShield[2]/2.0*mm,0,360);
248 logicalendShield = new G4LogicalVolume(tub7, G4Material::GetMaterial("Aluminium"),"logicalendShield");
249 physicalendShield1 = new G4PVPlacement(0,G4ThreeVector(0,0,endShield[3]*mm),logicalendShield,"physicalendShield1",logicalSCM,false,0);
250 physicalendShield2 = new G4PVPlacement(0,G4ThreeVector(0,0,endShield[4]*mm),logicalendShield,"physicalendShield2",logicalSCM,false,1);
251
252 G4Tubs* tub8 = new G4Tubs("tub8",l1insu[0]*mm,l1insu[1]*mm,l1insu[2]/2.0*mm,0,360);
253 logicall1insu = new G4LogicalVolume(tub8, fibre,"logicall1insu");
254 physicall1insu = new G4PVPlacement(0,G4ThreeVector(0,0,0),logicall1insu,"physicall1insu",logicalSCM,false,0);
255
256 G4Tubs* tub9 = new G4Tubs("tub9",coil[0]*mm,coil[1]*mm,coil[2]/2.0*mm,0,360);
257 logicalcoil = new G4LogicalVolume(tub9, G4Material::GetMaterial("Aluminium"),"logicalcoil");
258 physicalcoil = new G4PVPlacement(0,G4ThreeVector(0,0,0),logicalcoil,"physicalcoil",logicalSCM,false,0);
259
260 G4Tubs* tub10 = new G4Tubs("tub10",l2insu[0]*mm,l2insu[1]*mm,l2insu[2]/2.0*mm,0,360);
261 logicall2insu = new G4LogicalVolume(tub10, fibre,"logicall2insu");
262 physicall2insu = new G4PVPlacement(0,G4ThreeVector(0,0,0),logicall2insu,"physicall2insu",logicalSCM,false,0);
263
264 G4Tubs* tub11 = new G4Tubs("tub11",supp[0]*mm,supp[1]*mm,supp[2]/2.0*mm,0,360);
265 logicalsupp = new G4LogicalVolume(tub11, G4Material::GetMaterial("Aluminium"),"logicalsupp");
266 physicalsupp = new G4PVPlacement(0,G4ThreeVector(0,0,0),logicalsupp,"physicalsupp",logicalSCM,false,0);
267
268 G4Tubs* tub12 = new G4Tubs("tub12",l4Adia[0]*mm,l4Adia[1]*mm,l4Adia[2]/2.0*mm,0,360);
269 logicall4Adia = new G4LogicalVolume(tub12, fibre,"logicall4Adia");
270 physicall4Adia = new G4PVPlacement(0,G4ThreeVector(0,0,0),logicall4Adia,"physicall4Adia",logicalSCM,false,0);
271
272 G4Tubs* tub13 = new G4Tubs("tub13",endCoil[0]*mm,endCoil[1]*mm,endCoil[2]/2.0*mm,0,360);
273 logicalendCoil = new G4LogicalVolume(tub13, G4Material::GetMaterial("Aluminium"),"logicalendCoil");
274 physicalendCoil1 = new G4PVPlacement(0,G4ThreeVector(0,0,endCoil[3]*mm),logicalendCoil,"physicalendCoil1",logicalSCM,false,0);
275 physicalendCoil2 = new G4PVPlacement(0,G4ThreeVector(0,0,endCoil[4]*mm),logicalendCoil,"physicalendCoil2",logicalSCM,false,1);
276
277 G4Tubs* hole_tmp2 = new G4Tubs("hole_tmp2",0,hole[1],18*mm,0,360);
278 G4Tubs* tub14_tmp = new G4Tubs("tub14_tmp",outerCryo[0]*mm,outerCryo[1]*mm,outerCryo[2]/2.0*mm,0,360);
279 G4SubtractionSolid* tub14 = new G4SubtractionSolid("tub14",tub14_tmp,hole_tmp2,xRot,G4ThreeVector(0,(outerCryo[1]-8)*mm,1640*mm) );
280 logicalouterCryo = new G4LogicalVolume(tub14, Steel,"logicalouterCryo");
281 physicalouterCryo = new G4PVPlacement(0,G4ThreeVector(0,0,0),logicalouterCryo,"physicalouterCryo",logicalSCM,false,0);
282
283 G4Tubs* tub15 = new G4Tubs("tub15",endCryo[0]*mm,endCryo[1]*mm,endCryo[2]/2.0*mm,0,360);
284 logicalendCryo = new G4LogicalVolume(tub15, Steel,"logicalendCryo");
285 physicalendCryo1 = new G4PVPlacement(0,G4ThreeVector(0,0,endCryo[3]*mm),logicalendCryo,"physicalendCryo1",logicalSCM,false,0);
286 physicalendCryo2 = new G4PVPlacement(0,G4ThreeVector(0,0,endCryo[4]*mm),logicalendCryo,"physicalendCryo2",logicalSCM,false,1);
287/*
288 G4Trap* trap = new G4Trap("trap",rein[2]/2.0*mm,0,0,rein[1]/2*mm,rein[1]*std::tan(pi/8)*mm,2,0,rein[1]/2*mm,rein[1]*std::tan(pi/8)*mm,2,0);
289 G4Tubs* tub16 = new G4Tubs("tub16",0,outerCryo[1]*mm,(rein[2]/2.0+3)*mm,0,360);
290
291 G4SubtractionSolid* solidrein = new G4SubtractionSolid("solidrein",trap,tub16,0,G4ThreeVector(0,847.5*mm,0) );
292 logicalrein = new G4LogicalVolume(solidrein, Steel,"logicalrein");
293
294 for(int i=0; i<8; i++)
295 {
296 std::ostringstream osnamerein;
297 osnamerein << "physicalrein1_"<<i;
298 G4RotationMatrix* zRot = new G4RotationMatrix;
299 zRot->rotateZ(45*i*deg);
300 physicalrein1 = new G4PVPlacement(zRot,G4ThreeVector(-rein[1]/2*std::sin(pi/4*i)*mm,-rein[1]/2*std::cos(pi/4*i)*mm,rein[3]*mm),logicalrein,osnamerein.str(),logicalSCM,false,i);
301 }
302 for(G4int i=0; i<4; i++)
303 {
304 std::ostringstream osnamerein;
305 osnamerein << "physicalrein2_"<<i;
306 G4RotationMatrix* zRot = new G4RotationMatrix;
307 zRot->rotateZ(45*i*deg);
308 physicalrein2 = new G4PVPlacement(zRot,G4ThreeVector(-rein[1]/2*std::sin(pi/4*i)*mm,-rein[1]/2*std::cos(pi/4*i)*mm,rein[4]*mm),logicalrein,osnamerein.str(),logicalSCM,false,8+i);
309 }
310
311 for(G4int i=5; i<8; i++)
312 {
313 std::ostringstream osnamerein;
314 osnamerein << "physicalrein2_"<<i;
315 G4RotationMatrix* zRot = new G4RotationMatrix;
316 zRot->rotateZ(45*i*deg);
317 physicalrein2 = new G4PVPlacement(zRot,G4ThreeVector(-rein[1]/2*std::sin(pi/4*i)*mm,-rein[1]/2*std::cos(pi/4*i)*mm,rein[4]*mm),logicalrein,osnamerein.str(),logicalSCM,false,8+i);
318 }
319*/
320 //pipe of inner 77k
321 G4Box* solidpipe1 = new G4Box("solidpipe1",pipe1[2]/2*mm,(pipe1[1]+pipe1[4])/2*mm,pipe1[5]/2*mm);
322 logicalpipe1 = new G4LogicalVolume(solidpipe1, G4Material::GetMaterial("Air"),"logicalpipe1");
323 G4Tubs* tub17 = new G4Tubs("tub17",pipe1[0]*mm,pipe1[1]*mm,pipe1[5]/2*mm,0,360);
324 G4Tubs* tub18 = new G4Tubs("tub18",0,pipe1[1]*mm,pipe1[5]/2*mm,0,360);
325 G4Tubs* tub19 = new G4Tubs("tub19",0,pipe1[0]*mm,pipe1[5]/2*mm,0,360);
326 G4Box* solidbox1 = new G4Box("solidbox1",pipe1[2]/2*mm,pipe1[3]/2*mm,pipe1[5]/2*mm);
327 G4SubtractionSolid* solidsub1 = new G4SubtractionSolid("solidsub1",solidbox1,tub18,0,G4ThreeVector(0,(pipe1[4]-pipe1[3]/2)*mm,0) );
328 G4LogicalVolume* logicalsub1 = new G4LogicalVolume(solidsub1, G4Material::GetMaterial("Aluminium"),"logicalsub1");
329 G4LogicalVolume* logicaltub17 = new G4LogicalVolume(tub17, G4Material::GetMaterial("Aluminium"),"logicaltub17");
330 G4LogicalVolume* logicaltub19 = new G4LogicalVolume(tub19,liquidhelium,"logicaltub19");
331 //G4VPhysicalVolume* physicaltub17 =
332 new G4PVPlacement(0,G4ThreeVector(0,0,0),logicaltub17,"physicaltub17",logicalpipe1,false,0);
333 //G4VPhysicalVolume* physicaltub19 =
334 new G4PVPlacement(0,G4ThreeVector(0,0,0),logicaltub19,"physicaltub19",logicalpipe1,false,0);
335 //G4VPhysicalVolume* physicalsub1 =
336 new G4PVPlacement(0,G4ThreeVector(0,-(pipe1[4]-pipe1[3]/2)*mm,0),logicalsub1,"physicalsub1",logicalpipe1,false,0);
337 for(G4int i=0; i<24; i++)
338 {
339 std::ostringstream osnamerein;
340 osnamerein << "physicalpipe1_"<<i;
341 G4RotationMatrix* zRot = new G4RotationMatrix;
342 zRot->rotateZ(15*i*deg);
343 //pipe of inner 77k
344 physicalpipe1=new G4PVPlacement(zRot,G4ThreeVector(-(std::sqrt(innerShield[0]*innerShield[0]-pipe1[2]/2*pipe1[2]/2)-
345 (pipe1[1]+pipe1[4])/2)*std::sin(15*pi/180*i)*mm,-(std::sqrt(innerShield[0]*innerShield[0]-
346 pipe1[2]/2*pipe1[2]/2)-(pipe1[1]+pipe1[4])/2)*std::cos(15*pi/180*i)*mm,0),
347 logicalpipe1,osnamerein.str(),logicalSCM,false,0);
348 }
349 //pipe of outer 77k
350 G4Box* solidpipe2 = new G4Box("solidpipe2",pipe2[2]/2*mm,(pipe2[1]+pipe2[4])/2*mm,pipe2[5]/2*mm);
351 logicalpipe2 = new G4LogicalVolume(solidpipe2,G4Material::GetMaterial("Air"),"logicalpipe2");
352 G4Tubs* tub20 = new G4Tubs("tub20",pipe2[0]*mm,pipe2[1]*mm,pipe2[5]/2*mm,0,360);
353 G4Tubs* tub21 = new G4Tubs("tub21",0,pipe2[1]*mm,pipe2[5]/2*mm,0,360);
354 G4Tubs* tub22 = new G4Tubs("tub22",0,pipe2[0]*mm,pipe2[5]/2*mm,0,360);
355 G4Box* solidbox2 = new G4Box("solidbox2",pipe2[2]/2*mm,pipe2[3]/2*mm,pipe2[5]/2*mm);
356 G4SubtractionSolid* solidsub2 = new G4SubtractionSolid("solidsub2",solidbox2,tub21,0,G4ThreeVector(0,(pipe2[4]-pipe2[3]/2)*mm,0) );
357 G4LogicalVolume* logicalsub2 = new G4LogicalVolume(solidsub2,G4Material::GetMaterial("Aluminium"),"logicalsub2");
358 G4LogicalVolume* logicaltub20 = new G4LogicalVolume(tub20,G4Material::GetMaterial("Aluminium"),"logicaltub20");
359 G4LogicalVolume* logicaltub22 = new G4LogicalVolume(tub22,liquidhelium,"logicaltub22");
360 //G4VPhysicalVolume* physicaltub20 =
361 new G4PVPlacement(0,G4ThreeVector(0,0,0),logicaltub20,"physicaltub20",logicalpipe2,false,0);
362 //G4VPhysicalVolume* physicaltub22 =
363 new G4PVPlacement(0,G4ThreeVector(0,0,0),logicaltub22,"physicaltub22",logicalpipe2,false,0);
364 //G4VPhysicalVolume* physicalsub2 =
365 new G4PVPlacement(0,G4ThreeVector(0,-(pipe2[4]-pipe2[3]/2)*mm,0),logicalsub2,"physicalsub2",logicalpipe2,false,0);
366 for(G4int i=0; i<24; i++)
367 {
368 std::ostringstream osnamerein;
369 osnamerein << "physicalpipe2_"<<i;
370 G4RotationMatrix* zRot = new G4RotationMatrix;
371 zRot->rotateZ(15*i*deg);
372 physicalpipe2= new G4PVPlacement(zRot,G4ThreeVector(-(l3Adia[1]+(pipe2[1]+pipe2[4])/2)*std::sin(15*pi/180*i)*mm,
373 -(l3Adia[1]+(pipe2[1]+pipe2[4])/2)*std::cos(15*pi/180*i)*mm,0),logicalpipe2,osnamerein.str(),
374 logicalSCM,false,0);
375 }
376
377 //pipe of 4k
378 G4Box* solidpipe3 = new G4Box("solidpipe3",pipe3[2]/2*mm,(pipe3[1]+pipe3[4])/2*mm,pipe3[5]/2*mm);
379 logicalpipe3 = new G4LogicalVolume(solidpipe3,G4Material::GetMaterial("Air"),"logicalpipe3");
380 G4Tubs* tub23 = new G4Tubs("tub23",pipe3[0]*mm,pipe3[1]*mm,pipe3[5]/2*mm,0,360);
381 G4Tubs* tub24 = new G4Tubs("tub24",0,pipe3[1]*mm,pipe3[5]/2*mm,0,360);
382 G4Tubs* tub25 = new G4Tubs("tub25",0,pipe3[0]*mm,pipe3[5]/2*mm,0,360);
383 G4Box* solidbox3 = new G4Box("solidbox3",pipe3[2]/2*mm,pipe3[3]/2*mm,pipe3[5]/2*mm);
384 G4SubtractionSolid* solidsub3 = new G4SubtractionSolid("solidsub3",solidbox3,tub24,0,G4ThreeVector(0,(pipe3[4]-pipe3[3]/2)*mm,0));
385 G4LogicalVolume* logicalsub3 = new G4LogicalVolume(solidsub3,G4Material::GetMaterial("Aluminium"),"logicalsub3");
386 G4LogicalVolume* logicaltub23 = new G4LogicalVolume(tub23,G4Material::GetMaterial("Aluminium"),"logicaltub23");
387 G4LogicalVolume* logicaltub25 = new G4LogicalVolume(tub25,liquidhelium,"logicaltub25");
388 //G4VPhysicalVolume* physicaltub23 =
389 new G4PVPlacement(0,G4ThreeVector(0,0,0),logicaltub23,"physicaltub23",logicalpipe3,false,0);
390 //G4VPhysicalVolume* physicaltub25 =
391 new G4PVPlacement(0,G4ThreeVector(0,0,0),logicaltub25,"physicaltub25",logicalpipe3,false,0);
392 //G4VPhysicalVolume* physicalsub3 =
393 new G4PVPlacement(0,G4ThreeVector(0,-(pipe3[4]-pipe3[3]/2)*mm,0),logicalsub3,"physicalsub3",logicalpipe3,false,0);
394 for(G4int i=0; i<24; i++)
395 {
396 std::ostringstream osnamerein;
397 osnamerein << "physicalpipe3_"<<i;
398 G4RotationMatrix* zRot = new G4RotationMatrix;
399 zRot->rotateZ(15*i*deg);
400 physicalpipe3= new G4PVPlacement(zRot,G4ThreeVector(-(l4Adia[1]+(pipe3[1]+pipe3[4])/2)*std::sin(15*pi/180*i)*mm,
401 -(l4Adia[1]+(pipe3[1]+pipe3[4])/2)*std::cos(15*pi/180*i)*mm,0),logicalpipe3,osnamerein.str(),
402 logicalSCM,false,0);
403 }
404
405 //G4VisAttributes* visSCM = new G4VisAttributes(G4Colour(1.,1.,1.));
406 G4VisAttributes* visSCM1 = new G4VisAttributes(G4Colour(0.,0.,1.));
407 logicalSCM->SetVisAttributes(visSCM1);
408 logicalinnCryo->SetVisAttributes(visSCM1);
409// logicalinnCryo->SetVisAttributes(G4VisAttributes::Invisible);
410 logicalouterCryo->SetVisAttributes(visSCM1);
411// logicalouterCryo->SetVisAttributes(G4VisAttributes::Invisible);
412 logicalendCryo->SetVisAttributes(visSCM1);
413// logicalendCryo->SetVisAttributes(G4VisAttributes::Invisible);
414 G4VisAttributes* visSCM2 = new G4VisAttributes(G4Colour(0.,1.,0.));
415 logicall1Adia->SetVisAttributes(visSCM2);
416// logicall1Adia->SetVisAttributes(G4VisAttributes::Invisible);
417 logicall2Adia->SetVisAttributes(visSCM2);
418// logicall2Adia->SetVisAttributes(G4VisAttributes::Invisible);
419 logicall3Adia->SetVisAttributes(visSCM2);
420// logicall3Adia->SetVisAttributes(G4VisAttributes::Invisible);
421 logicall4Adia->SetVisAttributes(visSCM2);
422// logicall4Adia->SetVisAttributes(G4VisAttributes::Invisible);
423 G4VisAttributes* visSCM3 = new G4VisAttributes(G4Colour(1.,0.,0.));
424 logicalinnShield->SetVisAttributes(visSCM3);
425// logicalinnShield->SetVisAttributes(G4VisAttributes::Invisible);
426 logicaloutShield->SetVisAttributes(visSCM3);
427// logicaloutShield->SetVisAttributes(G4VisAttributes::Invisible);
428 logicalendShield->SetVisAttributes(visSCM3);
429// logicalendShield->SetVisAttributes(G4VisAttributes::Invisible);
430
431 G4VisAttributes* visSCM4 = new G4VisAttributes(G4Colour(0.,1.,1.));
432 logicall1insu->SetVisAttributes(visSCM4);
433// logicall1insu->SetVisAttributes(G4VisAttributes::Invisible);
434 logicall2insu->SetVisAttributes(visSCM4);
435// logicall2insu->SetVisAttributes(G4VisAttributes::Invisible);
436 G4VisAttributes* visSCM5 = new G4VisAttributes(G4Colour(1.,0.,1.));
437 logicalcoil->SetVisAttributes(visSCM5);
438// logicalcoil->SetVisAttributes(G4VisAttributes::Invisible);
439 logicalendCoil->SetVisAttributes(visSCM5);
440// logicalendCoil->SetVisAttributes(G4VisAttributes::Invisible);
441 G4VisAttributes* visSCM6 = new G4VisAttributes(G4Colour(1.,1.,0.));
442 logicalsupp->SetVisAttributes(visSCM6);
443// logicalsupp->SetVisAttributes(G4VisAttributes::Invisible);
444// G4VisAttributes* visSCM7 = new G4VisAttributes(G4Colour(0.,0.,0.));
445// logicalrein->SetVisAttributes(G4VisAttributes::Invisible);
446// logicalpipe1->SetVisAttributes(G4VisAttributes::Invisible);
447 logicalpipe2->SetVisAttributes(visSCM2);
448// logicalpipe2->SetVisAttributes(G4VisAttributes::Invisible);
449// logicalpipe3->SetVisAttributes(G4VisAttributes::Invisible);
450 logicaltub17->SetVisAttributes(visSCM2);
451// logicaltub17->SetVisAttributes(G4VisAttributes::Invisible);
452 logicaltub19->SetVisAttributes(visSCM5);
453// logicaltub19->SetVisAttributes(G4VisAttributes::Invisible);
454 logicaltub20->SetVisAttributes(visSCM1);
455// logicaltub20->SetVisAttributes(G4VisAttributes::Invisible);
456 logicaltub22->SetVisAttributes(visSCM1);
457// logicaltub22->SetVisAttributes(G4VisAttributes::Invisible);
458 logicaltub23->SetVisAttributes(visSCM2);
459// logicaltub23->SetVisAttributes(G4VisAttributes::Invisible);
460 logicaltub25->SetVisAttributes(visSCM5);
461// logicaltub25->SetVisAttributes(G4VisAttributes::Invisible);
462 logicalsub1->SetVisAttributes(visSCM4);
463// logicalsub1->SetVisAttributes(G4VisAttributes::Invisible);
464 logicalsub2->SetVisAttributes(visSCM4);
465// logicalsub2->SetVisAttributes(G4VisAttributes::Invisible);
466
467 logicalsub3->SetVisAttributes(visSCM4);
468// logicalsub3->SetVisAttributes(G4VisAttributes::Invisible);
469 logicalhole1->SetVisAttributes(visSCM3);
470// logicalhole1->SetVisAttributes(G4VisAttributes::Invisible);
471 logicalhole2->SetVisAttributes(visSCM3);
472// logicalhole2->SetVisAttributes(G4VisAttributes::Invisible);
473 logicalhole3->SetVisAttributes(visSCM3);
474// logicalhole3->SetVisAttributes(G4VisAttributes::Invisible);
475 logicalhole4->SetVisAttributes(visSCM3);
476// logicalhole4->SetVisAttributes(G4VisAttributes::Invisible);
477 logicalhole5->SetVisAttributes(visSCM3);
478// logicalhole5->SetVisAttributes(G4VisAttributes::Invisible);
479}
***************************************************************************************Pseudo Class RRes *****************************************************************************************Parameters and physical constants **Maarten sept ************************************************************************DOUBLE PRECISION xsmu **************************************************************************PARTICLE DATA all others are from PDG *Only resonances with known widths into electron pairs are sept ************************************************************************C Declarations C
Definition: RRes.h:29
G4double getL3Adia(G4int i)
G4double getL1insu(G4int i)
G4double getPipe3(G4int i)
G4double getEndCoil(G4int i)
G4double getOuterShield(G4int i)
G4double getCoil(G4int i)
G4double getRein(G4int i)
G4double getL1Adia(G4int i)
G4double getHole(G4int i)
G4double getL2insu(G4int i)
G4double getL4Adia(G4int i)
G4double getPipe1(G4int i)
G4double getEndCryo(G4int i)
G4double getL2Adia(G4int i)
G4double getInnerCryo(G4int i)
G4double getSupp(G4int i)
G4double getInnerShield(G4int i)
G4double getOuterCryo(G4int i)
G4double getEndShield(G4int i)
G4double getPipe2(G4int i)
BesSCM()
Definition: BesSCM.cc:30
void Construct(G4LogicalVolume *logicbes)
Definition: BesSCM.cc:181
void DefineMaterial()
Definition: BesSCM.cc:135
IMPLICIT REAL *A H
Definition: myXsection.h:1
const float pi
Definition: vector3.h:133