QwGeant4
QweakSimWShutters Class Reference

#include <QweakSimWShutters.hh>

+ Collaboration diagram for QweakSimWShutters:

Public Member Functions

 QweakSimWShutters (G4int n)
 Constructor. More...
 
 ~QweakSimWShutters ()
 Destructor. More...
 
void ConstructWShutters (G4VPhysicalVolume *)
 
void DestroyComponent ()
 
void SetWShutters_CenterPositionInX (G4double xPos)
 
void SetWShutters_CenterPositionInY (G4double yPos)
 
void SetWShutters_CenterPositionInZ (G4double zPos)
 
G4double GetWShutters_CenterPositionInX ()
 
G4double GetWShutters_CenterPositionInY ()
 
G4double GetWShutters_CenterPositionInZ ()
 
void SetWShuttersMaterial (G4String)
 
void SetWShutters_LengthInX (G4double dim)
 
void SetWShutters_LengthInY (G4double dim)
 
void SetWShutters_LengthInZ (G4double dim)
 
G4double GetWShutters_LengthInX ()
 
G4double GetWShutters_LengthInY ()
 
G4double GetWShutters_LengthInZ ()
 
void SetWShuttersNumber (G4int n)
 
G4int GetWShuttersNumber ()
 
void SetEnabled ()
 
void SetDisabled ()
 
void SetWShutters_Material (G4String)
 

Private Attributes

G4int WShutterNum
 
QweakSimMaterialpMaterial
 
G4LogicalVolume * WShutters_Logical
 
G4VPhysicalVolume * WShutters_Physical
 
G4Box * WShutters_Box
 
G4Trap * WShutters_Trap
 
G4VSolid * WShutters_Solid
 
G4Material * WShutters_Material
 
G4VisAttributes * WShutters_VisAtt
 
G4RotationMatrix * Rot
 
G4RotationMatrix * WRot
 
QweakSimWShuttersMessengerWShutters_Messenger
 
G4double WShutters_Length_X
 
G4double WShutters_Length_Y
 
G4double WShutters_Length_Z
 
G4double WShutters_CenterXPosition
 
G4double WShutters_CenterYPosition
 
G4double WShutters_CenterZPosition
 

Detailed Description

Definition at line 35 of file QweakSimWShutters.hh.

Constructor & Destructor Documentation

QweakSimWShutters::QweakSimWShutters ( G4int  n)

Constructor.

Definition at line 16 of file QweakSimWShutters.cc.

References QweakSimMaterial::GetInstance(), inch, pMaterial, Rot, WRot, WShutters_Box, WShutters_CenterXPosition, WShutters_CenterYPosition, WShutters_CenterZPosition, WShutters_Length_X, WShutters_Length_Y, WShutters_Length_Z, WShutters_Logical, WShutters_Material, WShutters_Messenger, WShutters_Physical, WShutters_Solid, WShutters_Trap, and WShutters_VisAtt.

17 {
18  WShutters_Logical = NULL;
19  WShutters_Physical = NULL;
20  WShutters_Box = NULL;
21  WShutters_Trap = NULL;
22  WShutters_Solid = NULL;
23  WShutters_Material = NULL;
24  WShutters_VisAtt = NULL;
25 
26  Rot = NULL;
27  WRot = NULL;
28 
29  WShutters_Length_X = 2.687*inch;
32 
33 
34 
38 
40 
41  // get access to material definition
43 }
G4Material * WShutters_Material
G4LogicalVolume * WShutters_Logical
G4VisAttributes * WShutters_VisAtt
static QweakSimMaterial * GetInstance()
G4double WShutters_CenterXPosition
G4RotationMatrix * Rot
static const G4double inch
G4double WShutters_CenterZPosition
QweakSimMaterial * pMaterial
G4VSolid * WShutters_Solid
QweakSimWShuttersMessenger * WShutters_Messenger
G4RotationMatrix * WRot
G4double WShutters_CenterYPosition
G4VPhysicalVolume * WShutters_Physical

+ Here is the call graph for this function:

QweakSimWShutters::~QweakSimWShutters ( )

Destructor.

Definition at line 46 of file QweakSimWShutters.cc.

46 { }

Member Function Documentation

void QweakSimWShutters::ConstructWShutters ( G4VPhysicalVolume *  MotherVolume)

Definition at line 49 of file QweakSimWShutters.cc.

