41 #include "G4LogicalVolume.hh"
42 #include "G4RotationMatrix.hh"
54 G4cout << G4endl <<
"###### Calling QweakSimVDCRotator::QweakCollimatorSupport() " << G4endl << G4endl;
185 G4cout << G4endl <<
"###### Leaving QweakSimVDCRotator::QweakCollimatorSupport() " << G4endl << G4endl;
194 G4cout << G4endl <<
"###### Calling QweakSimVDCRotator::RotatorMasterContainer() " << G4endl << G4endl;
196 G4Box* RotatorMasterContainer_Solid =
new G4Box(
"RotatorMasterContainer_Solid",
201 G4LogicalVolume* RotatorMasterContainer_Logical =
new G4LogicalVolume( RotatorMasterContainer_Solid,
203 "RotatorMasterContainer_Logical",
207 G4Colour aluminum ( 169/255. , 172/255. , 182/255.);
208 G4VisAttributes* RotatorMasterContainer_VisAtt =
new G4VisAttributes(aluminum);
209 RotatorMasterContainer_VisAtt->SetForceWireframe(
true);
210 RotatorMasterContainer_VisAtt->SetVisibility(
false);
211 RotatorMasterContainer_Logical->SetVisAttributes(RotatorMasterContainer_VisAtt);
215 G4ThreeVector Translation_RotatorMasterContainer;
218 G4RotationMatrix* Rotation_RotatorMasterContainer =
new G4RotationMatrix();
222 Translation_RotatorMasterContainer,
223 "RotatorMasterContainer_Physical",
224 RotatorMasterContainer_Logical,
236 G4cout << G4endl <<
"###### Calling QweakSimVDCRotator::ConstructSupport() " << G4endl << G4endl;
251 G4Tubs* UpstreamRing_Solid =
new G4Tubs(
"UpstreamRing_Sol",
268 positionUpstreamRing,
287 G4Tubs* DownstreamRing_Solid =
new G4Tubs(
"DownstreamRing_Sol",
300 "DownstreamRing_Log",
304 positionDownstreamRing,
313 G4Colour blue (0.,0.,1.);
314 G4Colour mangenta (237/255.,173/255.,255/255.);
315 G4Colour mangenta1 (104/255., 49/255., 94/255.);
316 G4Colour aluminum ( 169/255. , 172/255. , 182/255.);
317 G4Color lightsteelblue ( 176/255. , 196/255. , 222/255.);
320 G4VisAttributes* Ring_VisAtt =
new G4VisAttributes(aluminum);
321 Ring_VisAtt->SetVisibility(
true);
329 G4cout << G4endl <<
"###### Leaving QweakSimVDCRotator::ConstructSupport() " << G4endl << G4endl;
336 G4cout << G4endl <<
"###### Calling QweakSimVDCRotator::ConstructRails() " << G4endl << G4endl;
342 G4Box* Rail_Solid =
new G4Box(
"Rail_Solid",
355 G4Colour blue (0.,0.,1.);
356 G4Colour mangenta (237/255.,173/255.,255/255.);
357 G4Colour mangenta1 (104/255., 49/255., 94/255.);
358 G4Colour aluminum ( 169/255. , 172/255. , 182/255.);
359 G4Color lightsteelblue ( 176/255. , 196/255. , 222/255.);
361 G4VisAttributes* Rails_VisAtt =
new G4VisAttributes(blue);
362 Rails_VisAtt->SetVisibility(
true);
377 G4ThreeVector* CenterRailLeft =
new G4ThreeVector();
378 G4ThreeVector* CenterRailRight =
new G4ThreeVector();
381 CenterRailLeft->setY(0.0*cm);
382 CenterRailLeft->setZ(0.0*cm);
385 CenterRailRight->setY(0.0*cm);
386 CenterRailRight->setZ(0.0*cm);
418 "RightRail_Physical",
430 G4cout << G4endl <<
"###### Calling QweakSimVDCRotator::ConstructMount() " << G4endl << G4endl;
439 G4Tubs* Rod_LeftRight_Solid =
new G4Tubs(
"Rod_LR_Sol",
451 Rod_LeftRight_Material,
452 "Rod_LeftRight_Logical",
459 G4Colour blue (0.,0.,1.);
460 G4Colour mangenta (237/255.,173/255.,255/255.);
461 G4Colour mangenta1 (104/255., 49/255., 94/255.);
462 G4Colour aluminum ( 169/255. , 172/255. , 182/255.);
463 G4Color lightsteelblue ( 176/255. , 196/255. , 222/255.);
465 G4VisAttributes* Rod_LeftRight_VisAtt =
new G4VisAttributes(mangenta);
466 Rod_LeftRight_VisAtt ->SetVisibility(
true);
479 G4ThreeVector* CenterRodLeftUpstream =
new G4ThreeVector();
480 G4ThreeVector* CenterRodLeftDownstream =
new G4ThreeVector();
482 G4ThreeVector* CenterRodRightUpstream =
new G4ThreeVector();
483 G4ThreeVector* CenterRodRightDownstream =
new G4ThreeVector();
540 "RodLR_LeftUpstream_Physical",
549 "RodLR_RightUpstream_Physical",
558 "RodLR_LeftDownstream_Physical",
567 "RodLR_RightDownstream_Physical",
579 G4cout << G4endl <<
"###### Calling QweakSimVDCRotator::ConstructSliderSupport() " << G4endl << G4endl;
585 G4Box* SliderSupportLeft_Solid =
new G4Box(
"SliderSupportLeft_Solid",
590 G4Box* SliderSupportRight_Solid =
new G4Box(
"SliderSupportRight_Solid",
598 G4Box* SubtractInnerBox_Solid =
new G4Box(
"SubtractInnerBox_Solid",
599 0.5 * 2*4.00*2.54*cm,
604 std::vector< G4ThreeVector > LocalTranslation_InnerBox_Subtract;
605 LocalTranslation_InnerBox_Subtract.clear();
606 LocalTranslation_InnerBox_Subtract.resize(4);
609 LocalTranslation_InnerBox_Subtract[0].setX(-1.0*(0.5*203.20*mm));
610 LocalTranslation_InnerBox_Subtract[0].setY(0.0*cm);
611 LocalTranslation_InnerBox_Subtract[0].setZ(-1.0*(1.0+0.5*3.50)*2.54*cm);
614 LocalTranslation_InnerBox_Subtract[1].setX(-1.0*(0.5*203.20*mm));
615 LocalTranslation_InnerBox_Subtract[1].setY(0.0*cm);
616 LocalTranslation_InnerBox_Subtract[1].setZ(+1.0*(1.0+0.5*3.50)*2.54*cm);
620 LocalTranslation_InnerBox_Subtract[2].setX(+1.0*(0.5*203.20*mm));
621 LocalTranslation_InnerBox_Subtract[2].setY(0.0*cm);
622 LocalTranslation_InnerBox_Subtract[2].setZ(-1.0*(1.0+0.5*3.50)*2.54*cm);
625 LocalTranslation_InnerBox_Subtract[3].setX(+1.0*(0.5*203.20*mm));
626 LocalTranslation_InnerBox_Subtract[3].setY(0.0*cm);
627 LocalTranslation_InnerBox_Subtract[3].setZ(+1.0*(1.0+0.5*3.50)*2.54*cm);
631 G4RotationMatrix LocalRotation_InnerBox_Subtraction;
633 G4Transform3D Transform3D_InnerUpstreamSubtraction_LeftSlider(LocalRotation_InnerBox_Subtraction, LocalTranslation_InnerBox_Subtract[0] );
636 SliderSupportLeft_Solid,
638 SubtractInnerBox_Solid,
639 Transform3D_InnerUpstreamSubtraction_LeftSlider);
641 G4Transform3D Transform3D_InnerUpstreamSubtraction_RightSlider(LocalRotation_InnerBox_Subtraction, LocalTranslation_InnerBox_Subtract[2] );
644 SliderSupportRight_Solid,
646 SubtractInnerBox_Solid,
647 Transform3D_InnerUpstreamSubtraction_RightSlider);
650 G4Transform3D Transform3D_InnerDownstreamSubtraction_LeftSlider(LocalRotation_InnerBox_Subtraction, LocalTranslation_InnerBox_Subtract[1] );
654 SubtractInnerBox_Solid,
655 Transform3D_InnerDownstreamSubtraction_LeftSlider);
657 G4Transform3D Transform3D_InnerDownstreamSubtraction_RightSlider(LocalRotation_InnerBox_Subtraction, LocalTranslation_InnerBox_Subtract[3] );
661 SubtractInnerBox_Solid,
662 Transform3D_InnerDownstreamSubtraction_RightSlider);
666 G4Box* SubtractBottomBox_Solid =
new G4Box(
"SubtractBottomBox_Solid",
667 0.5 * 2*3.25*2.54*cm,
672 std::vector< G4ThreeVector > LocalTranslation_BottomBox_Subtract;
673 LocalTranslation_BottomBox_Subtract.clear();
674 LocalTranslation_BottomBox_Subtract.resize(2);
677 LocalTranslation_BottomBox_Subtract[0].setX(+1.0*(0.5*203.20*mm));
678 LocalTranslation_BottomBox_Subtract[0].setY(0.0*cm);
679 LocalTranslation_BottomBox_Subtract[0].setZ(0.0*cm);
682 LocalTranslation_BottomBox_Subtract[1].setX(-1.0*(0.5*203.20*mm));
683 LocalTranslation_BottomBox_Subtract[1].setY(0.0*cm);
684 LocalTranslation_BottomBox_Subtract[1].setZ(0.0*cm);
689 G4RotationMatrix LocalRotation_BottomBox_Subtraction;
691 G4Transform3D Transform3D_BottomSubtraction_LeftSlider(LocalRotation_BottomBox_Subtraction, LocalTranslation_BottomBox_Subtract[0] );
696 SubtractBottomBox_Solid,
697 Transform3D_BottomSubtraction_LeftSlider);
699 G4Transform3D Transform3D_BottomSubtraction_RightSlider(LocalRotation_BottomBox_Subtraction, LocalTranslation_BottomBox_Subtract[1] );
704 SubtractBottomBox_Solid,
705 Transform3D_BottomSubtraction_RightSlider);
707 G4Box* SubtractOuterBox_Solid =
new G4Box(
"SubtractOuterBox_Solid",
708 0.5 * 6.82*2.54*cm + 0.1*mm,
710 0.5 * (2*1.937)*2.54*cm);
713 std::vector< G4ThreeVector > LocalTranslation_OuterBox_Subtract;
714 LocalTranslation_OuterBox_Subtract.clear();
715 LocalTranslation_OuterBox_Subtract.resize(2);
718 LocalTranslation_OuterBox_Subtract[0].setX(0.0*cm);
719 LocalTranslation_OuterBox_Subtract[0].setY(0.0*cm);
720 LocalTranslation_OuterBox_Subtract[0].setZ(-1.0*(4.50+2.527)*2.54*cm);
723 LocalTranslation_OuterBox_Subtract[1].setX(0.0*cm);
724 LocalTranslation_OuterBox_Subtract[1].setY(0.0*cm);
725 LocalTranslation_OuterBox_Subtract[1].setZ(+1.0*(4.50+2.527)*2.54*cm);
729 G4RotationMatrix LocalRotation_OuterBox_Subtraction;
731 G4Transform3D Transform3D_OuterUpstreamSubtraction(LocalRotation_OuterBox_Subtraction, LocalTranslation_OuterBox_Subtract[0] );
736 SubtractOuterBox_Solid,
737 Transform3D_OuterUpstreamSubtraction);
742 SubtractOuterBox_Solid,
743 Transform3D_OuterUpstreamSubtraction);
745 G4Transform3D Transform3D_OuterDownstreamSubtraction(LocalRotation_OuterBox_Subtraction, LocalTranslation_OuterBox_Subtract[1] );
749 SubtractOuterBox_Solid,
750 Transform3D_OuterDownstreamSubtraction);
754 SubtractOuterBox_Solid,
755 Transform3D_OuterDownstreamSubtraction);
765 G4cout << G4endl <<
"###### QweakSimVDCRotator: Define SliderSupport_Logical " << G4endl << G4endl;
768 SliderSupport_Material,
769 "SliderSupportLeft_Logical",
774 SliderSupport_Material,
775 "SliderSupportRight_Logical",
781 G4Colour blue (0.,0.,1.);
782 G4Colour mangenta (237/255.,173/255.,255/255.);
783 G4Colour mangenta1 (104/255., 49/255., 94/255.);
784 G4Colour aluminum ( 169/255. , 172/255. , 182/255.);
785 G4Color lightsteelblue ( 176/255. , 196/255. , 222/255.);
787 G4VisAttributes* SliderSupport_VisAtt =
new G4VisAttributes(lightsteelblue);
788 SliderSupport_VisAtt ->SetVisibility(
true);
805 G4ThreeVector* leftcenter =
new G4ThreeVector();
806 G4ThreeVector* rightcenter =
new G4ThreeVector();
828 double reverser = 1.0;
856 Form(
"SliderSupportLeft_Pkg%d_Physical",pkg),
865 Form(
"SliderSupportRight_Pkg%d_Physical",pkg),
886 G4Material* pttoMaterial = G4Material::GetMaterial(materialName);
898 G4cout << G4endl <<
"###### Calling QweakSimVDCRotator::SetRotationAngleInPhi() " << G4endl << G4endl;
902 G4RotationMatrix* Rotation_RotatorMasterContainer =
new G4RotationMatrix();
903 Rotation_RotatorMasterContainer->setPhi(vdc_phiangle);
G4RotationMatrix * Rotation_Rail
void PlacePVSliderSupport(int pkg)
QweakSimMaterial * pMaterial
G4VPhysicalVolume * LeftRail_Physical
G4RotationMatrix * Rotation_SliderSupportLeft
G4RotationMatrix * Rotation_SliderSupportRight
G4double kRod_LR_PhiAngleEnd
static QweakSimMaterial * GetInstance()
G4LogicalVolume * DownstreamRing_Logical
G4double kRod_LR_Distance
G4ThreeVector Translation_LeftSliderSupport
G4double kRod_LR_RadiusMin
G4double kSliderSupport_CenterPositionInX
void SetRotationAngleInPhi(G4double vdc_phiangle)
std::vector< G4SubtractionSolid * > SliderSupportSubtraction_TempSolid
G4LogicalVolume * Rail_Logical
G4double kSliderSupport_CenterPositionInY
~QweakSimVDCRotator()
Destructor.
G4double UpstreamRing_CenterZPosition
G4ThreeVector Translation_RodLeftUpstream
static const G4bool pSurfChk
G4double kSliderSupport_FullLength_Z
G4double kRod_LR_PhiAngleStart
G4ThreeVector Translation_LeftRail
std::vector< G4double > kRod_LR_CenterPositionInX
G4double DownstreamRing_CenterXPosition
G4double kRod_LR_RadiusMax
G4VPhysicalVolume * theMotherVolume
G4LogicalVolume * Rod_LeftRight_Logical
std::vector< G4VPhysicalVolume * > SliderSupportRight_Physical
G4double kRail_FullLength_Z
std::vector< G4double > kRod_LR_CenterPositionInZ
G4double kAngle_GlobalRotation
G4double kSliderSupport_FullLength_X
G4LogicalVolume * SliderSupportRight_Logical
std::vector< G4VPhysicalVolume * > SliderSupportLeft_Physical
G4double kRail_FullLength_X
G4Material * GetMaterial(G4String material)
G4VPhysicalVolume * RotatorMasterContainer_Physical
G4ThreeVector Translation_RodRightDownstream
G4ThreeVector Translation_RodLeftDownstream
G4double UpstreamRing_CenterXPosition
std::vector< G4double > kRod_LR_CenterPositionInY
void ConstructSliderSupport()
G4VPhysicalVolume * DownstreamRing_Physical
G4double kRod_LR_FullThickness
G4LogicalVolume * UpstreamRing_Logical
G4double DownstreamRing_CenterZPosition
G4ThreeVector Translation_RightSliderSupport
G4RotationMatrix * Rotation_Rod_LR
void SetRingMaterial(G4String)
G4VPhysicalVolume * RightRail_Physical
G4double DownstreamRing_CenterYPosition
G4double kRing_PhiAngleEnd
G4double kRail_FullLength_Y
G4double kRod_LR_StubLength
G4double kRail_CenterPositionInR
G4double kRail_CenterPositionInZ
G4double kSliderSupport_FullLength_Y
std::vector< G4VPhysicalVolume * > Rod_LeftRight_Physical
G4double kRing_FullThickness
QweakSimVDCRotator()
Constructor.
G4double kRing_PhiAngleStart
void ConstructRotatorMasterContainer()
G4double kSliderSupport_CenterPositionInZ
G4VPhysicalVolume * UpstreamRing_Physical
G4double UpstreamRing_CenterYPosition
G4LogicalVolume * SliderSupportLeft_Logical
G4ThreeVector Translation_RightRail
G4ThreeVector Translation_RodRightUpstream