QwGeant4
QweakSimLumiDetector Class Reference

#include <QweakSimLumiDetector.hh>

+ Collaboration diagram for QweakSimLumiDetector:

Public Member Functions

 QweakSimLumiDetector ()
 
virtual ~QweakSimLumiDetector ()
 
void SetUSLumi_PositionInX (G4double)
 
void SetUSLumi_PositionInY (G4double)
 
void SetUSLumi_PositionInZ (G4double)
 
void SetUSLumi_Material (G4String)
 
void SetUSLumi_Enabled ()
 
void SetUSLumi_Disabled ()
 
void ConstructComponent (G4VPhysicalVolume *)
 
G4VPhysicalVolume * getUSLumiPhysicalVolume ()
 
G4VPhysicalVolume * getDSLumiPhysicalVolume ()
 

Private Attributes

QweakSimLumiMessengerLumiMessenger
 
QweakSimMaterialpMaterial
 
G4VisAttributes * USLumi_VisAtt
 
G4RotationMatrix * USLumi_Rot
 
G4RotationMatrix * DSLumi_Rot
 
G4ThreeVector USLumi_XYZ
 
G4ThreeVector DSLumi_XYZ
 
G4double USLumi_Position_X
 
G4double USLumi_Position_Y
 
G4double USLumi_Position_Z
 
G4double DSLumi_Position_X
 
G4double DSLumi_Position_Y
 
G4double DSLumi_Position_Z
 
G4VSolid * USLumi_Solid
 
G4LogicalVolume * USLumi_Logical
 
G4VPhysicalVolume * USLumi_Physical
 
G4VSolid * DSLumi_Solid
 
G4LogicalVolume * DSLumi_Logical
 
G4VPhysicalVolume * DSLumi_Physical
 
G4double USLumi_Length_X
 
G4double USLumi_Length_Y
 
G4double USLumi_Length_Z
 
G4double DSLumi_Length_X
 
G4double DSLumi_Length_Y
 
G4double DSLumi_Length_Z
 
G4Material * QuartzBar
 
G4VSensitiveDetector * USLumiSD
 
G4VSensitiveDetector * DSLumiSD
 

Detailed Description

Definition at line 19 of file QweakSimLumiDetector.hh.

Constructor & Destructor Documentation

QweakSimLumiDetector::QweakSimLumiDetector ( )

Definition at line 17 of file QweakSimLumiDetector.cc.

References DSLumi_Length_X, DSLumi_Length_Y, DSLumi_Length_Z, DSLumi_Logical, DSLumi_Physical, DSLumi_Position_X, DSLumi_Position_Y, DSLumi_Position_Z, DSLumi_Rot, DSLumi_Solid, QweakSimMaterial::GetInstance(), QweakSimMaterial::GetMaterial(), LumiMessenger, pMaterial, QuartzBar, USLumi_Length_X, USLumi_Length_Y, USLumi_Length_Z, USLumi_Logical, USLumi_Physical, USLumi_Position_X, USLumi_Position_Y, USLumi_Position_Z, USLumi_Rot, and USLumi_Solid.

