13#include "BesTofConstruction.hh"
14#include "BesTofGeoParameter.hh"
16#include "ReadBoostRoot.hh"
17#include "G4Material.hh"
24#include "G4UnionSolid.hh"
25#include "G4SubtractionSolid.hh"
26#include "G4IntersectionSolid.hh"
28#include "G4LogicalVolume.hh"
29#include "G4Transform3D.hh"
30#include "G4PVPlacement.hh"
31#include "G4AssemblyVolume.hh"
32#include "G4SDManager.hh"
33#include "G4UnitsTable.hh"
36#include "G4VisAttributes.hh"
37#include "G4UnionSolid.hh"
38#include "G4Geo/TofG4Geo.h"
39#include "G4Geo/MRPCG4Geo.h"
43#include "G4UserLimits.hh"
46#include "G4ProductionCuts.hh"
78 physicalBucket1Br1 = 0;
79 physicalBucket2Br1 = 0;
80 physicalBucket1Br2 = 0;
81 physicalBucket2Br2 = 0;
83 logicalScinEcWest = 0;
84 logicalScinEcEast = 0;
85 physicalScinEcWest = 0;
86 physicalScinEcEast = 0;
95 physicalPVFEcWest = 0;
96 physicalPVFEcEast = 0;
108 logical_assembly_west_1=0;
109 logical_pcboard_west_1=0;
110 logical_sensitive_detector_west_1=0;
111 logical_electrodes_west_1=0;
112 logical_glass_layer_west_1=0;
113 logical_readoutstrips_012_west_1=0;
114 logical_honeycomb_west_1=0;
115 logical_gascontainer_3_west_1=0;
116 logical_gaslayer_tot_west_1=0;
117 logical_mylarlayer_west_1=0;
120 physical_gascontainer_3_west_1=0;
121 physical_pcboard_west_1=0;
122 physical_sensitive_detector_west_1=0;
123 physical_glass_layer_west_1=0;
124 physical_electrodes_west_1=0;
125 physical_readoutstrips_012_west_1=0;
126 physical_honeycomb_1_west_1=0;
127 physical_honeycomb_2_west_1=0;
128 physical_gaslayer_tot_west_1=0;
129 physical_mylarlayer_west_1=0;
132 logical_gascontainer_3_west_2=0;
133 logical_assembly_west_2=0;
134 logical_pcboard_west_2=0;
135 logical_sensitive_detector_west_2=0;
136 logical_electrodes_west_2=0;
137 logical_glass_layer_west_2=0;
138 logical_readoutstrips_012_west_2=0;
139 logical_honeycomb_west_2=0;
140 logical_gaslayer_tot_west_2=0;
141 logical_mylarlayer_west_2=0;
145 physical_gascontainer_3_west_2=0;
146 physical_pcboard_west_2=0;
147 physical_sensitive_detector_west_2=0;
148 physical_glass_layer_west_2=0;
149 physical_electrodes_west_2=0;
150 physical_readoutstrips_012_west_2=0;
151 physical_honeycomb_1_west_2=0;
152 physical_honeycomb_2_west_2=0;
153 physical_gaslayer_tot_west_2=0;
154 physical_mylarlayer_west_2=0;
157 logical_assembly_east_1=0;
158 logical_pcboard_east_1=0;
159 logical_sensitive_detector_east_1=0;
160 logical_electrodes_east_1=0;
161 logical_glass_layer_east_1=0;
162 logical_readoutstrips_012_east_1=0;
163 logical_honeycomb_east_1=0;
164 logical_gascontainer_3_east_1=0;
165 logical_gaslayer_tot_east_1=0;
166 logical_mylarlayer_east_1=0;
170 physical_gascontainer_3_east_1=0;
171 physical_pcboard_east_1=0;
172 physical_sensitive_detector_east_1=0;
173 physical_glass_layer_east_1=0;
174 physical_electrodes_east_1=0;
175 physical_readoutstrips_012_east_1=0;
176 physical_honeycomb_1_east_1=0;
177 physical_honeycomb_2_east_1=0;
178 physical_gaslayer_tot_east_1=0;
179 physical_mylarlayer_east_1=0;
183 logical_gascontainer_3_east_2=0;
184 logical_assembly_east_2=0;
185 logical_pcboard_east_2=0;
186 logical_sensitive_detector_east_2=0;
187 logical_electrodes_east_2=0;
188 logical_glass_layer_east_2=0;
189 logical_readoutstrips_012_east_2=0;
190 logical_honeycomb_east_2=0;
191 logical_gaslayer_tot_east_2=0;
192 logical_mylarlayer_east_2=0;
195 physical_gascontainer_3_east_2=0;
196 physical_pcboard_east_2=0;
197 physical_sensitive_detector_east_2=0;
198 physical_glass_layer_east_2=0;
199 physical_electrodes_east_2=0;
200 physical_readoutstrips_012_east_2=0;
201 physical_honeycomb_1_east_2=0;
202 physical_honeycomb_2_east_2=0;
203 physical_gaslayer_tot_east_2=0;
204 physical_mylarlayer_east_2=0;
207 physical_assembly_west_1=0;
208 physical_assembly_west_2=0;
209 physical_assembly_east_1=0;
210 physical_assembly_east_2=0;
239 G4cout<<
"BesTofConstruction::Construct(), logicalTof not found"<<G4endl;
242 physicalTof =
new G4PVPlacement(0,G4ThreeVector(0,0,0),
243 logicalTof,
"physicalTof",logicalBes,
false,0);
272 G4double r1=tofPara->
GetEcR1()-1;
280 G4cout<<
"Tof Volume: "<<r1<<
" "<<r2<<
" "<<r3<<
" "<<r4<<
" "<<a1<<
" "<<a2<<
" "<<a3<<G4endl;
282 G4Tubs* tub1 =
new G4Tubs(
"tub1",r1,r2,a1,0,360);
283 G4Tubs* tub2 =
new G4Tubs(
"tub2",r2-4,r4,a2,0,360);
284 G4Tubs* tub3 =
new G4Tubs(
"tub3",0,r3,a3,0,360);
285 G4UnionSolid* tub4 =
new G4UnionSolid(
"tub4",tub1,tub2,0,G4ThreeVector(0,0,0) );
286 G4SubtractionSolid* solidTof =
new G4SubtractionSolid(
"solidTof",tub4,tub3,0, G4ThreeVector(0,0,0) );
288 logicalTof =
new G4LogicalVolume(solidTof, G4Material::GetMaterial(
"Air"),
"logicalTof");
290 G4Tubs* tub5 =
new G4Tubs(
"tub5",r3,r4,a3,0,360);
291 logicalBrTof =
new G4LogicalVolume(tub5, G4Material::GetMaterial(
"Air"),
"logicalBrTof");
293 G4VPhysicalVolume* physicalBrTof =
new G4PVPlacement(0,G4ThreeVector(0,0,0),logicalBrTof,
"physicalBrTof",logicalTof,
false,0);
297 G4Tubs* tub6 =
new G4Tubs(
"tub6",r1,r4,(a2-a3)/2,0,360);
298 G4Tubs* tub7 =
new G4Tubs(
"tub7",r1,r2,(a1-a2)/2,0,360);
299 G4UnionSolid* tub8 =
new G4UnionSolid(
"tub8",tub6,tub7,0,G4ThreeVector(0,0,(a3-a1)/2));
300 logicalEcTofWest =
new G4LogicalVolume(tub8, G4Material::GetMaterial(
"Air"),
"logicalEcTofWest");
301 G4VPhysicalVolume* physicalEcTofWest =
new G4PVPlacement(0,G4ThreeVector(0,0,tofPara->
GetzPosWestEc()),logicalEcTofWest,
"physicalEcTofWest",logicalTof,
false,0);
303 G4UnionSolid* tub9 =
new G4UnionSolid(
"tub9",tub6,tub7,0,G4ThreeVector(0,0,(a1-a3)/2) );
304 logicalEcTofEast =
new G4LogicalVolume(tub9, G4Material::GetMaterial(
"Air"),
"logicalEcTofEast");
305 G4VPhysicalVolume* physicalEcTofEast =
new G4PVPlacement(0,G4ThreeVector(0,0,tofPara->
GetzPosEastEc()),logicalEcTofEast,
"physicalEcTofEast",logicalTof,
false,0);
309 physicalTof =
new G4PVPlacement(0,G4ThreeVector(0,0,0),logicalTof,
"physicalTof",logicalBes,
false,0);
319 G4Tubs* tubTape =
new G4Tubs(
"tubTape",866, 866.3, 1150, 0, 360);
320 G4LogicalVolume* logicalTape =
new G4LogicalVolume(tubTape,G4Material::GetMaterial(
"tape"),
"logicalTape");
321 G4VPhysicalVolume* physicalTape =
new G4PVPlacement(0,G4ThreeVector(0,0,0),logicalTape,
"physicalTape",logicalBrTof,
false,0);
322 logicalTape->SetVisAttributes(G4VisAttributes::Invisible);
336 G4cout<<
"BesTofConstruction::Construct(), logicalTof not found"<<G4endl;
339 physicalTof =
new G4PVPlacement(0,G4ThreeVector(0,0,0),
340 logicalTof,
"physicalTof",logicalBes,
false,0);
355 logical_sensitive_detector_east_1 =
FindLogicalVolume(
"logical_sensitive_detector_east_1");
356 logical_sensitive_detector_east_2 =
FindLogicalVolume(
"logical_sensitive_detector_east_2");
357 logical_sensitive_detector_west_1 =
FindLogicalVolume(
"logical_sensitive_detector_west_1");
358 logical_sensitive_detector_west_2 =
FindLogicalVolume(
"logical_sensitive_detector_west_2");
372 G4double r1=tofPara->
GetEcR1()-1;
380 G4cout<<
"Tof Volume: "<<r1<<
" "<<r2<<
" "<<r3<<
" "<<r4<<
" "<<a1<<
" "<<a2<<
" "<<a3<<G4endl;
382 G4Tubs* tub1 =
new G4Tubs(
"tub1",r1,r2,a1,0,360);
383 G4Tubs* tub2 =
new G4Tubs(
"tub2",r2-4,r4,a2,0,360);
384 G4Tubs* tub3 =
new G4Tubs(
"tub3",0,r3,a3,0,360);
385 G4UnionSolid* tub4 =
new G4UnionSolid(
"tub4",tub1,tub2,0,G4ThreeVector(0,0,0) );
386 G4SubtractionSolid* solidTof =
new G4SubtractionSolid(
"solidTof",tub4,tub3,0, G4ThreeVector(0,0,0) );
388 logicalTof =
new G4LogicalVolume(solidTof, G4Material::GetMaterial(
"Air"),
"logicalTof");
390 G4Tubs* tub5 =
new G4Tubs(
"tub5",r3,r4,a3,0,360);
391 logicalBrTof =
new G4LogicalVolume(tub5, G4Material::GetMaterial(
"Air"),
"logicalBrTof");
393 G4VPhysicalVolume* physicalBrTof =
new G4PVPlacement(0,G4ThreeVector(0,0,0),logicalBrTof,
"physicalBrTof",logicalTof,
false,0);
398 G4Tubs* tub6 =
new G4Tubs(
"tub6",r1,r4,(a2-a3)/2,0,360);
399 G4Tubs* tub7 =
new G4Tubs(
"tub7",r1,r2,(a1-a2)/2,0,360);
400 G4UnionSolid* tub8 =
new G4UnionSolid(
"tub8",tub6,tub7,0,G4ThreeVector(0,0,(a3-a1)/2) );
401 logicalEcTofWest =
new G4LogicalVolume(tub8, G4Material::GetMaterial(
"Air"),
"logicalEcTofWest");
402 G4VPhysicalVolume* physicalEcTofWest =
new G4PVPlacement(0,G4ThreeVector(0,0,tofPara->
GetzPosWestEc()),logicalEcTofWest,
"physicalEcTofWest",logicalTof,
false,0);
404 G4UnionSolid* tub9 =
new G4UnionSolid(
"tub9",tub6,tub7,0,G4ThreeVector(0,0,(a1-a3)/2) );
405 logicalEcTofEast =
new G4LogicalVolume(tub9, G4Material::GetMaterial(
"Air"),
"logicalEcTofEast");
406 G4VPhysicalVolume* physicalEcTofEast =
new G4PVPlacement(0,G4ThreeVector(0,0,tofPara->
GetzPosEastEc()),logicalEcTofEast,
"physicalEcTofEast",logicalTof,
false,0);
410 physicalTof =
new G4PVPlacement(0,G4ThreeVector(0,0,0),logicalTof,
"physicalTof",logicalBes,
false,0);
418 G4Tubs* tubTape =
new G4Tubs(
"tubTape",866, 866.3, 1150, 0, 360);
419 G4LogicalVolume* logicalTape =
new G4LogicalVolume(tubTape,G4Material::GetMaterial(
"tape"),
"logicalTape");
420 G4VPhysicalVolume* physicalTape =
new G4PVPlacement(0,G4ThreeVector(0,0,0),logicalTape,
"physicalTape",logicalBrTof,
false,0);
421 logicalTape->SetVisAttributes(G4VisAttributes::Invisible);
432 G4SDManager* SDman = G4SDManager::GetSDMpointer();
434 SDman->AddNewDetector(tofSD);
437 logicalScinBr1->SetSensitiveDetector(tofSD);
439 logicalScinBr2->SetSensitiveDetector(tofSD);
440 if (logicalScinEcWest)
441 logicalScinEcWest->SetSensitiveDetector(tofSD);
442 if (logicalScinEcEast)
443 logicalScinEcEast->SetSensitiveDetector(tofSD);
445 if(logical_sensitive_detector_east_1)
446 {logical_sensitive_detector_east_1->SetSensitiveDetector(tofSD); std::cout <<
"Found logical_sensitive_detector_east_1" <<std::endl;}
447 if(logical_sensitive_detector_east_2)
448 {logical_sensitive_detector_east_2->SetSensitiveDetector(tofSD);std::cout <<
"Found logical_sensitive_detector_east_2" <<std::endl;}
449 if(logical_sensitive_detector_west_1)
450 {logical_sensitive_detector_west_1->SetSensitiveDetector(tofSD);std::cout <<
"Found logical_sensitive_detector_west_1" <<std::endl;}
451 if(logical_sensitive_detector_west_2)
452 {logical_sensitive_detector_west_2->SetSensitiveDetector(tofSD);std::cout <<
"Found logical_sensitive_detector_west_2" <<std::endl;}
456 if(logical_sensitive_detector_west_1) logical_sensitive_detector_west_1->SetUserLimits (
new G4UserLimits(0.03*mm));
457 if(logical_sensitive_detector_west_2) logical_sensitive_detector_west_2->SetUserLimits (
new G4UserLimits(0.03*mm));
458 if(logical_sensitive_detector_east_1) logical_sensitive_detector_east_1->SetUserLimits (
new G4UserLimits(0.03*mm));
459 if(logical_sensitive_detector_east_2) logical_sensitive_detector_east_2->SetUserLimits (
new G4UserLimits(0.03*mm));
465 G4VisAttributes* visAttmrpc =
new G4VisAttributes(G4Colour(1.,1.,0.));
466 G4VisAttributes* visAttmrpc_2 =
new G4VisAttributes(G4Colour(1.,0.,0.));
468 if(logical_gascontainer_3_west_1) logical_gascontainer_3_west_1->SetVisAttributes(G4VisAttributes::Invisible);
469 if(logical_assembly_west_1) logical_assembly_west_1->SetVisAttributes(visAttmrpc_2) ;
470 if(logical_pcboard_west_1) logical_pcboard_west_1->SetVisAttributes(G4VisAttributes::Invisible) ;
471 if(logical_sensitive_detector_west_1) logical_sensitive_detector_west_1->SetVisAttributes(visAttmrpc);
472 if(logical_electrodes_west_1) logical_electrodes_west_1->SetVisAttributes(G4VisAttributes::Invisible);
473 if(logical_glass_layer_west_1) logical_glass_layer_west_1->SetVisAttributes(G4VisAttributes::Invisible);
474 if(logical_readoutstrips_012_west_1) logical_readoutstrips_012_west_1->SetVisAttributes(G4VisAttributes::Invisible);
475 if(logical_honeycomb_west_1) logical_honeycomb_west_1->SetVisAttributes(G4VisAttributes::Invisible);
477 if(logical_gascontainer_3_west_2) logical_gascontainer_3_west_2->SetVisAttributes(G4VisAttributes::Invisible);
478 if(logical_assembly_west_2) logical_assembly_west_2->SetVisAttributes(visAttmrpc_2) ;
479 if(logical_pcboard_west_2) logical_pcboard_west_2->SetVisAttributes(G4VisAttributes::Invisible) ;
480 if(logical_sensitive_detector_west_2) logical_sensitive_detector_west_2->SetVisAttributes(visAttmrpc);
481 if(logical_electrodes_west_2) logical_electrodes_west_2->SetVisAttributes(G4VisAttributes::Invisible);
482 if(logical_glass_layer_west_2) logical_glass_layer_west_2->SetVisAttributes(G4VisAttributes::Invisible);
483 if(logical_readoutstrips_012_west_2) logical_readoutstrips_012_west_2->SetVisAttributes(G4VisAttributes::Invisible);
484 if(logical_honeycomb_west_2) logical_honeycomb_west_2->SetVisAttributes(G4VisAttributes::Invisible);
486 if(logical_gascontainer_3_east_1) logical_gascontainer_3_east_1->SetVisAttributes(G4VisAttributes::Invisible);
487 if(logical_assembly_east_1) logical_assembly_east_1->SetVisAttributes(visAttmrpc_2) ;
488 if(logical_pcboard_east_1) logical_pcboard_east_1->SetVisAttributes(G4VisAttributes::Invisible) ;
489 if(logical_sensitive_detector_east_1) logical_sensitive_detector_east_1->SetVisAttributes(visAttmrpc);
490 if(logical_electrodes_east_1) logical_electrodes_east_1->SetVisAttributes(G4VisAttributes::Invisible);
491 if(logical_glass_layer_east_1) logical_glass_layer_east_1->SetVisAttributes(G4VisAttributes::Invisible);
492 if(logical_readoutstrips_012_east_1) logical_readoutstrips_012_east_1->SetVisAttributes(G4VisAttributes::Invisible);
493 if(logical_honeycomb_east_1) logical_honeycomb_east_1->SetVisAttributes(G4VisAttributes::Invisible);
495 if(logical_gascontainer_3_east_2) logical_gascontainer_3_east_2->SetVisAttributes(G4VisAttributes::Invisible);
496 if(logical_assembly_east_2) logical_assembly_east_2->SetVisAttributes(visAttmrpc_2) ;
497 if(logical_pcboard_east_2) logical_pcboard_east_2->SetVisAttributes(G4VisAttributes::Invisible) ;
498 if(logical_sensitive_detector_east_2) logical_sensitive_detector_east_2->SetVisAttributes(visAttmrpc);
499 if(logical_electrodes_east_2) logical_electrodes_east_2->SetVisAttributes(G4VisAttributes::Invisible);
500 if(logical_glass_layer_east_2) logical_glass_layer_east_2->SetVisAttributes(G4VisAttributes::Invisible);
501 if(logical_readoutstrips_012_east_2) logical_readoutstrips_012_east_2->SetVisAttributes(G4VisAttributes::Invisible);
502 if(logical_honeycomb_east_2) logical_honeycomb_east_2->SetVisAttributes(G4VisAttributes::Invisible);
510 G4VisAttributes* visBrTof =
new G4VisAttributes(G4Colour(1.,0.,0.));
511 G4VisAttributes* visEcTof =
new G4VisAttributes(G4Colour(0.,1.,0.));
515 logicalTof->SetVisAttributes(G4VisAttributes::Invisible);
517 logicalBrTof->SetVisAttributes(G4VisAttributes::Invisible);
519 if (logicalEcTofWest)
520 logicalEcTofWest->SetVisAttributes(G4VisAttributes::Invisible);
522 if (logicalEcTofEast)
523 logicalEcTofEast->SetVisAttributes(G4VisAttributes::Invisible);
526 G4VisAttributes* visAttBrTof =
new G4VisAttributes(G4Colour(0,1,1));
528 logicalScinBr1->SetVisAttributes(G4VisAttributes::Invisible);
531 logicalScinBr2->SetVisAttributes(G4VisAttributes::Invisible);
536 logicalAlBr1->SetVisAttributes(G4VisAttributes::Invisible);
538 logicalAlBr2->SetVisAttributes(G4VisAttributes::Invisible);
541 logicalPVFBr1->SetVisAttributes(G4VisAttributes::Invisible);
543 logicalPVFBr2->SetVisAttributes(G4VisAttributes::Invisible);
545 G4VisAttributes* visAttBrBuck =
new G4VisAttributes(G4Colour(1.,1.,0.));
546 if (logicalBucketBr1)
547 logicalBucketBr1->SetVisAttributes(visAttBrBuck);
549 if (logicalBucketBr2)
550 logicalBucketBr2->SetVisAttributes(visAttBrBuck);
553 G4VisAttributes* visAttEcTof =
new G4VisAttributes(G4Colour(0.,1.,1.));
554 if (logicalScinEcWest)
555 logicalScinEcWest->SetVisAttributes(visAttEcTof);
557 if (logicalScinEcEast)
558 logicalScinEcEast->SetVisAttributes(visAttEcTof);
560 G4VisAttributes* visAttEcBuck =
new G4VisAttributes(G4Colour(1.,1.,0.));
562 logicalBucketEc->SetVisAttributes(visAttEcBuck);
566 logicalAlEcWest->SetVisAttributes(G4VisAttributes::Invisible);
568 logicalAlEcEast->SetVisAttributes(G4VisAttributes::Invisible);
569 if (logicalPVFEcWest)
570 logicalPVFEcWest->SetVisAttributes(G4VisAttributes::Invisible);
571 if (logicalPVFEcEast)
572 logicalPVFEcEast->SetVisAttributes(G4VisAttributes::Invisible);
581 G4double br1L=tofPara->
GetBr1L();
593 G4double angleBr=360./nScinBr*deg;
594 G4double scinTrapdx1,scinTrapdx2,scinTrapdx3,scinTrapdx4;
595 scinTrapdx1=scinTrapdx3=br1TrapW1/2.;
596 scinTrapdx2=scinTrapdx4=br1TrapW2/2.;
597 G4double scinTrapdy1,scinTrapdy2;
598 scinTrapdy1=scinTrapdy2=0.5*br1TrapH;
599 G4double scinTrapdz=br1L/2.;
600 G4double scinPosR=br1R1+scinTrapdy1;
601 G4double theta = atan((br1TrapW2/2.-br1TrapW1/2.)/br1TrapH);
602 G4double delta13 = AlThickness*(1/
cos(theta)-
tan(theta));
603 G4double delta24 = AlThickness*(1/
cos(theta)+
tan(theta));
604 G4double delta13P = (PVFThickness+AlThickness)*(1/
cos(theta)-
tan(theta));
605 G4double delta24P = (PVFThickness+AlThickness)*(1/
cos(theta)+
tan(theta));
608 G4Trap* solidScinBr1=
new G4Trap(
"solidScinBr1",scinTrapdz,0*deg,0*deg,
609 scinTrapdy1,scinTrapdx1,scinTrapdx2,0*deg,
610 scinTrapdy2,scinTrapdx3,scinTrapdx4,0*deg);
611 logicalScinBr1 =
new G4LogicalVolume(solidScinBr1,BC408,
"logicalScinBr1");
614 G4Trap* solidAlBr1 =
new G4Trap(
"solidAlBr1", scinTrapdz+0.001,0*deg,0*deg,
615 scinTrapdy1+AlThickness, scinTrapdx1+delta13, scinTrapdx2+delta24 ,0*deg,
616 scinTrapdy2+AlThickness, scinTrapdx3+delta13, scinTrapdx4+delta24 ,0*deg);
618 logicalAlBr1 =
new G4LogicalVolume(solidAlBr1,G4Material::GetMaterial(
"Aluminium"),
"logicalAlBr1");
619 G4Trap* solidPVFBr1 =
new G4Trap(
"solidPVFBr1",scinTrapdz+0.002,0*deg,0*deg,
620 scinTrapdy1+AlThickness+PVFThickness,scinTrapdx1+delta13P, scinTrapdx2+delta24P,0*deg,
621 scinTrapdy2+AlThickness+PVFThickness,scinTrapdx3+delta13P, scinTrapdx4+delta24P,0*deg);
623 logicalPVFBr1 =
new G4LogicalVolume(solidPVFBr1,PVF,
"logicalPVFBr1");
625 physicalAlBr1 =
new G4PVPlacement(0,G4ThreeVector(0,0,0),logicalAlBr1,
"physicalAlBr1",logicalPVFBr1,
false,0);
626 physicalScinBr1 =
new G4PVPlacement(0,G4ThreeVector(0,0,0),logicalScinBr1,
"physicalScinBr1",logicalAlBr1,
false, 0);
629 G4Tubs* solidBucketBr1=
new G4Tubs(
"solidBucketBr1",0,bucketDBr/2.,
630 bucketLBr/2., 0, 360.*deg);
631 logicalBucketBr1=
new G4LogicalVolume(solidBucketBr1,PMTmaterial,
"logicalBucketBr1");
635 G4RotationMatrix trapRot;
636 trapRot.rotateZ(0.5*angleBr-90.*deg);
643 G4ThreeVector pos(0,0,0);
645 for (
int i=0;i<nScinBr;i++)
647 ostringstream osnamePVFBr1;
648 osnamePVFBr1 <<
"physicalPVFBr1_"<<i;
649 ostringstream osnameBucket1Br1;
650 osnameBucket1Br1 <<
"physicalBucket1Br1_"<<i;
651 ostringstream osnameBucket2Br1;
652 osnameBucket2Br1 <<
"physicalBucket2Br1_"<<i;
655 x=scinPosR*
cos((i+0.5)*angleBr);
656 y=scinPosR*
sin((i+0.5)*angleBr);
664 G4RotationMatrix trapRotTemp;
665 trapRotTemp.rotateZ(c);
666 G4Transform3D transform(trapRotTemp,pos);
670 physicalPVFBr1 =
new G4PVPlacement(transform,logicalPVFBr1,osnamePVFBr1.str(), logicalBrTof,
false,i);
672 pos.setZ(-(bucketLBr+br1L)/2.-0.01);
673 physicalBucket1Br1 =
new G4PVPlacement(0,pos,logicalBucketBr1,osnameBucket1Br1.str(),logicalBrTof,
false,0);
674 pos.setZ((bucketLBr+br1L)/2.+0.01);
675 physicalBucket2Br1 =
new G4PVPlacement(0,pos,logicalBucketBr1,osnameBucket2Br1.str(),logicalBrTof,
false,0);
678 trapRot.rotateZ(angleBr);
688 G4double br2L=tofPara->
GetBr2L();
700 G4double angleBr=360./nScinBr*deg;
701 G4double scinTrapdx1,scinTrapdx2,scinTrapdx3,scinTrapdx4;
702 scinTrapdx1=scinTrapdx3=br2TrapW1/2.;
703 scinTrapdx2=scinTrapdx4=br2TrapW2/2.;
704 G4double scinTrapdy1,scinTrapdy2;
705 scinTrapdy1=scinTrapdy2=0.5*br2TrapH;
706 G4double scinTrapdz=br2L/2.;
707 G4double scinPosR=br2R1+scinTrapdy1;
708 G4double theta = atan((br2TrapW2/2.-br2TrapW1/2.)/br2TrapH);
709 G4double delta13 = AlThickness*(1/
cos(theta)-
tan(theta));
710 G4double delta24 = AlThickness*(1/
cos(theta)+
tan(theta));
711 G4double delta13P = (PVFThickness+AlThickness)*(1/
cos(theta)-
tan(theta));
712 G4double delta24P = (PVFThickness+AlThickness)*(1/
cos(theta)+
tan(theta));
715 G4Trap* solidScinBr2=
new G4Trap(
"solidScinBr2",scinTrapdz,0*deg,0*deg,
716 scinTrapdy1,scinTrapdx1,scinTrapdx2,0*deg,
717 scinTrapdy2,scinTrapdx3,scinTrapdx4,0*deg);
718 logicalScinBr2 =
new G4LogicalVolume(solidScinBr2,BC408,
"logicalScinBr2");
721 G4Trap* solidAlBr2 =
new G4Trap(
"solidAlBr2", scinTrapdz+0.001,0*deg,0*deg,
722 scinTrapdy1+AlThickness, scinTrapdx1+delta13, scinTrapdx2+delta24 ,0*deg,
723 scinTrapdy2+AlThickness, scinTrapdx3+delta13, scinTrapdx4+delta24 ,0*deg);
725 logicalAlBr2 =
new G4LogicalVolume(solidAlBr2,G4Material::GetMaterial(
"Aluminium"),
"logicalAlBr2");
726 G4Trap* solidPVFBr2 =
new G4Trap(
"solidPVFBr2",scinTrapdz+0.002,0*deg,0*deg,
727 scinTrapdy1+AlThickness+PVFThickness,scinTrapdx1+delta13P, scinTrapdx2+delta24P,0*deg,
728 scinTrapdy2+AlThickness+PVFThickness,scinTrapdx3+delta13P, scinTrapdx4+delta24P,0*deg);
730 logicalPVFBr2 =
new G4LogicalVolume(solidPVFBr2,PVF,
"logicalPVFBr2");
732 physicalAlBr2 =
new G4PVPlacement(0,G4ThreeVector(0,0,0),logicalAlBr2,
"physicalAlBr2",logicalPVFBr2,
false,0);
733 physicalScinBr2 =
new G4PVPlacement(0,G4ThreeVector(0,0,0),logicalScinBr2,
"physicalScinBr2",logicalAlBr2,
false, 0);
736 G4Tubs* solidBucketBr2=
new G4Tubs(
"solidBucketBr2",0,bucketDBr/2.,
737 bucketLBr/2., 0, 360.*deg);
738 logicalBucketBr2=
new G4LogicalVolume(solidBucketBr2,PMTmaterial,
"logicalBucketBr2");
740 G4RotationMatrix trapRot;
741 trapRot.rotateZ(-90.*deg);
748 G4ThreeVector pos(0,0,0);
750 for (
int i=0;i<nScinBr;i++)
752 ostringstream osnamePVFBr2;
753 osnamePVFBr2 <<
"physicalPVFBr2_"<<i;
754 ostringstream osnameBucket1Br2;
755 osnameBucket1Br2 <<
"physicalBucket1Br2_"<<i;
756 ostringstream osnameBucket2Br2;
757 osnameBucket2Br2 <<
"physicalBucket2Br2_"<<i;
760 x=scinPosR*
cos(i*angleBr);
761 y=scinPosR*
sin(i*angleBr);
768 G4RotationMatrix trapRotTemp;
769 trapRotTemp.rotateZ(c);
770 G4Transform3D transform(trapRotTemp,pos);
772 physicalPVFBr2 =
new G4PVPlacement(transform,logicalPVFBr2,osnamePVFBr2.str(), logicalBrTof,
false,i);
774 pos.setZ(-(bucketLBr+br2L)/2.-0.01);
775 physicalBucket1Br2 =
new G4PVPlacement(0,pos,logicalBucketBr2,osnameBucket1Br2.str(),logicalBrTof,
false,0);
776 pos.setZ((bucketLBr+br2L)/2.+0.01);
777 physicalBucket2Br2 =
new G4PVPlacement(0,pos,logicalBucketBr2,osnameBucket2Br2.str(),logicalBrTof,
false,0);
780 trapRot.rotateZ(angleBr);
792 G4double ecL = tofPara->
GetEcL();
799 G4double ecR1 = tofPara->
GetEcR1();
810 G4double angleEc=360./nScinEc*deg;
811 G4double ecTrapW3 = ecTrapW1 + (ecTrapW2-ecTrapW1)*ecTrapH1/ecTrapH;
812 G4double ecTrapH2 = ecTrapH-ecTrapH1;
813 G4double pdz = ecL/2;
814 G4double ptheta = atan(ecTrapH1/(2*ecL));
815 G4double pdy1 = ecTrapH2/2;
816 G4double pdx1 = ecTrapW3/2;
817 G4double pdx2 = ecTrapW2/2;
818 G4double pdy2 = ecTrapH/2;
819 G4double pdx3 = ecTrapW1/2;
820 G4double pdx4 = ecTrapW2/2;
824 G4double ecR = ecR1+ecTrapH/2+ecTrapH1/4;
827 G4Trap* solidScinEc=
new G4Trap(
"solidScinEc",pdz,ptheta, 270*deg,
828 pdy1,pdx1,pdx2,0*deg,pdy2,pdx3,pdx4,0*deg);
830 logicalScinEcWest=
new G4LogicalVolume(solidScinEc,BC404,
"logicalScinEcWest");
831 logicalScinEcEast=
new G4LogicalVolume(solidScinEc,BC404,
"logicalScinEcEast");
834 G4Tubs* solidBucketEc =
new G4Tubs(
"solidBucketEc", 0, bucketDEc/2.,
835 bucketLEc/2., 0, 360.*deg);
836 logicalBucketEc =
new G4LogicalVolume(solidBucketEc, PMTmaterial,
"logicalBucketEc");
839 G4double pthetaAl = atan(ecTrapH1/(2*(ecL+AlThickness*2)));
840 G4double
theta1 = atan((ecTrapW2/2.-ecTrapW3/2.)/ecTrapH2);
841 G4double
theta2 = atan((ecTrapW2/2.-ecTrapW1/2.)/ecTrapH);
848 G4double thick = AlThickness+PVFThickness;
849 G4double pthetaPVF = atan(ecTrapH1/(2*(ecL+thick*2)));
855 G4Trap* solidAlEc=
new G4Trap(
"solidAlEc",pdz+AlThickness,pthetaAl,270*deg,pdy1+AlThickness,pdx1+delta1,pdx2+delta2,0*deg,pdy2+AlThickness,pdx3+delta3,pdx4+delta4,0*deg);
857 logicalAlEcWest =
new G4LogicalVolume(solidAlEc,G4Material::GetMaterial(
"Aluminium"),
"logicalAlEcWest");
858 logicalAlEcEast =
new G4LogicalVolume(solidAlEc,G4Material::GetMaterial(
"Aluminium"),
"logicalAlEcEast");
860 G4Trap* solidPVFEc =
new G4Trap(
"solidPVFEc",pdz+thick,pthetaPVF,270*deg,
861 pdy1+thick,pdx1+delta1P,pdx2+delta2P,0*deg,
862 pdy2+thick,pdx3+delta3P,pdx4+delta4P,0*deg);
864 logicalPVFEcWest =
new G4LogicalVolume(solidPVFEc,PVF,
"logicalPVFEcWest");
865 logicalPVFEcEast =
new G4LogicalVolume(solidPVFEc,PVF,
"logicalPVFEcEast");
868 physicalAlEcWest =
new G4PVPlacement(0,G4ThreeVector(0,0,0),logicalAlEcWest,
"physicalAlEcWest",logicalPVFEcWest,
false,0);
869 physicalScinEcWest =
new G4PVPlacement(0,G4ThreeVector(0,0,0),logicalScinEcWest,
"physicalScinEcWest",logicalAlEcWest,
false, 0);
873 physicalAlEcEast =
new G4PVPlacement(0,G4ThreeVector(0,0,0),logicalAlEcEast,
"physicalAlEcEast",logicalPVFEcEast,
false,0);
874 physicalScinEcEast =
new G4PVPlacement(0,G4ThreeVector(0,0,0),logicalScinEcEast,
"physicalScinEcEast",logicalAlEcEast,
false, 0);
880 G4ThreeVector posW(0,0,0);
881 G4ThreeVector posE(0,0,0);
882 G4RotationMatrix trapRot;
883 trapRot.rotateY(180.*deg);
884 trapRot.rotateZ(0.5*angleEc-90*deg);
885 for (
int i=0;i<nScinEc;i++)
887 ostringstream osnamePVFEc;
888 osnamePVFEc <<
"physicalPVFEcWest_"<<i;
889 ostringstream osnameBucketEc;
890 osnameBucketEc <<
"physicalBucketEcWest_"<<i;
892 posW.setX( ecR*
cos((0.5+i)*angleEc) );
893 posW.setY( ecR*
sin((0.5+i)*angleEc) );
900 G4RotationMatrix trapRotTemp;
901 trapRotTemp.rotateX(a);
902 trapRotTemp.rotateY(b);
903 trapRotTemp.rotateZ(c);
904 G4Transform3D transform(trapRotTemp,posW);
906 physicalPVFEcWest =
new G4PVPlacement(transform,logicalPVFEcWest,osnamePVFEc.str(), logicalEcTofWest,
false,i);
907 posW.setX( bucketPosR*
cos((0.5+i)*angleEc) );
908 posW.setY( bucketPosR*
sin((0.5+i)*angleEc) );
910 posW.setZ(-ecL/2-thick-bucketLEc/2-0.01 );
911 physicalBucketEc =
new G4PVPlacement(0,posW,logicalBucketEc,osnameBucketEc.str(),logicalEcTofWest,
false,0);
912 trapRot.rotateZ(angleEc);
920 trapRot.rotateZ(-angleEc);
921 trapRot.rotateX(180.*deg);
922 for (
int i=0;i<nScinEc;i++)
924 ostringstream osnamePVFEc;
925 osnamePVFEc <<
"physicalPVFEcEast_"<<i;
926 ostringstream osnameBucketEc;
927 osnameBucketEc <<
"physicalBucketEcEast_"<<i;
929 posE.setX( ecR*
cos((0.5+i)*angleEc) );
930 posE.setY( ecR*
sin((0.5+i)*angleEc) );
937 G4RotationMatrix trapRotTemp;
938 trapRotTemp.rotateX(a);
939 trapRotTemp.rotateY(b);
940 trapRotTemp.rotateZ(c);
941 G4Transform3D transform(trapRotTemp,posE);
943 physicalPVFEcEast =
new G4PVPlacement(transform,logicalPVFEcEast,osnamePVFEc.str(), logicalEcTofEast,
false,i);
944 posE.setX( bucketPosR*
cos((0.5+i)*angleEc) );
945 posE.setY( bucketPosR*
sin((0.5+i)*angleEc) );
947 posE.setZ(ecL/2+thick+bucketLEc/2+0.01 );
948 physicalBucketEc =
new G4PVPlacement(0,posE,logicalBucketEc,osnameBucketEc.str(),logicalEcTofEast,
false,0);
949 trapRot.rotateZ(angleEc);
970 G4RotationMatrix rot_dummy(0*deg,0*deg,0*deg);
971 G4ThreeVector transl_dummy(0*deg,0*deg,0*deg);
972 G4Transform3D transf_dummy(rot_dummy,transl_dummy);
975 G4double l_mrpc_xdo_out=133.62*mm;
976 G4double lmrpc_xup_out =200.97*mm;
977 G4double lmrpc_z_out= 395.5*mm;
978 G4double lmrpc_yfr_out_e =24.50*mm;
979 G4double lmrpc_yba_out_e =24.50*mm;
981 G4double l_mrpc_xdo_ins=115.25*mm;
982 G4double lmrpc_xup_ins=180.56*mm;
983 G4double lmrpc_yfr_ins=22.50*mm;
984 G4double lmrpc_yba_ins=22.50*mm;
985 G4double lmrpc_z_ins=383.14*mm;
986 G4double delta_frame_x =7*mm;
987 G4double delta_frame_y=3*mm;
988 G4double inner_angle=9.74*deg;
990 G4double ks_trafo =10.*mm - (lmrpc_z_out)/2. + lmrpc_z_ins/2.;
992 G4Trd* frame_tot_e =
new G4Trd(
"frame_tot_e",l_mrpc_xdo_out/2.,lmrpc_xup_out/2.,lmrpc_yfr_out_e/2.,lmrpc_yba_out_e/2.,lmrpc_z_out/2.);
994 G4Box* bendingbox_e =
new G4Box(
"bendingbox_e",lmrpc_xup_out/2,lmrpc_yfr_out_e/2,5*mm);
995 G4ThreeVector trans_bendingbox_e(0.,0.,(5.*mm+lmrpc_z_out/2.-0.05*mm));
996 G4Transform3D transf_bendingbox_e(rot_dummy,trans_bendingbox_e);
999 G4double ztransframein_e= 10.*mm - (lmrpc_z_out)/2. + lmrpc_z_ins/2.;
1000 G4ThreeVector trans_frame_in_e(0.,0.,ztransframein_e);
1001 G4Transform3D transf_frame_in_e(rot_dummy,trans_frame_in_e);
1003 G4UnionSolid * frame_000_e =
new G4UnionSolid(
"frame_000_e",frame_tot_e,bendingbox_e,transf_bendingbox_e);
1006 G4double r_bending_in=838.0*mm;
1007 G4double bending_angle_start=(90.-45.)*deg;
1008 G4double bending_angle_end=360*deg;
1009 G4double rot_bend_x=90.*deg;
1010 G4double rot_bend_y=90.*deg;
1011 G4double rot_bend_z=0.*deg;
1012 G4double transl_bend_x=0*mm;
1013 G4double transl_bend_y=0*mm;
1014 G4double transl_bend_z=-634.56*mm;
1017 G4Cons* bending_e =
new G4Cons(
"bending_e",r_bending_in,(r_bending_in+30.*mm),r_bending_in,(r_bending_in+30.*mm),(lmrpc_yfr_out_e/2.+4*mm),bending_angle_start,bending_angle_end);
1019 G4RotationMatrix rot_mat_bending;
1020 rot_mat_bending.rotateX(rot_bend_x);
1021 rot_mat_bending.rotateY(rot_bend_y);
1022 rot_mat_bending.rotateZ(rot_bend_z);
1023 G4ThreeVector transl_bending(transl_bend_x,transl_bend_y,transl_bend_z);
1024 G4Transform3D transf_bend(rot_mat_bending,transl_bending);
1026 G4SubtractionSolid* frame_003_e =
new G4SubtractionSolid(
"frame_003_e",frame_000_e,bending_e,transf_bend);
1028 G4Cons* borehole_m10 =
new G4Cons(
"borehole_m10",0.*mm,5.*mm,0.*mm,5.*mm,6.*mm,0*deg,360*deg);
1029 G4RotationMatrix rot_mat_boreholes_m10(0*deg,0*deg,0*deg);
1030 G4ThreeVector transl_gas_l(36.*mm,0.,-(lmrpc_z_out-10.*mm)/2.);
1031 G4ThreeVector transl_gas_r(-36.*mm,0.,-(lmrpc_z_out-10.*mm)/2.);
1032 G4ThreeVector transl_HV_l(13.*mm,0.,-(lmrpc_z_out-10.*mm)/2.);
1033 G4ThreeVector transl_HV_r(-13.*mm,0.,-(lmrpc_z_out-10.*mm)/2.);
1034 G4Transform3D transf_gas_l(rot_mat_boreholes_m10,transl_gas_l);
1035 G4Transform3D transf_gas_r(rot_mat_boreholes_m10,transl_gas_r);
1036 G4Transform3D transf_HV_l(rot_mat_boreholes_m10,transl_HV_l);
1037 G4Transform3D transf_HV_r(rot_mat_boreholes_m10,transl_HV_r);
1039 G4SubtractionSolid* frame_004_e =
new G4SubtractionSolid(
"frame_004_e",frame_003_e,borehole_m10,transf_gas_l);
1040 G4SubtractionSolid* frame_005_e =
new G4SubtractionSolid(
"frame_005_e",frame_004_e,borehole_m10,transf_gas_r);
1041 G4SubtractionSolid* frame_006_e =
new G4SubtractionSolid(
"frame_006_e",frame_005_e,borehole_m10,transf_HV_l);
1042 G4SubtractionSolid* frame_007_e =
new G4SubtractionSolid(
"frame_007_e",frame_006_e,borehole_m10,transf_HV_r);
1045 G4double readout_conncetor_y=4.5*mm;
1046 G4double readout_conncetor_z=23.0*mm;
1048 G4double rot_readout_con_x=0*deg;
1049 G4double rot_readout_con_y=+inner_angle/2;
1050 G4double rot_readout_con_z=0*deg;
1051 G4RotationMatrix rot_readout_con_r;
1052 rot_readout_con_r.rotateX(rot_readout_con_x);
1053 rot_readout_con_r.rotateY(rot_readout_con_y);
1054 rot_readout_con_r.rotateZ(rot_readout_con_z);
1056 G4RotationMatrix rot_readout_con_l;
1057 rot_readout_con_l.rotateX(rot_readout_con_x);
1058 rot_readout_con_l.rotateY(-rot_readout_con_y);
1059 rot_readout_con_l.rotateZ(rot_readout_con_z);
1063 G4Box* readout_connector_e =
new G4Box(
"readout_connector_e",2.*mm,readout_conncetor_y,readout_conncetor_z);
1065 G4double transl_readout_con1_x=(((lmrpc_z_ins-(182.*mm+1.*mm)*
cos(inner_angle/2))*
tan(inner_angle/2))+l_mrpc_xdo_ins/2.+delta_frame_x/
cos(inner_angle/2.)+delta_frame_y/2./
cos(inner_angle/2.));
1066 G4double transl_readout_con1_y=-1.25*mm;
1067 G4double transl_readout_con1_z=lmrpc_z_ins/2.-183*mm*
cos(inner_angle/2) + ks_trafo ;
1068 G4ThreeVector transl_readout_con1(transl_readout_con1_x,transl_readout_con1_y,transl_readout_con1_z);
1069 G4Transform3D transf_readout_con1(rot_readout_con_r,transl_readout_con1);
1071 G4double transl_readout_con2_x=(lmrpc_z_ins-96.*mm*
cos(inner_angle/2))*
tan(inner_angle/2.)+l_mrpc_xdo_ins/2.+delta_frame_x/
cos(inner_angle/2.)+delta_frame_y/2./
cos(inner_angle/2.);
1072 G4double transl_readout_con2_y=-1.25*mm;
1073 G4double transl_readout_con2_z=lmrpc_z_ins/2.-96.*mm*
cos(inner_angle/2) + ks_trafo;
1074 G4ThreeVector transl_readout_con2(transl_readout_con2_x,transl_readout_con2_y,transl_readout_con2_z);
1075 G4Transform3D transf_readout_con2(rot_readout_con_r,transl_readout_con2);
1077 G4double transl_readout_con3_x=-((lmrpc_z_ins-183.*mm*
cos(inner_angle/2))*
tan(inner_angle/2)+l_mrpc_xdo_ins/2.+delta_frame_x/
cos(inner_angle/2.)+delta_frame_y/
cos(inner_angle/2.)/2.);
1078 G4double transl_readout_con3_y=-1.25*mm;
1079 G4double transl_readout_con3_z=lmrpc_z_ins/2.-183*mm*
cos(inner_angle/2) + ks_trafo ;
1080 G4ThreeVector transl_readout_con3(transl_readout_con3_x,transl_readout_con3_y,transl_readout_con3_z);
1081 G4Transform3D transf_readout_con3(rot_readout_con_l,transl_readout_con3);
1083 G4double transl_readout_con4_x=-((lmrpc_z_ins-96.*mm*
cos(inner_angle/2))*
tan(inner_angle/2)+l_mrpc_xdo_ins/2.+delta_frame_x/
cos(inner_angle/2.)+delta_frame_y/
cos(inner_angle/2.)/2.);
1084 G4double transl_readout_con4_y=-1.25*mm;
1085 G4double transl_readout_con4_z=lmrpc_z_ins/2.-96*mm*
cos(inner_angle/2) + ks_trafo;
1086 G4ThreeVector transl_readout_con4(transl_readout_con4_x,transl_readout_con4_y,transl_readout_con4_z);
1087 G4Transform3D transf_readout_con4(rot_readout_con_l,transl_readout_con4);
1090 G4SubtractionSolid* frame_012_e =
new G4SubtractionSolid(
"frame_012_e",frame_007_e,readout_connector_e,transf_readout_con1);
1091 G4SubtractionSolid* frame_013_e =
new G4SubtractionSolid(
"frame_013_e",frame_012_e,readout_connector_e,transf_readout_con2);
1092 G4SubtractionSolid* frame_014_e =
new G4SubtractionSolid(
"frame_014_e",frame_013_e,readout_connector_e,transf_readout_con3);
1093 G4SubtractionSolid* frame_015_e =
new G4SubtractionSolid(
"frame_015_e",frame_014_e,readout_connector_e,transf_readout_con4);
1097 G4double interface_readout_x=1.5*mm;
1098 G4double interface_readout_y=20*mm;
1099 G4double interface_readout_z=160.00*mm;
1100 G4double interface_readout_connector_y=7*mm;
1101 G4double interface_readout_connector_z=44.00*mm;
1103 G4double rot_interface_readout_x=0*deg;
1104 G4double rot_interface_readout_y=-inner_angle/2;
1105 G4double rot_interface_readout_z=0*deg;
1106 G4RotationMatrix rot_interface_readout_r;
1107 G4RotationMatrix rot_interface_readout_l;
1108 rot_interface_readout_r.rotateX(rot_interface_readout_x);
1109 rot_interface_readout_r.rotateY(rot_interface_readout_y);
1110 rot_interface_readout_r.rotateZ(rot_interface_readout_z);
1111 rot_interface_readout_l.rotateX(rot_interface_readout_x);
1112 rot_interface_readout_l.rotateY(-rot_interface_readout_y);
1113 rot_interface_readout_l.rotateZ(rot_interface_readout_z);
1116 G4Box* interface_readout_001=
new G4Box(
"interface_readout_001",interface_readout_x/2.,interface_readout_y/2.,interface_readout_z/2.);
1117 G4Box* interface_readout_connector =
new G4Box(
"interface_readout_connector",1.5,interface_readout_connector_y/2.,interface_readout_connector_z/2.);
1120 G4ThreeVector transl_interface_readout_connector_1(0*mm,-1.25*mm,-43.5*mm);
1121 G4ThreeVector transl_interface_readout_connector_2(0*mm,-1.25*mm,+43.5*mm);
1122 G4Transform3D transf_interface_readout_connector_1(rot_dummy,transl_interface_readout_connector_1);
1123 G4Transform3D transf_interface_readout_connector_2(rot_dummy,transl_interface_readout_connector_2);
1126 G4SubtractionSolid* interface_readout_002=
new G4SubtractionSolid(
"interface_readout_002",interface_readout_001,interface_readout_connector,transf_interface_readout_connector_1);
1127 G4SubtractionSolid* interface_readout_006=
new G4SubtractionSolid(
"interface_readout_006",interface_readout_002,interface_readout_connector,transf_interface_readout_connector_2);
1130 G4double readout_box_wallthickness= 0.80*mm;
1132 G4double l_readoutbox_xdo_help=45.18*mm;
1133 G4double l_readoutbox_xup_help=86.63*mm;
1134 G4double l_readoutbox_z_help=233*mm;
1135 G4double angle_readoutbox=2*asin((l_readoutbox_xup_help-l_readoutbox_xdo_help)/(2*l_readoutbox_z_help))*180/
pi*deg;
1137 G4double l_readoutbox_xdo=l_readoutbox_xdo_help+2*1.5/
cos(angle_readoutbox/2)*mm;
1138 G4double l_readoutbox_xup=l_readoutbox_xup_help+2*1.5/
cos(angle_readoutbox/2)*mm;
1139 G4double l_readoutbox_yfr=21*mm;
1140 G4double l_readoutbox_yba=21*mm;
1141 G4double l_readoutbox_z=l_readoutbox_z_help*
cos(angle_readoutbox/2);
1144 G4double l_cut_1_readoutbox_xdo= (43.71)*mm;
1145 G4double l_cut_1_readoutbox_xup= 85.08*mm;
1146 G4double l_cut_1_readoutbox_yfr= l_readoutbox_yfr;
1147 G4double l_cut_1_readoutbox_yba= l_readoutbox_yba;
1148 G4double l_cut_1_readoutbox_z=(l_readoutbox_z-2*readout_box_wallthickness);
1151 G4double l_cut_2_readoutbox_xdo=(2*18.64*
sin(angle_readoutbox/2)*mm+l_readoutbox_xdo+2.5*mm);
1152 G4double l_cut_2_readoutbox_xup=(2*180.14*
sin(angle_readoutbox/2)*mm+l_readoutbox_xdo+2.5*mm);
1153 G4double l_cut_2_readoutbox_yfr=21*mm;
1154 G4double l_cut_2_readoutbox_yba=21*mm;
1155 G4double l_cut_2_readoutbox_z=161.5*
cos(angle_readoutbox/2)*mm;
1158 G4double l_cut_3_readoutbox_xdo=50.27*mm;
1159 G4double l_cut_3_readoutbox_xup=(81.81+2*1.6)*mm;
1160 G4double l_cut_3_readoutbox_yfr=21*mm;
1161 G4double l_cut_3_readoutbox_yba=21*mm;
1162 G4double l_cut_3_readoutbox_z=195.20*
cos(angle_readoutbox/2)*mm;
1165 G4Trd* readoutbox_tot =
new G4Trd(
"readoutbox_tot",l_readoutbox_xdo/2,l_readoutbox_xup/2,l_readoutbox_yfr/2,l_readoutbox_yba/2,l_readoutbox_z/2);
1167 G4Trd* readoutbox_cut_1 =
new G4Trd(
"readoutbox_cut_1",l_cut_1_readoutbox_xdo/2,l_cut_1_readoutbox_xup/2,l_cut_1_readoutbox_yfr/2,l_cut_1_readoutbox_yba/2,l_cut_1_readoutbox_z/2);
1168 G4ThreeVector transl_readoutbox_cut_1(0*mm,readout_box_wallthickness,0*mm);
1169 G4Transform3D transf_readoutbox_cut_1(rot_dummy,transl_readoutbox_cut_1);
1172 G4Trd* readoutbox_cut_2 =
new G4Trd(
"readoutbox_cut_2",l_cut_2_readoutbox_xdo/2,l_cut_2_readoutbox_xup/2,l_cut_2_readoutbox_yfr/2,l_cut_2_readoutbox_yba/2,l_cut_2_readoutbox_z/2);
1173 G4ThreeVector transl_readoutbox_cut_2(0*mm,readout_box_wallthickness,20.14*
cos(angle_readoutbox/2)*mm-l_readoutbox_z/2+l_cut_2_readoutbox_z/2);
1174 G4Transform3D transf_readoutbox_cut_2(rot_dummy,transl_readoutbox_cut_2);
1177 G4Cons* readoutbox_cablecon =
new G4Cons(
"readoutbox_cablecon",0.*mm,6.5*mm,0.*mm,6.5*mm,1*mm,0*deg,360*deg);
1178 G4Box * readoutbox_abovecablecon =
new G4Box(
"readoutbox_abovecablecon",6.5,5.26,1);
1180 G4ThreeVector transl_readoutbox_cablecon(0*mm,0*mm,-l_readoutbox_z/2+readout_box_wallthickness/2);
1181 G4Transform3D transf_readoutbox_cablecon(rot_dummy,transl_readoutbox_cablecon);
1183 G4ThreeVector transl_readoutbox_abovecablecon(0*mm,5.25*mm+0.005*mm,-l_readoutbox_z/2+readout_box_wallthickness/2);
1184 G4Transform3D transf_readoutbox_abovecablecon(rot_dummy,transl_readoutbox_abovecablecon);
1188 G4Trd* readoutbox_cut_3 =
new G4Trd(
"readoutbox_cut_3",l_cut_3_readoutbox_xdo/2,l_cut_3_readoutbox_xup/2,l_cut_3_readoutbox_yfr/2,l_cut_3_readoutbox_yba/2,l_cut_3_readoutbox_z/2);
1189 G4ThreeVector transl_readoutbox_cut_3(0*mm,readout_box_wallthickness,18.94*
cos(angle_readoutbox/2)*mm-l_readoutbox_z/2+l_cut_3_readoutbox_z/2);
1190 G4Transform3D transf_readoutbox_cut_3(rot_dummy,transl_readoutbox_cut_3);
1194 G4SubtractionSolid* readoutbox_001_e=
new G4SubtractionSolid(
"readoutbox_001_e",readoutbox_tot,readoutbox_cut_1,transf_readoutbox_cut_1);
1195 G4SubtractionSolid* readoutbox_002_e=
new G4SubtractionSolid(
"readoutbox_002_e",readoutbox_001_e,readoutbox_cut_2,transf_readoutbox_cut_2);
1196 G4SubtractionSolid* readoutbox_007_e=
new G4SubtractionSolid(
"readoutbox_007_e",readoutbox_002_e,readoutbox_cablecon,transf_readoutbox_cablecon);
1197 G4SubtractionSolid* readoutbox_008_e=
new G4SubtractionSolid(
"readoutbox_008_e",readoutbox_007_e,readoutbox_abovecablecon,transf_readoutbox_abovecablecon);
1198 G4SubtractionSolid* readoutbox_009_e=
new G4SubtractionSolid(
"readoutbox_009_e",readoutbox_008_e,readoutbox_cut_3,transf_readoutbox_cut_3);
1200 G4double bottom_bracket_x_e=15.0*mm ;
1201 G4double bottom_bracket_y_e=1.2*mm ;
1202 G4double bottom_bracket_z_e=18*mm ;
1203 G4Box* bottom_bracket=
new G4Box(
"bottom_bracket",bottom_bracket_x_e/2,bottom_bracket_y_e/2,bottom_bracket_z_e/2);
1205 G4ThreeVector transl_bottom_bracket_1((l_readoutbox_xdo/2-bottom_bracket_x_e/2),-(l_readoutbox_yfr/2 + bottom_bracket_y_e/2)+0.2*mm,-(l_readoutbox_z/2-bottom_bracket_z_e/2));
1206 G4Transform3D transf_bottom_bracket_1(rot_dummy,transl_bottom_bracket_1);
1207 G4UnionSolid* readoutbox_010_e =
new G4UnionSolid(
"readoutbox_010_e",readoutbox_009_e,bottom_bracket,transf_bottom_bracket_1);
1209 G4ThreeVector transl_bottom_bracket_2(-(l_readoutbox_xdo/2-bottom_bracket_x_e/2),-(l_readoutbox_yfr/2 + bottom_bracket_y_e/2)+0.2*mm,-(l_readoutbox_z/2-bottom_bracket_z_e/2));
1210 G4Transform3D transf_bottom_bracket_2(rot_dummy,transl_bottom_bracket_2);
1211 G4UnionSolid* readoutbox_011_e =
new G4UnionSolid(
"readoutbox_011_e",readoutbox_010_e,bottom_bracket,transf_bottom_bracket_2);
1214 G4ThreeVector transl_bottom_bracket_3(-(l_readoutbox_xup/2-bottom_bracket_x_e/2-bottom_bracket_z_e*
tan(angle_readoutbox/2)),-(l_readoutbox_yfr/2 + bottom_bracket_y_e/2)+0.2*mm,(l_readoutbox_z/2-bottom_bracket_z_e/2));
1215 G4Transform3D transf_bottom_bracket_3(rot_dummy,transl_bottom_bracket_3);
1216 G4UnionSolid* readoutbox_012_e =
new G4UnionSolid(
"readoutbox_012_e",readoutbox_011_e,bottom_bracket,transf_bottom_bracket_3);
1218 G4ThreeVector transl_bottom_bracket_4((l_readoutbox_xup/2-bottom_bracket_x_e/2-bottom_bracket_z_e*
tan(angle_readoutbox/2)),-(l_readoutbox_yfr/2 + bottom_bracket_y_e/2)+0.2*mm,(l_readoutbox_z/2-bottom_bracket_z_e/2));
1219 G4Transform3D transf_bottom_bracket_4(rot_dummy,transl_bottom_bracket_4);
1222 G4UnionSolid* readoutbox_013_e =
new G4UnionSolid(
"readoutbox_013_et",readoutbox_012_e,bottom_bracket,transf_bottom_bracket_4);
1227 double link_x_dotot = 60*mm;
1228 double link_z_mid =16.5*mm;
1229 double link_y=22.5*mm;
1230 double link_xangle=20.25*mm;
1231 double t_link_angle=10*deg;
1234 double link_x_trp1_do = (link_x_dotot+2*mm);
1235 double link_x_trp1_up = link_x_dotot-2*link_xangle*
cos(t_link_angle);
1236 double link_z_trp1 = (link_x_trp1_do-link_x_trp1_up)/2*
tan(t_link_angle);
1238 double link_x_trp2_do = (link_x_dotot-2*link_xangle*
tan(t_link_angle)+2*mm);
1239 double link_x_trp2_up = link_x_trp1_up -link_z_mid*
tan(t_link_angle);
1240 double link_z_trp2 = (link_x_trp2_do-link_x_trp2_up)/2*
tan(t_link_angle);
1243 G4Trd* link_up =
new G4Trd(
"link_up",link_x_trp1_do/2,link_x_trp1_up/2,link_y/2,link_y/2,link_z_trp1/2);
1244 double transl_link_up_z=link_z_mid/2+link_xangle*
sin(t_link_angle)/2;
1246 G4Trd* link_do =
new G4Trd(
"link_do",link_x_trp2_do/2,link_x_trp2_up/2,link_y/2+3*mm,link_y/2+3*mm,link_z_trp2/2);
1247 double transl_link_do_z=link_z_mid/2-link_xangle*
sin(t_link_angle)/2;
1248 G4Box* t_box =
new G4Box(
"link_box",(link_x_dotot)/2+10*mm,(link_y)/2+10*mm,(link_z_mid)/2);
1250 G4ThreeVector transl_link_up(0,0,transl_link_up_z);
1251 G4Transform3D transf_link_up(rot_dummy,transl_link_up);
1252 G4ThreeVector transl_link_do(0,0,-transl_link_do_z);
1253 G4Transform3D transf_link_do(rot_dummy,transl_link_do);
1255 G4UnionSolid* link_1=
new G4UnionSolid(
"link_1",t_box,link_up,transf_link_up);
1256 G4SubtractionSolid* link_2 =
new G4SubtractionSolid(
"link_2",link_1,link_do,transf_link_do);
1257 G4Trd* t_box_2 =
new G4Trd(
"link_box_2",link_x_trp2_do/2,(30*mm*
tan(10*deg)*2+link_x_trp2_do)/2,22.5*mm/2 ,22.5*mm/2,30*mm/2);
1258 G4ThreeVector transl_link_3(0,0,(15*mm-link_z_mid/2));
1259 G4Transform3D transf_link_3(rot_dummy,transl_link_3);
1260 G4IntersectionSolid * link_3 =
new G4IntersectionSolid(
"link_3",link_2,t_box_2,transf_link_3);
1265 G4double rot_interface_x_r_e=0*deg;
1266 G4double rot_interface_y_r_e=-angle_readoutbox/2;
1267 G4double rot_interface_z_r_e=0*deg;
1268 G4RotationMatrix rot_interface_r_e;
1269 rot_interface_r_e.rotateX(rot_interface_x_r_e);
1270 rot_interface_r_e.rotateY(rot_interface_y_r_e);
1271 rot_interface_r_e.rotateZ(rot_interface_z_r_e);
1272 G4RotationMatrix rot_interface_l_e;
1273 rot_interface_l_e.rotateX(rot_interface_x_r_e);
1274 rot_interface_l_e.rotateY(-rot_interface_y_r_e);
1275 rot_interface_l_e.rotateZ(rot_interface_z_r_e);
1276 G4ThreeVector transl_interface_r_e(-((20.14*
cos(angle_readoutbox/2)*mm+l_cut_2_readoutbox_z/2)*
tan(angle_readoutbox/2)+l_readoutbox_xdo/2-0.75*mm/
cos(inner_angle/2))
1278 ,readout_box_wallthickness,
1279 20.14*
cos(angle_readoutbox/2)*mm-l_readoutbox_z/2+l_cut_2_readoutbox_z/2
1282 G4Transform3D transf_interface_r_e(rot_interface_r_e,transl_interface_r_e);
1283 G4ThreeVector transl_interface_l_e(((20.14*
cos(angle_readoutbox/2)*mm+l_cut_2_readoutbox_z/2)*
tan(angle_readoutbox/2)+l_readoutbox_xdo/2-0.75*mm/
cos(inner_angle/2))
1285 ,readout_box_wallthickness,
1286 20.14*
cos(angle_readoutbox/2)*mm-l_readoutbox_z/2+l_cut_2_readoutbox_z/2
1288 G4Transform3D transf_interface_l_e(rot_interface_l_e,transl_interface_l_e);
1290 G4UnionSolid* assembly_01_e=
new G4UnionSolid(
"assembly_01",readoutbox_013_e,interface_readout_006, transf_interface_r_e);
1291 G4UnionSolid* assembly_02_e=
new G4UnionSolid(
"assembly_02",assembly_01_e,interface_readout_006, transf_interface_l_e);
1296 G4RotationMatrix rot_assembly_01_e;
1297 rot_assembly_01_e.rotateY((inner_angle+angle_readoutbox)/2);
1298 G4ThreeVector transl_assembly_01_e(((lmrpc_z_ins-123.5*mm*
cos(inner_angle/2))*
tan(inner_angle/2)+l_mrpc_xdo_ins/2.+delta_frame_x/
cos(inner_angle/2.)+delta_frame_y/
cos(inner_angle/2.)
1299 + l_readoutbox_xdo/2+l_readoutbox_z/2*
tan(angle_readoutbox/2)),
1300 -readout_box_wallthickness,
1301 lmrpc_z_ins/2-123.5*mm*
cos(inner_angle/2)+ks_trafo-(l_readoutbox_xdo/2+l_readoutbox_z/2*
tan(angle_readoutbox/2))*
tan((inner_angle+angle_readoutbox)/2));
1303 G4Transform3D transf_assembly_01_e(rot_assembly_01_e,transl_assembly_01_e);
1304 G4UnionSolid* assembly_03_e =
new G4UnionSolid(
"assembly_01_e",frame_015_e,assembly_02_e,transf_assembly_01_e);
1306 double transl_link_up_z_2=link_z_mid/2+ (link_x_dotot+(link_x_dotot-2*link_xangle*
cos(t_link_angle))/2)/2*
tan(t_link_angle)/2;
1308 G4RotationMatrix rot_link_002_e;
1309 rot_link_002_e.rotateY(-10*deg);
1310 G4ThreeVector transl_link_002_e(-55*mm-20.03*mm,0*mm,-lmrpc_z_out/2-transl_link_up_z_2/
cos(10*deg));
1311 G4Transform3D transf_link_002_e(rot_link_002_e,transl_link_002_e);
1312 G4UnionSolid* assembly_04_e =
new G4UnionSolid(
"assembly_04_e",assembly_03_e,link_3,transf_link_002_e);
1321 double l_pcboard_xdo=114.0*mm;
1322 double l_pcboard_xup=174.0*mm;
1323 double l_pcboard_y=12.94*mm;
1324 double l_pcboard_z=352*mm;
1325 double angle_pcboard = atan((l_pcboard_xup-l_pcboard_xdo)/2./l_pcboard_z)*180/
pi*deg;
1326 G4Trd* pcboard =
new G4Trd(
"pcboard",l_pcboard_xdo/2.,l_pcboard_xup/2.,l_pcboard_y/2.,l_pcboard_y/2.,l_pcboard_z/2.);
1330 double gaslayer_x_do=l_pcboard_xdo;
1331 double gaslayer_x_up=l_pcboard_xup;
1332 double gaslayer_y =4.82*mm;
1333 double gaslayer_z =l_pcboard_z;
1336 G4ThreeVector transl_gas_layer(0*mm,gaslayer_y+1.5*mm,0*mm);
1337 G4Transform3D transf_gas_layer(rot_dummy,transl_gas_layer);
1339 G4Trd * gas_layer =
new G4Trd(
"gas_layer",gaslayer_x_do/2.,gaslayer_x_up/2.,gaslayer_y/2.,gaslayer_y/2.,gaslayer_z/2.);
1340 G4UnionSolid *gas_layer_tot =
new G4UnionSolid(
"gas_layer_tot",gas_layer,gas_layer,transf_gas_layer);
1343 double glasslayer_inner_x_do=88.68*mm;
1344 double glasslayer_inner_x_up=147.32*mm;
1345 double glasslayer_inner_y=0.4*mm;
1346 double glasslayer_inner_z=344*mm;
1348 double glasslayer_outer_x_do=98.17*mm;
1349 double glasslayer_outer_x_up=157.83*mm;
1350 double glasslayer_outer_y=0.55*mm;
1351 double glasslayer_outer_z=350*mm;
1353 double sdlayer_x_do=glasslayer_inner_x_do;
1354 double sdlayer_x_up=glasslayer_inner_x_up;
1355 double sdlayer_y=0.22*mm;
1356 double sdlayer_z =glasslayer_inner_z;
1361 G4ThreeVector transl_sdlayer_tot2(0*mm,sdlayer_y+glasslayer_inner_y,0*mm);
1362 G4ThreeVector transl_sdlayer_tot3(0*mm,2*(sdlayer_y+glasslayer_inner_y),0*mm);
1363 G4ThreeVector transl_sdlayer_tot4(0*mm,3*(sdlayer_y+glasslayer_inner_y),0*mm);
1364 G4ThreeVector transl_sdlayer_tot5(0*mm,4*(sdlayer_y+glasslayer_inner_y),0*mm);
1365 G4ThreeVector transl_sdlayer_tot6(0*mm,5*(sdlayer_y+glasslayer_inner_y),0*mm);
1366 G4ThreeVector transl_sdlayer_tot7(0*mm,6*(sdlayer_y+glasslayer_inner_y)+3*mm-glasslayer_inner_y,0*mm);
1367 G4ThreeVector transl_sdlayer_tot8(0*mm,7*(sdlayer_y+glasslayer_inner_y)+3*mm-glasslayer_inner_y,0*mm);
1368 G4ThreeVector transl_sdlayer_tot9(0*mm,8*(sdlayer_y+glasslayer_inner_y)+3*mm-glasslayer_inner_y,0*mm);
1369 G4ThreeVector transl_sdlayer_tot10(0*mm,9*(sdlayer_y+glasslayer_inner_y)+3*mm-glasslayer_inner_y,0*mm);
1370 G4ThreeVector transl_sdlayer_tot11(0*mm,10*(sdlayer_y+glasslayer_inner_y)+3*mm-glasslayer_inner_y,0*mm);
1371 G4ThreeVector transl_sdlayer_tot12(0*mm,11*(sdlayer_y+glasslayer_inner_y)+3*mm-glasslayer_inner_y,0*mm);
1373 G4Transform3D transf_sdlayer_tot2(rot_dummy,transl_sdlayer_tot2);
1374 G4Transform3D transf_sdlayer_tot3(rot_dummy,transl_sdlayer_tot3);
1375 G4Transform3D transf_sdlayer_tot4(rot_dummy,transl_sdlayer_tot4);
1376 G4Transform3D transf_sdlayer_tot5(rot_dummy,transl_sdlayer_tot5);
1377 G4Transform3D transf_sdlayer_tot6(rot_dummy,transl_sdlayer_tot6);
1378 G4Transform3D transf_sdlayer_tot7(rot_dummy,transl_sdlayer_tot7);
1379 G4Transform3D transf_sdlayer_tot8(rot_dummy,transl_sdlayer_tot8);
1380 G4Transform3D transf_sdlayer_tot9(rot_dummy,transl_sdlayer_tot9);
1381 G4Transform3D transf_sdlayer_tot10(rot_dummy,transl_sdlayer_tot10);
1382 G4Transform3D transf_sdlayer_tot11(rot_dummy,transl_sdlayer_tot11);
1383 G4Transform3D transf_sdlayer_tot12(rot_dummy,transl_sdlayer_tot12);
1385 G4Trd * sdlayer =
new G4Trd(
"sdlayer",sdlayer_x_do/2.,sdlayer_x_up/2.,sdlayer_y/2.,sdlayer_y/2.,sdlayer_z/2.);
1386 G4UnionSolid *sdlayer_tot2 =
new G4UnionSolid(
"sdlayer_tot2",sdlayer,sdlayer,transf_sdlayer_tot2);
1387 G4UnionSolid *sdlayer_tot3 =
new G4UnionSolid(
"sdlayer_tot3",sdlayer_tot2,sdlayer,transf_sdlayer_tot3);
1388 G4UnionSolid *sdlayer_tot4 =
new G4UnionSolid(
"sdlayer_tot4",sdlayer_tot3,sdlayer,transf_sdlayer_tot4);
1389 G4UnionSolid *sdlayer_tot5 =
new G4UnionSolid(
"sdlayer_tot5",sdlayer_tot4,sdlayer,transf_sdlayer_tot5);
1390 G4UnionSolid *sdlayer_tot6 =
new G4UnionSolid(
"sdlayer_tot6",sdlayer_tot5,sdlayer,transf_sdlayer_tot6);
1391 G4UnionSolid *sdlayer_tot7 =
new G4UnionSolid(
"sdlayer_tot7",sdlayer_tot6,sdlayer,transf_sdlayer_tot7);
1392 G4UnionSolid *sdlayer_tot8 =
new G4UnionSolid(
"sdlayer_tot8",sdlayer_tot7,sdlayer,transf_sdlayer_tot8);
1393 G4UnionSolid *sdlayer_tot9 =
new G4UnionSolid(
"sdlayer_tot9",sdlayer_tot8,sdlayer,transf_sdlayer_tot9);
1394 G4UnionSolid *sdlayer_tot10 =
new G4UnionSolid(
"sdlayer_tot10",sdlayer_tot9,sdlayer,transf_sdlayer_tot10);
1395 G4UnionSolid *sdlayer_tot11 =
new G4UnionSolid(
"sdlayer_tot11",sdlayer_tot10,sdlayer,transf_sdlayer_tot11);
1396 G4UnionSolid *sensitive_detector =
new G4UnionSolid(
"sensitive_detector",sdlayer_tot11,sdlayer,transf_sdlayer_tot12);
1403 G4ThreeVector transl_glass_2(0*mm,(glasslayer_outer_y/2.+sdlayer_y+glasslayer_inner_y/2.),0*mm);
1404 G4ThreeVector transl_glass_3(0*mm,(glasslayer_outer_y/2.+sdlayer_y+glasslayer_inner_y/2.)+(sdlayer_y+glasslayer_inner_y),0*mm);
1405 G4ThreeVector transl_glass_4(0*mm,(glasslayer_outer_y/2.+sdlayer_y+glasslayer_inner_y/2.)+2*(sdlayer_y+glasslayer_inner_y),0*mm);
1406 G4ThreeVector transl_glass_5(0*mm,(glasslayer_outer_y/2.+sdlayer_y+glasslayer_inner_y/2.)+3*(sdlayer_y+glasslayer_inner_y),0*mm);
1407 G4ThreeVector transl_glass_6(0*mm,(glasslayer_outer_y/2.+sdlayer_y+glasslayer_inner_y/2.)+4*(sdlayer_y+glasslayer_inner_y),0*mm);
1408 G4ThreeVector transl_glass_7(0*mm,2*(glasslayer_outer_y/2.+sdlayer_y+glasslayer_inner_y/2.)+4*(sdlayer_y+glasslayer_inner_y),0*mm);
1410 G4ThreeVector transl_glass_8(0*mm,2*(glasslayer_outer_y/2.+sdlayer_y+glasslayer_inner_y/2.)+4*(sdlayer_y+glasslayer_inner_y)+2.45*mm,0*mm);
1411 G4ThreeVector transl_glass_9(0*mm,3*(glasslayer_outer_y/2.+sdlayer_y+glasslayer_inner_y/2.)+4*(sdlayer_y+glasslayer_inner_y)+2.45*mm,0*mm);
1412 G4ThreeVector transl_glass_10(0*mm,3*(glasslayer_outer_y/2.+sdlayer_y+glasslayer_inner_y/2.)+5*(sdlayer_y+glasslayer_inner_y)+2.45*mm,0*mm);
1413 G4ThreeVector transl_glass_11(0*mm,3*(glasslayer_outer_y/2.+sdlayer_y+glasslayer_inner_y/2.)+6*(sdlayer_y+glasslayer_inner_y)+2.45*mm,0*mm);
1414 G4ThreeVector transl_glass_12(0*mm,3*(glasslayer_outer_y/2.+sdlayer_y+glasslayer_inner_y/2.)+7*(sdlayer_y+glasslayer_inner_y)+2.45*mm,0*mm);
1415 G4ThreeVector transl_glass_13(0*mm,3*(glasslayer_outer_y/2.+sdlayer_y+glasslayer_inner_y/2.)+8*(sdlayer_y+glasslayer_inner_y)+2.45*mm,0*mm);
1416 G4ThreeVector transl_glass_14(0*mm,4*(glasslayer_outer_y/2.+sdlayer_y+glasslayer_inner_y/2.)+8*(sdlayer_y+glasslayer_inner_y)+2.45*mm,0*mm);
1419 G4Transform3D transf_glass_2(rot_dummy,transl_glass_2);
1420 G4Transform3D transf_glass_3(rot_dummy,transl_glass_3);
1421 G4Transform3D transf_glass_4(rot_dummy,transl_glass_4);
1422 G4Transform3D transf_glass_5(rot_dummy,transl_glass_5);
1423 G4Transform3D transf_glass_6(rot_dummy,transl_glass_6);
1424 G4Transform3D transf_glass_7(rot_dummy,transl_glass_7);
1425 G4Transform3D transf_glass_8(rot_dummy,transl_glass_8);
1426 G4Transform3D transf_glass_9(rot_dummy,transl_glass_9);
1427 G4Transform3D transf_glass_10(rot_dummy,transl_glass_10);
1428 G4Transform3D transf_glass_11(rot_dummy,transl_glass_11);
1429 G4Transform3D transf_glass_12(rot_dummy,transl_glass_12);
1430 G4Transform3D transf_glass_13(rot_dummy,transl_glass_13);
1431 G4Transform3D transf_glass_14(rot_dummy,transl_glass_14);
1434 G4Trd * glass_outer =
new G4Trd(
"glass_outer",glasslayer_outer_x_do/2.,glasslayer_outer_x_up/2. ,glasslayer_outer_y/2.,glasslayer_outer_y/2.,glasslayer_outer_z/2.);
1435 G4Trd * glass_inner =
new G4Trd(
"glass_inner",glasslayer_inner_x_do/2.,glasslayer_inner_x_up/2. ,glasslayer_inner_y/2.,glasslayer_inner_y/2.,glasslayer_inner_z/2.);
1437 G4UnionSolid * glass_2 =
new G4UnionSolid(
"glass_2",glass_outer,glass_inner,transf_glass_2);
1438 G4UnionSolid * glass_3 =
new G4UnionSolid(
"glass_3",glass_2,glass_inner,transf_glass_3);
1439 G4UnionSolid * glass_4 =
new G4UnionSolid(
"glass_4",glass_3,glass_inner,transf_glass_4);
1440 G4UnionSolid * glass_5 =
new G4UnionSolid(
"glass_5",glass_4,glass_inner,transf_glass_5);
1441 G4UnionSolid * glass_6 =
new G4UnionSolid(
"glass_6",glass_5,glass_inner,transf_glass_6);
1442 G4UnionSolid * glass_7 =
new G4UnionSolid(
"glass_7",glass_6,glass_outer,transf_glass_7);
1443 G4UnionSolid * glass_8 =
new G4UnionSolid(
"glass_8",glass_7,glass_outer,transf_glass_8);
1444 G4UnionSolid * glass_9 =
new G4UnionSolid(
"glass_9",glass_8,glass_inner,transf_glass_9);
1445 G4UnionSolid * glass_10 =
new G4UnionSolid(
"glass_10",glass_9,glass_inner,transf_glass_10);
1446 G4UnionSolid * glass_11 =
new G4UnionSolid(
"glass_11",glass_10,glass_inner,transf_glass_11);
1447 G4UnionSolid * glass_12 =
new G4UnionSolid(
"glass_12",glass_11,glass_inner,transf_glass_12);
1448 G4UnionSolid * glass_13 =
new G4UnionSolid(
"glass_13",glass_12,glass_inner,transf_glass_13);
1449 G4UnionSolid * glass_layer =
new G4UnionSolid(
"glass_layer",glass_13,glass_outer,transf_glass_14);
1455 double electrode_x_do=93.51*mm;
1456 double electrode_x_up=152.49*mm;
1457 double electrode_y=0.13*mm;
1458 double electrode_z=346*mm;
1460 G4ThreeVector transl_electrode_2(0*mm,4.55*mm,0*mm);
1461 G4ThreeVector transl_electrode_3(0*mm,6.32*mm,0*mm);
1462 G4ThreeVector transl_electrode_4(0*mm,10.87*mm,0*mm);
1463 G4Transform3D transf_electrode_2(rot_dummy,transl_electrode_2);
1464 G4Transform3D transf_electrode_3(rot_dummy,transl_electrode_3);
1465 G4Transform3D transf_electrode_4(rot_dummy,transl_electrode_4);
1467 G4Trd * electrode =
new G4Trd(
"gaslayer",electrode_x_do/2.,electrode_x_up/2.,electrode_y/2.,electrode_y/2.,electrode_z/2.);
1468 G4UnionSolid *electrode_2 =
new G4UnionSolid(
"electrode_2",electrode,electrode,transf_electrode_2);
1469 G4UnionSolid *electrode_3 =
new G4UnionSolid(
"electrode_3",electrode_2,electrode,transf_electrode_3);
1470 G4UnionSolid *electrodes =
new G4UnionSolid(
"electrodes",electrode_3,electrode,transf_electrode_4);
1477 G4double readoutstrip_x[12]={88*mm,92*mm,98*mm,102*mm,108*mm,112*mm,118*mm,122*mm,128*mm,132*mm,138*mm,142*mm};
1478 G4double readoutstrip_y=0.035*mm;
1479 G4double readoutstrip_z=25*mm;
1481 const G4int no_readoutstrips=12;
1483 G4Box * readoutstrip[no_readoutstrips];
1484 G4UnionSolid * readoutstrip_unified[no_readoutstrips];
1489 for(G4int i=0; i<no_readoutstrips;i++)
1491 std::ostringstream
help;
1492 help <<
"strip_" << i;
1493 readoutstrip[i]=
new G4Box(
help.str(), readoutstrip_x[i]/2 , readoutstrip_y/2., readoutstrip_z/2.);
1494 G4ThreeVector transl_help_1(0*mm,6.4875*mm,0*mm);
1495 G4ThreeVector transl_help_2(0*mm,-6.4875*mm,0*mm);
1496 G4Transform3D transf_help_1(rot_dummy,transl_help_1);
1497 G4Transform3D transf_help_2(rot_dummy,transl_help_2);
1498 G4UnionSolid* strip_help =
new G4UnionSolid(
"strip_help",readoutstrip[i],readoutstrip[i],transf_help_1);
1499 readoutstrip_unified[i] =
new G4UnionSolid(
"strip_help_2",strip_help,readoutstrip[i],transf_help_2);
1502 G4ThreeVector transl_readoutsrips[no_readoutstrips-1];
1503 for(G4int i=0;i<(no_readoutstrips-1);i++)
1505 transl_readoutsrips[i].set(0*mm,0*mm,(i+1)*29*mm);
1509 G4Transform3D transf_readoutstrip_2(rot_dummy,transl_readoutsrips[0]);
1510 G4Transform3D transf_readoutstrip_3(rot_dummy,transl_readoutsrips[1]);
1511 G4Transform3D transf_readoutstrip_4(rot_dummy,transl_readoutsrips[2]);
1512 G4Transform3D transf_readoutstrip_5(rot_dummy,transl_readoutsrips[3]);
1513 G4Transform3D transf_readoutstrip_6(rot_dummy,transl_readoutsrips[4]);
1514 G4Transform3D transf_readoutstrip_7(rot_dummy,transl_readoutsrips[5]);
1515 G4Transform3D transf_readoutstrip_8(rot_dummy,transl_readoutsrips[6]);
1516 G4Transform3D transf_readoutstrip_9(rot_dummy,transl_readoutsrips[7]);
1517 G4Transform3D transf_readoutstrip_10(rot_dummy,transl_readoutsrips[8]);
1518 G4Transform3D transf_readoutstrip_11(rot_dummy,transl_readoutsrips[9]);
1519 G4Transform3D transf_readoutstrip_12(rot_dummy,transl_readoutsrips[10]);
1521 G4UnionSolid * readoutstrips_001 =
new G4UnionSolid(
"readoutstrips_001",readoutstrip_unified[0],readoutstrip_unified[1],transf_readoutstrip_2);
1522 G4UnionSolid * readoutstrips_002 =
new G4UnionSolid(
"readoutstrips_002",readoutstrips_001,readoutstrip_unified[2],transf_readoutstrip_3);
1523 G4UnionSolid * readoutstrips_003 =
new G4UnionSolid(
"readoutstrips_003",readoutstrips_002,readoutstrip_unified[3],transf_readoutstrip_4);
1524 G4UnionSolid * readoutstrips_004 =
new G4UnionSolid(
"readoutstrips_004",readoutstrips_003,readoutstrip_unified[4],transf_readoutstrip_5);
1525 G4UnionSolid * readoutstrips_005 =
new G4UnionSolid(
"readoutstrips_005",readoutstrips_004,readoutstrip_unified[5],transf_readoutstrip_6);
1526 G4UnionSolid * readoutstrips_006 =
new G4UnionSolid(
"readoutstrips_006",readoutstrips_005,readoutstrip_unified[6],transf_readoutstrip_7);
1527 G4UnionSolid * readoutstrips_007 =
new G4UnionSolid(
"readoutstrips_007",readoutstrips_006,readoutstrip_unified[7],transf_readoutstrip_8);
1528 G4UnionSolid * readoutstrips_008 =
new G4UnionSolid(
"readoutstrips_008",readoutstrips_007,readoutstrip_unified[8],transf_readoutstrip_9);
1529 G4UnionSolid * readoutstrips_009 =
new G4UnionSolid(
"readoutstrips_009",readoutstrips_008,readoutstrip_unified[9],transf_readoutstrip_10);
1530 G4UnionSolid * readoutstrips_010 =
new G4UnionSolid(
"readoutstrips_010",readoutstrips_009,readoutstrip_unified[10],transf_readoutstrip_11);
1531 G4UnionSolid * readoutstrips_011 =
new G4UnionSolid(
"readoutstrips_011",readoutstrips_010,readoutstrip_unified[11],transf_readoutstrip_12);
1533 G4Box * readoutstrip_help =
new G4Box(
"readoustrip_help",4/2*mm,(13.01+2)/2*mm,(344+2)/2*mm);
1535 G4ThreeVector transl_readoutstrip_help(0*mm,0*mm,160*mm);
1536 G4Transform3D transf_readoutstrip_help(rot_dummy,transl_readoutstrip_help);
1538 G4SubtractionSolid * readoutstrips_012 =
new G4SubtractionSolid(
"readoutstrips_012",readoutstrips_011,readoutstrip_help,transf_readoutstrip_help);
1543 G4double mylar_layer_x_do=103*mm;
1544 G4double mylar_layer_x_up=163*mm;
1545 G4double mylar_layer_y=0.07*mm;
1546 G4double mylar_layer_z=352*mm;
1550 G4ThreeVector transl_mylarlayer_2(0*mm,4.75*mm,0*mm);
1551 G4ThreeVector transl_mylarlayer_3(0*mm,6.32*mm,0*mm);
1552 G4ThreeVector transl_mylarlayer_4(0*mm,11.07*mm,0*mm);
1553 G4Transform3D transf_mylarlayer_2(rot_dummy,transl_mylarlayer_2);
1554 G4Transform3D transf_mylarlayer_3(rot_dummy,transl_mylarlayer_3);
1555 G4Transform3D transf_mylarlayer_4(rot_dummy,transl_mylarlayer_4);
1557 G4Trd * mylar_layer =
new G4Trd(
"mylar_layer",mylar_layer_x_do/2.,mylar_layer_x_up/2.,mylar_layer_y/2.,mylar_layer_y/2.,mylar_layer_z/2.);
1558 G4UnionSolid *mylar_layer_2 =
new G4UnionSolid(
"mylar_layer_2",mylar_layer,mylar_layer,transf_mylarlayer_2);
1559 G4UnionSolid *mylar_layer_3 =
new G4UnionSolid(
"mylar_layer_3",mylar_layer_2,mylar_layer,transf_mylarlayer_3);
1560 G4UnionSolid *mylarlayer_4 =
new G4UnionSolid(
"mylarlayer_4",mylar_layer_3,mylar_layer,transf_mylarlayer_4);
1565 double honeycomb_x_do=98.17*mm;
1566 double honeycomb_x_up=157.83*mm;
1567 double honeycomb_y=3*mm;
1568 double honeycomb_z=350*mm;
1569 G4Trd* honeycomb=
new G4Trd(
"honeycomb",honeycomb_x_do/2,honeycomb_x_up/2,honeycomb_y/2,honeycomb_y/2,honeycomb_z/2);
1574 G4Trd* gascontainer_1 =
new G4Trd(
"gas_container_1",(l_mrpc_xdo_ins)/2.,(lmrpc_xup_ins)/2.,(lmrpc_yfr_ins)/2.,(lmrpc_yba_ins)/2.,(lmrpc_z_ins)/2.);
1575 G4Trd* gascontainer_2 =
new G4Trd(
"gas_container_2",((l_mrpc_xdo_ins)/2.+ delta_frame_x/
cos(inner_angle/2.)),((lmrpc_xup_ins)/2. + delta_frame_x/
cos(inner_angle/2.)),
1576 ((lmrpc_yfr_ins)/2.-delta_frame_y),
1577 ((lmrpc_yba_ins)/2.-delta_frame_y),(lmrpc_z_ins)/2.);
1578 G4UnionSolid* gascontainer_3=
new G4UnionSolid(
"gascontainer_3",gascontainer_1,gascontainer_2,transf_dummy);
1581 logical_assembly_west_1 =
new G4LogicalVolume(assembly_04_e,G4Material::GetMaterial(
"Aluminium"),
"logical_assembly_west_1");
1582 logical_assembly_west_2 =
new G4LogicalVolume(assembly_04_e,G4Material::GetMaterial(
"Aluminium"),
"logical_assembly_west_2");
1583 logical_assembly_east_1 =
new G4LogicalVolume(assembly_04_e,G4Material::GetMaterial(
"Aluminium"),
"logical_assembly_east_1");
1584 logical_assembly_east_2 =
new G4LogicalVolume(assembly_04_e,G4Material::GetMaterial(
"Aluminium"),
"logical_assembly_east_2");
1595 logical_gascontainer_3_west_1 =
new G4LogicalVolume(gascontainer_3,MRPCGas,
"logical_gascontainer_3_west_1");
1596 logical_pcboard_west_1 =
new G4LogicalVolume(pcboard,Mylar_1397,
"logical_pcboard_west_1");
1597 logical_gaslayer_tot_west_1 =
new G4LogicalVolume(gas_layer_tot,MRPCGas,
"logical_gaslayer_tot_west_1");
1598 logical_sensitive_detector_west_1 =
new G4LogicalVolume(sensitive_detector,MRPCGas,
"logical_sensitive_detector_west_1");
1599 logical_glass_layer_west_1 =
new G4LogicalVolume(glass_layer,G4Material::GetMaterial(
"SiO2"),
"logical_glass_layer_west_1");
1600 logical_electrodes_west_1 =
new G4LogicalVolume(electrodes,Graphite,
"logical_electrodes_west_1");
1601 logical_readoutstrips_012_west_1 =
new G4LogicalVolume(readoutstrips_012,G4Material::GetMaterial(
"Copper"),
"logical_readoutstrips_012_west_1");
1602 logical_mylarlayer_west_1 =
new G4LogicalVolume(mylarlayer_4,Mylar_1397,
"logical_mylarlayer_west_1");
1603 logical_honeycomb_west_1 =
new G4LogicalVolume(honeycomb,Mylar_073,
"logical_honeycomb_west_1");
1606 logical_gascontainer_3_west_2 =
new G4LogicalVolume(gascontainer_3,MRPCGas,
"logical_gascontainer_3_west_2");
1607 logical_pcboard_west_2 =
new G4LogicalVolume(pcboard,Mylar_1397,
"logical_pcboard_west_2");
1608 logical_gaslayer_tot_west_2 =
new G4LogicalVolume(gas_layer_tot,MRPCGas,
"logical_gaslayer_tot_west_2");
1609 logical_sensitive_detector_west_2 =
new G4LogicalVolume(sensitive_detector,MRPCGas,
"logical_sensitive_detector_west_2");
1610 logical_electrodes_west_2 =
new G4LogicalVolume(electrodes,Graphite,
"logical_electrodes_west_2");
1611 logical_glass_layer_west_2 =
new G4LogicalVolume(glass_layer,G4Material::GetMaterial(
"SiO2"),
"logical_glass_layer_west_2");
1612 logical_readoutstrips_012_west_2 =
new G4LogicalVolume(readoutstrips_012,G4Material::GetMaterial(
"Copper"),
"logical_readoutstrips_012_west_2");
1613 logical_mylarlayer_west_2 =
new G4LogicalVolume(mylarlayer_4,Mylar_1397,
"logical_mylarlayer_west_2");
1614 logical_honeycomb_west_2 =
new G4LogicalVolume(honeycomb,Mylar_073,
"logical_honeycomb_west_2");
1617 logical_gascontainer_3_east_1 =
new G4LogicalVolume(gascontainer_3,MRPCGas,
"logical_gascontainer_3_east_1");
1618 logical_pcboard_east_1 =
new G4LogicalVolume(pcboard,Mylar_1397,
"logical_pcboard_east_1");
1619 logical_gaslayer_tot_east_1 =
new G4LogicalVolume(gas_layer_tot,MRPCGas,
"logical_gaslayer_tot_east_1");
1620 logical_sensitive_detector_east_1 =
new G4LogicalVolume(sensitive_detector,MRPCGas,
"logical_sensitive_detector_east_1");
1621 logical_electrodes_east_1 =
new G4LogicalVolume(electrodes,Graphite,
"logical_electrodes_east_1");
1622 logical_glass_layer_east_1 =
new G4LogicalVolume(glass_layer,G4Material::GetMaterial(
"SiO2"),
"logical_glass_layer_east_1");
1623 logical_readoutstrips_012_east_1 =
new G4LogicalVolume(readoutstrips_012,G4Material::GetMaterial(
"Copper"),
"logical_readoutstrips_012_east_1");
1624 logical_mylarlayer_east_1 =
new G4LogicalVolume(mylarlayer_4,Mylar_1397,
"logical_mylarlayer_east_1");
1625 logical_honeycomb_east_1 =
new G4LogicalVolume(honeycomb,Mylar_073,
"logical_honeycomb_east_1");
1630 logical_gascontainer_3_east_2 =
new G4LogicalVolume(gascontainer_3,MRPCGas,
"logical_gascontain_3_east_2");
1631 logical_pcboard_east_2 =
new G4LogicalVolume(pcboard,Mylar_1397,
"logical_pcboard_east_2");
1632 logical_gaslayer_tot_east_2 =
new G4LogicalVolume(gas_layer_tot,MRPCGas,
"logical_gaslayer_tot_east_2");
1633 logical_sensitive_detector_east_2 =
new G4LogicalVolume(sensitive_detector,MRPCGas,
"logical_sensitive_detector_east_2");
1634 logical_electrodes_east_2 =
new G4LogicalVolume(electrodes,Graphite,
"logical_electrodes_east_2");
1635 logical_glass_layer_east_2 =
new G4LogicalVolume(glass_layer,G4Material::GetMaterial(
"SiO2"),
"logical_glass_layer_east_2");
1636 logical_readoutstrips_012_east_2 =
new G4LogicalVolume(readoutstrips_012,G4Material::GetMaterial(
"Copper"),
"logical_readoutstrips_012_east_2");
1637 logical_mylarlayer_east_2 =
new G4LogicalVolume(mylarlayer_4,Mylar_1397,
"logical_mylarlayer_east_2");
1638 logical_honeycomb_east_2 =
new G4LogicalVolume(honeycomb,Mylar_073,
"logical_honeycomb_east_2");
1661 physical_gascontainer_3_west_1 =
new G4PVPlacement(0,G4ThreeVector(0,0,ks_trafo),logical_gascontainer_3_west_1,
"physical_gascontainer_3_west_1",logical_assembly_west_1,
false,0);
1662 physical_pcboard_west_1 =
new G4PVPlacement(0,G4ThreeVector(0,0,0),logical_pcboard_west_1,
"physical_pcboard_west_1",logical_gascontainer_3_west_1,
false,0);
1663 physical_gaslayer_tot_west_1 =
new G4PVPlacement(0,G4ThreeVector(0,-3.16*mm,0),logical_gaslayer_tot_west_1,
"physical_gaslayer_tot_west_1",logical_gascontainer_3_west_1,
false,0);
1664 physical_sensitive_detector_west_1 =
new G4PVPlacement(0,G4ThreeVector(0,-4.71*mm,0),logical_sensitive_detector_west_1,
"physical_sensitive_detector_west_1",logical_pcboard_west_1,
false,0);
1665 physical_glass_layer_west_1 =
new G4PVPlacement(0,G4ThreeVector(0,-5.095*mm,0),logical_glass_layer_west_1,
"physical_glass_layer_west_1",logical_pcboard_west_1,
false,0);
1666 physical_electrodes_west_1 =
new G4PVPlacement(0,G4ThreeVector(0,-5.435*mm,0),logical_electrodes_west_1,
"physical_electrodes_west_1",logical_pcboard_west_1,
false,0);
1667 physical_readoutstrips_012_west_1 =
new G4PVPlacement(0,G4ThreeVector(0,0*mm,-159.5*mm),logical_readoutstrips_012_west_1,
"physical_readoutstrips_012_west_1",logical_pcboard_west_1,
false,0);
1668 physical_mylarlayer_west_1 =
new G4PVPlacement(0,G4ThreeVector(0,-5.535*mm,0*mm),logical_mylarlayer_west_1,
"physical_mylarlayer_west_1",logical_pcboard_west_1,
false,0);
1669 physical_honeycomb_1_west_1 =
new G4PVPlacement(0,G4ThreeVector(0,l_pcboard_y/2.+readoutstrip_y+honeycomb_y/2,0),
1670 logical_honeycomb_west_1,
"physical_honeycomb_1_west_1",logical_gascontainer_3_west_1,
false,0);
1671 physical_honeycomb_2_west_1 =
new G4PVPlacement(0,G4ThreeVector(0,-(l_pcboard_y/2.+readoutstrip_y+honeycomb_y/2),0),
1672 logical_honeycomb_west_1,
"physical_honeycomb_2_west_1",logical_gascontainer_3_west_1,
false,0);
1675 physical_gascontainer_3_west_2 =
new G4PVPlacement(0,G4ThreeVector(0,0,ks_trafo),logical_gascontainer_3_west_2,
"physical_gascontainer_3_west_2",logical_assembly_west_2,
false,0);
1676 physical_pcboard_west_2 =
new G4PVPlacement(0,G4ThreeVector(0,0,0),logical_pcboard_west_2,
"physical_pcboard_west_2",logical_gascontainer_3_west_2,
false,0);
1677 physical_gaslayer_tot_west_2 =
new G4PVPlacement(0,G4ThreeVector(0,-3.16*mm,0),logical_gaslayer_tot_west_2,
"physical_gaslayer_tot_west_2",logical_gascontainer_3_west_2,
false,0);
1678 physical_sensitive_detector_west_2 =
new G4PVPlacement(0,G4ThreeVector(0,-4.71*mm,0),logical_sensitive_detector_west_2,
"physical_sensitive_detector_west_2",logical_pcboard_west_2,
false,0);
1679 physical_glass_layer_west_2 =
new G4PVPlacement(0,G4ThreeVector(0,-5.095*mm,0),logical_glass_layer_west_2,
"physical_glass_layer_west_2",logical_pcboard_west_2,
false,0);
1680 physical_electrodes_west_2 =
new G4PVPlacement(0,G4ThreeVector(0,-5.435*mm,0),logical_electrodes_west_2,
"physical_electrodes_west_2",logical_pcboard_west_2,
false,0);
1681 physical_readoutstrips_012_west_2 =
new G4PVPlacement(0,G4ThreeVector(0,0*mm,-159.5*mm),logical_readoutstrips_012_west_2,
"physical_readoutstrips_012_west_2",logical_pcboard_west_2,
false,0);
1682 physical_mylarlayer_west_2 =
new G4PVPlacement(0,G4ThreeVector(0,-5.535*mm,0*mm),logical_mylarlayer_west_2,
"physical_mylarlayer_west_2",logical_pcboard_west_2,
false,0);
1683 physical_honeycomb_1_west_2 =
new G4PVPlacement(0,G4ThreeVector(0,l_pcboard_y/2.+readoutstrip_y+honeycomb_y/2,0),
1684 logical_honeycomb_west_2,
"physical_honeycomb_1_west_2",logical_gascontainer_3_west_2,
false,0);
1685 physical_honeycomb_2_west_2 =
new G4PVPlacement(0,G4ThreeVector(0,-(l_pcboard_y/2.+readoutstrip_y+honeycomb_y/2),0),
1686 logical_honeycomb_west_2,
"physical_honeycomb_2_west_2",logical_gascontainer_3_west_2,
false,0);
1689 physical_gascontainer_3_east_1 =
new G4PVPlacement(0,G4ThreeVector(0,0,ks_trafo),logical_gascontainer_3_east_1,
"physical_gascontainer_3_east_1",logical_assembly_east_1,
false,0);
1690 physical_pcboard_east_1 =
new G4PVPlacement(0,G4ThreeVector(0,0,0),logical_pcboard_east_1,
"physical_pcboard_east_1",logical_gascontainer_3_east_1,
false,0);
1691 physical_gaslayer_tot_east_1 =
new G4PVPlacement(0,G4ThreeVector(0,-3.16*mm,0),logical_gaslayer_tot_east_1,
"physical_gaslayer_tot_east_1",logical_gascontainer_3_east_1,
false,0);
1692 physical_sensitive_detector_east_1 =
new G4PVPlacement(0,G4ThreeVector(0,-4.71*mm,0),logical_sensitive_detector_east_1,
"physical_sensitive_detector_east_1",logical_pcboard_east_1,
false,0);
1693 physical_glass_layer_east_1 =
new G4PVPlacement(0,G4ThreeVector(0,-5.095*mm,0),logical_glass_layer_east_1,
"physical_glass_layer_east_1",logical_pcboard_east_1,
false,0);
1694 physical_electrodes_east_1 =
new G4PVPlacement(0,G4ThreeVector(0,-5.435*mm,0),logical_electrodes_east_1,
"physical_electrodes_east_1",logical_pcboard_east_1,
false,0);
1695 physical_readoutstrips_012_east_1 =
new G4PVPlacement(0,G4ThreeVector(0,0*mm,-159.5*mm),logical_readoutstrips_012_east_1,
"physical_readoutstrips_012_east_1",logical_pcboard_east_1,
false,0);
1696 physical_mylarlayer_east_1 =
new G4PVPlacement(0,G4ThreeVector(0,-5.535*mm,0*mm),logical_mylarlayer_east_1,
"physical_mylarlayer_east_1",logical_pcboard_east_1,
false,0);
1697 physical_honeycomb_1_east_1 =
new G4PVPlacement(0,G4ThreeVector(0,l_pcboard_y/2.+readoutstrip_y+honeycomb_y/2,0),
1698 logical_honeycomb_east_1,
"physical_honeycomb_1_east_1",logical_gascontainer_3_east_1,
false,0);
1699 physical_honeycomb_2_east_1 =
new G4PVPlacement(0,G4ThreeVector(0,-(l_pcboard_y/2.+readoutstrip_y+honeycomb_y/2),0),
1700 logical_honeycomb_east_1,
"physical_honeycomb_2_east_1",logical_gascontainer_3_east_1,
false,0);
1704 physical_gascontainer_3_east_2 =
new G4PVPlacement(0,G4ThreeVector(0,0,ks_trafo),logical_gascontainer_3_east_2,
"physical_gascontainer_3_east_2",logical_assembly_east_2,
false,0);
1705 physical_pcboard_east_2 =
new G4PVPlacement(0,G4ThreeVector(0,0,0),logical_pcboard_east_2,
"physical_pcboard_east_2",logical_gascontainer_3_east_2,
false,0);
1706 physical_gaslayer_tot_east_2 =
new G4PVPlacement(0,G4ThreeVector(0,-3.16*mm,0),logical_gaslayer_tot_east_2,
"physical_gaslayer_tot_east_2",logical_gascontainer_3_east_2,
false,0);
1707 physical_sensitive_detector_east_2 =
new G4PVPlacement(0,G4ThreeVector(0,-4.71*mm,0),logical_sensitive_detector_east_2,
"physical_sensitive_detector_east_2",logical_pcboard_east_2,
false,0);
1708 physical_glass_layer_east_2 =
new G4PVPlacement(0,G4ThreeVector(0,-5.095*mm,0),logical_glass_layer_east_2,
"physical_glass_layer_east_2",logical_pcboard_east_2,
false,0);
1709 physical_electrodes_east_2 =
new G4PVPlacement(0,G4ThreeVector(0,-5.435*mm,0),logical_electrodes_east_2,
"physical_electrodes_east_2",logical_pcboard_east_2,
false,0);
1710 physical_readoutstrips_012_east_2 =
new G4PVPlacement(0,G4ThreeVector(0,0*mm,-159.5*mm),logical_readoutstrips_012_east_2,
"physical_readoutstrips_012_east_2",logical_pcboard_east_2,
false,0);
1711 physical_mylarlayer_east_2 =
new G4PVPlacement(0,G4ThreeVector(0,-5.535*mm,0*mm),logical_mylarlayer_east_2,
"physical_mylarlayer_east_2",logical_pcboard_east_2,
false,0);
1712 physical_honeycomb_1_east_2 =
new G4PVPlacement(0,G4ThreeVector(0,l_pcboard_y/2.+readoutstrip_y+honeycomb_y/2,0),
1713 logical_honeycomb_east_2,
"physical_honeycomb_1_east_2",logical_gascontainer_3_east_2,
false,0);
1714 physical_honeycomb_2_east_2 =
new G4PVPlacement(0,G4ThreeVector(0,-(l_pcboard_y/2.+readoutstrip_y+honeycomb_y/2),0),
1715 logical_honeycomb_east_2,
"physical_honeycomb_2_east_2",logical_gascontainer_3_east_2,
false,0);
1720 G4ThreeVector pos_west_1(0,0,+12.5*mm);
1721 G4ThreeVector pos_west_2(0,0,-12.5*mm);
1722 G4ThreeVector pos_east_1(0,0,-12.5*mm);
1723 G4ThreeVector pos_east_2(0,0,+12.5*mm);
1725 int n_mrpc_modules=18;
1726 double shift_angle_mrpc=360*deg/n_mrpc_modules;
1727 double shift_angle_layer_2=(angle_readoutbox+inner_angle)/2.;
1729 double radius_physical_mrpc_placement = 634.56*mm;
1733 for (
int i=0;i<n_mrpc_modules;i++)
1737 pos_west_1.setX(radius_physical_mrpc_placement*
cos(90*deg+i*shift_angle_mrpc));
1738 pos_west_1.setY(radius_physical_mrpc_placement*
sin(90*deg+i*shift_angle_mrpc));
1740 pos_west_2.setX(radius_physical_mrpc_placement*
cos(90*deg+shift_angle_layer_2+i*shift_angle_mrpc));
1741 pos_west_2.setY(radius_physical_mrpc_placement*
sin(90*deg+shift_angle_layer_2+i*shift_angle_mrpc));
1743 G4RotationMatrix rot_west_1,rot_west_2;
1745 rot_west_1.rotateX(90*deg);
1746 rot_west_1.rotateY(shift_angle_mrpc*i);
1747 rot_west_1.rotateZ(180*deg);
1748 rot_west_1.invert();
1749 G4Transform3D transf_west_1(rot_west_1,pos_west_1);
1751 rot_west_2.rotateX(90*deg);
1752 rot_west_2.rotateY(shift_angle_layer_2+shift_angle_mrpc*i);
1753 rot_west_2.rotateZ(180*deg);
1754 rot_west_2.invert();
1755 G4Transform3D transf_west_2(rot_west_2,pos_west_2);
1758 std::ostringstream string_physical_mrpc_lay1,string_physical_mrpc_lay2;
1759 string_physical_mrpc_lay1 <<
"physical_mrpc_west_lay1_mod_"<<i;
1760 string_physical_mrpc_lay2 <<
"physical_mrpc_west_lay2_mod_"<<i;
1763 physical_assembly_west_1 =
new G4PVPlacement(transf_west_1,logical_assembly_west_1,string_physical_mrpc_lay1.str(),logicalEcTofWest,
false,(i+1));
1764 physical_assembly_west_2 =
new G4PVPlacement(transf_west_2,logical_assembly_west_2,string_physical_mrpc_lay2.str(),logicalEcTofWest,
false,(i+1));
1769 G4cout << G4endl << G4endl <<
"You are using the new MRPC TOF Detector" <<G4endl << G4endl;
1771 for (
int i=0;i<n_mrpc_modules;i++)
1774 pos_east_1.setX(radius_physical_mrpc_placement*
cos(90*deg+i*shift_angle_mrpc));
1775 pos_east_1.setY(radius_physical_mrpc_placement*
sin(90*deg+i*shift_angle_mrpc));
1777 pos_east_2.setX(radius_physical_mrpc_placement*
cos(90*deg+shift_angle_layer_2+i*shift_angle_mrpc));
1778 pos_east_2.setY(radius_physical_mrpc_placement*
sin(90*deg+shift_angle_layer_2+i*shift_angle_mrpc));
1780 G4RotationMatrix rot_east_1,rot_east_2;
1782 rot_east_1.rotateX(90*deg);
1783 rot_east_1.rotateY(shift_angle_mrpc*i);
1784 rot_east_1.invert();
1785 G4Transform3D transf_east_1(rot_east_1,pos_east_1);
1787 rot_east_2.rotateX(90*deg);
1788 rot_east_2.rotateY(shift_angle_layer_2+shift_angle_mrpc*i);
1789 rot_east_2.invert();
1790 G4Transform3D transf_east_2(rot_east_2,pos_east_2);
1792 std::ostringstream string_physical_mrpc_lay1,string_physical_mrpc_lay2;
1793 string_physical_mrpc_lay1 <<
"physical_mrpc_east_lay1_mod_"<<(17-i);
1794 string_physical_mrpc_lay2 <<
"physical_mrpc_east_lay2_mod_"<<(17-i);
1796 physical_assembly_east_1 =
new G4PVPlacement(transf_east_1,logical_assembly_east_1,string_physical_mrpc_lay1.str(),logicalEcTofEast,
false,(18-i));
1797 physical_assembly_east_2 =
new G4PVPlacement(transf_east_2,logical_assembly_east_2,string_physical_mrpc_lay2.str(),logicalEcTofEast,
false,(18-i));
1808 G4double a,z,density,fraction;
1809 G4int nel, natoms, ncomponents;
1810 G4String name, symbol;
1813 G4Element*
H=G4Element::GetElement(
"Hydrogen");
1815 H =
new G4Element(name=
"Hydrogen",symbol=
"H" , z= 1., a=1.01*g/mole);
1817 G4Element*
C=G4Element::GetElement(
"Carbon");
1819 C =
new G4Element(name=
"Carbon" ,symbol=
"C" , z= 6., a=12.01*g/mole);
1821 G4Element* F=G4Element::GetElement(
"Fluorin");
1823 F =
new G4Element(name=
"Fluorin", symbol=
"F", z=9., a=18.01*g/mole);
1825 G4Element* O=G4Element::GetElement(
"Oxygen");
1827 O =
new G4Element(name=
"Oxygen",symbol=
"O",z= 8., a= 16.00*g/mole);
1829 G4Element* S=G4Element::GetElement(
"Sulfur");
1831 S =
new G4Element(name=
"Sulfur",symbol=
"S",z= 16., a= 32.06*g/mole);
1834 Mylar_1397 =
new G4Material(
"Mylar_1397", density= 1.397*g/cm3, ncomponents=3);
1835 Mylar_1397->AddElement(
C,natoms=10);
1836 Mylar_1397->AddElement(
H,natoms=8);
1837 Mylar_1397->AddElement(O,natoms=4);
1840 Mylar_073 =
new G4Material(
"Mylar_073", density= 0.73*g/cm3, ncomponents=3);
1841 Mylar_073->AddElement(
C,natoms=10);
1842 Mylar_073->AddElement(
H,natoms=8);
1843 Mylar_073->AddElement(O,natoms=4);
1846 FreonR134A =
new G4Material(
"FreonR134A", density =4.168*mg/cm3,ncomponents=3);
1847 FreonR134A->AddElement(
C,natoms=2);
1848 FreonR134A->AddElement(
H,natoms=2);
1849 FreonR134A->AddElement(F,natoms=4);
1852 SF6 =
new G4Material(
"SF6", density =6.18*mg/cm3,ncomponents=2);
1853 SF6->AddElement(S,natoms=1);
1854 SF6->AddElement(F,natoms=6);
1857 Isobutan =
new G4Material(
"Isobutan", density =2.506*mg/cm3,ncomponents=2);
1858 Isobutan->AddElement(
C, natoms=4);
1859 Isobutan->AddElement(
H, natoms=10);
1863 MRPCGas =
new G4Material(name=
"MRPCGas", density=4.18*mg/cm3,ncomponents=3);
1864 MRPCGas->AddMaterial(FreonR134A, fraction= 33.3*perCent);
1865 MRPCGas->AddMaterial(SF6, fraction=47.7*perCent);
1866 MRPCGas->AddMaterial(Isobutan, fraction=19.*perCent);
1868 if(0.0 == MRPCGas->GetIonisation()->GetMeanEnergyPerIonPair()) {
1869 MRPCGas->GetIonisation()->SetMeanEnergyPerIonPair(20*eV);
1874 Carbonfiber =
new G4Material(name=
"Carbonfiber", density=1.8*g/cm3,nel=1);
1875 Carbonfiber->AddElement(
C,1.);
1877 Graphite =
new G4Material(
"Graphite", density=2.2*g/cm3,ncomponents=1);
1878 Graphite->AddElement(
C,1.);
1882 BC404 =
new G4Material(
"BC404",density=1.032*g/cm3,nel=2);
1883 BC404->AddElement(
C,10);
1884 BC404->AddElement(
H,11);
1886 BC408 =
new G4Material(
"BC408",density=1.032*g/cm3,nel=2);
1887 BC408->AddElement(
C,1000);
1888 BC408->AddElement(
H,1104);
1890 PVF =
new G4Material(
"PVF",density=1.45*g/cm3,nel=3);
1891 PVF->AddElement(
C,2);
1892 PVF->AddElement(
H,3);
1893 PVF->AddElement(F,1);
1897 G4Material* Cu = G4Material::GetMaterial(
"Copper");
1899 G4Material* Al = G4Material::GetMaterial(
"Aluminium");
1902 G4Material* SiO2 =G4Material::GetMaterial(
"SiO2");
1917 density = 1.4618815*g/cm3;
1918 PMTmaterial =
new G4Material(name=
"PMTmaterial", density, 4);
1919 PMTmaterial->AddMaterial(Al, 0.4495);
1920 PMTmaterial->AddMaterial(Cu,0.35);
1921 PMTmaterial->AddMaterial(SiO2,0.2);
1922 PMTmaterial->AddMaterial(G4Material::GetMaterial(
"Air"),0.0005);
1924 G4cout<<PMTmaterial;
1926 density = 1.002*g/cm3;
1927 G4Material* tape =
new G4Material(name=
"tape",density,nel=2);
1928 tape->AddElement(
C,2);
1929 tape->AddElement(
H,5);
1937 double cosb = sqrt( r.xx()*r.xx() + r.yx()*r.yx() );
1939 if (cosb > 16*FLT_EPSILON)
1941 a = atan2( r.zy(), r.zz() );
1942 b = atan2( -r.zx(), cosb );
1943 c = atan2( r.yx(), r.xx() );
1947 a = atan2( -r.yz(), r.yy() );
1948 b = atan2( -r.zx(), cosb );
1960 G4RotationMatrix temp;
1965 temp.rotateZ((c/deg)*deg);
double tan(const BesAngle a)
double sin(const BesAngle a)
double cos(const BesAngle a)
***************************************************************************************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
G4LogicalVolume * FindLogicalVolume(const G4String &vn)
void ConstructEcTof_mrpc()
void getXYZ(const G4RotationMatrix r, double &a, double &b, double &c) const
void Construct(G4LogicalVolume *logicalBes)
virtual ~BesTofConstruction()
G4double GetPVFThickness()
static BesTofGeoParameter * GetInstance()
G4double GetAlThickness()
G4LogicalVolume * GetTopVolume()
Get the top(world) volume;.