QwGeant4
QweakSimDetectorConstruction Class Reference

main class of QweakSim. All experiment components are are placed here. More...

#include <QweakSimDetectorConstruction.hh>

Inherits G4VUserDetectorConstruction.

+ Collaboration diagram for QweakSimDetectorConstruction:

Public Member Functions

 QweakSimDetectorConstruction (QweakSimUserInformation *)
 
 ~QweakSimDetectorConstruction ()
 
G4VPhysicalVolume * Construct ()
 
void UpdateGeometry ()
 
void SetGlobalMagneticField ()
 
void ShowHallFloor ()
 
void HideHallFloor ()
 
G4double GetWorldFullLengthInX ()
 
G4double GetWorldFullLengthInY ()
 
G4double GetWorldFullLengthInZ ()
 
void DumpGeometry (G4bool surfchk=false, G4VPhysicalVolume *aVolume=0, G4int depth=0)
 

Private Member Functions

G4VPhysicalVolume * ConstructQweak ()
 

Private Attributes

QweakSimUserInformationmyUserInfo
 
QweakSimGeometrypGeometry
 
QweakSimMaterialpMaterial
 
QweakSimTargetpTarget
 
QweakSimBeamLinepBeamLine
 
QweakSimTungstenPlugpTungstenPlug
 
QweakSimCollimatorpCollimator1
 
QweakSimCollimatorpCollimator2
 
QweakSimCollimatorpCollimator3
 
QweakSimCollimatorSupportpCollimatorSupport
 
QweakSimShieldingWallpShieldingWall
 
QweakSimPionWallpPionWall
 
QweakSimWShutterspWShutters1
 
QweakSimWShutterspWShutters2
 
QweakSimLeadGlasspLeadGlass
 
QweakSimPMTOnlypPMTOnly
 
QweakSimLumiDetectorpLumiDetector
 
QweakSimMainMagnetpMainMagnet
 
QweakSimVDCpVDC
 
QweakSimHDCpHDC
 
QweakSimVDCRotatorpVDCRotator
 
QweakSimTriggerScintillatorpTriggerScintillator
 
QweakSimCerenkovDetectorpCerenkovDetector
 
QweakSimDetectorMessengerdetectorMessenger
 
G4Box * experimentalHall_Solid
 
G4LogicalVolume * experimentalHall_Logical
 
G4VPhysicalVolume * experimentalHall_Physical
 
G4Material * experimentalHall_Material
 
G4Box * HallFloor_Solid
 
G4LogicalVolume * HallFloor_Logical
 
G4VPhysicalVolume * HallFloor_Physical
 
G4Material * HallFloor_Material
 
G4VisAttributes * HallFloor_VisAtt
 
G4double fWorldLength
 
G4double fWorldLengthInX
 
G4double fWorldLengthInY
 
G4double fWorldLengthInZ
 
G4double fFloorLengthInX
 
G4double fFloorLengthInY
 
G4double fFloorLengthInZ
 
G4double fFloorPositionInY
 
QweakSimMagneticFieldpMagneticField
 
G4FieldManager * fGlobalFieldManager
 
G4ChordFinder * fGlobalChordFinder
 
G4Mag_EqRhs * fGlobalEquation
 
G4MagIntegratorStepper * fGlobalStepper
 
G4double fMinStep
 

Detailed Description

main class of QweakSim. All experiment components are are placed here.

Placeholder for a long explaination

Definition at line 78 of file QweakSimDetectorConstruction.hh.

Constructor & Destructor Documentation

QweakSimDetectorConstruction::QweakSimDetectorConstruction ( QweakSimUserInformation userInfo)

Definition at line 89 of file QweakSimDetectorConstruction.cc.

References detectorMessenger, experimentalHall_Logical, experimentalHall_Physical, experimentalHall_Solid, fFloorLengthInX, fFloorLengthInY, fFloorLengthInZ, fFloorPositionInY, fGlobalChordFinder, fGlobalEquation, fGlobalStepper, fWorldLengthInX, fWorldLengthInY, fWorldLengthInZ, QweakSimMaterial::GetInstance(), HallFloor_Logical, HallFloor_Physical, HallFloor_Solid, HallFloor_VisAtt, myUserInfo, pBeamLine, pCerenkovDetector, pCollimator1, pCollimator2, pCollimator3, pCollimatorSupport, pGeometry, pHDC, pLeadGlass, pLumiDetector, pMagneticField, pMainMagnet, pMaterial, pPionWall, pPMTOnly, pShieldingWall, pTarget, pTriggerScintillator, pTungstenPlug, pVDC, pVDCRotator, pWShutters1, and pWShutters2.

90 {
91  // initialize pointers and variables
95 
96  HallFloor_Solid = NULL;
97  HallFloor_Logical = NULL;
98  HallFloor_Physical = NULL;
99 
100  detectorMessenger = NULL;
101  pMaterial = NULL;
102  pGeometry = NULL;
103 
104  pMagneticField = NULL;
105 
106  pTriggerScintillator = NULL;
107  pCerenkovDetector = NULL;
108 
109  pTungstenPlug = NULL;
110  pCollimator1 = NULL;
111  pCollimator2 = NULL;
112  pCollimator3 = NULL;
113  pCollimatorSupport = NULL;
114 
115 
116  pShieldingWall = NULL;
117 
118  pPionWall = NULL;
119 
120  pWShutters1 = NULL;
121  pWShutters2 = NULL;
122 
123  pLeadGlass = NULL;
124 
125  pPMTOnly = NULL;
126 
127  pLumiDetector = NULL;
128 
129  // pGEM = NULL;
130  pHDC = NULL;
131  pVDC = NULL;
132  pVDCRotator = NULL;
133 
134  pTarget = NULL;
135  pBeamLine = NULL;
136  pMainMagnet = NULL;
137 
138  fWorldLengthInX = 0.0*cm;
139  fWorldLengthInY = 0.0*cm;
140  fWorldLengthInZ = 0.0*cm;
141 
142  fFloorLengthInX = 0.0*cm;
143  fFloorLengthInY = 0.0*cm;
144  fFloorLengthInZ = 0.0*cm;
145  fFloorPositionInY = 0.0*cm; // Top positon, not the center pos
146 
147  fGlobalEquation = NULL;
148  fGlobalStepper = NULL;
149  fGlobalChordFinder = NULL;
150 
151  HallFloor_VisAtt = NULL;
152  HallFloor_VisAtt = new G4VisAttributes();
153 
154  myUserInfo = userInfo;
155 
157 
159 }
QweakSimCollimatorSupport * pCollimatorSupport
static QweakSimMaterial * GetInstance()
Scans the input file for /QweakSim/xyz commands.
QweakSimDetectorMessenger * detectorMessenger
QweakSimTriggerScintillator * pTriggerScintillator
QweakSimCerenkovDetector * pCerenkovDetector

+ Here is the call graph for this function:

QweakSimDetectorConstruction::~QweakSimDetectorConstruction ( )

Definition at line 161 of file QweakSimDetectorConstruction.cc.

References detectorMessenger, pBeamLine, pCerenkovDetector, pCollimator1, pCollimator2, pCollimator3, pCollimatorSupport, pGeometry, pHDC, pLeadGlass, pLumiDetector, pMagneticField, pMainMagnet, pPionWall, pPMTOnly, pShieldingWall, pTarget, pTriggerScintillator, pTungstenPlug, pVDC, pVDCRotator, pWShutters1, and pWShutters2.

162 {
163  // I'm deleting the objects in the reverse order they were created (~FILO)
164 
165  if (pMagneticField) delete pMagneticField;
166 
167  if (pVDCRotator) delete pVDCRotator;
168  // if (pGEM) delete pGEM;
169  if (pHDC) delete pHDC;
170  if (pVDC) delete pVDC;
171 
174 
175  if (pTungstenPlug) delete pTungstenPlug;
176  if (pCollimator1) delete pCollimator1;
177  if (pCollimator2) delete pCollimator2;
178  if (pCollimator3) delete pCollimator3;
180 
181 
182  if (pShieldingWall) delete pShieldingWall;
183 
184  if (pPionWall) delete pPionWall;
185 
186  if (pWShutters1) delete pWShutters1;
187  if (pWShutters2) delete pWShutters2;
188 
189  if (pLeadGlass) delete pLeadGlass;
190 
191  if (pPMTOnly) delete pPMTOnly;
192 
193  if (pLumiDetector) delete pLumiDetector;
194 
195  if (pTarget) delete pTarget;
196  if (pBeamLine) delete pBeamLine;
197  if (pMainMagnet) delete pMainMagnet;
198 
200  if (pGeometry) delete pGeometry;
201 
202 }
QweakSimCollimatorSupport * pCollimatorSupport
QweakSimDetectorMessenger * detectorMessenger
QweakSimTriggerScintillator * pTriggerScintillator
QweakSimCerenkovDetector * pCerenkovDetector

Member Function Documentation

G4VPhysicalVolume * QweakSimDetectorConstruction::Construct ( )

Definition at line 205 of file QweakSimDetectorConstruction.cc.

References ConstructQweak().

206 {
207  return ConstructQweak();
208 }

+ Here is the call graph for this function:

G4VPhysicalVolume * QweakSimDetectorConstruction::ConstructQweak ( )
private

Definition at line 210 of file QweakSimDetectorConstruction.cc.

References QweakSimGeometry::AddModule(), QweakSimShieldingWall::ConstructBackWall(), QweakSimShieldingWall::ConstructBeamLeftSideWall(), QweakSimShieldingWall::ConstructBeamRightSideWall(), QweakSimCollimator::ConstructCollimator(), QweakSimCerenkovDetector::ConstructComponent(), QweakSimLeadGlass::ConstructComponent(), QweakSimPMTOnly::ConstructComponent(), QweakSimTriggerScintillator::ConstructComponent(), QweakSimHDC::ConstructComponent(), QweakSimVDC::ConstructComponent(), QweakSimLumiDetector::ConstructComponent(), QweakSimShieldingWall::ConstructFrontWall(), QweakSimVDCRotator::ConstructMount(), QweakSimPionWall::ConstructPionWall(), QweakSimVDCRotator::ConstructRails(), QweakSimVDCRotator::ConstructRings(), QweakSimVDCRotator::ConstructRotatorMasterContainer(), QweakSimShieldingWall::ConstructShieldingWallHousing_UsingTrapezoids(), QweakSimVDCRotator::ConstructSliderSupport(), QweakSimShieldingWall::ConstructTopWall(), QweakSimTungstenPlug::ConstructTungstenPlug(), QweakSimWShutters::ConstructWShutters(), experimentalHall_Logical, experimentalHall_Material, experimentalHall_Physical, experimentalHall_Solid, fFloorLengthInX, fFloorLengthInY, fFloorLengthInZ, fFloorPositionInY, fWorldLengthInX, fWorldLengthInY, fWorldLengthInZ, QweakSimCerenkovDetector::GetCerenkovDetector_PhysicalVolume(), QweakSimCollimator::getCollimatorHousingPhysicalVolume(), QweakSimHDC::getHDCBack_PhysicalVolume(), QweakSimHDC::getHDCFront_PhysicalVolume(), QweakSimLeadGlass::GetLeadGlass_PhysicalVolume(), QweakSimMainMagnet::getMainMagnetPhysicalVolume(), QweakSimMaterial::GetMaterial(), QweakSimPMTOnly::GetPMTOnly_PhysicalVolume(), QweakSimShieldingWall::getShieldingWallHousingPhysicalVolume(), QweakSimTarget::getTargetPhysicalVolume(), QweakSimTriggerScintillator::GetTriggerScintillator_PhysicalVolume(), QweakSimTungstenPlug::getTungstenPlugPhysicalVolume(), QweakSimLumiDetector::getUSLumiPhysicalVolume(), QweakSimVDC::getVDCBack_PhysicalVolume(), QweakSimVDC::getVDCFront_PhysicalVolume(), HallFloor_Logical, HallFloor_Material, HallFloor_Physical, HallFloor_Solid, HallFloor_VisAtt, inch, myUserInfo, pBeamLine, pCerenkovDetector, pCollimator1, pCollimator2, pCollimator3, pCollimatorSupport, pGeometry, pHDC, pLeadGlass, pLumiDetector, pMainMagnet, pMaterial, pPionWall, pPMTOnly, pShieldingWall, pSurfChk, pTarget, pTriggerScintillator, pTungstenPlug, pVDC, pVDCRotator, pWShutters1, pWShutters2, QweakSimCollimator::SetBeamlineCutoutDiameter(), QweakSimCollimator::SetCollimatorHousing_CenterPositionInZ(), QweakSimCollimator::SetCollimatorHousing_FullLengthInX(), QweakSimCollimator::SetCollimatorHousing_FullLengthInY(), QweakSimCollimator::SetCollimatorHousing_FullLengthInZ(), QweakSimCollimator::SetCollimatorHousingMaterial(), QweakSimCollimator::SetCollimatorNumber(), QweakSimShieldingWall::SetCollimatorWall_CenterPositionInZ(), QweakSimShieldingWall::SetCollimatorWall_FullLengthInX(), QweakSimShieldingWall::SetCollimatorWall_FullLengthInY(), QweakSimShieldingWall::SetCollimatorWall_FullLengthInZ(), QweakSimShieldingWall::SetCollimatorWallMaterial(), QweakSimWShutters::SetDisabled(), SetGlobalMagneticField(), QweakSimVDCRotator::SetMotherVolume(), QweakSimShieldingWall::SetOctantCutOut_Trap_AzimuthalAngle(), QweakSimShieldingWall::SetOctantCutOut_Trap_FullHeightBack(), QweakSimShieldingWall::SetOctantCutOut_Trap_FullHeightFront(), QweakSimShieldingWall::SetOctantCutOut_Trap_FullLengthBack_Inner(), QweakSimShieldingWall::SetOctantCutOut_Trap_FullLengthBack_Outer(), QweakSimShieldingWall::SetOctantCutOut_Trap_FullLengthFront_Inner(), QweakSimShieldingWall::SetOctantCutOut_Trap_FullLengthFront_Outer(), QweakSimShieldingWall::SetOctantCutOut_Trap_PolarAngle(), QweakSimShieldingWall::SetOctantCutOut_Trap_RadialDistance(), QweakSimCollimator::SetOctantCutOutBackFullLength_X1(), QweakSimCollimator::SetOctantCutOutBackFullLength_X2(), QweakSimCollimator::SetOctantCutOutBackFullLength_Y(), QweakSimCollimator::SetOctantCutOutBackInnerDiameter(), QweakSimCollimator::SetOctantCutOutBackOuterDiameter(), QweakSimCollimator::SetOctantCutOutDeltaPhiAngle(), QweakSimCollimator::SetOctantCutOutFrontFullLength_X1(), QweakSimCollimator::SetOctantCutOutFrontFullLength_X2(), QweakSimCollimator::SetOctantCutOutFrontFullLength_Y(), QweakSimCollimator::SetOctantCutOutFrontInnerDiameter(), QweakSimCollimator::SetOctantCutOutFrontOuterDiameter(), QweakSimCollimator::SetOctantCutOutRadialOffset(), QweakSimCollimator::SetOctantCutOutStartingPhiAngle(), QweakSimVDCRotator::SetRotationAngleInPhi(), QweakSimVDC::SetTriggerScintillator(), QweakSimVDC::SetVDC_RotationAngleInPhi(), QweakSimVDC::SetVDCRotator(), QweakSimGeometry::SetWorldVolume(), QweakSimWShutters::SetWShutters_CenterPositionInX(), QweakSimWShutters::SetWShutters_CenterPositionInY(), QweakSimWShutters::SetWShutters_CenterPositionInZ(), QweakSimWShutters::SetWShutters_Material(), QweakSimWShutters::SetWShuttersNumber(), and QweakSimUserInformation::TargetCenterPositionZ.

Referenced by Construct(), and UpdateGeometry().

211 {
214 
220 
222 
223  pPionWall = new QweakSimPionWall();
224 
227 
229 
231 
233 
234  pMainMagnet = new QweakSimMainMagnet(); // QTOR Geometry (decoupled from field)
235 
236  //pGEM = new QweakSimGEM();
237  pHDC = new QweakSimHDC();
238  pVDC = new QweakSimVDC();
240 
242 
244 
245 
246  //--------- Definitions of Solids, Logical Volumes, Physical Volumes ---------
247 
248 // fWorldLengthInX = 10.0*m;
249 // fWorldLengthInY = 10.0*m;
250 // fWorldLengthInZ = 20.0*m;
251 
252 //Val's Changes so correct shielding hut lengths fit in the world 2013-05-03
253  fWorldLengthInX = 20.0*m; //Val's Changes so correct shielding hut lengths fit in the world
254  fWorldLengthInY = 20.0*m; //Val's Changes so correct shielding hut lengths fit in the world
255  fWorldLengthInZ = 40.0*m; //Val's Changes so correct shielding hut lengths fit in the world
256 
257 
258  // experimentalHall_Material = pMaterial->GetMaterial("HeGas");
259  // Note: experimentalHall_Material was HeGas all the time up to 12-28-2005 !!!
260 
262 
263  experimentalHall_Solid = new G4Box("ExpHall_Sol",
264  0.5* fWorldLengthInX ,
265  0.5* fWorldLengthInY ,
266  0.5* fWorldLengthInZ );
267 
268  experimentalHall_Logical = new G4LogicalVolume( experimentalHall_Solid,
270  "ExpHall_Logical",
271  0, 0, 0);
272 
273  // Must place the World Physical volume unrotated at (0,0,0).
274  //
275  experimentalHall_Physical = new G4PVPlacement(0, // no rotation
276  G4ThreeVector(), // at (0,0,0)
277  experimentalHall_Logical, // its logical volume
278  "ExpHall_Physical", // its name
279  0, // its mother volume
280  false, // no boolean operations
281  0, // no field specific to volume
282  pSurfChk); // check for overlaps
283 
284  // Get the geometry, which defines the world volume
285  //
286  pGeometry = new QweakSimGeometry();
288 
289  //==========================
290  // Defining the Hall Floor
291  //==========================
292 
293 // fFloorLengthInX = 12.0*m;
294 // fFloorLengthInY = 1.0*m;
295 // fFloorLengthInZ = 28.0*m;
296 
297 //Val's Changes so correct shielding hut lengths will be on the floor 2013-05-03
298  fFloorLengthInX = 16.0*m;
299  fFloorLengthInY = 1.0*m;
300  fFloorLengthInZ = 32.0*m;
301 
302  fFloorPositionInY = -396.25*cm; // Top positon, not the center pos
303 
304 
305  HallFloor_Material = pMaterial->GetMaterial("ShieldingConcrete");
306 
307  HallFloor_Solid = new G4Box("HallFloor_Sol",
308  0.5* fFloorLengthInX ,
309  0.5* fFloorLengthInY ,
310  0.5* fFloorLengthInZ );
311 
312  HallFloor_Logical = new G4LogicalVolume( HallFloor_Solid,
314  "HallFloor_Logical",
315  0, 0, 0);
316 
317  // Must place the World Physical volume unrotated at (0,0,0).
318  //
319  HallFloor_Physical = new G4PVPlacement(0, // no rotation
320  G4ThreeVector(0.,fFloorPositionInY -0.5* fFloorLengthInY,0.),
321  "HallFloor_Physical", // its name
322  HallFloor_Logical, // its logical volume
323  experimentalHall_Physical , // its physical mother volume
324  false, // no boolean operations
325  0, // no field specific to volume
326  pSurfChk); // check for overlaps
327 
328 
329  G4cout << G4endl << "###### QweakSimDetectorConstruction: Setting Attributes " << G4endl << G4endl;
330 
331  G4Colour grey ( 127/255., 127/255., 127/255.);
332 
333  HallFloor_VisAtt->SetColor(grey);
334  HallFloor_VisAtt->SetVisibility(true);
335  //HallFloor_VisAtt->SetVisibility(false);
336  //HallFloor_VisAtt->SetForceWireframe(true);
337  //HallFloor_VisAtt->SetForceSolid(true);
338  HallFloor_Logical->SetVisAttributes(HallFloor_VisAtt);
339 
340  //============================================
341  // create/place target body into MotherVolume
342  //============================================
343  //
344  if (pTarget) {
345  pTarget -> ConstructComponent(experimentalHall_Physical);
346  // pTarget -> SetTargetCenterPositionInZ(-650.0*cm);
347  pTarget -> SetTargetCenterPositionInZ(myUserInfo->TargetCenterPositionZ);
348  //
350  }
351 
352  //============================================
353  // create/place beamline body into MotherVolume
354  //============================================
355  //
356  if (pBeamLine) {
357  pBeamLine -> ConstructComponent(experimentalHall_Physical);
358  //pBeamLine -> SetBeamLineCenterPositionInZ(300.0*cm);
359  //pGeometry->AddModule(pBeamLine->getBeamLinePhysicalVolume());
360  }
361 
362  //================================================
363  // create/place MainMagnet body into MotherVolume
364  //================================================
365  //
366  if(pMainMagnet) {
367  pMainMagnet -> ConstructComponent(experimentalHall_Physical);
368  pMainMagnet -> SetCenterPositionInZ(0.0*cm);
369  pMainMagnet -> Construct_UpstreamSpider(experimentalHall_Physical);
370  pMainMagnet -> Construct_ClampPlates(experimentalHall_Physical);
371  pMainMagnet -> Construct_UpStreamMiniClampPlates(experimentalHall_Physical);
372  pMainMagnet -> Construct_CoilFrames(experimentalHall_Physical);
373  pMainMagnet -> Construct_RadialMountingBlocks(experimentalHall_Physical);
374  pMainMagnet -> Construct_SupportFrame(experimentalHall_Physical);
375  pMainMagnet -> Construct_DownstreamSpider(experimentalHall_Physical);
376  //
378  }
379 
380  //================================================
381  // create/place Tungsten plug body into MotherVolume
382  //================================================
383  //
384  if (pTungstenPlug) {
386  //
388  }
389 
390  //jpan@nuclear.uwinnipeg.ca: Fri Jun 5 12:24:18 CDT 2009
391  //update collimators' geometry parameters according to the drawings from //http://qweak.jlab.org/doc-private/ShowDocument?docid=745
392 
393  // Collimator 1 configuration
394  if (pCollimator1) {
395 
396  // TODO: the little high-theta corners of collimator 1 are not implemented
397  // TODO: the slanted region of collimator 1 is implemented with a single slope, not a double slope (see drawings)
402 
409 
411 
416  pCollimator1->SetOctantCutOutStartingPhiAngle((-16.61+90.0)*degree);
417  pCollimator1->SetOctantCutOutDeltaPhiAngle(2.0*16.61*degree);
419 
421 
422  pCollimator1->SetCollimatorHousing_CenterPositionInZ(-575.375*cm); //from ELOG Target/27
423  pCollimator1->SetCollimatorHousingMaterial("PBA"); //housing material - Lead with 5% Antimony
424  //
426  }
427 
428  // Collimator 2 configuration
429  if (pCollimator2) {
434 
437  pCollimator2->SetOctantCutOutFrontFullLength_X2(18.37*cm);//(upper edge)
441 
443 
444  // pCollimator2->SetOctantCutOutFrontInnerDiameter(57.12*cm);
445  // pCollimator2->SetOctantCutOutFrontOuterDiameter(71.62*cm);
446  // pCollimator2->SetOctantCutOutBackInnerDiameter(61.14*cm);
447  // pCollimator2->SetOctantCutOutBackOuterDiameter(74.14*cm);
448  // pCollimator2->SetOctantCutOutStartingPhiAngle((-14.38+90.0)*degree); // between 12.21 deg to 14.38 deg
449  // pCollimator2->SetOctantCutOutDeltaPhiAngle(2.0*14.38*degree); // take the average of 13.3 deg ? - Peiqing
450  // pCollimator2->SetOctantCutOutRadialOffset(0.0*cm);
451 
452  // redefine it here. -Peiqing, 2011 Nov 11
454  pCollimator2->SetOctantCutOutFrontOuterDiameter(2.0*(14.935+7.25)*cm);
457  pCollimator2->SetOctantCutOutStartingPhiAngle((-22.479+90.0)*degree);
458  pCollimator2->SetOctantCutOutDeltaPhiAngle(2.0*22.479*degree);
460 
462 
463  pCollimator2->SetCollimatorHousing_CenterPositionInZ(-377.99*cm); //from Target ELOG 27
465  //
467  }
468 
469  // Collimator 3 configuration
470  if (pCollimator3) {
472  pCollimator3->SetCollimatorHousing_FullLengthInX(240.0*cm);//should be updated to 238.76*cm
475 
482 
484 
485  // pCollimator3->SetOctantCutOutFrontInnerDiameter(2.0*39.0*cm);
486  // pCollimator3->SetOctantCutOutFrontOuterDiameter(2.0*51.0*cm);
487  // pCollimator3->SetOctantCutOutBackInnerDiameter(2.0*39.954*cm);
488  // pCollimator3->SetOctantCutOutBackOuterDiameter(2.0*51.0*cm);
489  // pCollimator3->SetOctantCutOutStartingPhiAngle((-16.390+90.0)*degree);
490  // pCollimator3->SetOctantCutOutDeltaPhiAngle(2.0*16.390*degree);
491  // pCollimator3->SetOctantCutOutRadialOffset(0.0*cm);
492 
493  // redefine it here -Peiqing 2011 Nov 11
494  pCollimator3->SetOctantCutOutFrontInnerDiameter(2.0*(39.0-16.2)*cm);
495  pCollimator3->SetOctantCutOutFrontOuterDiameter(2.0*(51.0-16.2)*cm);
496  pCollimator3->SetOctantCutOutBackInnerDiameter(2.0*(39.954-16.2)*cm);
497  pCollimator3->SetOctantCutOutBackOuterDiameter(2.0*(51.0-16.2)*cm);
498  pCollimator3->SetOctantCutOutStartingPhiAngle((-22.6+90.0)*degree);
499  pCollimator3->SetOctantCutOutDeltaPhiAngle(2.0*22.6*degree);
501 
503 
506  //
508  }
509 
510  //================================================
511  // create/place Collimator Support body into MotherVolume
512  //================================================
513  //
514  if (pCollimatorSupport) {
515  pCollimatorSupport -> ConstructSupport(experimentalHall_Physical);
516  }
517 
518  //===================================================
519  // create/place ShieldingWall body into MotherVolume
520  //===================================================
521  //
522  if (pShieldingWall) {
526 
527  // Peiqing: updated it according to as-designed geometry. 2011 Nov 12
531 
535 
539 
542 
543  pShieldingWall->SetCollimatorWallMaterial("ShieldingConcrete");
544 
551  //
553  }
554 
555  //===================================================
556  // create/place Pion Wall body into MotherVolume
557  //===================================================
558  //
559  if (pPionWall) {
561  }
562 
563  //===================================================
564  // create/place WShutters body into MotherVolume
565  //===================================================
566  //
567  if (pWShutters1) {
570  //pWShutters1->SetWShuttersNumber(1);
574  pWShutters1->SetWShutters_Material ("TungstenAlloy");
576  }
577  if (pWShutters2) {
580  //pWShutters2->SetWShuttersNumber(2);
584  pWShutters2->SetWShutters_Material ("TungstenAlloy");
586  }
587  //===================================================
588  // create/place LeadGlass into MotherVolume
589  //===================================================
590  //
591  if (pLeadGlass){
594  }
595 
596  //===================================================
597  // create/place PMTOnly into MotherVolume
598  //===================================================
599  //
600  if (pPMTOnly){
603  }
604 
605  //=========================================
606  // create/place Lumis into MotherVolume
607  //=========================================
608  //
609  if (pLumiDetector) {
611 
613  //pGeometry->AddModule(pLumiDetector->getDSLumiPhysicalVolume());
614  }
615 
616  //===============================================
617  // create/place Drift Chambers into MotherVolume
618  //===============================================
619  //
620  //if (pGEM) {
621  // pGEM->ConstructComponent(experimentalHall_Physical);
622  // pGeometry->AddModule(pGEM->getGEMFront_PhysicalVolume());
623  // pGeometry->AddModule(pGEM->getGEMBack_PhysicalVolume());
624  //}
625  //
626  if (pHDC) {
630  }
631  //===============================================
632  // create/place VDC Rotator into MotherVolume
633  //===============================================
634  //
635  if (pVDCRotator) {
642  pVDCRotator->SetRotationAngleInPhi( 90.0*degree);
643  }
644 
645 
646  //=====================================================
647  // create/place Trigger Scintillator into MotherVolume
648  //=====================================================
649  //
650  if (pTriggerScintillator) {
652  //
654  }
655 
656  //
657  if (pVDC) {
663  pVDC->SetVDC_RotationAngleInPhi(90.0*degree,0);
664  pVDC->SetVDC_RotationAngleInPhi(270.0*degree,1);
665  }
666 
667 
668  //=========================================
669  // create/place Cerenkov into MotherVolume
670  //=========================================
671  //
672  if (pCerenkovDetector) {
674  //
676  }
677 
678  //--------- Visualization attributes -------------------------------
679 
680  // Invisible Volume
681  experimentalHall_Logical->SetVisAttributes (G4VisAttributes::Invisible);
682 
683  //--------- Load magnetic field -------------------------------
684 
686 
687 
688  G4cout << G4endl << "###### Leaving QweakSimDetectorConstruction::Construct() " << G4endl << G4endl;
689 
690  // Construct() *MUST* return the pointer of the physical World !!!
692 }
void SetOctantCutOut_Trap_FullLengthFront_Inner(G4double)
G4VPhysicalVolume * GetTriggerScintillator_PhysicalVolume()
void SetOctantCutOut_Trap_FullLengthFront_Outer(G4double)
void ConstructWShutters(G4VPhysicalVolume *)
void SetWShutters_CenterPositionInX(G4double xPos)
QweakSimCollimatorSupport * pCollimatorSupport
void SetOctantCutOutFrontFullLength_Y(G4double dim)
void SetWShutters_Material(G4String)
Definition of the Target.
void SetVDC_RotationAngleInPhi(G4double vdc_phiangle, G4int pkg)
void SetOctantCutOutStartingPhiAngle(G4double spa)
void ConstructTopWall(G4VPhysicalVolume *MotherVolume)
G4VPhysicalVolume * GetPMTOnly_PhysicalVolume()
G4VPhysicalVolume * getCollimatorHousingPhysicalVolume()
void SetCollimatorHousing_CenterPositionInZ(G4double zPos)
Defines the Shielding Wall with trapezoid cut outs (located after Main Magnet and before Region 3 VDC...
void SetOctantCutOutBackFullLength_X1(G4double dim)
void ConstructBackWall(G4VPhysicalVolume *MotherVolume)
void SetCollimatorHousingMaterial(G4String)
G4VPhysicalVolume * getShieldingWallHousingPhysicalVolume()
void SetCollimatorHousing_FullLengthInY(G4double dim)
void SetCollimatorHousing_FullLengthInZ(G4double dim)
void SetOctantCutOut_Trap_FullHeightBack(G4double)
G4VPhysicalVolume * getVDCBack_PhysicalVolume()
Definition: QweakSimVDC.hh:112
main class of QweakSim. All passive elements are are read from the GDML files.
void ConstructComponent(G4VPhysicalVolume *MotherVolume)
G4VPhysicalVolume * getTargetPhysicalVolume()
void SetOctantCutOut_Trap_FullHeightFront(G4double)
void ConstructTungstenPlug(G4VPhysicalVolume *)
void SetCollimatorNumber(G4int n)
void ConstructFrontWall(G4VPhysicalVolume *MotherVolume)
void ConstructComponent(G4VPhysicalVolume *MotherVolume)
static const G4double inch
void ConstructPionWall(G4VPhysicalVolume *)
Definition of the Collimators.
void SetOctantCutOut_Trap_FullLengthBack_Inner(G4double)
void SetCollimatorWallMaterial(G4String)
G4VPhysicalVolume * getTungstenPlugPhysicalVolume()
void SetCollimatorWall_FullLengthInZ(G4double)
void SetRotationAngleInPhi(G4double vdc_phiangle)
QweakSimTriggerScintillator * pTriggerScintillator
G4VPhysicalVolume * getVDCFront_PhysicalVolume()
Definition: QweakSimVDC.hh:111
void SetCollimatorWall_CenterPositionInZ(G4double)
G4VPhysicalVolume * GetLeadGlass_PhysicalVolume()
void ConstructBeamRightSideWall(G4VPhysicalVolume *MotherVolume)
Region 3 Vertical Drift Chamber.
Definition: QweakSimVDC.hh:67
G4Material * GetMaterial(G4String material)
void ConstructComponent(G4VPhysicalVolume *)
Definition: QweakSimVDC.cc:218
void ConstructComponent(G4VPhysicalVolume *MotherVolume)
void ConstructShieldingWallHousing_UsingTrapezoids(G4VPhysicalVolume *)
void SetOctantCutOut_Trap_FullLengthBack_Outer(G4double)
void SetCollimatorWall_FullLengthInX(G4double)
void SetCollimatorHousing_FullLengthInX(G4double dim)
void SetOctantCutOutDeltaPhiAngle(G4double dpa)
void SetOctantCutOut_Trap_AzimuthalAngle(G4double)
G4VPhysicalVolume * GetCerenkovDetector_PhysicalVolume()
void SetOctantCutOutRadialOffset(G4double dpa)
void SetWorldVolume(G4VPhysicalVolume *worldvolume)
void SetOctantCutOutFrontOuterDiameter(G4double fod)
Definition of the Support/Shielding of the Collimators.
void SetMotherVolume(G4VPhysicalVolume *mv)
void ConstructComponent(G4VPhysicalVolume *MotherVolume)
void SetWShutters_CenterPositionInY(G4double yPos)
Definition of the Support/Shielding of the Collimators.
void ConstructBeamLeftSideWall(G4VPhysicalVolume *MotherVolume)
void SetWShuttersNumber(G4int n)
void SetOctantCutOutBackInnerDiameter(G4double bid)
void SetOctantCutOutFrontInnerDiameter(G4double fid)
void ConstructComponent(G4VPhysicalVolume *)
Definition: QweakSimHDC.cc:187
Region 2 Horizontal Drift Chamber.
Definition: QweakSimHDC.hh:65
void SetOctantCutOut_Trap_RadialDistance(G4double)
Main Magnet solids like coils and support, no field.
void SetBeamlineCutoutDiameter(G4double dia)
QweakSimCerenkovDetector * pCerenkovDetector
void SetOctantCutOutFrontFullLength_X2(G4double dim)
G4VPhysicalVolume * getHDCBack_PhysicalVolume()
Definition: QweakSimHDC.hh:102
void AddModule(G4VPhysicalVolume *physvol)
void ConstructCollimator(G4VPhysicalVolume *)
static const G4bool pSurfChk
void SetOctantCutOutBackFullLength_X2(G4double dim)
void ConstructComponent(G4VPhysicalVolume *)
Definition of the BeamLine.
void SetOctantCutOutBackFullLength_Y(G4double dim)
void SetOctantCutOutFrontFullLength_X1(G4double dim)
G4VPhysicalVolume * getHDCFront_PhysicalVolume()
Definition: QweakSimHDC.hh:101
void SetOctantCutOutBackOuterDiameter(G4double bod)
G4VPhysicalVolume * getMainMagnetPhysicalVolume()
void SetWShutters_CenterPositionInZ(G4double zPos)
Definition of the Trigger Scintillator detector.
void SetTriggerScintillator(QweakSimTriggerScintillator *theTriggerScintillator)
Definition: QweakSimVDC.hh:141
G4VPhysicalVolume * getUSLumiPhysicalVolume()
void SetOctantCutOut_Trap_PolarAngle(G4double)
void SetVDCRotator(QweakSimVDCRotator *theRotator)
Definition: QweakSimVDC.hh:138
void SetCollimatorWall_FullLengthInY(G4double)

+ Here is the caller graph for this function:

void QweakSimDetectorConstruction::DumpGeometry ( G4bool  surfchk = false,
G4VPhysicalVolume *  aVolume = 0,
G4int  depth = 0 
)

Definition at line 695 of file QweakSimDetectorConstruction.cc.

References experimentalHall_Physical, and pSurfChk.

Referenced by QweakSimDetectorMessenger::SetNewValue().

696 {
697  // Null volume
698  if (aVolume == 0) aVolume = experimentalHall_Physical;
699 
700  // Print spaces
701  for(int isp=0;isp<depth;isp++)
702  { G4cout << " "; }
703  // Print name
704  G4cout << aVolume->GetName() << "[" << aVolume->GetCopyNo() << "] "
705  << aVolume->GetLogicalVolume()->GetName() << " "
706  << aVolume->GetLogicalVolume()->GetNoDaughters() << " "
707  << aVolume->GetLogicalVolume()->GetMaterial()->GetName();
708  // Print sensitive detector
709  if(aVolume->GetLogicalVolume()->GetSensitiveDetector())
710  {
711  G4cout << " " << aVolume->GetLogicalVolume()->GetSensitiveDetector()
712  ->GetFullPathName();
713  }
714  G4cout << G4endl;
715 
716  // Check overlapping volumes
717  if (pSurfChk || surfchk) aVolume->CheckOverlaps();
718 
719  // Descend down the tree
720  for(int i=0;i<aVolume->GetLogicalVolume()->GetNoDaughters();i++)
721  { DumpGeometry(surfchk, aVolume->GetLogicalVolume()->GetDaughter(i),depth+1); }
722 }
void DumpGeometry(G4bool surfchk=false, G4VPhysicalVolume *aVolume=0, G4int depth=0)
static const G4bool pSurfChk

+ Here is the caller graph for this function:

G4double QweakSimDetectorConstruction::GetWorldFullLengthInX ( )
inline

Definition at line 94 of file QweakSimDetectorConstruction.hh.

References fWorldLengthInX.

G4double QweakSimDetectorConstruction::GetWorldFullLengthInY ( )
inline

Definition at line 95 of file QweakSimDetectorConstruction.hh.

References fWorldLengthInY.

G4double QweakSimDetectorConstruction::GetWorldFullLengthInZ ( )
inline

Definition at line 96 of file QweakSimDetectorConstruction.hh.

References fWorldLengthInZ.

void QweakSimDetectorConstruction::HideHallFloor ( )

Definition at line 837 of file QweakSimDetectorConstruction.cc.

References HallFloor_VisAtt.

Referenced by QweakSimDetectorMessenger::SetNewValue().

838 {
839  G4cout << "###### Calling QweakSimDetectorConstruction::HideHallFloor() " << G4endl << G4endl;
840 
841  HallFloor_VisAtt->SetVisibility(false);
842 
843  G4cout << "###### Leaving QweakSimDetectorConstruction::HideHallFloor() " << G4endl << G4endl;
844 }

+ Here is the caller graph for this function:

void QweakSimDetectorConstruction::SetGlobalMagneticField ( )

Definition at line 748 of file QweakSimDetectorConstruction.cc.

References fGlobalChordFinder, fGlobalEquation, fGlobalFieldManager, fGlobalStepper, and pMagneticField.

Referenced by ConstructQweak().

749 {
750 
751  //--------- Magnetic Field -------------------------------
752 
753  //============================================
754  // Define the global magnet field Manager
755  //============================================
757 
758  // Get transportation, field, and propagator managers
759  fGlobalFieldManager = G4TransportationManager::GetTransportationManager()->GetFieldManager();
760 
761  // perform navigation/propagation in a general non-uni-form magnetic field
762  //G4PropagatorInField* pGlobalFieldPropagator = G4TransportationManager::GetTransportationManager()->GetPropagatorInField();
763 
764  // G4double minEps = 1.0e-5;
765  // G4double maxEps = 1.0e-4;
766 
767  //pGlobalFieldPropagator->SetMinimumEpsilonStep(minEps);
768  //pGlobalFieldPropagator->SetMaximumEpsilonStep(maxEps);
769 
770 
771  fGlobalFieldManager->SetDetectorField(pMagneticField);
772 
773 #define TRACK_ELECTRON_SPIN
774 #ifdef TRACK_ELECTRON_SPIN
775  fGlobalEquation = new G4Mag_SpinEqRhs(pMagneticField);
776  G4int numberOfVariables = 12;
777 #else
778  fGlobalEquation = new G4Mag_UsualEqRhs(pMagneticField);
779  G4int numberOfVariables = 6;
780 #endif
781 
782  // taken from one of the Geant4 presentation:
783  // - If the field is calculated from a field map, a lower order stepper
784  // is recommended: the less smooth the field is, the lower the order of the
785  // stepper that should be used. For very rough fields one should use 1st order
786  // stepper, for a somewhat smooth field one must choose between 1st and 2nd
787  // order stepper.
788 
789  //fGlobalStepper = new G4ClassicalRK4(fGlobalEquation, numberOfVariables); // classical 4th order stepper
790  //fGlobalStepper = new G4ExplicitEuler(fGlobalEquation, numberOfVariables); // 1st order stepper
791  //fGlobalStepper = new G4ImplicitEuler(fGlobalEquation, numberOfVariables); // 2nd order stepper
792  fGlobalStepper = new G4SimpleRunge(fGlobalEquation, numberOfVariables); // 2nd order stepper
793 
794 
795  // Provides a driver that talks to the Integrator Stepper, and insures that
796  // the error is within acceptable bounds.
797  G4MagInt_Driver* fGlobalIntgrDriver = new G4MagInt_Driver(0.1*mm, //1.0e-3*mm,
799  fGlobalStepper->GetNumberOfVariables());
800 
801  fGlobalChordFinder = new G4ChordFinder(fGlobalIntgrDriver);
802 
803 
804 
805  // G4bool fieldChangesEnergy = false;
806  // G4FieldManager* pFieldMgr = new G4FieldManager(myField,pChordFinder,FieldChangeEnergy);
807  // LocalLogicalVolume = new G4LogicalVolume(shape, material,"name",pFieldMgr,0,0);
808 
809  // // minimal step of 1 mm is default
810  // fMinStep = 0.01*mm ;
811  //
812  // fGlobalChordFinder = new G4ChordFinder (pGlobalMagnetField,
813  // fMinStep,
814  // fGlobalStepper);
815 
816  fGlobalFieldManager->SetChordFinder(fGlobalChordFinder);
817 
818 //=====================================================================================
819 // you can use this in DetectorConstruction class to make more smooth visulisation:
820 
821  G4TransportationManager* tmanager = G4TransportationManager::GetTransportationManager();
822  tmanager->GetPropagatorInField()->SetLargestAcceptableStep(1*mm);
823 //=====================================================================================
824 }

+ Here is the caller graph for this function:

void QweakSimDetectorConstruction::ShowHallFloor ( )

Definition at line 827 of file QweakSimDetectorConstruction.cc.

References HallFloor_VisAtt.

Referenced by QweakSimDetectorMessenger::SetNewValue().

828 {
829  G4cout << "###### Calling QweakSimDetectorConstruction::ShowHallFloor() " << G4endl << G4endl;
830 
831  HallFloor_VisAtt->SetVisibility(true);
832 
833  G4cout << "###### Leaving QweakSimDetectorConstruction::ShowHallFloor() " << G4endl << G4endl;
834 }

+ Here is the caller graph for this function:

void QweakSimDetectorConstruction::UpdateGeometry ( )

Definition at line 725 of file QweakSimDetectorConstruction.cc.

References ConstructQweak().

Referenced by QweakSimDetectorMessenger::SetNewValue().

726 {
727  G4cout << G4endl << "###### Calling QweakDetectorConstruction::UpdateGeometry() " << G4endl << G4endl;
728 
729  // taken from LXe example
730  G4GeometryManager::GetInstance()->OpenGeometry();
731 
732  // clean up previous geometry
733  G4PhysicalVolumeStore ::GetInstance()->Clean();
734  G4LogicalVolumeStore ::GetInstance()->Clean();
735  G4SolidStore ::GetInstance()->Clean();
736  G4LogicalBorderSurface ::CleanSurfaceTable();
737 
738 
739  // define new geometry
740  G4RunManager::GetRunManager()->DefineWorldVolume(ConstructQweak());
741  G4RunManager::GetRunManager()->GeometryHasBeenModified();
742 
743 
744  G4cout << G4endl << "###### Leaving QweakDetectorConstruction::UpdateGeometry() " << G4endl << G4endl;
745 }

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

QweakSimDetectorMessenger* QweakSimDetectorConstruction::detectorMessenger
private
G4LogicalVolume* QweakSimDetectorConstruction::experimentalHall_Logical
private
G4Material* QweakSimDetectorConstruction::experimentalHall_Material
private

Definition at line 153 of file QweakSimDetectorConstruction.hh.

Referenced by ConstructQweak().

G4VPhysicalVolume* QweakSimDetectorConstruction::experimentalHall_Physical
private
G4Box* QweakSimDetectorConstruction::experimentalHall_Solid
private
G4double QweakSimDetectorConstruction::fFloorLengthInX
private
G4double QweakSimDetectorConstruction::fFloorLengthInY
private
G4double QweakSimDetectorConstruction::fFloorLengthInZ
private
G4double QweakSimDetectorConstruction::fFloorPositionInY
private
G4ChordFinder* QweakSimDetectorConstruction::fGlobalChordFinder
private
G4Mag_EqRhs* QweakSimDetectorConstruction::fGlobalEquation
private
G4FieldManager* QweakSimDetectorConstruction::fGlobalFieldManager
private

Definition at line 177 of file QweakSimDetectorConstruction.hh.

Referenced by SetGlobalMagneticField().

G4MagIntegratorStepper* QweakSimDetectorConstruction::fGlobalStepper
private
G4double QweakSimDetectorConstruction::fMinStep
private

Definition at line 182 of file QweakSimDetectorConstruction.hh.

G4double QweakSimDetectorConstruction::fWorldLength
private

Definition at line 161 of file QweakSimDetectorConstruction.hh.

G4double QweakSimDetectorConstruction::fWorldLengthInX
private
G4double QweakSimDetectorConstruction::fWorldLengthInY
private
G4double QweakSimDetectorConstruction::fWorldLengthInZ
private
G4LogicalVolume* QweakSimDetectorConstruction::HallFloor_Logical
private
G4Material* QweakSimDetectorConstruction::HallFloor_Material
private

Definition at line 158 of file QweakSimDetectorConstruction.hh.

Referenced by ConstructQweak().

G4VPhysicalVolume* QweakSimDetectorConstruction::HallFloor_Physical
private
G4Box* QweakSimDetectorConstruction::HallFloor_Solid
private
G4VisAttributes* QweakSimDetectorConstruction::HallFloor_VisAtt
private
QweakSimUserInformation* QweakSimDetectorConstruction::myUserInfo
private
QweakSimBeamLine* QweakSimDetectorConstruction::pBeamLine
private
QweakSimCerenkovDetector* QweakSimDetectorConstruction::pCerenkovDetector
private
QweakSimCollimator* QweakSimDetectorConstruction::pCollimator1
private
QweakSimCollimator* QweakSimDetectorConstruction::pCollimator2
private
QweakSimCollimator* QweakSimDetectorConstruction::pCollimator3
private
QweakSimCollimatorSupport* QweakSimDetectorConstruction::pCollimatorSupport
private
QweakSimGeometry* QweakSimDetectorConstruction::pGeometry
private
QweakSimHDC* QweakSimDetectorConstruction::pHDC
private
QweakSimLeadGlass* QweakSimDetectorConstruction::pLeadGlass
private
QweakSimLumiDetector* QweakSimDetectorConstruction::pLumiDetector
private
QweakSimMagneticField* QweakSimDetectorConstruction::pMagneticField
private
QweakSimMainMagnet* QweakSimDetectorConstruction::pMainMagnet
private
QweakSimMaterial* QweakSimDetectorConstruction::pMaterial
private
QweakSimPionWall* QweakSimDetectorConstruction::pPionWall
private
QweakSimPMTOnly* QweakSimDetectorConstruction::pPMTOnly
private
QweakSimShieldingWall* QweakSimDetectorConstruction::pShieldingWall
private
QweakSimTarget* QweakSimDetectorConstruction::pTarget
private
QweakSimTriggerScintillator* QweakSimDetectorConstruction::pTriggerScintillator
private
QweakSimTungstenPlug* QweakSimDetectorConstruction::pTungstenPlug
private
QweakSimVDC* QweakSimDetectorConstruction::pVDC
private
QweakSimVDCRotator* QweakSimDetectorConstruction::pVDCRotator
private
QweakSimWShutters* QweakSimDetectorConstruction::pWShutters1
private
QweakSimWShutters* QweakSimDetectorConstruction::pWShutters2
private

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