18 {
19 
20  // Initialize pointers to objects
21  LumiMessenger = NULL;
22  USLumi_Rot = NULL;
23  USLumi_Solid = NULL;
24  USLumi_Logical = NULL;
25  USLumi_Physical = NULL;
26  DSLumi_Rot = NULL;
27  DSLumi_Solid = NULL;
28  DSLumi_Logical = NULL;
29  DSLumi_Physical = NULL;
30 
31  /* Geometries are for the detector in the 1 slot:
32  * https://qweak.jlab.org/wiki/images/Qweak-Coordinate-Systems.png
33  *
34  * FIXME: These need to be double checked by me.
35  */
36 
37  /* USLumi geometries */
38  USLumi_Length_X = 7.0*cm;
39  USLumi_Length_Y = 25.0*cm;
40  USLumi_Length_Z = 2.0*cm;
41  // DSLumi geometries
42  DSLumi_Length_X = 2.0*cm;
43  DSLumi_Length_Y = 6.0*cm;
44  DSLumi_Length_Z = 4.0*cm;
45 
46  // USLumi positions
47  USLumi_Position_X = 25.0*cm;
48  USLumi_Position_Y = 0.0*cm;
49  USLumi_Position_Z = -387.5*cm;
50  // DSLumi positions
51  DSLumi_Position_X = 0*cm;
52  DSLumi_Position_Y = 0*cm;
53  DSLumi_Position_Z = 0*cm;
54 
55  // Create lumi messenger
57 
58  // Access to material definition
60 
61  // Get quartz for lumi bars
62  QuartzBar = pMaterial->GetMaterial("Quartz");
63 }
static QweakSimMaterial * GetInstance()
G4LogicalVolume * USLumi_Logical
G4VPhysicalVolume * USLumi_Physical
QweakSimMaterial * pMaterial
QweakSimLumiMessenger * LumiMessenger
G4Material * GetMaterial(G4String material)
G4LogicalVolume * DSLumi_Logical
G4VPhysicalVolume * DSLumi_Physical
G4RotationMatrix * USLumi_Rot
G4RotationMatrix * DSLumi_Rot

+ Here is the call graph for this function:

QweakSimLumiDetector::~QweakSimLumiDetector ( )
virtual

Definition at line 65 of file QweakSimLumiDetector.cc.

65 { }

Member Function Documentation

void QweakSimLumiDetector::ConstructComponent ( G4VPhysicalVolume *  MotherVolume)

Definition at line 67 of file QweakSimLumiDetector.cc.

References DSLumi_Position_X, DSLumi_Position_Y, DSLumi_Position_Z, DSLumi_Rot, DSLumi_XYZ, pSurfChk, QuartzBar, USLumi_Length_X, USLumi_Length_Y, USLumi_Length_Z, USLumi_Logical, USLumi_Physical, USLumi_Position_X, USLumi_Position_Y, USLumi_Position_Z, USLumi_Rot, USLumi_Solid, USLumi_VisAtt, USLumi_XYZ, and USLumiSD.

Referenced by QweakSimDetectorConstruction::ConstructQweak().

68 {
69  // Create G4RotationMatrix and set rotation to zero for now
70  USLumi_Rot = new G4RotationMatrix();
71  DSLumi_Rot = new G4RotationMatrix();
72  USLumi_Rot->rotateX(0);
73  DSLumi_Rot->rotateX(0);
74 
75  // Create G4ThreeVector for lumi positions
78 
79  //DSLumi_Position = new G4PVPlacement(USLumi_Rot,G4ThreeVector(DSLumi_Position_X, DSLumi_Position_Y, DSLumi_Position_Z));
80 
81  // Create upstream lumi bar
82  USLumi_Solid = new G4Box("USLumi", // Object name
83  USLumi_Length_X/2.0, // X size
84  USLumi_Length_Y/2.0, // Y size
85  USLumi_Length_Z/2.0); // Z Size
86 
87  // Place the lumi bar into a quartz lv
88  USLumi_Logical = new G4LogicalVolume(USLumi_Solid, // Solid placed in lv
89  QuartzBar, // Material for lv
90  "USLumi_Logical", // Name for object
91  0,0,0); // Set all options to zero for now
92 
93  //DSLumi_Logical = new G4LogicalVolume(DSLumi_Solid, // Solid placed in lv
94  // QuartzBar, // Material for lv
95  // "DSLumi_Logical", // Name for object
96  // 0,0,0); // Set all options to zero for now
97 
98  // Create G4PVPlacement with uslumi position
99  USLumi_Physical = new G4PVPlacement(USLumi_Rot,
100  USLumi_XYZ,
101  "USLumi_Physical",
103  MotherVolume,
104  false,
105  0,
106  pSurfChk);
107 
108  // Create G4PVPlacement with dslumi position
109  //DSLumi_Physical = new G4PVPlacement(DSLumi_Rot,
110  // DSLumi_XYZ,
111  // "DSLumi_Physical",
112  // DSLumi_Logical,
113  // MotherVolume,
114  // false,
115  // 0);
116 
117  // Define sensitive detectors for USLumi and DSLumi
118  G4SDManager* SDman = G4SDManager::GetSDMpointer();
119 
120  USLumiSD = new QweakSimLumi_DetectorSD("USLumiSD");
121  SDman->AddNewDetector(USLumiSD);
122  USLumi_Logical->SetSensitiveDetector(USLumiSD);
123 
124  //Make it pretty...
125  G4Colour red (1.,0.,0.);
126  G4Colour blue (0.,0.,1.);
127 
128  USLumi_VisAtt = new G4VisAttributes(red);
129  //G4VisAttributes* DSLumi_VisAtt = new G4VisAttributes(blue);
130  USLumi_VisAtt->SetVisibility(true);
131  USLumi_Logical->SetVisAttributes(USLumi_VisAtt);
132 
133 }
G4LogicalVolume * USLumi_Logical
G4VPhysicalVolume * USLumi_Physical
G4VSensitiveDetector * USLumiSD
static const G4bool pSurfChk
G4RotationMatrix * USLumi_Rot
G4RotationMatrix * DSLumi_Rot
G4VisAttributes * USLumi_VisAtt