References QweakSimMaterial::GetMaterial(), inch, pMaterial, pSurfChk, Rot, WRot, WShutterNum, WShutters_Box, WShutters_CenterXPosition, WShutters_CenterYPosition, WShutters_CenterZPosition, WShutters_Length_X, WShutters_Length_Y, WShutters_Length_Z, WShutters_Logical, WShutters_Material, WShutters_Physical, WShutters_Solid, WShutters_Trap, and WShutters_VisAtt.

Referenced by QweakSimDetectorConstruction::ConstructQweak().

50 {
51 
52  // assign material
53  WShutters_Material = pMaterial->GetMaterial("TungstenAlloy");
54 
55  G4ThreeVector positionWShutters;
56  G4ThreeVector Trans;
57 
58 
59 
60  Rot = new G4RotationMatrix;
61  Rot->rotateY(-M_PI/2*rad);
62  Trans = G4ThreeVector(-2.688*inch,0,0);
63 
64  WShutters_Box = new G4Box("WShutters_Box", WShutters_Length_X*0.5, WShutters_Length_Y*0.5, WShutters_Length_Z*0.5);
65  WShutters_Trap = new G4Trap("WShutters_Trap", 0.5*WShutters_Length_Z, 0.5*WShutters_Length_Z, 0.5*2.125*inch, 0.5*WShutters_Length_Y,0.5*2.688*inch);
66  WShutters_Solid = new G4UnionSolid("WShutters_Box+WShutters_Trap", WShutters_Box, WShutters_Trap, Rot, Trans);
67 
68  WRot = new G4RotationMatrix;
69  WRot->rotateZ(M_PI*rad);
70 
71  //***************************************************************************
72  // Define WShutters logical and physical volumes
73 
74  WShutters_Logical = new G4LogicalVolume(WShutters_Solid,
76  "WShutters_Log",
77  0,0,0);
78 
79  positionWShutters = G4ThreeVector(WShutters_CenterXPosition,
82 
83  if(WShutterNum==1){
84  WShutters_Physical = new G4PVPlacement(0,
85  positionWShutters,
86  "WShutters",
88  MotherVolume,
89  false,
90  0,
91  pSurfChk);
92  }else if(WShutterNum==2){
93  WShutters_Physical = new G4PVPlacement(WRot,
94  positionWShutters,
95  "WShutters",
97  MotherVolume,
98  false,
99  0,
100  pSurfChk);
101  }
102  //***************************************************************************
103 
104  // Formating
105  G4Color blue (0.,0.,1.);
106 
107  WShutters_VisAtt = new G4VisAttributes(blue);
108  WShutters_VisAtt->SetVisibility(true);
109  WShutters_Logical->SetVisAttributes(WShutters_VisAtt);
110 
111 }
G4Material * WShutters_Material
G4LogicalVolume * WShutters_Logical
G4VisAttributes * WShutters_VisAtt
G4double WShutters_CenterXPosition
G4RotationMatrix * Rot
static const G4double inch
G4double WShutters_CenterZPosition
QweakSimMaterial * pMaterial
G4Material * GetMaterial(G4String material)
G4VSolid * WShutters_Solid
G4RotationMatrix * WRot
G4double WShutters_CenterYPosition
G4VPhysicalVolume * WShutters_Physical
static const G4bool pSurfChk

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void QweakSimWShutters::DestroyComponent ( )
G4double QweakSimWShutters::GetWShutters_CenterPositionInX ( )
inline

Definition at line 85 of file QweakSimWShutters.hh.

References WShutters_CenterXPosition.

G4double WShutters_CenterXPosition
G4double QweakSimWShutters::GetWShutters_CenterPositionInY ( )
inline

Definition at line 86 of file QweakSimWShutters.hh.

References WShutters_CenterYPosition.

G4double WShutters_CenterYPosition
G4double QweakSimWShutters::GetWShutters_CenterPositionInZ ( )
inline

Definition at line 87 of file QweakSimWShutters.hh.

References WShutters_CenterZPosition.

G4double WShutters_CenterZPosition
G4double QweakSimWShutters::GetWShutters_LengthInX ( )
inline

Definition at line 95 of file QweakSimWShutters.hh.

References WShutters_Length_X.

95 {return WShutters_Length_X;}
G4double QweakSimWShutters::GetWShutters_LengthInY ( )
inline

Definition at line 96 of file QweakSimWShutters.hh.

References WShutters_Length_Y.

96 {return WShutters_Length_Y;}
G4double QweakSimWShutters::GetWShutters_LengthInZ ( )
inline

Definition at line 97 of file QweakSimWShutters.hh.

References WShutters_Length_Z.

97 {return WShutters_Length_Z;}
G4int QweakSimWShutters::GetWShuttersNumber ( )
inline

Definition at line 103 of file QweakSimWShutters.hh.

References WShutterNum.

103 {return WShutterNum;}
void QweakSimWShutters::SetDisabled ( )

Definition at line 176 of file QweakSimWShutters.cc.

References SetWShutters_Material(), WShutters_CenterXPosition, WShutters_CenterYPosition, WShutters_CenterZPosition, WShutters_Physical, and WShutters_VisAtt.

Referenced by QweakSimDetectorConstruction::ConstructQweak(), and QweakSimWShuttersMessenger::SetNewValue().

177 {
178  // Disables the WShutters by changing the material to air,
179  // moving the wall 5m into the floor and hiding it.
180  WShutters_VisAtt->SetVisibility(true);
181  SetWShutters_Material("Air");
182  WShutters_Physical->SetTranslation(G4ThreeVector(WShutters_CenterXPosition,
183  WShutters_CenterYPosition + 200*cm,
185 
186 }
void SetWShutters_Material(G4String)
G4VisAttributes * WShutters_VisAtt
G4double WShutters_CenterXPosition
G4double WShutters_CenterZPosition
G4double WShutters_CenterYPosition
G4VPhysicalVolume * WShutters_Physical

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void QweakSimWShutters::SetEnabled ( )

Definition at line 162 of file QweakSimWShutters.cc.

References SetWShutters_Material(), WShutters_CenterXPosition, WShutters_CenterYPosition, WShutters_CenterZPosition, WShutters_Material, WShutters_Physical, and WShutters_VisAtt.

Referenced by QweakSimWShuttersMessenger::SetNewValue().

163 {
164  // Enables the WShutters
165  WShutters_VisAtt->SetVisibility(true);
167  WShutters_Physical->SetTranslation(G4ThreeVector(WShutters_CenterXPosition,
170 
171 
172 }
void SetWShutters_Material(G4String)
G4Material * WShutters_Material
G4VisAttributes * WShutters_VisAtt
G4double WShutters_CenterXPosition
G4double WShutters_CenterZPosition
G4double WShutters_CenterYPosition
G4VPhysicalVolume * WShutters_Physical

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void QweakSimWShutters::SetWShutters_CenterPositionInX ( G4double  xPos)

Definition at line 123 of file QweakSimWShutters.cc.

References WShutters_CenterXPosition, WShutters_CenterYPosition, WShutters_CenterZPosition, and WShutters_Physical.

Referenced by QweakSimDetectorConstruction::ConstructQweak().

124 {
125  // Sets X position of the WShutters
127  WShutters_Physical->SetTranslation(G4ThreeVector(WShutters_CenterXPosition,
130 }
G4double WShutters_CenterXPosition
G4double WShutters_CenterZPosition
G4double WShutters_CenterYPosition
G4VPhysicalVolume * WShutters_Physical

+ Here is the caller graph for this function:

void QweakSimWShutters::SetWShutters_CenterPositionInY ( G4double  yPos)

Definition at line 133 of file QweakSimWShutters.cc.

References WShutters_CenterXPosition, WShutters_CenterYPosition, WShutters_CenterZPosition, and WShutters_Physical.

Referenced by QweakSimDetectorConstruction::ConstructQweak().

134 {
135  // Sets Y position of the WShutters
137  WShutters_Physical->SetTranslation(G4ThreeVector(WShutters_CenterXPosition,
140 }
G4double WShutters_CenterXPosition
G4double WShutters_CenterZPosition
G4double WShutters_CenterYPosition
G4VPhysicalVolume * WShutters_Physical

+ Here is the caller graph for this function:

void QweakSimWShutters::SetWShutters_CenterPositionInZ ( G4double  zPos)

Definition at line 143 of file QweakSimWShutters.cc.

References WShutters_CenterXPosition, WShutters_CenterYPosition, WShutters_CenterZPosition, and WShutters_Physical.

Referenced by QweakSimDetectorConstruction::ConstructQweak().

144 {
145  // Sets Z position of the WShutters
147  WShutters_Physical->SetTranslation(G4ThreeVector(WShutters_CenterXPosition,
150 }
G4double WShutters_CenterXPosition
G4double WShutters_CenterZPosition
G4double WShutters_CenterYPosition
G4VPhysicalVolume * WShutters_Physical

+ Here is the caller graph for this function:

void QweakSimWShutters::SetWShutters_LengthInX ( G4double  dim)
inline

Definition at line 91 of file QweakSimWShutters.hh.

References WShutters_Length_X.

91 {WShutters_Length_X = dim;}
void QweakSimWShutters::SetWShutters_LengthInY ( G4double  dim)
inline

Definition at line 92 of file QweakSimWShutters.hh.

References WShutters_Length_Y.

92 {WShutters_Length_Y = dim;}
void QweakSimWShutters::SetWShutters_LengthInZ ( G4double  dim)
inline

Definition at line 93 of file QweakSimWShutters.hh.

References WShutters_Length_Z.

93 {WShutters_Length_Z = dim;}
void QweakSimWShutters::SetWShutters_Material ( G4String  materialName)

Definition at line 154 of file QweakSimWShutters.cc.

References WShutters_Logical.

Referenced by QweakSimDetectorConstruction::ConstructQweak(), SetDisabled(), and SetEnabled().

155 {
156  G4Material* pttoMaterial = G4Material::GetMaterial(materialName);
157  WShutters_Logical->SetMaterial(pttoMaterial);
158 }
G4LogicalVolume * WShutters_Logical

+ Here is the caller graph for this function:

void QweakSimWShutters::SetWShuttersMaterial ( G4String  materialName)

Definition at line 114 of file QweakSimWShutters.cc.

References WShutters_Logical.

115 {
116  // Sets WShutters material
117  G4Material* pttoMaterial = G4Material::GetMaterial(materialName);
118  if (pttoMaterial)
119  WShutters_Logical->SetMaterial(pttoMaterial);
120 }
G4LogicalVolume * WShutters_Logical
void QweakSimWShutters::SetWShuttersNumber ( G4int  n)
inline

Definition at line 102 of file QweakSimWShutters.hh.

References WShutterNum.

Referenced by QweakSimDetectorConstruction::ConstructQweak().

102 { WShutterNum = n;}

+ Here is the caller graph for this function:

Field Documentation

QweakSimMaterial* QweakSimWShutters::pMaterial
private

Definition at line 41 of file QweakSimWShutters.hh.

Referenced by ConstructWShutters(), and QweakSimWShutters().

G4RotationMatrix* QweakSimWShutters::Rot
private

Definition at line 52 of file QweakSimWShutters.hh.

Referenced by ConstructWShutters(), and QweakSimWShutters().

G4RotationMatrix* QweakSimWShutters::WRot
private

Definition at line 53 of file QweakSimWShutters.hh.

Referenced by ConstructWShutters(), and QweakSimWShutters().

G4int QweakSimWShutters::WShutterNum
private

Definition at line 40 of file QweakSimWShutters.hh.

Referenced by ConstructWShutters(), GetWShuttersNumber(), and SetWShuttersNumber().

G4Box* QweakSimWShutters::WShutters_Box
private

Definition at line 45 of file QweakSimWShutters.hh.

Referenced by ConstructWShutters(), and QweakSimWShutters().

G4double QweakSimWShutters::WShutters_Length_X
private
G4double QweakSimWShutters::WShutters_Length_Y
private
G4double QweakSimWShutters::WShutters_Length_Z
private
G4LogicalVolume* QweakSimWShutters::WShutters_Logical
private
G4Material* QweakSimWShutters::WShutters_Material
private

Definition at line 49 of file QweakSimWShutters.hh.

Referenced by ConstructWShutters(), QweakSimWShutters(), and SetEnabled().

QweakSimWShuttersMessenger* QweakSimWShutters::WShutters_Messenger
private

Definition at line 56 of file QweakSimWShutters.hh.

Referenced by QweakSimWShutters().

G4VPhysicalVolume* QweakSimWShutters::WShutters_Physical
private
G4VSolid* QweakSimWShutters::WShutters_Solid
private

Definition at line 47 of file QweakSimWShutters.hh.

Referenced by ConstructWShutters(), and QweakSimWShutters().

G4Trap* QweakSimWShutters::WShutters_Trap
private

Definition at line 46 of file QweakSimWShutters.hh.

Referenced by ConstructWShutters(), and QweakSimWShutters().

G4VisAttributes* QweakSimWShutters::WShutters_VisAtt
private

The documentation for this class was generated from the following files: