QwGeant4
QweakSimMainMagnet.cc
Go to the documentation of this file.
1 //=============================================================================
2 //
3 // ---------------------------
4 // | Doxygen File Information |
5 // ---------------------------
6 //
7 /**
8 
9  \file QweakSimMainMagnet.cc
10 
11  $Revision: 1.8 $
12  $Date: 2006/01/20 21:14:33 $
13 
14  \author Klaus Hans Grimm
15 
16 */
17 
18 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
19 
20 #include "QweakSimMainMagnet.hh"
21 
22 // geant4 includes
23 #include "G4LogicalVolume.hh"
24 #include "G4ThreeVector.hh"
25 #include "G4RotationMatrix.hh"
26 
27 // user includes
28 #include "QweakSimMaterial.hh"
30 
31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32 
34 {
35  G4cout << G4endl << "###### Calling QweakSimMainMagnet::QweakSimMainMagnet() " << G4endl << G4endl;
36 
37  // initialize pointers here, order does NOT matter
38  pMaterial = NULL;
39  MM_SingleCoilParam = NULL;
40 
44 
47 
48  SingleCoil_Material = NULL;
49 
52 
56 
60 
67 
68  //---
69  Angle_Lintel.clear();
70  Angle_Lintel.resize(8);
71 
72  Rotation_Lintel.clear();
73  Rotation_Lintel.resize(8);
74 
75  Translation_Lintel.clear();
76  Translation_Lintel.resize(8);
77 
78  Lintel_Logical = NULL;
79  Lintel_Material = NULL;
80 
81  Lintel_Physical.clear();
82  Lintel_Physical.resize(8);
83 
84  //---
85  Angle_SingleCoil.clear();
86  Angle_SingleCoil.resize(8);
87 
88  Rotation_SingleCoil.clear();
89  Rotation_SingleCoil.resize(8);
90 
91  Translation_SingleCoil.clear();
92  Translation_SingleCoil.resize(8);
93 
94  //---
95 
98 
101 
104 
107 
108  //---
109 
112 
115 
118 
119 
122 
125 
128 
129  SingleCoil_VisAtt = NULL;
130  SingleCoil_VisAtt = new G4VisAttributes();
131 
132  Lintel_VisAtt = NULL;
133  Lintel_VisAtt = new G4VisAttributes();
134 
135  //---
136 
137  // clear vector containing temp solids for boolean soild subtractions
138  MyUpstreamSpider_Solid.clear();
139  MyUpstreamSpider_Solid.resize(24); // 16 tube-holes + 8 plate-hole
140 
141 
142  // clear vector containing temp solids for boolean soild subtractions
144  MyUpstreamSpider_LowThetaCutout_Solid.resize(3); // 2 union tubes
145 
146  // for merging radial struts to upstream spider
149 
150  UpstreamSpider_VisAtt = NULL;
151  UpstreamSpider_VisAtt = new G4VisAttributes();
152 
153  //---------------------
154  // large clamp plates
155  //---------------------
157 
159 
162 
165 
167  Translation_LeftClampPlate.resize(8);
168 
170  Translation_RightClampPlate.resize(8);
171 
172  Angle_ClampPlate.clear();
173  Angle_ClampPlate.resize(8);
174 
175  Rotation_ClampPlate.clear();
176  Rotation_ClampPlate.resize(8);
177 
179  SingleCoil_ClampPlate_VisAtt = new G4VisAttributes();
180 
181  //---------------------------
182  // Upstream mini clamp plates
183  //----------------------------
187 
190 
193 
196 
199 
200  Angle_MiniClampPlate.clear();
201  Angle_MiniClampPlate.resize(8);
202 
203  Rotation_MiniClampPlate.clear();
204  Rotation_MiniClampPlate.resize(8);
205 
206  // clear vector containing temp solids for mini clamp chamfers
207  MiniClampPlateTemp_Solid.clear();
208  MiniClampPlateTemp_Solid.resize(4); //need 4 chamfers
209 
211  SingleCoil_MiniClampPlate_VisAtt = new G4VisAttributes();
212 
213  //--------------------------------------------
214  // Frame plate in which the coil is embedded
215  //--------------------------------------------
218 
221 
222  Translation_FramePlate.clear();
223  Translation_FramePlate.resize(8);
224 
225  Angle_FramePlate.clear();
226  Angle_FramePlate.resize(8);
227 
228  Rotation_FramePlate.clear();
229  Rotation_FramePlate.resize(8);
230 
231  // clear vector containing temp solids for mini clamp chamfers
232  FramePlateTemp_Solid.clear();
233  FramePlateTemp_Solid.resize(4); //need 4 solid for subtraction
234 
236  SingleCoil_FramePlate_VisAtt = new G4VisAttributes();
237 
238  //--------------------------------------------
239  // Radial Mounting Blocks
240  //--------------------------------------------
241  //
244 
247 
250 
253 
256 
259 
262 
265 
268 
270  Angle_RadialMountingBlock.resize(8);
271 
274 
276  SingleCoil_RadialMountingBlock_VisAtt = new G4VisAttributes();
277 
278  //--------------------------------------------
279  // Downstream support frame , general
280  //--------------------------------------------
281  //
284 
286  SupportFrameUnion_TempSolid.resize(10);
287 
288  //------------------------------------------------------------
289  // Downstream Double-T-Beam orientated horizontal and vertical
290  //------------------------------------------------------------
291  //
292 
295  SupportFrame_Material = NULL;
296 
299 
302 
305 
308 
311 
314 
315 
316  //------------------------------------------------------------
317  // Downstream Double-T-Beam orientated at +-45 and +-135 deg
318  //------------------------------------------------------------
319  //
321 
324 
327 
328  Angle_DoubleTBeam45Deg.clear();
329  Angle_DoubleTBeam45Deg.resize(4);
330 
332  Rotation_DoubleTBeam45Deg.resize(4);
333 
335  SupportFrame_Downstream45DegDoubleTBeam_VisAtt = new G4VisAttributes();
336 
337  //------------------------------------------------------------
338  // Downstream Spider and radial slabs
339  //------------------------------------------------------------
340  //
343 
345  DownstreamSpider_VisAtt = new G4VisAttributes();
346 
349 
350  //-----
351 
353  DownstreamSpider_RadialSlab_VisAtt = new G4VisAttributes();
354 
357 
360 
363 
366 
367  //-------------------------------------------------------------------------------------
368 
369 
370  // get access to material definition
372 
373  // get material
384 
385  // define MainMagnet_MasterContainer geometry values
386  // The MainMagnet_MasterContainer contains everything related to the MiniTorus
387  //
388  MainMagnet_MasterContainer_FullLength_X = 800.0*cm; // Full X length
389  MainMagnet_MasterContainer_FullLength_Y = 800.0*cm; // Full Y length
390  MainMagnet_MasterContainer_FullLength_Z = 450.0*cm; // Full Z length , Coil_diameter= 52.50*cm
391 
392  // set default for origin (taken from Juliette's euclid file) in MotherVolume
394 
395  // define a single coil
396  SingleCoil_FullThickness = 11.842*cm; // without expoxy mold
397 
398  // Distance of Copper Plates to BeamLine : See SolidWorks
400 
404 
405  // Distance of a Single Copper Coil Center to BeamLine : See SolidWorks
407 
408 // define a single coil disk for union
409  SingleCoil_Wing_DiameterMin = 2.0*21.6*cm;
410  SingleCoil_Wing_DiameterMax = 2.0*73.0*cm;
411 
412  //Left: downstream
413  SingleCoil_Wing_PhiAngleStart = 90.0*degree; // OK
414  SingleCoil_Wing_PhiDeltaAngle = 180.0*degree; //OK
415 
416  // part of the coil: plate
417  // using the coodinate system as for SingleCoil_MasterContainer_FullLength
418  // since I will place the plate into the MasterContainer
422 
423 // SingleCoil_Plate_FullLength_X = 1.0*cm;
424 // SingleCoil_Plate_FullLength_Y = 1.0*cm;
425 // SingleCoil_Plate_FullLength_Z = 1.0*cm;
426 
427 
428 // define a single coil disk for union
429  UpstreamSpider_DiameterMin = 2.0* 6.5*2.56*cm; //SW: 13 inch inner diameter hole
430  UpstreamSpider_DiameterMax = 2.0*17.5*2.56*cm; //SW: 31 inch outer diameter + some extra inches for subtraction
431  UpstreamSpider_FullThickness = 1.0*2.56*cm; //SW
432  UpstreamSpider_PhiAngleStart = 0.0*degree; // OK
433  UpstreamSpider_PhiDeltaAngle = 360.0*degree; //OK
434 
435  UpstreamSpider_CenterPositionInZ = -87.5625*2.54*cm; //SW
436 
437 
438  // Large Clamp Plate mounted on both sides of a coil
439  // values are checked with SW
440  ClampPlate_FullLength_X = 1.25*2.54*cm; // thickness
441  ClampPlate_FullLength_Y = 36.00*2.54*cm; // height
442  ClampPlate_FullLength_Z = 152.50*2.54*cm; // length along beam axis
444 
445  // Upstream Mini Clamp Plate mounted on both sides of a coil
446  // values are checked with SW
447  MiniClampPlate_FullLength_X = 1.25*2.54*cm; // thickness
448  MiniClampPlate_FullLength_Y = 9.00*2.54*cm; // height
449  MiniClampPlate_FullLength_Z = 23.00*2.54*cm; // length along beam axis
450 
452 
453  //MiniClampPlate_CenterPositionInR = 30.0*cm;
454  MiniClampPlate_CenterPositionInZ = -78.312*2.54*cm + 0.5*MiniClampPlate_FullLength_Z; // from SW
455 
456  // dimension of mini clamp chamfer solid
457  Chamfer_FullLength_X = sqrt(2.0)*1.27*cm; // thickness
458  Chamfer_FullLength_Y = 5.00*cm; // height
459  Chamfer_FullLength_Z = 70.00*cm; // length along beam axis
460 
461 
462 
463  //-------------------------------------------
464  // outer plate in which the coil is embedded
465  //-------------------------------------------
466 
467  // Large Plate
468  // values are checked with SW
469  CoilFramePlate_FullLength_X = 5.00*2.54*cm; // thickness
470  CoilFramePlate_FullLength_Y = 76.00*2.54*cm; // height
471  CoilFramePlate_FullLength_Z = 171.25*2.54*cm; // length along beam axis
472 
473  // extracted from SW
475 
476  CoilFramePlate_CenterPositionInZ = 0.0*cm; // from SW
477 
478  // dimension of solids for subtraction
479  Subtraction_Cylinder_Diameter = 29.75*2.54*cm;
480  Subtraction_Cylinder_Height = 6.00*2.54*cm ;
481 
482  Subtraction_CenterBox_FullLength_X = 6.00*2.54*cm;
483  Subtraction_CenterBox_FullLength_Y = 2*29.75*2.54*cm;
484  Subtraction_CenterBox_FullLength_Z = 87.25*2.54*cm;
485 
488  Subtraction_DownstreamBox_FullLength_Z = 80.00*2.54*cm; //arbitrary
489 
490 
491  //------------------------
492  // radial mounting blocks
493  //------------------------
494 
495  RadialMountingBlock_FullLength_X = 2.500*2.54*cm; // horizontal thickness
496  RadialMountingBlock_FullLength_Y = 43.125*2.54*cm; // vertical height
497  RadialMountingBlock_FullLength_Z = 5.000*2.54*cm; // length along z
498 
502 
503 
504  //-----------------------------------------
505  // downstream support structure
506  //-----------------------------------------
507  //
511 
515 
518 
519  positionInZ_DownstreamDoubleTBeam = 94.188*2.54*cm;
520 
521  //------------------------------------------------------------
522  // Downstream Double-T-Beam orientated at +-45 and +-135 deg
523  //------------------------------------------------------------
524  //
525  // dimension before rotation, horizontal layout
526  SupportFrame_Downstream45DegDoubleTBeam_FullLength_X = 97.754*2.54*cm; // horizontal
527  SupportFrame_Downstream45DegDoubleTBeam_FullLength_Y = 7.000*2.54*cm; // vertical
528  SupportFrame_Downstream45DegDoubleTBeam_FullLength_Z = 12.000*2.54*cm; // along beam
529 
532 
536 
537  //------------------------------------
538  // Downstream Spider and radial slabs
539  //------------------------------------
540  //
541 
542  DownstreamSpider_DiameterMin = 51.000*2.56*cm; //SW
543  DownstreamSpider_DiameterMax = 75.000*2.56*cm; //SW
544  DownstreamSpider_FullThickness = 1.000*2.56*cm; //SW
545  DownstreamSpider_PhiAngleStart = 0.0*degree; // OK
546  DownstreamSpider_PhiDeltaAngle = 360.0*degree; //OK
547 
548  DownstreamSpider_CenterPositionInZ = 88.690*2.54*cm; //SW + safety gap
549 
550  //---
551  // unrotated slab is orientated vertically
552  //
553  DownstreamSpider_RadialSlab_FullLength_X = 11.500*2.54*cm; // horizontal == width
554  DownstreamSpider_RadialSlab_FullLength_Y = 103.000*2.54*cm; // vertical == height
555  DownstreamSpider_RadialSlab_FullLength_Z = 1.000*2.54*cm; // along z == thickness
556 
558  DownstreamSpider_RadialSlab_CenterPositionInZ = 87.680*2.54*cm; // original: 87.688
559 
560  Lintel_FullLength_X = 70.0*cm;
561  Lintel_FullLength_Y = 16.0*cm;
562  Lintel_FullLength_Z = 10.0*cm;
563  Lintel_CenterPositionInR = -129.39*cm;
564  Lintel_Tilt_Angle = -20.0*degree;
565  //===============================================================================
566 
567  G4cout << G4endl << "###### Leaving QweakSimMainMagnet::QweakSimMainMagnet " << G4endl << G4endl;
568 }
569 
570 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
572 
573 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
574 void QweakSimMainMagnet::ConstructComponent(G4VPhysicalVolume* MotherVolume)
575 {
576 G4cout << G4endl << "###### Calling QweakSimMainMagnet::ConstructComponent() " << G4endl << G4endl;
577 
578  // define center position of SingleCoil_MasterContainer inside the MainMagnet_MasterContainer
579  G4ThreeVector positionSingleCoilContainer = G4ThreeVector(0,0,0);
580 
581  // define MainMagnet SingleCoil Container solid volume
582  G4cout << G4endl << "###### QweakSimMainMagnet: Define MainMagnet_MasterContainer_Solid " << G4endl << G4endl;
583 
584  //----------------------------------------------------------
585 
586  G4double Offset_SingleCoilWithinMasterContainer =
588 
589  G4Box* SingleCoil_Plate_Solid = new G4Box("SingleCoil_Plate_Solid",
590  0.5 * SingleCoil_Plate_FullLength_X, // horizontal == thickness
591  0.5 * SingleCoil_Plate_FullLength_Y, // vertical == height
592  0.5 * SingleCoil_Plate_FullLength_Z ); // length
593 
594 
595  SingleCoil_Plate_Logical = new G4LogicalVolume( SingleCoil_Plate_Solid,
597  "SingleCoil_Plate_Logical",
598  0,
599  0,0);
600 
601 
602  // Y (or radial) offset of the upper/lowe plate relative to the local single coil origin
603  G4double RadialOffset_Plate = 0.5*(SingleCoil_Plate_FullLength_Y + SingleCoil_Wing_DiameterMin);
604 
605  // Global position in R
606  G4double SingleCoil_UpperPlate_CenterPositionInR = +1.0*RadialOffset_Plate - Offset_SingleCoilWithinMasterContainer + SingleCoil_CenterPositionInR;
607  G4double SingleCoil_LowerPlate_CenterPositionInR = -1.0*RadialOffset_Plate - Offset_SingleCoilWithinMasterContainer + SingleCoil_CenterPositionInR;
608 
609  //----------------------------------------------------------
610 
611  G4cout << G4endl << "###### QweakSimMainMagnet: Define SingleCoil C Shape Solid" << G4endl << G4endl;
612 
613  G4Tubs* SingleCoil_Wing_Solid = new G4Tubs("SingleCoil_Wing_Solid",
619  );
620 
621  SingleCoil_Wing_Logical = new G4LogicalVolume( SingleCoil_Wing_Solid,
623  "SingleCoil_Wing_Log",
624  0,
625  0,0);
626 
627 
628  // Global position in R
629  G4double SingleCoil_Wings_CenterPositionInR = SingleCoil_CenterPositionInR - Offset_SingleCoilWithinMasterContainer;
630  G4double HorizontalOffset_Wing = 0.5*SingleCoil_Plate_FullLength_Z;
631 
632  //----------------------------------------------------------
633 
634  // place 8 SingleCoil_MasterContainer_Logical plates into the MotherVolume (around the global Z axis)
635  for (G4int n=0; n<8; n++) {
636 
637  Angle_SingleCoil[n] = n*45.0*degree + 22.5*degree;
638 
639  Rotation_SingleCoil[n] = new G4RotationMatrix();
640  Rotation_SingleCoil[n]->rotateZ(Angle_SingleCoil[n]);
641 
642  //----------------------------------------
643 
644  Translation_SingleCoil_UpperPlate[n].setX(sin(Angle_SingleCoil[n])*SingleCoil_UpperPlate_CenterPositionInR);
645  Translation_SingleCoil_UpperPlate[n].setY(cos(Angle_SingleCoil[n])*SingleCoil_UpperPlate_CenterPositionInR);
646  Translation_SingleCoil_UpperPlate[n].setZ(0.0*cm);
647 
648  Translation_SingleCoil_LowerPlate[n].setX(sin(Angle_SingleCoil[n])*SingleCoil_LowerPlate_CenterPositionInR);
649  Translation_SingleCoil_LowerPlate[n].setY(cos(Angle_SingleCoil[n])*SingleCoil_LowerPlate_CenterPositionInR);
650  Translation_SingleCoil_LowerPlate[n].setZ(0.0*cm);
651 
652 
653  SingleCoil_UpperPlate_Physical[n] = new G4PVPlacement( Rotation_SingleCoil[n],
655  "SingleCoil_UpperPlate_Physical",
657  MotherVolume,
658  false,
659  n,
660  pSurfChk);
661 
662 
663  SingleCoil_LowerPlate_Physical[n] = new G4PVPlacement( Rotation_SingleCoil[n],
665  "SingleCoil_LowerPlate_Physical",
667  MotherVolume,
668  false,
669  n,
670  pSurfChk);
671 
672  //----------------------------------------
673 
674  Rotation_SingleCoil_LeftWing[n] = new G4RotationMatrix();
675  Rotation_SingleCoil_LeftWing[n]->rotateY(90.0*degree);
677 
678 
679  Rotation_SingleCoil_RightWing[n] = new G4RotationMatrix();
680  Rotation_SingleCoil_RightWing[n]->rotateY(-90.0*degree);
682 
683 
684  Translation_SingleCoil_LeftWing[n].setX(sin(Angle_SingleCoil[n])*SingleCoil_Wings_CenterPositionInR);
685  Translation_SingleCoil_LeftWing[n].setY(cos(Angle_SingleCoil[n])*SingleCoil_Wings_CenterPositionInR);
686  Translation_SingleCoil_LeftWing[n].setZ(-1.0*HorizontalOffset_Wing -0.1*mm);
687 
688  Translation_SingleCoil_RightWing[n].setX(sin(Angle_SingleCoil[n])*SingleCoil_Wings_CenterPositionInR);
689  Translation_SingleCoil_RightWing[n].setY(cos(Angle_SingleCoil[n])*SingleCoil_Wings_CenterPositionInR);
690  Translation_SingleCoil_RightWing[n].setZ(+1.0*HorizontalOffset_Wing + 0.1*mm);
691 
694  "SingleCoil_LeftWing_Physical",
696  MotherVolume,
697  false,
698  n,
699  pSurfChk);
700 
703  "SingleCoil_RightWing_Physical",
705  MotherVolume,
706  false,
707  n,
708  pSurfChk);
709 
710  //----------------------------------------
711 
712  } // end of for (G4int n=0; n<8; n++)
713 
714 
715  // Lintel geometry
716  // Lintels are 16 cm high x 70 cm wide x 10 cm deep and are pitched
717  // forward toward the beamline at an angle ~20 degrees.
718  G4cout << G4endl << "###### QweakSimMainMagnet: Define Lintels." << G4endl << G4endl;
719 
720  G4Box* Lintel_Solid = new G4Box("Lintel_Solid",
721  0.5 * Lintel_FullLength_X, // horizontal 70 cm
722  0.5 * Lintel_FullLength_Y, // vertical 16 cm
723  0.5 * Lintel_FullLength_Z ); // length 10 cm
724 
725 
726  Lintel_Logical = new G4LogicalVolume( Lintel_Solid,
728  "Lintel_Logical",
729  0,
730  0,0);
731 
732  // place 8 lintels into the MotherVolume
733  for (G4int n=0; n<8; n++) {
734 
735  Angle_Lintel[n] = n*45.0*degree;
736 
737  Rotation_Lintel[n] = new G4RotationMatrix();
738  Rotation_Lintel[n]->rotateZ(Angle_Lintel[n]);
739  Rotation_Lintel[n]->rotateX(Lintel_Tilt_Angle);
740  Rotation_Lintel[n]->rotateY(0.0*degree);
741 
743  Translation_Lintel[n].setY(cos(Angle_Lintel[n])*Lintel_CenterPositionInR);
744  Translation_Lintel[n].setZ(-66.8*cm);
745 
746  Lintel_Physical[n] = new G4PVPlacement( Rotation_Lintel[n],
748  "Lintel_Physical",
750  MotherVolume,
751  false,
752  n,
753  pSurfChk);
754 
755  } // end of place lintels
756 
757  G4Colour copper ( 184/255., 115/255., 51/255.);
758  G4Colour mangenta (237/255.,173/255.,255/255.);
759 
760  SingleCoil_VisAtt -> SetColor(copper);
761  SingleCoil_VisAtt -> SetVisibility(true);
762  SingleCoil_Plate_Logical -> SetVisAttributes(SingleCoil_VisAtt);
763  SingleCoil_Wing_Logical -> SetVisAttributes(SingleCoil_VisAtt);
764 
765  Lintel_VisAtt -> SetColor(mangenta);
766  Lintel_VisAtt -> SetVisibility(true);
767  Lintel_Logical -> SetVisAttributes(Lintel_VisAtt);
768 
769  G4cout << G4endl << "###### Leaving QweakSimMainMagnet::ConstructComponent() " << G4endl << G4endl;
770 
771 } // end
772 
773 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
775 {
776 G4cout << G4endl << "###### Calling QweakSimMainMagnet::DestroyComponent() " << G4endl << G4endl;
777 
778 G4cout << G4endl << "###### Leaving QweakSimMainMagnet::DestroyComponent() " << G4endl << G4endl;
779 
780 }
781 
782 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........
783 
784 void QweakSimMainMagnet::SetCenterPositionInZ(G4double /*myCenterPositionInZ*/)
785 {
786  G4cout << G4endl << "###### Calling QweakSimMainMagnet::SetCenterPositionInZ() " << G4endl << G4endl;
787 
788  //MainMagnet_MasterContainer_Physical->SetTranslation(G4ThreeVector(0.,0., myCenterPositionInZ));
789 
790  G4cout << G4endl << "###### Leaving QweakSimMainMagnet::SetCenterPositionInZ() " << G4endl << G4endl;
791 }
792 
793 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
794 void QweakSimMainMagnet::Construct_UpstreamSpider(G4VPhysicalVolume* MotherVolume)
795 {
796 
797  G4Tubs* UpstreamSpider_Solid = new G4Tubs("UpstreamSpider_Solid",
803  );
804 
805 
806  G4double UpstreamSpider_SubtractionTube_MinDiameter = 0.0*cm;
807  G4double UpstreamSpider_SubtractionTube_MaxDiameter = 4.0*2.56*cm;
808  G4double UpstreamSpider_SubtractionTubeLeft_Thickness = 2.01*2.56*cm;
809  G4double UpstreamSpider_SubtractionTubeRight_Thickness = 2.02*2.56*cm;
810 
811  G4Tubs* UpstreamSpider_SubtractionTubeLeft_Solid = new G4Tubs("UpstreamSpider_SubtractionTubeLeft_Solid",
812  0.5*UpstreamSpider_SubtractionTube_MinDiameter,
813  0.5*UpstreamSpider_SubtractionTube_MaxDiameter,
814  0.5*UpstreamSpider_SubtractionTubeLeft_Thickness,
815  0.0*degree,
816  360.0*degree
817  );
818 
819  G4Tubs* UpstreamSpider_SubtractionTubeRight_Solid = new G4Tubs("UpstreamSpider_SubtractionTubeRight_Solid",
820  0.5*UpstreamSpider_SubtractionTube_MinDiameter,
821  0.5*UpstreamSpider_SubtractionTube_MaxDiameter,
822  0.5*UpstreamSpider_SubtractionTubeRight_Thickness,
823  0.0*degree,
824  360.0*degree
825  );
826 
827 
828 
829  G4double UpstreamSpider_SubtractionBox_FullLengthInX = 4.76*2.56*cm; // width
830  G4double UpstreamSpider_SubtractionBox_FullLengthInY = 4.00*2.56*cm; // height
831  G4double UpstreamSpider_SubtractionBox_FullLengthInZ = 2.00*2.56*cm; // thickness
832 
833 
834  G4Box* UpstreamSpider_SubtractionBox_Solid = new G4Box(" UpstreamSpider_SubtractionBox_Solid",
835  0.5*UpstreamSpider_SubtractionBox_FullLengthInX, // half X length required by Geant4
836  0.5*UpstreamSpider_SubtractionBox_FullLengthInY, // half Y length required by Geant4
837  0.5*UpstreamSpider_SubtractionBox_FullLengthInZ); // half Z length required by Geant4
838 
839 
840 
841 
842 
843 
844 // define left/right tube position for scooping out left/right corners
845 //
846 // | |
847 // \________/
848 //
849  G4ThreeVector position_LeftBottomTube = G4ThreeVector( -0.5*UpstreamSpider_SubtractionBox_FullLengthInX,
850  -0.5*UpstreamSpider_SubtractionBox_FullLengthInY + 0.5*UpstreamSpider_SubtractionTube_MaxDiameter,
851  0.0);
852 
853  G4ThreeVector position_RightBottomTube = G4ThreeVector( 0.5*UpstreamSpider_SubtractionBox_FullLengthInX,
854  -0.5*UpstreamSpider_SubtractionBox_FullLengthInY + 0.5*UpstreamSpider_SubtractionTube_MaxDiameter,
855  0.0);
856 
857  G4ThreeVector position_CutoutUnion = G4ThreeVector(0.0*cm , 0.0*cm, 0.0*cm);
858 
859 
860 
861  MyUpstreamSpider_LowThetaCutout_Solid[0] = new G4UnionSolid ("PlateAndLeftBottomTube",
862  UpstreamSpider_SubtractionBox_Solid,
863  UpstreamSpider_SubtractionTubeLeft_Solid,
864  0,
865  position_LeftBottomTube);
866 
867  MyUpstreamSpider_LowThetaCutout_Solid[1] = new G4UnionSolid ("PlateAndRightBottomTube",
869  UpstreamSpider_SubtractionTubeRight_Solid,
870  0,
871  position_RightBottomTube);
872 
873  G4double OctantCutOut_Box_RadialDistance = 15.50*2.56*cm + 0.5*UpstreamSpider_SubtractionBox_FullLengthInY; // radial+ 1/2*BoxDimY
874 
875 
876  // octant #1 location
877  G4double Angle_Octant1;
878  G4ThreeVector Translation_Octant1;
879  G4RotationMatrix Rotation_Octant1_Left;
880  G4RotationMatrix Rotation_Octant1_Right;
881 
882  Angle_Octant1 = 90.0*degree;
883  Translation_Octant1.setX(cos(Angle_Octant1)*OctantCutOut_Box_RadialDistance);
884  Translation_Octant1.setY(sin(Angle_Octant1)*OctantCutOut_Box_RadialDistance);
885  Translation_Octant1.setZ(0.0*cm);
886 
887  Rotation_Octant1_Left.rotateZ(Angle_Octant1 -90.0*degree);
888  Rotation_Octant1_Right.rotateZ(Angle_Octant1 +90.0*degree);
889 
890  G4Transform3D Transform3D_Octant1_Left(Rotation_Octant1_Left,Translation_Octant1);
891  G4Transform3D Transform3D_Octant1_Right(Rotation_Octant1_Right,Translation_Octant1);
892 
893  // octant #2 location
894  G4double Angle_Octant2;
895  G4ThreeVector Translation_Octant2;
896  G4RotationMatrix Rotation_Octant2_Left;
897  G4RotationMatrix Rotation_Octant2_Right;
898 
899  Angle_Octant2 = 45.0*degree;
900  Translation_Octant2.setX(cos(Angle_Octant2)*OctantCutOut_Box_RadialDistance);
901  Translation_Octant2.setY(sin(Angle_Octant2)*OctantCutOut_Box_RadialDistance);
902  Translation_Octant2.setZ(0.0*cm);
903 
904  Rotation_Octant2_Left.rotateZ(Angle_Octant2 -90.0*degree);
905  Rotation_Octant2_Right.rotateZ(Angle_Octant2 +90.0*degree);
906 
907  G4Transform3D Transform3D_Octant2_Left(Rotation_Octant2_Left,Translation_Octant2);
908  G4Transform3D Transform3D_Octant2_Right(Rotation_Octant2_Right,Translation_Octant2);
909 
910  // octant #3 location
911  G4double Angle_Octant3;
912  G4ThreeVector Translation_Octant3;
913  G4RotationMatrix Rotation_Octant3_Left;
914  G4RotationMatrix Rotation_Octant3_Right;
915 
916  Angle_Octant3 = 0.0*degree;
917  Translation_Octant3.setX(cos(Angle_Octant3)*OctantCutOut_Box_RadialDistance);
918  Translation_Octant3.setY(sin(Angle_Octant3)*OctantCutOut_Box_RadialDistance);
919  Translation_Octant3.setZ(0.0*cm);
920 
921  Rotation_Octant3_Left.rotateZ(Angle_Octant3 -90.0*degree);
922  Rotation_Octant3_Right.rotateZ(Angle_Octant3 +90.0*degree);
923 
924  G4Transform3D Transform3D_Octant3_Left(Rotation_Octant3_Left,Translation_Octant3);
925  G4Transform3D Transform3D_Octant3_Right(Rotation_Octant3_Right,Translation_Octant3);
926 
927  // octant #4 location
928  G4double Angle_Octant4;
929  G4ThreeVector Translation_Octant4;
930  G4RotationMatrix Rotation_Octant4_Left;
931  G4RotationMatrix Rotation_Octant4_Right;
932 
933  Angle_Octant4 = 315.0*degree;
934  Translation_Octant4.setX(cos(Angle_Octant4)*OctantCutOut_Box_RadialDistance);
935  Translation_Octant4.setY(sin(Angle_Octant4)*OctantCutOut_Box_RadialDistance);
936  Translation_Octant4.setZ(0.0*cm);
937 
938  Rotation_Octant4_Left.rotateZ(Angle_Octant4 -90.0*degree);
939  Rotation_Octant4_Right.rotateZ(Angle_Octant4 +90.0*degree);
940 
941  G4Transform3D Transform3D_Octant4_Left(Rotation_Octant4_Left,Translation_Octant4);
942  G4Transform3D Transform3D_Octant4_Right(Rotation_Octant4_Right,Translation_Octant4);
943 
944  // octant #5 location
945  G4double Angle_Octant5;
946  G4ThreeVector Translation_Octant5;
947  G4RotationMatrix Rotation_Octant5_Left;
948  G4RotationMatrix Rotation_Octant5_Right;
949 
950  Angle_Octant5 = 270.0*degree;
951  Translation_Octant5.setX(cos(Angle_Octant5)*OctantCutOut_Box_RadialDistance);
952  Translation_Octant5.setY(sin(Angle_Octant5)*OctantCutOut_Box_RadialDistance);
953  Translation_Octant5.setZ(0.0*cm);
954 
955  Rotation_Octant5_Left.rotateZ(Angle_Octant5 -90.0*degree);
956  Rotation_Octant5_Right.rotateZ(Angle_Octant5 +90.0*degree);
957 
958  G4Transform3D Transform3D_Octant5_Left(Rotation_Octant5_Left,Translation_Octant5);
959  G4Transform3D Transform3D_Octant5_Right(Rotation_Octant5_Right,Translation_Octant5);
960 
961  // octant #6 location
962  G4double Angle_Octant6;
963  G4ThreeVector Translation_Octant6;
964  G4RotationMatrix Rotation_Octant6_Left;
965  G4RotationMatrix Rotation_Octant6_Right;
966 
967  Angle_Octant6 = 225.0*degree;
968  Translation_Octant6.setX(cos(Angle_Octant6)*OctantCutOut_Box_RadialDistance);
969  Translation_Octant6.setY(sin(Angle_Octant6)*OctantCutOut_Box_RadialDistance);
970  Translation_Octant6.setZ(0.0*cm);
971 
972  Rotation_Octant6_Left.rotateZ(Angle_Octant6 -90.0*degree);
973  Rotation_Octant6_Right.rotateZ(Angle_Octant6 +90.0*degree);
974 
975  G4Transform3D Transform3D_Octant6_Left(Rotation_Octant6_Left,Translation_Octant6);
976  G4Transform3D Transform3D_Octant6_Right(Rotation_Octant6_Right,Translation_Octant6);
977 
978  // octant #7 location
979  G4double Angle_Octant7;
980  G4ThreeVector Translation_Octant7;
981  G4RotationMatrix Rotation_Octant7_Left;
982  G4RotationMatrix Rotation_Octant7_Right;
983 
984  Angle_Octant7 = 180.0*degree;
985  Translation_Octant7.setX(cos(Angle_Octant7)*OctantCutOut_Box_RadialDistance);
986  Translation_Octant7.setY(sin(Angle_Octant7)*OctantCutOut_Box_RadialDistance);
987  Translation_Octant7.setZ(0.0*cm);
988 
989  Rotation_Octant7_Left.rotateZ(Angle_Octant7 -90.0*degree);
990  Rotation_Octant7_Right.rotateZ(Angle_Octant7 +90.0*degree);
991 
992  G4Transform3D Transform3D_Octant7_Left(Rotation_Octant7_Left,Translation_Octant7);
993  G4Transform3D Transform3D_Octant7_Right(Rotation_Octant7_Right,Translation_Octant7);
994 
995  // octant #8 location
996  G4double Angle_Octant8;
997  G4ThreeVector Translation_Octant8;
998  G4RotationMatrix Rotation_Octant8_Left;
999  G4RotationMatrix Rotation_Octant8_Right;
1000 
1001  Angle_Octant8 = 135.0*degree;
1002  Translation_Octant8.setX(cos(Angle_Octant8)*OctantCutOut_Box_RadialDistance);
1003  Translation_Octant8.setY(sin(Angle_Octant8)*OctantCutOut_Box_RadialDistance);
1004  Translation_Octant8.setZ(0.0*cm);
1005 
1006  Rotation_Octant8_Left.rotateZ(Angle_Octant8 -90.0*degree);
1007  Rotation_Octant8_Right.rotateZ(Angle_Octant8 +90.0*degree);
1008 
1009 
1010  G4Transform3D Transform3D_Octant8_Left(Rotation_Octant8_Left,Translation_Octant8);
1011  G4Transform3D Transform3D_Octant8_Right(Rotation_Octant8_Right,Translation_Octant8);
1012 
1013 
1014 
1015  // subtract octant hole from shielding wall
1016  MyUpstreamSpider_Solid[0] = new G4SubtractionSolid ("Ring-Plate1",
1017  UpstreamSpider_Solid,
1019  //UpstreamSpider_SubtractionBox_Solid,
1020  Transform3D_Octant1_Right );
1021 
1022  // subtract octant hole from previous G4StbtractionSolid
1023  MyUpstreamSpider_Solid[1] = new G4SubtractionSolid ("Ring-Plate2",
1026  //UpstreamSpider_SubtractionBox_Solid,
1027  Transform3D_Octant2_Right );
1028 
1029  // subtract octant hole from previous G4StbtractionSolid
1030  MyUpstreamSpider_Solid[2] = new G4SubtractionSolid ("Ring-Plate3",
1033  //UpstreamSpider_SubtractionBox_Solid,
1034  Transform3D_Octant3_Right );
1035 
1036  // subtract octant hole from previous G4StbtractionSolid
1037  MyUpstreamSpider_Solid[3] = new G4SubtractionSolid ("Ring-Plate4",
1040  //UpstreamSpider_SubtractionBox_Solid,
1041  Transform3D_Octant4_Right);
1042  // subtract octant hole from previous G4StbtractionSolid
1043  MyUpstreamSpider_Solid[4] = new G4SubtractionSolid ("Ring-Plate5",
1046  //UpstreamSpider_SubtractionBox_Solid,
1047  Transform3D_Octant5_Right );
1048  // subtract octant hole from previous G4StbtractionSolid
1049  MyUpstreamSpider_Solid[5] = new G4SubtractionSolid ("Ring-Plate6",
1052  //UpstreamSpider_SubtractionBox_Solid,
1053  Transform3D_Octant6_Right );
1054  // subtract octant hole from previous G4StbtractionSolid
1055  MyUpstreamSpider_Solid[6] = new G4SubtractionSolid ("Ring-Plate7",
1058  //UpstreamSpider_SubtractionBox_Solid,
1059  Transform3D_Octant7_Right );
1060  // subtract octant hole from previous G4StbtractionSolid
1061  MyUpstreamSpider_Solid[7] = new G4SubtractionSolid ("Ring-Plate8",
1064  //UpstreamSpider_SubtractionBox_Solid,
1065  Transform3D_Octant8_Right );
1066 
1067  /*
1068 // define radial strut
1069 
1070 
1071  G4double UpstreamSpider_RadialStrut_FullLengthInX = 5.00*2.56*cm;
1072  G4double UpstreamSpider_RadialStrut_FullLengthInY = 20.0*2.56*cm;
1073  G4double UpstreamSpider_RadialStrut_FullLengthInZ = UpstreamSpider_FullThickness + 1*mm;
1074 
1075  G4Box* UpstreamSpider_RadialStrut_Solid = new G4Box(" UpstreamSpider_RadialStrut_Solid",
1076  0.5*UpstreamSpider_RadialStrut_FullLengthInX, // half X length required by Geant4
1077  0.5*UpstreamSpider_RadialStrut_FullLengthInY, // half Y length required by Geant4
1078  0.5*UpstreamSpider_RadialStrut_FullLengthInZ); // half Z length required by Geant4
1079 
1080 
1081 
1082  G4ThreeVector position_RadialStrut;
1083 
1084 // position_RadialStrut.setX(0.0*cm);
1085 // position_RadialStrut.setY(33.25*2.56*cm - 0.5*UpstreamSpider_RadialStrut_FullLengthInY);
1086 // position_RadialStrut.setZ(0.0*cm);
1087 // position_RadialStrut.rotateZ(22.5*degree);
1088 //
1089  position_RadialStrut.setX(0.0*cm);
1090  position_RadialStrut.setY(0.0*cm);
1091  position_RadialStrut.setZ(0.0*cm);
1092  position_RadialStrut.rotateZ(22.5*degree);
1093 
1094 
1095  G4RotationMatrix* Rotation_RadialStrut = new G4RotationMatrix();
1096  Rotation_RadialStrut->rotateZ(22.5*degree);
1097 
1098 
1099  MyUpstreamSpider_StrutsUnion_Solid[0] = new G4UnionSolid ("SpiderAndRadialStrut1",
1100  MyUpstreamSpider_Solid[22],
1101  UpstreamSpider_RadialStrut_Solid);
1102 
1103 // Rotation_RadialStrut,
1104 // position_RadialStrut);
1105 */
1106 
1107  // Solid of Spider is defined above. Now make a logical volume and place it in the
1108  // MotherVolume of Qweak
1109  UpstreamSpider_Logical = new G4LogicalVolume( //MyUpstreamSpider_Solid[7],
1110  //MyUpstreamSpider_LowThetaCutout_Solid[1],
1113  "UpstreamSpider_Log",
1114  0,
1115  0,0);
1116 
1117 
1118  G4ThreeVector position_UpstreamSpider = G4ThreeVector(0.0,
1119  0.0,
1121 
1122 
1123  UpstreamSpider_Physical = new G4PVPlacement( 0,
1124  position_UpstreamSpider,
1125  "UpstreamSpider_Physical",
1127  MotherVolume,
1128  false,
1129  0,
1130  pSurfChk);
1131 
1132  G4Colour aluminium ( 169/255., 172/255., 182/255.);
1133 
1134  UpstreamSpider_VisAtt -> SetColor(aluminium);
1135  UpstreamSpider_VisAtt -> SetVisibility(true);
1136  //UpstreamSpider_VisAtt->SetForceWireframe(true);
1137  UpstreamSpider_VisAtt -> SetForceSolid(true);
1138 
1139  UpstreamSpider_Logical -> SetVisAttributes(UpstreamSpider_VisAtt);
1140 // UpstreamSpider_LowThetaCutoutLeft_Logical -> SetVisAttributes(UpstreamSpider_VisAtt);
1141 // UpstreamSpider_LowThetaCutoutRight_Logical -> SetVisAttributes(UpstreamSpider_VisAtt);
1142 // UpstreamSpider_LowThetaCutoutFinal_Logical -> SetVisAttributes(UpstreamSpider_VisAtt);
1143 //
1144 
1145 }
1146 
1147 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
1148 
1149 void QweakSimMainMagnet::Construct_ClampPlates(G4VPhysicalVolume* MotherVolume)
1150 {
1151  // define center position of SingleCoil_ClampPlate inside the MotherVolume
1152  G4ThreeVector positionClampPlate = G4ThreeVector(0,0,0);
1153 
1154  // define MainMagnet SingleCoil Container solid volume
1155  G4cout << G4endl << "###### QweakSimMainMagnet: Define MainMagnet_ClampPlate_Solid " << G4endl << G4endl;
1156 
1157 
1158  G4Box* SingleCoil_ClampPlate_Solid = new G4Box("MM_SingleCoil_ClampPlate_Solid",
1159  0.5 * ClampPlate_FullLength_X , // half X length required by Geant4
1160  0.5 * ClampPlate_FullLength_Y , // half Y length required by Geant4
1161  0.5 * ClampPlate_FullLength_Z ); // half Z length required by Geant4
1162 
1163 
1164  // define SingleCoil_ClampPlate logical volume
1165  G4cout << G4endl << "###### QweakSimMainMagnet: Define SingleCoil_ClampPlate_Logical " << G4endl << G4endl;
1166 
1167  SingleCoil_ClampPlate_Logical = new G4LogicalVolume( SingleCoil_ClampPlate_Solid,
1169  "MM_SingleCoil_ClampPlate_Logical",
1170  0,
1171  0,0);
1172 
1173 
1174  G4ThreeVector* leftcenter = new G4ThreeVector();
1175  G4ThreeVector* rightcenter = new G4ThreeVector();
1176 
1177  // arbitrary gap distance: accounting for coil epoxy + wrapping etc
1178  //G4double GapBetweenClampPlateAndCoil = 1.0*mm;
1179 
1180  // place 8 SingleCoil_ClampPlate_Logical plates into the MotherVolume (around the global Z axis)
1181  for (G4int n=0; n<8; n++) {
1182 
1183  // set the vectors to the center of left and right clamp plate
1184  // located at 12 o'clock. The rotate these vectors to the coil
1185  // positions and extract the new vector components
1186  // This procedure is easier than the calculation by hand for individual
1187  // clamp plate positions *before* Rotation_ClampPlate[n]
1188  //
1189  // the clamps are attachted to the CoilFramePlate which is thicker than the Coils
1190  // Thickness CoilFramePlate: CoilFramePlate_FullLength_X
1191  // Thickness Coil : SingleCoil_FullThickness
1192 
1193  leftcenter->setX( -0.5*(CoilFramePlate_FullLength_X + ClampPlate_FullLength_X));
1194  leftcenter->setY(ClampPlate_CenterPositionInR);
1195  leftcenter->setZ(0.0*cm);
1196 
1197  rightcenter->setX( 0.5*(CoilFramePlate_FullLength_X+ ClampPlate_FullLength_X));
1198  rightcenter->setY(ClampPlate_CenterPositionInR);
1199  rightcenter->setZ(0.0*cm);
1200 
1201  // angles of the clamp plates
1202  Angle_ClampPlate[n] = n*45.0*degree + 22.5*degree;
1203 
1204  // rotate center vector to coils
1205  leftcenter ->rotateZ(Angle_ClampPlate[n]);
1206  rightcenter ->rotateZ(Angle_ClampPlate[n]);
1207 
1208 
1209  Translation_LeftClampPlate[n].setX( leftcenter->y() );
1210  Translation_LeftClampPlate[n].setY( leftcenter->x() );
1211  Translation_LeftClampPlate[n].setZ(0.0*cm);
1212 
1213  Translation_RightClampPlate[n].setX( rightcenter->y() );
1214  Translation_RightClampPlate[n].setY( rightcenter->x() );
1215  Translation_RightClampPlate[n].setZ(0.0*cm);
1216 
1217  // since the SingleCoil_ClampPlate_Logical is defined for a vertical orientation
1218  // but the translation assumes a horizontal orinetation, we have to subtract 90*deg
1219  Rotation_ClampPlate[n] = new G4RotationMatrix();
1220  Rotation_ClampPlate[n]->rotateZ(Angle_ClampPlate[n] -90*degree);
1221 
1222 
1223  SingleCoil_LeftClampPlate_Physical[n] = new G4PVPlacement(Rotation_ClampPlate[n],
1225  "MainMagnet_LeftClampPlate_Physical",
1227  MotherVolume,
1228  false,
1229  n,
1230  pSurfChk);
1231 
1232  SingleCoil_RightClampPlate_Physical[n] = new G4PVPlacement(Rotation_ClampPlate[n],
1234  "MainMagnet_RightClampPlate_Physical",
1236  MotherVolume,
1237  false,
1238  n,
1239  pSurfChk);
1240 
1241 
1242  } // end of for (G4int n=0; n<8; n++)
1243 
1244 
1245  G4Colour blue (0.,0.,1.);
1246  G4Colour aluminium ( 169/255., 172/255., 182/255.);
1247  G4Colour copper ( 184/255., 115/255., 51/255.);
1248 
1249  SingleCoil_ClampPlate_VisAtt -> SetColor(aluminium);
1250  SingleCoil_ClampPlate_VisAtt -> SetVisibility(true);
1251  //SingleCoil_ClampPlate_VisAtt -> SetForceWireframe(true);
1252  //SingleCoil_ClampPlate_VisAtt -> SetForceSolid(true);
1254 }
1255 
1256 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
1257 
1258 void QweakSimMainMagnet::Construct_UpStreamMiniClampPlates(G4VPhysicalVolume* MotherVolume)
1259 {
1260 
1261  // define MainMagnet SingleCoil Container solid volume
1262  G4cout << G4endl << "###### QweakSimMainMagnet: Define MainMagnet_MiniClampPlate_Solid " << G4endl << G4endl;
1263 
1264 
1265  G4Box* SingleCoil_MiniClampPlate_Solid = new G4Box("MM_SingleCoil_MiniClampPlate_Solid",
1269 
1270 
1271  G4Box* Chamfer_Solid = new G4Box("Chamfer_Solid",
1272  0.5 * Chamfer_FullLength_X,
1273  0.5 * Chamfer_FullLength_Y ,
1274  0.5 * Chamfer_FullLength_Z );
1275 
1276  //------------------------------
1277  //Boolean Subtraction:
1278  //Right-Down-Edge chamfer
1279  //------------------------------
1282  Position_Chamfer1.setZ(0.0*cm);
1283  Rotation_Chamfer1.rotateZ(45.0*degree);
1284 
1285  G4Transform3D Transform_Chamfer1(Rotation_Chamfer1,Position_Chamfer1);
1286 
1287  MiniClampPlateTemp_Solid[0] = new G4SubtractionSolid ("MiniClamp-RightDownChamfer",
1288  SingleCoil_MiniClampPlate_Solid,
1289  Chamfer_Solid,
1290  Transform_Chamfer1);
1291 
1292 
1293 
1295  Position_Chamfer2.setY( -0.5*MiniClampPlate_FullLength_Y); // down
1296  Position_Chamfer2.setZ(0.0*cm);
1297  Rotation_Chamfer2.rotateZ(-45.0*degree);
1298 
1299 
1300  G4Transform3D Transform_Chamfer2(Rotation_Chamfer2,Position_Chamfer2);
1301 
1302  MiniClampPlateTemp_Solid[1] = new G4SubtractionSolid ("MiniClamp-RightUpChamfer",
1304  Chamfer_Solid,
1305  Transform_Chamfer2);
1306 
1307  // define SingleCoil_RightMiniClampPlate logical volume
1308  G4cout << G4endl << "###### QweakSimMainMagnet: Define SingleCoil_RightMiniClampPlate_Logical " << G4endl << G4endl;
1309 
1312  "MM_SingleCoil_RightMiniClampPlate_Logical",
1313  0,
1314  0,0);
1315 
1316 // SingleCoil_RightMiniClampPlate_Logical = new G4LogicalVolume( SingleCoil_MiniClampPlate_Solid,
1317 // SingleCoil_MiniClampPlate_Material,
1318 // "MM_SingleCoil_RightMiniClampPlate_Logical",
1319 // 0,
1320 // 0,0);
1321  //------------------------------
1322  //Boolean Subtraction:
1323  //Left-Down-Edge chamfer
1324  //------------------------------
1325  Position_Chamfer3.setX( -0.5*MiniClampPlate_FullLength_X); // left
1327  Position_Chamfer3.setZ(0.0*cm);
1328  Rotation_Chamfer3.rotateZ(-45.0*degree);
1329 
1330  G4Transform3D Transform_Chamfer3(Rotation_Chamfer3,Position_Chamfer3);
1331 
1332 
1333  MiniClampPlateTemp_Solid[2] = new G4SubtractionSolid ("MiniClamp-LeftDownChamfer",
1334  SingleCoil_MiniClampPlate_Solid,
1335  Chamfer_Solid,
1336  Transform_Chamfer3);
1337 
1338  Position_Chamfer4.setX( -0.5*MiniClampPlate_FullLength_X); // left
1339  Position_Chamfer4.setY( -0.5*MiniClampPlate_FullLength_Y); // down
1340  Position_Chamfer4.setZ(0.0*cm);
1341  Rotation_Chamfer4.rotateZ(45.0*degree);
1342 
1343  G4Transform3D Transform_Chamfer4(Rotation_Chamfer4,Position_Chamfer4);
1344 
1345  MiniClampPlateTemp_Solid[3] = new G4SubtractionSolid ("MiniClamp-LeftUpChamfer",
1347  Chamfer_Solid,
1348  Transform_Chamfer4);
1349 
1350  G4cout << G4endl << "###### QweakSimMainMagnet: Define SingleCoil_RightMiniClampPlate_Logical " << G4endl << G4endl;
1351 
1354  "MM_SingleCoil_MiniClampPlate_Logical",
1355  0,
1356  0,0);
1357 
1358  //----------------------------------------------
1359 
1360  G4ThreeVector* leftcenter = new G4ThreeVector();
1361  G4ThreeVector* rightcenter = new G4ThreeVector();
1362 
1363  // arbitrary gap distance: accounting for coil epoxy + wrapping etc
1364  //G4double GapBetweenClampPlateAndCoil = 1.0*mm;
1365 
1366  // place 8 SingleCoil_ClampPlate_Logical plates into the MotherVolume (around the global Z axis)
1367  for (G4int n=0; n<8; n++) {
1368 
1369  // set the vectors to the center of left and right clamp plate
1370  // located at 12 o'clock. The rotate these vectors to the coil
1371  // positions and extract the new vector components
1372  // This procedure is easier than the calculation by hand for individual
1373  // clamp plate positions *before* Rotation_ClampPlate[n]
1374 
1375  // the clamps are attachted to the CoilFramePlate which is thicker than the Coils
1376  // Thickness CoilFramePlate: CoilFramePlate_FullLength_X
1377  // Thickness Coil : SingleCoil_FullThickness
1378 
1379  leftcenter->setX( -0.5*( CoilFramePlate_FullLength_X + MiniClampPlate_FullLength_X) );
1380  leftcenter->setY(MiniClampPlate_CenterPositionInR);
1381  leftcenter->setZ(0.0*cm);
1382 
1383  rightcenter->setX( 0.5*(CoilFramePlate_FullLength_X + MiniClampPlate_FullLength_X));
1384  rightcenter->setY(MiniClampPlate_CenterPositionInR);
1385  rightcenter->setZ(0.0*cm);
1386 
1387  // angles of the clamp plates
1388  Angle_MiniClampPlate[n] = n*45.0*degree + 22.5*degree;
1389 
1390  // rotate center vector to coils
1391  leftcenter ->rotateZ(Angle_MiniClampPlate[n]);
1392  rightcenter ->rotateZ(Angle_MiniClampPlate[n]);
1393 
1394 
1395  Translation_LeftMiniClampPlate[n].setX( leftcenter->y() );
1396  Translation_LeftMiniClampPlate[n].setY( leftcenter->x() );
1398 
1399  Translation_RightMiniClampPlate[n].setX( rightcenter->y() );
1400  Translation_RightMiniClampPlate[n].setY( rightcenter->x() );
1402 
1403  // since the SingleCoil_ClampPlate_Logical is defined for a vertical orientation
1404  // but the translation assumes a horizontal orinetation, we have to subtract 90*deg
1405  Rotation_MiniClampPlate[n] = new G4RotationMatrix();
1406  Rotation_MiniClampPlate[n]->rotateZ(Angle_MiniClampPlate[n] -90*degree);
1407 
1408 
1411  "MainMagnet_LeftMiniClampPlate_Physical",
1413  MotherVolume,
1414  false,
1415  n,
1416  pSurfChk);
1417 
1420  "MainMagnet_RightMiniClampPlate_Physical",
1422  MotherVolume,
1423  false,
1424  n,
1425  pSurfChk);
1426 
1427 
1428  } // end of for (G4int n=0; n<8; n++)
1429 
1430 
1431  G4Colour aluminium ( 169/255., 172/255., 182/255.);
1432 
1433  SingleCoil_MiniClampPlate_VisAtt -> SetColor(aluminium);
1434  SingleCoil_MiniClampPlate_VisAtt -> SetVisibility(true);
1435  //SingleCoil_MiniClampPlate_VisAtt -> SetForceWireframe(true);
1436  //SingleCoil_MiniClampPlate_VisAtt -> SetForceSolid(true);
1439 }
1440 
1441 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
1442 
1443 void QweakSimMainMagnet::Construct_CoilFrames(G4VPhysicalVolume* MotherVolume)
1444 {
1445 
1446  // define MainMagnet SingleCoil Container solid volume
1447  G4cout << G4endl << "###### QweakSimMainMagnet: Define MainMagnet_MiniClampPlate_Solid " << G4endl << G4endl;
1448 
1449 
1450  G4Box* SingleCoil_FramePlate_Solid = new G4Box("MM_SingleCoil_FramePlate_Solid",
1454 
1455 
1456 
1457 
1458  //-----------------------------------------------------------------------------------
1459 
1460  //------------------------------
1461  //Boolean Subtraction: CenterBox
1462  //------------------------------
1463 
1464  G4Box* Subtraction_CenterBox_Solid = new G4Box("Subtraction_CenterBox_Solid",
1468 
1469  Position_CenterBox.setX( 0.0*cm); // left
1470  Position_CenterBox.setY( -18.0*2.54*cm); // down
1471  Position_CenterBox.setZ(0.0*cm);
1472 
1473  //Rotation_Chamfer1.rotateZ(0.0*degree);
1474 
1475  G4Transform3D Transform_CenterBox(Rotation_SubtractionBox, Position_CenterBox);
1476 
1477  FramePlateTemp_Solid[0] = new G4SubtractionSolid ("FramePlate-CenterBox",
1478  SingleCoil_FramePlate_Solid,
1479  Subtraction_CenterBox_Solid,
1480  Transform_CenterBox);
1481 
1482 
1483 
1484  //-----------------------------------------------------------------------------------
1485 
1486  //------------------------------
1487  //Boolean Subtraction: Upstream Cylinder
1488  //------------------------------
1489 
1490  G4Tubs* Subtraction_UpstreamCylinder_Solid = new G4Tubs("Subtraction_UpstreamCylinder_Solid",
1491  0.0*cm,
1492  29.75*2.54*cm,
1493  6.0*2.54*cm,
1494  0.0*degree,
1495  360.0*degree );
1496 
1497  Rotation_SubtractionCylinder.rotateY(-90.0*degree);
1498 
1499  Position_UpstreamCylinder.setX( 0.0*cm); // left
1500  Position_UpstreamCylinder.setY( (38.0-18.0-29.75)*2.54*cm); // down
1501  //Position_UpstreamCylinder.setZ( -50.0*cm); // down
1502 
1503  Position_UpstreamCylinder.setZ( -0.5*87.75*2.54*cm);
1504 
1505 
1506 
1507  G4Transform3D Transform_UpstreamCylinder(Rotation_SubtractionCylinder, Position_UpstreamCylinder);
1508 
1509  FramePlateTemp_Solid[1] = new G4SubtractionSolid ("FramePlate-UpstreamCylinder",
1511  Subtraction_UpstreamCylinder_Solid,
1512  Transform_UpstreamCylinder);
1513 
1514 
1515  //------------------------------
1516  //Boolean Subtraction: Upstream Cylinder
1517  //------------------------------
1518 
1519  G4Tubs* Subtraction_DownstreamCylinder_Solid = new G4Tubs("Subtraction_DownstreamCylinder_Solid",
1520  0.0*cm,
1521  29.75*2.54*cm,
1522  6.0*2.54*cm,
1523  0.0*degree,
1524  360.0*degree );
1525 
1526  //Rotation_SubtractionCylinder.rotateY(-90.0*degree);
1527 
1528  Position_DownstreamCylinder.setX( 0.0*cm);
1529  Position_DownstreamCylinder.setY( (38.0-18.0-29.75)*2.54*cm);
1530  Position_DownstreamCylinder.setZ( 0.5*87.75*2.54*cm);
1531 
1532  G4Transform3D Transform_DownstreamCylinder(Rotation_SubtractionCylinder, Position_DownstreamCylinder);
1533 
1534  FramePlateTemp_Solid[2] = new G4SubtractionSolid ("FramePlate-DownstreamCylinder",
1536  Subtraction_DownstreamCylinder_Solid,
1537  Transform_DownstreamCylinder);
1538 
1539 
1540 
1541  //----------------------------------
1542  //Boolean Subtraction: DownstreamBox
1543  //-----------------------------------
1544 
1545  G4Box* Subtraction_DownstreamBox_Solid = new G4Box("Subtraction_DownstreamBox_Solid",
1549 
1550  Position_DownstreamBox.setX( 0.0*cm); // horizontal
1551  Position_DownstreamBox.setY( -59.0*2.54*cm); // vertical
1552  Position_DownstreamBox.setZ( 0.5*CoilFramePlate_FullLength_Z); // along beam line towards dump
1553 
1554  G4Transform3D Transform_DownstreamBox(Rotation_SubtractionBox, Position_DownstreamBox);
1555 
1556  FramePlateTemp_Solid[3] = new G4SubtractionSolid ("FramePlate-DownstreamBox",
1558  Subtraction_DownstreamBox_Solid,
1559  Transform_DownstreamBox);
1560 
1561 
1562 
1563 
1564 
1565  //-----------------------------------------------------------------------------------
1566 
1567  //--------------------------------
1568  // The final version of FramePlate
1569  //--------------------------------
1570 
1571  SingleCoil_FramePlate_Logical = new G4LogicalVolume( FramePlateTemp_Solid[3],
1573  "MM_SingleCoil_FramePlate_Logical",
1574  0,
1575  0,0);
1576 
1577 
1578  //-----------------------------------------------------------------------------------------------
1579  // place 8 SingleCoil_FramePlates_Logical plates into the MotherVolume (around the global Z axis)
1580  //-----------------------------------------------------------------------------------------------
1581  //
1582  for (G4int n=0; n<8; n++) {
1583 
1584  Angle_FramePlate[n] = n*45.0*degree + 22.5*degree;
1585 
1587  Translation_FramePlate[n].setY(cos(Angle_FramePlate[n])*CoilFramePlate_CenterPositionInR);
1588  Translation_FramePlate[n].setZ(0.0*cm);
1589 
1590  // since the SingleCoil_MasterContainer_Logical is defined for a vertical orientation
1591  // but the translation assumes a horizontal orinetation, we have to subtract 90*deg
1592  Rotation_FramePlate[n] = new G4RotationMatrix();
1593  Rotation_FramePlate[n]->rotateZ(Angle_FramePlate[n]);
1594 
1595  SingleCoil_FramePlate_Physical[n] = new G4PVPlacement(Rotation_FramePlate[n],
1597  "MainMagnet_FramePlate_Physical",
1599  MotherVolume,
1600  false,
1601  n,
1602  pSurfChk);
1603 
1604  } // end of for (G4int n=0; n<8; n++)
1605 
1606  G4Colour aluminium ( 169/255., 172/255., 182/255.);
1607  G4Colour copper ( 184/255., 115/255., 51/255.);
1608  G4Color green_yellow ( 173/255., 255/255., 47/255.);
1609 
1610  SingleCoil_FramePlate_VisAtt -> SetColor(green_yellow);
1611  SingleCoil_FramePlate_VisAtt->SetVisibility(true);
1612  //SingleCoil_FramePlate_VisAtt->SetVisibility(false);
1613  //SingleCoil_FramePlate_VisAtt->SetForceWireframe(true);
1614  //SingleCoil_FramePlate_VisAtt->SetForceSolid(true);
1616 
1617 }
1618 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
1619 
1620 void QweakSimMainMagnet::Construct_RadialMountingBlocks(G4VPhysicalVolume* MotherVolume)
1621 {
1622 
1623  // define MainMagnet SingleCoil Container solid volume
1624  G4cout << G4endl << "###### QweakSimMainMagnet: Define MainMagnet_MountingBlock_Solid " << G4endl << G4endl;
1625 
1626 
1627  G4Box* SingleCoil_RadialMountingBlock_Solid = new G4Box("MM_SingleCoil_RadialMountingBlock_Solid",
1631 
1632  // define SingleCoil_RadialMountingBlock logical volume
1633  G4cout << G4endl << "###### QweakSimMainMagnet: Define SingleCoil_RadialMountingBlock_Logical " << G4endl << G4endl;
1634 
1635  SingleCoil_RadialMountingBlock_Logical = new G4LogicalVolume( SingleCoil_RadialMountingBlock_Solid,
1637  "MM_SingleCoil_RadialMountingBlock_Logical",
1638  0,
1639  0,0);
1640 
1641 
1642  //----------------------------------------------
1643 
1644  G4ThreeVector* leftcenter = new G4ThreeVector();
1645  G4ThreeVector* rightcenter = new G4ThreeVector();
1646 
1647  // place 8 SingleCoil_ClampPlate_Logical plates into the MotherVolume (around the global Z axis)
1648  for (G4int n=0; n<8; n++) {
1649 
1650  // set the vectors to the center of left and right mounting block
1651  // located at 12 o'clock. The rotate these vectors to the coil
1652  // positions and extract the new vector components
1653  // This procedure is easier than the calculation by hand for individual
1654  // clamp plate positions *before* Rotation_ClampPlate[n]
1655 
1656  // the mounting blocks are attachted to the CoilFramePlate which is thicker than the Coils
1657  // Thickness CoilFramePlate: CoilFramePlate_FullLength_X
1658  // Thickness Coil : SingleCoil_FullThickness
1659 
1660  leftcenter->setX( -0.5*( CoilFramePlate_FullLength_X + RadialMountingBlock_FullLength_X) );
1661  leftcenter->setY(RadialMountingBlock_CenterPositionInR);
1662  leftcenter->setZ(0.0*cm);
1663 
1665  rightcenter->setY(RadialMountingBlock_CenterPositionInR);
1666  rightcenter->setZ(0.0*cm);
1667 
1668  // angles of the clamp plates
1669  Angle_RadialMountingBlock[n] = n*45.0*degree + 22.5*degree;
1670 
1671  // rotate center vector to coils
1672  leftcenter ->rotateZ(Angle_RadialMountingBlock[n]);
1673  rightcenter ->rotateZ(Angle_RadialMountingBlock[n]);
1674 
1675 
1676  Translation_LeftRadialMountingBlock_Upstream[n].setX( leftcenter->y() );
1677  Translation_LeftRadialMountingBlock_Upstream[n].setY( leftcenter->x() );
1679 
1680  Translation_RightRadialMountingBlock_Upstream[n].setX( rightcenter->y() );
1681  Translation_RightRadialMountingBlock_Upstream[n].setY( rightcenter->x() );
1683 
1684  Translation_LeftRadialMountingBlock_Downstream[n].setX( leftcenter->y() );
1685  Translation_LeftRadialMountingBlock_Downstream[n].setY( leftcenter->x() );
1687 
1688  Translation_RightRadialMountingBlock_Downstream[n].setX( rightcenter->y() );
1689  Translation_RightRadialMountingBlock_Downstream[n].setY( rightcenter->x() );
1691 
1692 
1693 
1694  // since the SingleCoil_ClampPlate_Logical is defined for a vertical orientation
1695  // but the translation assumes a horizontal orinetation, we have to subtract 90*deg
1696  Rotation_RadialMountingBlock[n] = new G4RotationMatrix();
1697  Rotation_RadialMountingBlock[n]->rotateZ(Angle_RadialMountingBlock[n] -90*degree);
1698 
1699 
1702  "MainMagnet_LeftRadialMountingBlock_Upstream_Physical",
1704  MotherVolume,
1705  false,
1706  n,
1707  pSurfChk);
1708 
1711  "MainMagnet_RightRadialMountingBlock_Upstream_Physical",
1713  MotherVolume,
1714  false,
1715  n,
1716  pSurfChk);
1717 
1720  "MainMagnet_LeftRadialMountingBlock_Downstream_Physical",
1722  MotherVolume,
1723  false,
1724  n,
1725  pSurfChk);
1726 
1729  "MainMagnet_RightRadialMountingBlock_Downstream_Physical",
1731  MotherVolume,
1732  false,
1733  n,
1734  pSurfChk);
1735 
1736  } // end of for (G4int n=0; n<8; n++)
1737 
1738 
1739  G4Colour aluminium ( 169/255., 172/255., 182/255.);
1740 
1741  SingleCoil_RadialMountingBlock_VisAtt -> SetColor(aluminium);
1742  SingleCoil_RadialMountingBlock_VisAtt -> SetVisibility(true);
1744 
1745 }
1746 
1747 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
1748 void QweakSimMainMagnet::Construct_SupportFrame(G4VPhysicalVolume* MotherVolume)
1749 {
1750 
1751  // define MainMagnet SingleCoil Container solid volume
1752  G4cout << G4endl << "###### QweakSimMainMagnet: Define MainMagnet_DownstreamSupportBox_Solid " << G4endl << G4endl;
1753 
1754 
1755 
1756  //----------------------------------------------------------------------
1757  // Vertical cut of the *downstream* double-t frame support
1758  //
1759  // -------------> electrom beam axis
1760  //
1761  // | | downstream frame plates: z=88.498" and z=99.878"
1762  // |---|
1763  // | |
1764  // |---|
1765  // / |
1766  //
1767  // slab-rip-slab == a single "Double-T-Bean"
1768  //----------------------------------------------------------------------
1769 
1770 
1771 
1772  // First build a single vertical double-t-bean
1773  // cross scetion in global X-Z plane:
1774  //
1775  // | |
1776  // |--|
1777  // | | -------> z-axis = beam
1778  //
1779 
1780  //==================================================================================
1781 
1782  G4Box* DownstreamHorizontalDoubleTBeam_Solid = new G4Box("DownstreamHorizontalDoubleTBeam_Solid",
1786 
1787  G4Box* Subtract_DownstreamHorizontalDoubleTBeam_Solid = new G4Box("SubtractDownstreamHorizontalDoubleTBeam_Solid",
1792 
1793  std::vector< G4ThreeVector > LocalTranslation_HorizontalDoubleTBeam_Subtract;
1794  LocalTranslation_HorizontalDoubleTBeam_Subtract.clear();
1795  LocalTranslation_HorizontalDoubleTBeam_Subtract.resize(2);
1796 
1797  // Upstream Slab
1798  LocalTranslation_HorizontalDoubleTBeam_Subtract[0].setX(0.0*cm);
1799  LocalTranslation_HorizontalDoubleTBeam_Subtract[0].setY(0.5 * SupportFrame_DownstreamHorizontalDoubleTBeam_FullLength_Y + 0.5*SupportFrame_DownstreamDoubleTBeamRib_Thickness);
1800  LocalTranslation_HorizontalDoubleTBeam_Subtract[0].setZ(0.0*cm);
1801 
1802  // Downstream Slab
1803  LocalTranslation_HorizontalDoubleTBeam_Subtract[1].setX(0.0*cm);
1804  LocalTranslation_HorizontalDoubleTBeam_Subtract[1].setY(-0.5 * SupportFrame_DownstreamHorizontalDoubleTBeam_FullLength_Y - 0.5*SupportFrame_DownstreamDoubleTBeamRib_Thickness);
1805  LocalTranslation_HorizontalDoubleTBeam_Subtract[1].setZ(0.0*cm);
1806 
1807  // dummy rotation matrix
1808  G4RotationMatrix LocalRotation_Subtraction;
1809 
1810  G4Transform3D Transform3D_TopSubtraction (LocalRotation_Subtraction, LocalTranslation_HorizontalDoubleTBeam_Subtract[0] );
1811  G4Transform3D Transform3D_BottomSubtraction (LocalRotation_Subtraction, LocalTranslation_HorizontalDoubleTBeam_Subtract[1] );
1812 
1813 
1814  SupportFrameSubtraction_TempSolid[0] = new G4SubtractionSolid ("HorizontalBean-TopCutout",
1815  DownstreamHorizontalDoubleTBeam_Solid,
1816  Subtract_DownstreamHorizontalDoubleTBeam_Solid,
1817  Transform3D_TopSubtraction);
1818 
1819 
1820  SupportFrameSubtraction_TempSolid[1] = new G4SubtractionSolid ("HorizontalBean-BottomCutout",
1822  Subtract_DownstreamHorizontalDoubleTBeam_Solid,
1823  Transform3D_BottomSubtraction);
1824 
1825  //==================================================================================
1826 
1829  "SupportFrame_DownstreamHorizontalDoubleTBeam_Logical",
1830  0,
1831  0,0);
1832 
1833  //==================================================================================
1834 
1835  // +Y : outer horizontal beam
1836  Translation_DownstreamHorizontalDoubleTBeam[0].setX(0.0*cm); // horizontal
1840 
1841  // +Y : inner horizontal beam
1842  Translation_DownstreamHorizontalDoubleTBeam[1].setX(0.0*cm); // horizontal
1846 
1847  // -Y : inner horizontal beam
1848  Translation_DownstreamHorizontalDoubleTBeam[2].setX(0.0*cm); // horizontal
1852 
1853  // -Y : outer horizontal beam
1854  Translation_DownstreamHorizontalDoubleTBeam[3].setX(0.0*cm); // horizontal
1858 
1859  // define physical volume
1860  G4cout << G4endl << "###### QweakSimMainManet: Define SupportFrame_DownstreamHorizontalDoubleTBeam_Physical" << G4endl << G4endl;
1861 
1864  "SupportFrame_DownstreamHorizontalDoubleTBeam_TopOuter_Physical",
1866  MotherVolume,
1867  false,
1868  0,
1869  pSurfChk); // copy number
1870 
1871 
1874  "SupportFrame_DownstreamHorizontalDoubleTBeam_TopInner_Physical",
1876  MotherVolume,
1877  false,
1878  1,
1879  pSurfChk); // copy number
1880 
1883  "SupportFrame_DownstreamHorizontalDoubleTBeam_BottomInner_Physical",
1885  MotherVolume,
1886  false,
1887  2,
1888  pSurfChk); // copy number
1889 
1892  "SupportFrame_DownstreamHorizontalDoubleTBeam_BottomOuter_Physical",
1894  MotherVolume,
1895  false,
1896  3,
1897  pSurfChk); // copy number
1898 
1899 
1900  //============================================================================================================================================================
1901  //============================================================================================================================================================
1902 
1903 
1904  // First build a single vertical double-t-bean
1905  // cross scetion in global X-Z plane:
1906  //
1907  // | |
1908  // |--|
1909  // | | -------> z-axis = beam
1910  //
1911 
1912  //==================================================================================
1913 
1914  G4Box* DownstreamVerticalDoubleTBeam_Solid = new G4Box("DownstreamVerticalDoubleTBeam_Solid",
1918 
1919  G4Box* Subtract_DownstreamVerticalDoubleTBeam_Solid = new G4Box("SubtractDownstreamVerticalDoubleTBeam_Solid",
1924 
1925  std::vector< G4ThreeVector > LocalTranslation_VerticalDoubleTBeam_Subtract;
1926  LocalTranslation_VerticalDoubleTBeam_Subtract.clear();
1927  LocalTranslation_VerticalDoubleTBeam_Subtract.resize(2);
1928 
1929  // Left Slab (looking along z)
1930  LocalTranslation_VerticalDoubleTBeam_Subtract[0].setX(0.5 * SupportFrame_DownstreamVerticalDoubleTBeam_FullLength_X + 0.5*SupportFrame_DownstreamDoubleTBeamRib_Thickness);
1931  LocalTranslation_VerticalDoubleTBeam_Subtract[0].setY(0.0*cm);
1932  LocalTranslation_VerticalDoubleTBeam_Subtract[0].setZ(0.0*cm);
1933 
1934  // Right Slab (looking along z)
1935  LocalTranslation_VerticalDoubleTBeam_Subtract[1].setX(-0.5 * SupportFrame_DownstreamVerticalDoubleTBeam_FullLength_X - 0.5*SupportFrame_DownstreamDoubleTBeamRib_Thickness);
1936  LocalTranslation_VerticalDoubleTBeam_Subtract[1].setY(0.0*cm);
1937  LocalTranslation_VerticalDoubleTBeam_Subtract[1].setZ(0.0*cm);
1938 
1939  // dummy rotation matrix
1940  G4RotationMatrix LocalRotation_VerticalSubtraction;
1941 
1942  G4Transform3D Transform3D_LeftSubtraction (LocalRotation_VerticalSubtraction, LocalTranslation_VerticalDoubleTBeam_Subtract[0] );
1943  G4Transform3D Transform3D_RightSubtraction (LocalRotation_VerticalSubtraction, LocalTranslation_VerticalDoubleTBeam_Subtract[1] );
1944 
1945 
1946  SupportFrameSubtraction_TempSolid[2] = new G4SubtractionSolid ("VerticalBean-LeftCutout",
1947  DownstreamVerticalDoubleTBeam_Solid,
1948  Subtract_DownstreamVerticalDoubleTBeam_Solid,
1949  Transform3D_LeftSubtraction);
1950 
1951 
1952  SupportFrameSubtraction_TempSolid[3] = new G4SubtractionSolid ("VerticalBean-RightCutout",
1954  Subtract_DownstreamVerticalDoubleTBeam_Solid,
1955  Transform3D_RightSubtraction);
1956 
1957  //==================================================================================
1958 
1961  "SupportFrame_DownstreamVerticalDoubleTBeam_Logical",
1962  0,
1963  0,0);
1964 
1965  //==================================================================================
1966 
1967  // +X : outer Vertical beam
1970  Translation_DownstreamVerticalDoubleTBeam[0].setY(0.0*cm); // Vertical
1972 
1973  // +X : inner Vertical beam
1976  Translation_DownstreamVerticalDoubleTBeam[1].setY(0.0*cm); // Vertical
1978 
1979  // -X : inner Vertical beam
1982  Translation_DownstreamVerticalDoubleTBeam[2].setY(0.0*cm); // Vertical
1984 
1985  // -X : outer Vertical beam
1988  Translation_DownstreamVerticalDoubleTBeam[3].setY(0.0*cm); // Vertical
1990 
1991  // define physical volume
1992  G4cout << G4endl << "###### QweakSimMainManet: Define SupportFrame_DownstreamVerticalDoubleTBeam_Physical" << G4endl << G4endl;
1993 
1994  SupportFrame_DownstreamVerticalDoubleTBeam_Physical[0] = new G4PVPlacement(0,
1996  "SupportFrame_DownstreamVerticalDoubleTBeam_TopOuter_Physical",
1998  MotherVolume,
1999  false,
2000  0,
2001  pSurfChk); // copy number
2002 
2003 
2004  SupportFrame_DownstreamVerticalDoubleTBeam_Physical[1] = new G4PVPlacement(0,
2006  "SupportFrame_DownstreamVerticalDoubleTBeam_TopInner_Physical",
2008  MotherVolume,
2009  false,
2010  1,
2011  pSurfChk); // copy number
2012 
2013  SupportFrame_DownstreamVerticalDoubleTBeam_Physical[2] = new G4PVPlacement(0,
2015  "SupportFrame_DownstreamVerticalDoubleTBeam_BottomInner_Physical",
2017  MotherVolume,
2018  false,
2019  2,
2020  pSurfChk); // copy number
2021 
2022  SupportFrame_DownstreamVerticalDoubleTBeam_Physical[3] = new G4PVPlacement(0,
2024  "SupportFrame_DownstreamVerticalDoubleTBeam_BottomOuter_Physical",
2026  MotherVolume,
2027  false,
2028  3,
2029  pSurfChk); // copy number
2030 
2031  //---------------------------------------------------------------------------------------------------------------------------
2032 
2033  // First build a single horizontal Double-T-Bean
2034  // cross scetion in global X-Z plane:
2035  //
2036  // | |
2037  // |--|
2038  // | | -------> z-axis = beam
2039  //
2040 
2041  //==================================================================================
2042 
2043  G4Box* Downstream45DegDoubleTBeam_Solid = new G4Box("Downstream45DegHorizontalDoubleTBeam_Solid",
2047 
2048  G4Box* Subtract_Downstream45DegDoubleTBeam_Solid = new G4Box("SubtractDownstream45DegDoubleTBeam_Solid",
2053 
2054  std::vector< G4ThreeVector > LocalTranslation_45DegDoubleTBeam_Subtract;
2055  LocalTranslation_45DegDoubleTBeam_Subtract.clear();
2056  LocalTranslation_45DegDoubleTBeam_Subtract.resize(2);
2057 
2058  // Top Slab (looking along z)
2059  LocalTranslation_45DegDoubleTBeam_Subtract[0].setX( 0.0*cm);
2060  LocalTranslation_45DegDoubleTBeam_Subtract[0].setY( 0.5*SupportFrame_Downstream45DegDoubleTBeam_FullLength_Y + 0.5*SupportFrame_Downstream45DegDoubleTBeamRib_Thickness);
2061  LocalTranslation_45DegDoubleTBeam_Subtract[0].setZ( 0.0*cm);
2062 
2063  // Bottom Slab (looking along z)
2064  LocalTranslation_45DegDoubleTBeam_Subtract[1].setX( 0.0*cm);
2065  LocalTranslation_45DegDoubleTBeam_Subtract[1].setY(-0.5*SupportFrame_Downstream45DegDoubleTBeam_FullLength_Y - 0.5*SupportFrame_Downstream45DegDoubleTBeamRib_Thickness);
2066  LocalTranslation_45DegDoubleTBeam_Subtract[1].setZ( 0.0*cm);
2067 
2068  // dummy rotation matrix
2069  G4RotationMatrix LocalRotation_45DegSubtraction;
2070 
2071  G4Transform3D Transform3D_45DegTopSubtraction (LocalRotation_45DegSubtraction, LocalTranslation_45DegDoubleTBeam_Subtract[0] );
2072  G4Transform3D Transform3D_45DegBottomSubtraction (LocalRotation_45DegSubtraction, LocalTranslation_45DegDoubleTBeam_Subtract[1] );
2073 
2074 
2075  SupportFrameSubtraction_TempSolid[4] = new G4SubtractionSolid ("DoubleTBeam45Deg-TopCutout",
2076  Downstream45DegDoubleTBeam_Solid,
2077  Subtract_Downstream45DegDoubleTBeam_Solid,
2078  Transform3D_45DegTopSubtraction);
2079 
2080 
2081  SupportFrameSubtraction_TempSolid[5] = new G4SubtractionSolid ("DoubleTBeam45Deg-BottomCutout",
2083  Subtract_Downstream45DegDoubleTBeam_Solid,
2084  Transform3D_45DegBottomSubtraction);
2085 
2086 
2087  //==================================================================================
2088 
2089  G4Box* Subtract_Downstream45DegDoubleTBeam_Chamfer_Solid = new G4Box("Subtract_Downstream45DegDoubleTBeam_Chamfer_Solid",
2090  0.5 * 40.0*2.54*cm,
2093 
2094 
2095 
2096  std::vector< G4ThreeVector > LocalTranslation_45DegDoubleTBeam_SubtractChamfer;
2097  LocalTranslation_45DegDoubleTBeam_SubtractChamfer.clear();
2098  LocalTranslation_45DegDoubleTBeam_SubtractChamfer.resize(2);
2099 
2100  // BeamLeft Chamfer
2101  LocalTranslation_45DegDoubleTBeam_SubtractChamfer[0].setX( 0.5 * SupportFrame_Downstream45DegDoubleTBeam_FullLength_X);
2102  LocalTranslation_45DegDoubleTBeam_SubtractChamfer[0].setY( 0.0*cm);
2103  LocalTranslation_45DegDoubleTBeam_SubtractChamfer[0].setZ( 0.0*cm);
2104 
2105  // BeamRight Chamfer
2106  LocalTranslation_45DegDoubleTBeam_SubtractChamfer[1].setX( -0.5 * SupportFrame_Downstream45DegDoubleTBeam_FullLength_X);
2107  LocalTranslation_45DegDoubleTBeam_SubtractChamfer[1].setY( 0.0*cm);
2108  LocalTranslation_45DegDoubleTBeam_SubtractChamfer[1].setZ( 0.0*cm);
2109 
2110  // rotation matrices
2111  G4RotationMatrix LocalRotation_45DegSubtraction_LeftChamfer;
2112  LocalRotation_45DegSubtraction_LeftChamfer.rotateZ(-45.0*degree);
2113 
2114  G4RotationMatrix LocalRotation_45DegSubtraction_RightChamfer;
2115  LocalRotation_45DegSubtraction_RightChamfer.rotateZ(45*degree);
2116 
2117 
2118  G4Transform3D Transform3D_45DegLeftSubtractionChamfer (LocalRotation_45DegSubtraction_LeftChamfer , LocalTranslation_45DegDoubleTBeam_SubtractChamfer[0] );
2119  G4Transform3D Transform3D_45DegRightSubtractionChamfer (LocalRotation_45DegSubtraction_RightChamfer , LocalTranslation_45DegDoubleTBeam_SubtractChamfer[1] );
2120 
2121 
2122  SupportFrameSubtraction_TempSolid[6] = new G4SubtractionSolid ("DoubleTBeam45Deg-LeftChamfer",
2124  Subtract_Downstream45DegDoubleTBeam_Chamfer_Solid,
2125  Transform3D_45DegLeftSubtractionChamfer);
2126 
2127 
2128  SupportFrameSubtraction_TempSolid[7] = new G4SubtractionSolid ("DoubleTBeam45Deg-RightChamfer",
2130  Subtract_Downstream45DegDoubleTBeam_Chamfer_Solid,
2131  Transform3D_45DegRightSubtractionChamfer);
2132 
2133 
2134 
2135  //==================================================================================
2136 
2139  "SupportFrame_Downstream45DegDoubleTBeam_Logical",
2140  0,
2141  0,0);
2142 
2143  //==================================================================================
2144 
2145 
2146  //---------------------------------------------------------------------------------------------------------
2147  // place 4 SupportFrame_Downstream45DegDoubleTBeam_Logical into the MotherVolume (around the global Z axis)
2148  //---------------------------------------------------------------------------------------------------------
2149  //
2150  for (G4int n=0; n<4; n++) {
2151 
2152  Angle_DoubleTBeam45Deg[n] = n*90.0*degree + 45.0*degree;
2153 
2155  Translation_Downstream45DegDoubleTBeam[n].setY(cos(Angle_DoubleTBeam45Deg[n])*DoubleTBeam45Deg_CenterPositionInR);
2157 
2158  // since the SingleCoil_MasterContainer_Logical is defined for a vertical orientation
2159  // but the translation assumes a horizontal orinetation, we have to subtract 90*deg
2160  Rotation_DoubleTBeam45Deg[n] = new G4RotationMatrix();
2162 
2165  "SupportFrame_Downstream45DegDoubleTBeam",
2167  MotherVolume,
2168  false,
2169  n,
2170  pSurfChk); // copy number
2171 
2172  } // end of for (G4int n=0; n<4; n++)
2173 
2174  //==================================================================================
2175 
2176  //---------------------------------------------------------------------------------------------------------------------------
2177 
2178  G4cout << G4endl << "###### QweakSimMainMagnet: Setting Attributes for downstream support frame" << G4endl << G4endl;
2179 
2180  G4Colour blue (0.,0.,1.);
2181 
2185 
2189 
2191  SupportFrame_Downstream45DegDoubleTBeam_VisAtt -> SetVisibility(true);
2193 
2194  //---------------------------------------------------------------------------------------------------------------------------
2195 
2196  G4cout << G4endl << "###### Leaving QweakSimMainMagnet::Construct_SupportFrame() " << G4endl << G4endl;
2197 
2198  //-----------------------------------------------------------------------------------
2199 }
2200 
2201 void QweakSimMainMagnet::Construct_DownstreamSpider(G4VPhysicalVolume* MotherVolume)
2202 {
2203 
2204  // define downstream spider radial slabs volume
2205  G4cout << G4endl << "###### QweakSimMainMagnet: Define MainMagnet_DownstreamSpider_RadialSlabs_Solids " << G4endl << G4endl;
2206 
2207  G4Tubs* DownstreamSpider_Solid = new G4Tubs("DowmstreamSpider_Solid",
2213 
2214 
2215  // Solid of Spider is defined above. Now make a logical volume and place it in the
2216  // MotherVolume of Qweak
2217  DownstreamSpider_Logical = new G4LogicalVolume( DownstreamSpider_Solid,
2219  "DownstreamSpider_Log",
2220  0,
2221  0,0);
2222 
2223 
2224  G4ThreeVector position_DownstreamSpider = G4ThreeVector(0.0,
2225  0.0,
2227 
2228 
2229  DownstreamSpider_Physical = new G4PVPlacement( 0,
2230  position_DownstreamSpider,
2231  "DownstreamSpider_Physical",
2233  MotherVolume,
2234  false,
2235  0,
2236  pSurfChk);
2237 
2238 
2239  //--------------
2240 
2241 
2242 
2243  G4Box* DownstreamSpider_RadialSlab_Solid = new G4Box("DownstreamSpider_RadialSlab_Solid",
2244  0.5 * DownstreamSpider_RadialSlab_FullLength_X, // horizontal
2245  0.5 * DownstreamSpider_RadialSlab_FullLength_Y, // vertical
2246  0.5 * DownstreamSpider_RadialSlab_FullLength_Z ); // along beam
2247 
2248 
2249  DownstreamSpider_RadialSlab_Logical = new G4LogicalVolume( DownstreamSpider_RadialSlab_Solid,
2251  "DownstreamSpider_RadialSlab_Logical",
2252  0,
2253  0,0);
2254 
2255 
2256  // place 8 DownstreamSpider_RadialSlab_Logical into the MotherVolume (around the global Z axis)
2257  for (G4int n=0; n<8; n++) {
2258 
2259  Angle_DownstreamSpider_RadialSlab[n] = n*45.0*degree + 22.5*degree;
2260 
2261  Rotation_DownstreamSpider_RadialSlab[n] = new G4RotationMatrix();
2263 
2265  Translation_DownstreamSpider_RadialSlab[n].setY(cos(Angle_DownstreamSpider_RadialSlab[n])*DownstreamSpider_RadialSlab_CenterPositionInR);
2267 
2270  "DownstreamSpider_RadialSlab_Physical",
2272  MotherVolume,
2273  false,
2274  n,
2275  pSurfChk);
2276 
2277  } // end of for (G4int n=0; n<8; n++)
2278 
2279 
2280  //--------------
2281 
2282  G4Colour aluminium ( 169/255., 172/255., 182/255.);
2283  G4Color khaki3 ( 205/255., 198/255., 115/255.);
2284 
2285 
2286  DownstreamSpider_VisAtt -> SetColor(khaki3);
2287  DownstreamSpider_VisAtt -> SetVisibility(true);
2289 
2290  DownstreamSpider_RadialSlab_VisAtt -> SetColor(aluminium);
2291  DownstreamSpider_RadialSlab_VisAtt -> SetVisibility(true);
2293 }
2294 
2295 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
2296 
2297 //=======================================================
2298 // -----------------------
2299 // | CVS File Information |
2300 // -----------------------
2301 //
2302 // $Revisions$
2303 // $Log: QweakSimMainMagnet.cc,v $
2304 // Revision 1.8 2006/01/20 21:14:33 grimm
2305 // .
2306 //
2307 // Revision 1.7 2006/01/18 20:18:49 grimm
2308 // Added downstream support structure and downstream spider
2309 //
2310 // Revision 1.6 2006/01/13 00:28:33 grimm
2311 // Added Construct_RadialMountingBlocks()
2312 //
2313 // Revision 1.5 2006/01/12 20:24:25 grimm
2314 // Included the 5" thick frame holder in which the coil is embedded. The whole code of coil placements had to be rewritten.
2315 // The coils are now placed directly into the MotherVolume and not in SingleCoil_MasterContainer (obsolete now like the function ConstructCoils() ).
2316 // The position and dimensions of the UpstreamMiniClamps and the big ClampPlates have been updated according to SolidWorks.
2317 //
2318 // Revision 1.4 2005/12/29 02:50:33 grimm
2319 // Added upstream Mini Clamps including a chamfer according to drawings.
2320 // Included only the chamfer which avoids an overlap of the mini clamps at the given radius.
2321 //
2322 // Revision 1.3 2005/12/28 23:08:03 grimm
2323 // Added the large clamp plates attached to both sides of each coil.
2324 // Dimensions and location are chosen rather arbirary, must be updated with SolidWorks information.
2325 //
2326 // Revision 1.2 2005/12/27 19:13:16 grimm
2327 // - Redesign of Doxygen header containing CVS info like revision and date
2328 // - Added CVS revision log at the end of file
2329 //
2330 //
G4Material * SingleCoil_MiniClampPlate_Material
G4double Subtraction_DownstreamBox_FullLength_X
G4RotationMatrix Rotation_SubtractionCylinder
std::vector< G4RotationMatrix * > Rotation_Lintel
std::vector< G4VPhysicalVolume * > SingleCoil_RightClampPlate_Physical
G4double SingleCoil_MasterContainer_FullLength_Y
void Construct_UpstreamSpider(G4VPhysicalVolume *MotherVolume)
G4double MainMagnet_MasterContainer_FullLength_X
G4VPhysicalVolume * MainMagnet_MasterContainer_Physical
G4double DownstreamSpider_PhiAngleStart
G4ThreeVector Position_Chamfer4
G4double SupportFrame_Downstream45DegDoubleTBeam_FullLength_X
G4RotationMatrix Rotation_Chamfer4
G4double DownstreamSpider_DiameterMax
G4double RadialMountingBlock_FullLength_Y
std::vector< G4VPhysicalVolume * > SingleCoil_FramePlate_Physical
std::vector< G4VPhysicalVolume * > SupportFrame_DownstreamHorizontalDoubleTBeam_Physical
G4double SingleCoil_MasterContainer_FullLength_Z
std::vector< G4ThreeVector > Translation_Lintel
G4double MiniClampPlate_CenterPositionInR
G4double SupportFrame_Downstream45DegDoubleTBeam_FullLength_Y
G4Material * UpstreamSpider_Material
std::vector< G4double > Angle_MiniClampPlate
G4LogicalVolume * SingleCoil_Wing_Logical
std::vector< G4double > Angle_Lintel
std::vector< G4ThreeVector > Translation_SingleCoil_LowerPlate
G4Material * SupportFrame_Material
G4VPhysicalVolume * UpstreamSpider_Physical
std::vector< G4VPhysicalVolume * > Lintel_Physical
G4RotationMatrix Rotation_Chamfer2
std::vector< G4VPhysicalVolume * > SupportFrame_DownstreamVerticalDoubleTBeam_Physical
G4ThreeVector Position_DownstreamBox
static QweakSimMaterial * GetInstance()
G4Material * Lintel_Material
G4double SingleCoil_Wing_PhiAngleStart
std::vector< G4ThreeVector > Translation_RightRadialMountingBlock_Downstream
G4ThreeVector Position_CenterBox
G4VisAttributes * DownstreamSpider_RadialSlab_VisAtt
G4LogicalVolume * UpstreamSpider_LowThetaCutoutFinal_Logical
G4double SupportFrame_DownstreamVerticalDoubleTBeam_FullLength_Y
G4Material * SingleCoil_Material
std::vector< G4ThreeVector > Translation_SingleCoil_UpperPlate
void SetCenterPositionInZ(G4double myCenterPositionInZ)
std::vector< G4ThreeVector > Translation_RightMiniClampPlate
G4double RadialMountingBlock_UpstreamPositionInZ
G4double UpstreamSpider_FullThickness
G4LogicalVolume * UpstreamSpider_LowThetaCutoutLeft_Logical
G4LogicalVolume * UpstreamSpider_Tube_Subtraction_Logical
G4VPhysicalVolume * UpstreamSpider_LowThetaCutoutRight_Physical
std::vector< G4RotationMatrix * > Rotation_DownstreamSpider_RadialSlab
G4LogicalVolume * SingleCoil_RightMiniClampPlate_Logical
G4double UpstreamSpider_PhiAngleStart
std::vector< G4double > Angle_DownstreamSpider_RadialSlab
std::vector< G4RotationMatrix * > Rotation_FramePlate
std::vector< G4RotationMatrix * > Rotation_DoubleTBeam45Deg
G4double SingleCoil_MasterContainer_FullLength_X
G4LogicalVolume * UpstreamSpider_LowThetaCutoutRight_Logical
G4double DownstreamSpider_RadialSlab_FullLength_Y
std::vector< G4VPhysicalVolume * > SingleCoil_UpperPlate_Physical
G4LogicalVolume * DownstreamSpider_RadialSlab_Logical
G4double SingleCoil_Plate_FullLength_Y
void Construct_CoilFrames(G4VPhysicalVolume *MotherVolume)
G4double MiniClampPlate_FullLength_Z
G4VisAttributes * UpstreamSpider_VisAtt
std::vector< G4ThreeVector > Translation_DownstreamVerticalDoubleTBeam
std::vector< G4VPhysicalVolume * > SingleCoil_RightWing_Physical
std::vector< G4ThreeVector > Translation_SingleCoil
static const G4bool pSurfChk
G4double SingleCoil_Plate_FullLength_Z
std::vector< G4RotationMatrix * > Rotation_SingleCoil_RightWing
G4double MainMagnet_MasterContainer_FullLength_Y
G4double DownstreamSpider_DiameterMin
G4Material * SingleCoil_RadialMountingBlock_Material
std::vector< G4ThreeVector > Translation_Downstream45DegDoubleTBeam
std::vector< G4VPhysicalVolume * > SingleCoil_RightRadialMountingBlock_Upstream_Physical
G4double MiniClampPlate_FullLength_X
G4double RadialMountingBlock_DownstreamPositionInZ
G4double RadialMountingBlock_FullLength_X
G4double DownstreamSpider_RadialSlab_CenterPositionInR
G4double CoilFramePlate_FullLength_Z
std::vector< G4ThreeVector > Translation_LeftMiniClampPlate
G4double Subtraction_CenterBox_FullLength_Y
G4double SupportFrame_DownstreamVerticalDoubleTBeam_FullLength_X
std::vector< G4ThreeVector > Translation_SingleCoil_LeftWing
G4double SupportFrame_Downstream45DegDoubleTBeamSlab_Thickness
void Construct_SupportFrame(G4VPhysicalVolume *MotherVolume)
std::vector< G4double > Angle_ClampPlate
std::vector< G4VPhysicalVolume * > SingleCoil_RightRadialMountingBlock_Downstream_Physical
void Construct_ClampPlates(G4VPhysicalVolume *MotherVolume)
G4VPVParameterisation * MM_SingleCoilParam
G4double Subtraction_DownstreamBox_FullLength_Y
G4double CoilFramePlate_FullLength_X
G4VisAttributes * SupportFrame_DownstreamVerticalDoubleTBeam_VisAtt
G4double SupportFrame_DownstreamHorizontalDoubleTBeam_FullLength_Z
G4double SupportFrame_DownstreamHorizontalDoubleTBeam_FullLength_X
G4LogicalVolume * SingleCoil_LeftMiniClampPlate_Logical
G4double SupportFrame_DownstreamVerticalDoubleTBeam_FullLength_Z
G4double SupportFrame_DownstreamDoubleTBeamRib_Thickness
std::vector< G4UnionSolid * > MyUpstreamSpider_LowThetaCutout_Solid
std::vector< G4VPhysicalVolume * > DownstreamSpider_RadialSlab_Physical
G4VPhysicalVolume * DownstreamSpider_Physical
G4double Subtraction_CenterBox_FullLength_X
G4double SingleCoil_Wing_DiameterMax
std::vector< G4RotationMatrix * > Rotation_MiniClampPlate
G4VisAttributes * SupportFrame_DownstreamHorizontalDoubleTBeam_VisAtt
G4VisAttributes * SingleCoil_RadialMountingBlock_VisAtt
std::vector< G4ThreeVector > Translation_RightRadialMountingBlock_Upstream
G4LogicalVolume * MainMagnet_MasterContainer_Logical
G4double RadialMountingBlock_CenterPositionInR
G4double Subtraction_DownstreamBox_FullLength_Z
std::vector< G4SubtractionSolid * > FramePlateTemp_Solid
std::vector< G4VPhysicalVolume * > SingleCoil_LeftRadialMountingBlock_Downstream_Physical
G4VisAttributes * SingleCoil_FramePlate_VisAtt
G4double DownstreamSpider_FullThickness
G4double DownstreamSpider_RadialSlab_FullLength_X
G4LogicalVolume * SingleCoil_FramePlate_Logical
G4LogicalVolume * SingleCoil_ClampPlate_Logical
G4VPhysicalVolume * UpstreamSpider_LowThetaCutoutFinal_Physical
std::vector< G4VPhysicalVolume * > SingleCoil_LeftWing_Physical
G4VPhysicalVolume * UpstreamSpider_LowThetaCutoutLeft_Physical
G4Material * SingleCoil_FramePlate_Material
G4double DownstreamSpider_PhiDeltaAngle
G4LogicalVolume * UpstreamSpider_Box_Union_Logical
G4VisAttributes * SupportFrame_Downstream45DegDoubleTBeam_VisAtt
G4Material * GetMaterial(G4String material)
G4double MiniClampPlate_FullLength_Y
G4double CoilFramePlate_CenterPositionInR
G4double DownstreamSpider_RadialSlab_CenterPositionInZ
G4double MiniClampPlate_CenterPositionInZ
std::vector< G4RotationMatrix * > Rotation_SingleCoil_LeftWing
G4double Subtraction_CenterBox_FullLength_Z
std::vector< G4SubtractionSolid * > SupportFrameSubtraction_TempSolid
G4VisAttributes * SingleCoil_MiniClampPlate_VisAtt
G4double SupportFrame_DownstreamDoubleTBeamSlab_Thickness
G4LogicalVolume * Lintel_Logical
std::vector< G4ThreeVector > Translation_LeftClampPlate
G4LogicalVolume * SingleCoil_Plate_Logical
G4ThreeVector Position_Chamfer1
G4LogicalVolume * SupportFrame_Downstream45DegDoubleTBeam_Logical
std::vector< G4ThreeVector > Translation_DownstreamHorizontalDoubleTBeam
std::vector< G4RotationMatrix * > Rotation_RadialMountingBlock
std::vector< G4UnionSolid * > SupportFrameUnion_TempSolid
std::vector< G4ThreeVector > Translation_FramePlate
std::vector< G4UnionSolid * > MyUpstreamSpider_StrutsUnion_Solid
std::vector< G4ThreeVector > Translation_LeftRadialMountingBlock_Upstream
QweakSimMaterial * pMaterial
G4LogicalVolume * SupportFrame_DownstreamHorizontalDoubleTBeam_Logical
G4ThreeVector Position_Chamfer2
void Construct_DownstreamSpider(G4VPhysicalVolume *MotherVolume)
G4RotationMatrix Rotation_Chamfer3
G4double UpstreamSpider_PhiDeltaAngle
G4double UpstreamSpider_CenterPositionInZ
std::vector< G4ThreeVector > Translation_LeftRadialMountingBlock_Downstream
std::vector< G4ThreeVector > Translation_DownstreamSpider_RadialSlab
G4LogicalVolume * SingleCoil_MasterContainer_Logical
G4ThreeVector Position_UpstreamCylinder
G4double SingleCoil_Wing_DiameterMin
std::vector< G4SubtractionSolid * > MiniClampPlateTemp_Solid
G4double SingleCoil_MinimalRadialDistance
std::vector< G4VPhysicalVolume * > SingleCoil_LowerPlate_Physical
std::vector< G4RotationMatrix * > Rotation_SingleCoil
G4double SingleCoil_Wing_PhiDeltaAngle
std::vector< G4SubtractionSolid * > MyUpstreamSpider_Solid
G4double CoilFramePlate_CenterPositionInZ
std::vector< G4VPhysicalVolume * > SingleCoil_RightMiniClampPlate_Physical
G4double DoubleTBeam45Deg_CenterPositionInR
G4LogicalVolume * SupportFrame_DownstreamVerticalDoubleTBeam_Logical
std::vector< G4ThreeVector > Translation_RightClampPlate
G4double RadialMountingBlock_FullLength_Z
G4ThreeVector Position_Chamfer3
std::vector< G4SubtractionSolid * > DownstreamSpider_TempSubtractionSolid
G4VisAttributes * DownstreamSpider_VisAtt
G4LogicalVolume * UpstreamSpider_Box_Subtraction_Logical
G4VisAttributes * SingleCoil_VisAtt
G4double CoilFramePlate_FullLength_Y
std::vector< G4double > Angle_DoubleTBeam45Deg
G4double MainMagnet_MasterContainer_FullLength_Z
G4RotationMatrix Rotation_Chamfer1
G4double DownstreamSpider_CenterPositionInZ
G4double DownstreamSpider_RadialSlab_FullLength_Z
std::vector< G4double > Angle_FramePlate
G4double ClampPlate_CenterPositionInR
std::vector< G4double > Angle_SingleCoil
void Construct_RadialMountingBlocks(G4VPhysicalVolume *MotherVolume)
G4double SupportFrame_Downstream45DegDoubleTBeamRib_Thickness
G4double SupportFrame_DownstreamHorizontalDoubleTBeam_FullLength_Y
G4LogicalVolume * SingleCoil_RadialMountingBlock_Logical
G4VisAttributes * SingleCoil_ClampPlate_VisAtt
G4RotationMatrix Rotation_SubtractionBox
G4double MainMagnet_CenterPositionInZ
std::vector< G4VPhysicalVolume * > SingleCoil_LeftMiniClampPlate_Physical
G4double SingleCoil_Plate_FullLength_X
void ConstructComponent(G4VPhysicalVolume *MotherVolume)
G4VisAttributes * Lintel_VisAtt
std::vector< G4double > Angle_RadialMountingBlock
G4double SupportFrame_Downstream45DegDoubleTBeam_FullLength_Z
void Construct_UpStreamMiniClampPlates(G4VPhysicalVolume *MotherVolume)
G4double Subtraction_Cylinder_Diameter
std::vector< G4VPhysicalVolume * > SingleCoil_LeftClampPlate_Physical
std::vector< G4VPhysicalVolume * > SupportFrame_Downstream45DegDoubleTBeam_Physical
G4double SingleCoil_CenterPositionInR
G4LogicalVolume * DownstreamSpider_Logical
G4Material * MainMagnet_MasterContainer_Material
G4double Subtraction_Cylinder_Height
G4double positionInZ_DownstreamDoubleTBeam
G4LogicalVolume * UpstreamSpider_Logical
G4ThreeVector Position_DownstreamCylinder
G4Material * SingleCoil_ClampPlate_Material
G4double positionInZ_Downstream45DegDoubleTBeam
std::vector< G4ThreeVector > Translation_SingleCoil_RightWing
G4Material * SingleCoil_MasterContainer_Material
std::vector< G4RotationMatrix * > Rotation_ClampPlate
std::vector< G4VPhysicalVolume * > SingleCoil_LeftRadialMountingBlock_Upstream_Physical