+ Here is the caller graph for this function:

G4VPhysicalVolume* QweakSimLumiDetector::getDSLumiPhysicalVolume ( )
inline

Definition at line 84 of file QweakSimLumiDetector.hh.

References DSLumi_Physical.

84  {
85  return DSLumi_Physical;
86  }
G4VPhysicalVolume * DSLumi_Physical
G4VPhysicalVolume* QweakSimLumiDetector::getUSLumiPhysicalVolume ( )
inline

Definition at line 81 of file QweakSimLumiDetector.hh.

References USLumi_Physical.

Referenced by QweakSimDetectorConstruction::ConstructQweak().

81  {
82  return USLumi_Physical;
83  }
G4VPhysicalVolume * USLumi_Physical

+ Here is the caller graph for this function:

void QweakSimLumiDetector::SetUSLumi_Disabled ( )

Definition at line 200 of file QweakSimLumiDetector.cc.

References SetUSLumi_Material(), USLumi_Physical, USLumi_Position_X, USLumi_Position_Y, USLumi_Position_Z, and USLumi_VisAtt.

Referenced by QweakSimLumiMessenger::SetNewValue().

200  {
201  //--- Disable the USLumi
202 
203  G4cout << "=== Calling QweakSimLumi::SetUSLumi_Disabled() " << G4endl;
204  USLumi_VisAtt -> SetVisibility(false);
205  SetUSLumi_Material("Air");
206  USLumi_Physical->SetTranslation(G4ThreeVector(USLumi_Position_X,
208  USLumi_Position_Z + 400*cm));
209  G4cout << "=== Leaving QweakSimLumi::SetLumi_Disabled() " << G4endl << G4endl;
210 }
G4VPhysicalVolume * USLumi_Physical
void SetUSLumi_Material(G4String)
G4VisAttributes * USLumi_VisAtt

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void QweakSimLumiDetector::SetUSLumi_Enabled ( )

Definition at line 184 of file QweakSimLumiDetector.cc.

References QuartzBar, SetUSLumi_Material(), USLumi_Physical, USLumi_Position_X, USLumi_Position_Y, USLumi_Position_Z, and USLumi_VisAtt.

Referenced by QweakSimLumiMessenger::SetNewValue().

