81 G4double PI = 3.14159265359;
89 std::vector< G4SubtractionSolid* > Solids;
92 G4ThreeVector positionCollimatorHousing;
97 G4Box* CollimatorHousing_Solid =
new G4Box(
"CollimatorHousing_Sol",
108 G4Tubs* BeamlimeHole =
new G4Tubs(
"Beamline_cut",0.0*cm,
111 0.0*degree,360.0*degree);
124 G4Polyhedra *Octant1Acceptance_p1 =
new G4Polyhedra(
"Oct1Accept_p1",
127 1,2,zPlanes,rInner,rOuter);
145 G4double phi = 90.0*degree;
146 G4double alpha1 = 0.0*degree;
147 G4double alpha2 = 0.0*degree;
162 G4Trap *Octant1Acceptance_p2 =
new G4Trap(
"Oct1Accept_p2",
184 Solids[0] =
new G4SubtractionSolid(
"Beamline_Hole",
185 CollimatorHousing_Solid,
194 G4ThreeVector Translation;
195 G4RotationMatrix *Rotation[16];
197 printf(
"Octant Rotation1 Solid1 Rotation2 Solid2\n\n");
199 for(
int oct = 0; oct < 8; oct++){
200 G4double zRot = (oct*45.0)*degree;
203 Translation.setY(std::cos(zRot)*OctantCutOutRadialOffset);
204 Translation.setZ(0.0*cm-0.01*cm);
205 Rotation[2*oct] =
new G4RotationMatrix();
206 Rotation[2*oct]->rotateZ(zRot);
209 Solids[2*oct+1] =
new G4SubtractionSolid(Name,Solids[2*oct],Octant1Acceptance_p1,
210 Rotation[2*oct],Translation);
213 Translation.setX(std::sin(zRot)*radLoc);
214 Translation.setY(std::cos(zRot)*radLoc);
215 Translation.setZ(0.0*cm+0.01*cm);
216 Rotation[2*oct+1] =
new G4RotationMatrix();
217 Rotation[2*oct+1]->rotateZ(zRot);
220 Solids[2*oct+2] =
new G4SubtractionSolid(Name,Solids[2*oct+1],Octant1Acceptance_p2,
221 Rotation[2*oct+1],Translation);
223 printf(
" %d %02d %02d %02d %02d\n",oct,2*oct,2*oct+1,2*oct+1,2*oct+2);
235 CollimatorHousing_Material,
236 "CollimatorHousing_Log",
241 positionCollimatorHousing,
251 G4Colour red (1.,0.,0.);
252 G4Colour blue (0.,0.,1.);
253 G4Colour mangenta (237/255.,173/255.,255/255.);
254 G4Colour mangenta1 (104/255., 49/255., 94/255.);
256 G4VisAttributes* CollimatorHousingVisAtt =
new G4VisAttributes(mangenta1);
257 CollimatorHousingVisAtt->SetVisibility(
true);
278 G4Material* pttoMaterial = G4Material::GetMaterial(materialName);
G4double OctantCutOutBackFullLength_X2
static QweakSimMaterial * GetInstance()
G4double OctantCutOutBackOuterDiameter
G4double CollimatorHousing_CenterZPosition
void SetCollimatorHousing_CenterPositionInZ(G4double zPos)
void SetCollimatorHousingMaterial(G4String)
G4double CollimatorHousing_FullLength_Y
static const G4bool pSurfChk
G4double OctantCutOutBackInnerDiameter
G4double OctantCutOutFrontOuterDiameter
G4double OctantCutOutFrontFullLength_Y
G4double BeamlineCutoutDiameter
QweakSimMaterial * pMaterial
G4Material * GetMaterial(G4String material)
G4double OctantCutOutBackFullLength_X1
G4double OctantCutOutStartingPhiAngle
G4double OctantCutOutBackFullLength_Y
G4double OctantCutOutFrontFullLength_X2
G4double CollimatorHousing_FullLength_Z
G4double OctantCutOutFrontFullLength_X1
~QweakSimCollimator()
Destructor.
G4double OctantCutOutRadialOffset
G4double OctantCutOutFrontInnerDiameter
G4int GetCollimatorNumber()
void ConstructCollimator(G4VPhysicalVolume *)
G4VPhysicalVolume * CollimatorHousing_Physical
G4LogicalVolume * CollimatorHousing_Logical
QweakSimCollimator()
Constructor.
G4double OctantCutOutDeltaPhiAngle
G4double CollimatorHousing_FullLength_X