184  {
185  //--- Enable the USLumi
186 
187  G4cout << "=== Calling QweakSimLumi::SetUSLumi_Enabled() " << G4endl;
188  USLumi_VisAtt->SetVisibility(true);
189  SetUSLumi_Material(QuartzBar -> GetName());
190  USLumi_Physical->SetTranslation(G4ThreeVector(USLumi_Position_X,
193  G4cout << "=== Leaving QweakSimLumi::SetUSLumi_Enabled() " << G4endl << G4endl;
194 }
G4VPhysicalVolume * USLumi_Physical
void SetUSLumi_Material(G4String)
G4VisAttributes * USLumi_VisAtt

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void QweakSimLumiDetector::SetUSLumi_Material ( G4String  materialName)

Definition at line 168 of file QweakSimLumiDetector.cc.

References USLumi_Logical.

Referenced by SetUSLumi_Disabled(), and SetUSLumi_Enabled().

168  {
169  //--- Set USLumi Material
170 
171  G4Material* pttoMaterial = G4Material::GetMaterial(materialName);
172 
173  if (pttoMaterial)
174  {
175  G4cout << "=== Changing USLumi material: Look up material " << G4endl;
176  USLumi_Logical -> SetMaterial(pttoMaterial);
177  G4cout << "=== Changing USLumi material: Now the material is " << materialName << G4endl;
178  }
179  else
180  G4cerr << "=== Error: Changing USLumi material FAILED! " << G4endl << G4endl;
181 
182 }
G4LogicalVolume * USLumi_Logical

+ Here is the caller graph for this function:

void QweakSimLumiDetector::SetUSLumi_PositionInX ( G4double  xPos)

Definition at line 135 of file QweakSimLumiDetector.cc.

References USLumi_Physical, USLumi_Position_X, USLumi_Position_Y, and USLumi_Position_Z.

Referenced by QweakSimLumiMessenger::SetNewValue().

135  {
136  /* Set USLumi X position. */
137 
138  G4cout << "=== Calling QweakSimLumi::SetUSLumi_PositionInX() " << G4endl;
139  USLumi_Position_X = xPos;
140  USLumi_Physical->SetTranslation(G4ThreeVector(USLumi_Position_X,
143  G4cout << "=== Leaving QweakSimLumi::SetUSLumi_PositionInX() " << G4endl << G4endl;
144 }
G4VPhysicalVolume * USLumi_Physical

+ Here is the caller graph for this function:

void QweakSimLumiDetector::SetUSLumi_PositionInY ( G4double  yPos)

Definition at line 146 of file QweakSimLumiDetector.cc.

References USLumi_Physical, USLumi_Position_Y, and USLumi_Position_Z.

Referenced by QweakSimLumiMessenger::SetNewValue().

146  {
147  /* Set USLumi Y position. */
148 
149  G4cout << "=== Calling QweakSimLumi::SetUSLumi_PositionInY() " << G4endl;
150  USLumi_Position_Y = yPos;
151  USLumi_Physical->SetTranslation(G4ThreeVector(USLumi_Position_Y,
154  G4cout << "=== Leaving QweakSimLumi::SetUSLumi_PositionInY() " << G4endl << G4endl;
155 }
G4VPhysicalVolume * USLumi_Physical

+ Here is the caller graph for this function:

void QweakSimLumiDetector::SetUSLumi_PositionInZ ( G4double  zPos)

Definition at line 157 of file QweakSimLumiDetector.cc.

References USLumi_Physical, USLumi_Position_Y, and USLumi_Position_Z.

Referenced by QweakSimLumiMessenger::SetNewValue().

157  {
158  /* Set USLumi Z position. */
159 
160  G4cout << "=== Calling QweakSimLumi::SetUSLumi_PositionInZ() " << G4endl;
161  USLumi_Position_Z = zPos;
162  USLumi_Physical->SetTranslation(G4ThreeVector(USLumi_Position_Z,
165  G4cout << "=== Leaving QweakSimLumi::SetUSLumi_PositionInZ() " << G4endl << G4endl;
166 }
G4VPhysicalVolume * USLumi_Physical

+ Here is the caller graph for this function:

Field Documentation

G4double QweakSimLumiDetector::DSLumi_Length_X
private

Definition at line 52 of file QweakSimLumiDetector.hh.

Referenced by QweakSimLumiDetector().

G4double QweakSimLumiDetector::DSLumi_Length_Y
private

Definition at line 53 of file QweakSimLumiDetector.hh.

Referenced by QweakSimLumiDetector().

G4double QweakSimLumiDetector::DSLumi_Length_Z
private

Definition at line 54 of file QweakSimLumiDetector.hh.

Referenced by QweakSimLumiDetector().

G4LogicalVolume* QweakSimLumiDetector::DSLumi_Logical
private

Definition at line 43 of file QweakSimLumiDetector.hh.

Referenced by QweakSimLumiDetector().

G4VPhysicalVolume* QweakSimLumiDetector::DSLumi_Physical
private

Definition at line 44 of file QweakSimLumiDetector.hh.

Referenced by getDSLumiPhysicalVolume(), and QweakSimLumiDetector().

G4double QweakSimLumiDetector::DSLumi_Position_X
private

Definition at line 34 of file QweakSimLumiDetector.hh.

Referenced by ConstructComponent(), and QweakSimLumiDetector().

G4double QweakSimLumiDetector::DSLumi_Position_Y
private

Definition at line 35 of file QweakSimLumiDetector.hh.

Referenced by ConstructComponent(), and QweakSimLumiDetector().

G4double QweakSimLumiDetector::DSLumi_Position_Z
private

Definition at line 36 of file QweakSimLumiDetector.hh.

Referenced by ConstructComponent(), and QweakSimLumiDetector().

G4RotationMatrix* QweakSimLumiDetector::DSLumi_Rot
private

Definition at line 27 of file QweakSimLumiDetector.hh.

Referenced by ConstructComponent(), and QweakSimLumiDetector().

G4VSolid* QweakSimLumiDetector::DSLumi_Solid
private

Definition at line 42 of file QweakSimLumiDetector.hh.

Referenced by QweakSimLumiDetector().

G4ThreeVector QweakSimLumiDetector::DSLumi_XYZ
private

Definition at line 29 of file QweakSimLumiDetector.hh.

Referenced by ConstructComponent().

G4VSensitiveDetector* QweakSimLumiDetector::DSLumiSD
private

Definition at line 61 of file QweakSimLumiDetector.hh.

QweakSimLumiMessenger* QweakSimLumiDetector::LumiMessenger
private

Definition at line 21 of file QweakSimLumiDetector.hh.

Referenced by QweakSimLumiDetector().

QweakSimMaterial* QweakSimLumiDetector::pMaterial
private

Definition at line 22 of file QweakSimLumiDetector.hh.

Referenced by QweakSimLumiDetector().

G4Material* QweakSimLumiDetector::QuartzBar
private
G4double QweakSimLumiDetector::USLumi_Length_X
private

Definition at line 47 of file QweakSimLumiDetector.hh.

Referenced by ConstructComponent(), and QweakSimLumiDetector().

G4double QweakSimLumiDetector::USLumi_Length_Y
private

Definition at line 48 of file QweakSimLumiDetector.hh.

Referenced by ConstructComponent(), and QweakSimLumiDetector().

G4double QweakSimLumiDetector::USLumi_Length_Z
private

Definition at line 49 of file QweakSimLumiDetector.hh.

Referenced by ConstructComponent(), and QweakSimLumiDetector().

G4LogicalVolume* QweakSimLumiDetector::USLumi_Logical
private
G4double QweakSimLumiDetector::USLumi_Position_X
private
G4double QweakSimLumiDetector::USLumi_Position_Y
private
G4double QweakSimLumiDetector::USLumi_Position_Z
private
G4RotationMatrix* QweakSimLumiDetector::USLumi_Rot
private

Definition at line 26 of file QweakSimLumiDetector.hh.

Referenced by ConstructComponent(), and QweakSimLumiDetector().

G4VSolid* QweakSimLumiDetector::USLumi_Solid
private

Definition at line 39 of file QweakSimLumiDetector.hh.

Referenced by ConstructComponent(), and QweakSimLumiDetector().

G4VisAttributes* QweakSimLumiDetector::USLumi_VisAtt
private
G4ThreeVector QweakSimLumiDetector::USLumi_XYZ
private

Definition at line 28 of file QweakSimLumiDetector.hh.

Referenced by ConstructComponent().

G4VSensitiveDetector* QweakSimLumiDetector::USLumiSD
private

Definition at line 60 of file QweakSimLumiDetector.hh.

Referenced by ConstructComponent().


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