Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IORTDetectorConstruction Class Reference

#include <IORTDetectorConstruction.hh>

Public Member Functions

 IORTDetectorConstruction (G4VPhysicalVolume *)
 
 ~IORTDetectorConstruction ()
 
G4ThreeVector GetDetectorToWorldPosition ()
 
G4ThreeVector GetDetectorToPhantomPosition ()
 
void SetDetectorPosition ()
 
bool IsInside (G4double detectorX, G4double detectorY, G4double detectorZ, G4double phantomX, G4double phantomY, G4double phantomZ, G4ThreeVector detToPhantomPosition)
 
G4bool SetPhantomMaterial (G4String material)
 
void SetVoxelSize (G4double sizeX, G4double sizeY, G4double sizeZ)
 
void SetDetectorSize (G4double sizeX, G4double sizeY, G4double sizeZ)
 
void SetPhantomSize (G4double sizeX, G4double sizeY, G4double sizeZ)
 
void SetPhantomPosition (G4ThreeVector)
 
void SetDetectorToPhantomPosition (G4ThreeVector DetectorToPhantomPosition)
 
void UpdateGeometry ()
 
void DeleteDisc ()
 
void ConstructDisc ()
 
void PrintParameters ()
 
G4LogicalVolumeGetDetectorLogicalVolume ()
 
G4bool SetDiscoMaterialIORT (G4String material)
 
void SetOuterRadiusDiscoIORT (G4double outerr)
 
void SetinnerRadiusDiscoIORT (G4double innerr)
 
void SetheightDiscoIORT (G4double height)
 
void SetDiscoXPositionIORT (G4double xpos)
 
void SetDiscoYPositionIORT (G4double ypos)
 
void SetDiscoZPositionIORT (G4double zpos)
 
G4bool SetDiscoMaterialIORT1 (G4String material)
 
void SetOuterRadiusDiscoIORT1 (G4double outerr)
 
void SetinnerRadiusDiscoIORT1 (G4double innerr)
 
void SetheightDiscoIORT1 (G4double height)
 
void SetDiscoXPositionIORT1 (G4double xpos)
 
void SetAngleDiscoIORT0 (G4double phi0)
 

Detailed Description

Definition at line 58 of file IORTDetectorConstruction.hh.

Constructor & Destructor Documentation

IORTDetectorConstruction::IORTDetectorConstruction ( G4VPhysicalVolume physicalTreatmentRoom)

Definition at line 71 of file IORTDetectorConstruction.cc.

72  : motherPhys(physicalTreatmentRoom), // pointer to WORLD volume
73  detectorSD(0), detectorROGeometry(0), matrix(0),
74  phantom(0), detector(0),
75  phantomLogicalVolume(0), detectorLogicalVolume(0),
76  phantomPhysicalVolume(0), detectorPhysicalVolume(0),
77  aRegion(0),
78 
79  solidDiscoIORT0(0),
80  logicDiscoIORT0(0),
81  physiDiscoIORT0(0),
82 
83  solidDiscoIORT(0),
84  logicDiscoIORT(0),
85  physiDiscoIORT(0),
86 
87  solidDiscoIORT1(0),
88  logicDiscoIORT1(0),
89  physiDiscoIORT1(0)
90 
91 {
93 
94  /* NOTE! that the IORTDetectorConstruction class
95  * does NOT inherit from G4VUserDetectorConstruction G4 class
96  * So the Construct() mandatory virtual method is inside another geometric class
97  * like the collimatorXXBeamLIne, ...
98  */
99 
100  // Messenger to change parameters of the phantom/detector geometry
101  detectorMessenger = new IORTDetectorMessenger(this);
102 
103  // Default detector voxels size
104  // 200 slabs along the beam direction (X)
105  sizeOfVoxelAlongX = 0.5 *CLHEP::mm; //
106  sizeOfVoxelAlongY = 0.5 *CLHEP::mm; //
107  sizeOfVoxelAlongZ = 0.5 *CLHEP::mm; //
108 
109  // Define here the material of the water phantom and of the detector
110  SetPhantomMaterial("G4_WATER");
111  // Construct geometry (messenger commands)
113  SetPhantomSize(20. *CLHEP::cm, 20. *CLHEP::cm, 20. *CLHEP::cm);
116 
117  // Default protection disc geometry and materials
124  SetDiscoMaterialIORT("G4_WATER");
125 
130  SetDiscoMaterialIORT1("G4_WATER");
131 
133 
134  // Write virtual parameters to the real ones and check for consistency
135  UpdateGeometry();
136 }
static constexpr double cm
Definition: SystemOfUnits.h:99
void SetDiscoZPositionIORT(G4double zpos)
CLHEP::Hep3Vector G4ThreeVector
void SetOuterRadiusDiscoIORT1(G4double outerr)
void SetDetectorToPhantomPosition(G4ThreeVector DetectorToPhantomPosition)
void SetPhantomSize(G4double sizeX, G4double sizeY, G4double sizeZ)
void SetDetectorSize(G4double sizeX, G4double sizeY, G4double sizeZ)
void SetheightDiscoIORT1(G4double height)
void SetinnerRadiusDiscoIORT1(G4double innerr)
G4bool SetDiscoMaterialIORT(G4String material)
void SetDiscoYPositionIORT(G4double ypos)
G4bool SetPhantomMaterial(G4String material)
static constexpr double mm
Definition: SystemOfUnits.h:95
void SetDiscoXPositionIORT1(G4double xpos)
void SetAngleDiscoIORT0(G4double phi0)
void SetPhantomPosition(G4ThreeVector)
void SetinnerRadiusDiscoIORT(G4double innerr)
static IORTAnalysisManager * GetInstance()
void SetheightDiscoIORT(G4double height)
static constexpr double deg
void SetOuterRadiusDiscoIORT(G4double outerr)
G4bool SetDiscoMaterialIORT1(G4String material)
void SetDiscoXPositionIORT(G4double xpos)

Here is the call graph for this function:

IORTDetectorConstruction::~IORTDetectorConstruction ( )

Definition at line 139 of file IORTDetectorConstruction.cc.

140 {
141  delete detectorROGeometry;
142  delete matrix;
143  delete detectorMessenger;
144 }

Member Function Documentation

void IORTDetectorConstruction::ConstructDisc ( )

Definition at line 255 of file IORTDetectorConstruction.cc.

256 {
257 // ---------------------------------------------------------------//
258  // 6.0 mm Protection Discs Volume //
259  // ---------------------------------------------------------------//
260  const G4double startAngleDiscoIORT0 = 0.*CLHEP::deg;
261  const G4double spanningAngleDiscoIORT0 = 360.*CLHEP::deg;
262 
263  //G4double phi0 = 180. *CLHEP::deg; // messenger
264 
265  // Matrix definition for a rotation (deg).
266  G4RotationMatrix rm0;
267  rm0.rotateY(AngleDiscoIORT0);
268 
269 
270  solidDiscoIORT0 = new G4Tubs("DiscoIORT0", innerRadiusDiscoIORT,
271  OuterRadiusDiscoIORT,
272  (heightDiscoIORT + heightDiscoIORT1),
273  startAngleDiscoIORT0,
274  spanningAngleDiscoIORT0);
275 
276  G4LogicalVolume* logDiscoIORT0 = new G4LogicalVolume(solidDiscoIORT0,
277  detectorMaterial, "DiscoIORT0Log", 0, 0, 0);
278 
279  physiDiscoIORT0 = new G4PVPlacement(G4Transform3D(rm0, G4ThreeVector((DiscoXPositionIORT + heightDiscoIORT1),DiscoYPositionIORT,DiscoZPositionIORT)),
280  "DiscoIORT0Phys", logDiscoIORT0, detectorPhysicalVolume, false, 0);
281 
282  white = new G4VisAttributes( G4Colour());
283  white -> SetVisibility(true);
284  // white -> SetForceSolid(true);
285  logDiscoIORT0 -> SetVisAttributes(white);
286 
287 // ---------------------------------------------------------------//
288  // 4.0 mm Aluminium Protection Disc //
289  // ---------------------------------------------------------------//
290  //G4bool isotopes = false;
291  // G4Material* leadNist = G4NistManager::Instance()->FindOrBuildMaterial("G4_Pb", isotopes);
292  // DiscoMaterialIORT = leadNist; // messenger
293  gray = new G4VisAttributes( G4Colour(0.5, 0.5, 0.5 ));
294  gray-> SetVisibility(true);
295  //gray -> SetForceWireframe(true);
296  //gray-> SetForceSolid(true);
297 
298  gray1 = new G4VisAttributes( G4Colour(0.7, 0.7, 0.7 ));
299  gray1-> SetVisibility(true);
300  //gray1 -> SetForceWireframe(true);
301  //gray1-> SetForceSolid(true);
302  // const G4double OuterRadiusDiscoIORT = 35. *CLHEP::mm; // messenger
303  // const G4double innerRadiusDiscoIORT = 0.*CLHEP::mm; // messenger
304  // const G4double heightDiscoIORT = 3.0*CLHEP::mm; // messenger
305  const G4double startAngleDiscoIORT = 0.*CLHEP::deg;
306  const G4double spanningAngleDiscoIORT = 360.*CLHEP::deg;
307  // const G4double DiscoXPositionIORT = -14.0*CLHEP::mm; // messenger
308 
309 //G4Material* DiscoMaterialIORT = G4NistManager::Instance()->FindOrBuildMaterial("G4_PLEXIGLASS", isotopes);// messenger
310 
311 
312  G4double phi = 0. *CLHEP::deg;
313 
314  // Matrix definition for a 90 deg rotation. Also used for other volumes
315  G4RotationMatrix rm;
316  rm.rotateY(phi);
317 
318 
319  solidDiscoIORT = new G4Tubs("DiscoIORT", innerRadiusDiscoIORT,
320  OuterRadiusDiscoIORT,
321  heightDiscoIORT,
322  startAngleDiscoIORT,
323  spanningAngleDiscoIORT);
324 
325  G4LogicalVolume* logDiscoIORT = new G4LogicalVolume(solidDiscoIORT,
326  DiscoMaterialIORT, "DiscoIORTLog", 0, 0, 0);
327 
328  physiDiscoIORT = new G4PVPlacement(G4Transform3D(rm, G4ThreeVector(0.,0.,(- heightDiscoIORT1))),
329  "DiscoIORTPhys", logDiscoIORT, physiDiscoIORT0, false, 0);
330 
331  logDiscoIORT -> SetVisAttributes(gray1);
332 
333 
334  // ---------------------------------------------------------------//
335  // 2.0 mm Lead Protection Disc //
336  // ---------------------------------------------------------------//
337 
338  // const G4double OuterRadiusDiscoIORT1 = 35. *CLHEP::mm;
339  // const G4double innerRadiusDiscoIORT1 = 0.*CLHEP::mm;
340  // const G4double heightDiscoIORT1 = 0.5*CLHEP::mm;
341  const G4double startAngleDiscoIORT1 = 0.*CLHEP::deg;
342  const G4double spanningAngleDiscoIORT1 = 360.*CLHEP::deg;
343 // const G4double DiscoXPositionIORT1 = -10.5*CLHEP::mm; messenger
344 // G4Material* DiscoMaterialIORT1 = G4NistManager::Instance()->FindOrBuildMaterial("G4_Cu", isotopes);// messenger
345 
346 
347 
348  solidDiscoIORT1 = new G4Tubs("DiscoIORT1", innerRadiusDiscoIORT1,
349  OuterRadiusDiscoIORT1,
350  heightDiscoIORT1,
351  startAngleDiscoIORT1,
352  spanningAngleDiscoIORT1);
353 
354  G4LogicalVolume* logDiscoIORT1 = new G4LogicalVolume(solidDiscoIORT1,
355  DiscoMaterialIORT1, "DiscoIORTLog1", 0, 0, 0);
356 
357  physiDiscoIORT1 = new G4PVPlacement(G4Transform3D(rm, G4ThreeVector(0.,0.,heightDiscoIORT)),
358  "DiscoIORTPhys1", logDiscoIORT1, physiDiscoIORT0, false, 0);
359  white = new G4VisAttributes( G4Colour());
360  white -> SetVisibility(true);
361  white -> SetForceSolid(true);
362  logDiscoIORT1 -> SetVisAttributes(gray);
363 
364 }
CLHEP::Hep3Vector G4ThreeVector
Definition: G4Tubs.hh:85
HepRotation & rotateY(double delta)
Definition: Rotation.cc:79
HepGeom::Transform3D G4Transform3D
static constexpr double deg
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

Here is the caller graph for this function:

void IORTDetectorConstruction::DeleteDisc ( )

Definition at line 697 of file IORTDetectorConstruction.cc.

698 {
699  delete solidDiscoIORT0;
700  delete logicDiscoIORT0;
701  delete physiDiscoIORT0;
702  delete solidDiscoIORT;
703  delete logicDiscoIORT;
704  delete physiDiscoIORT;
705  delete solidDiscoIORT1;
706  delete logicDiscoIORT1;
707  delete physiDiscoIORT1;
709  G4RunManager::GetRunManager() -> PhysicsHasBeenModified();
710 }
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79

Here is the call graph for this function:

G4LogicalVolume* IORTDetectorConstruction::GetDetectorLogicalVolume ( )
inline

Definition at line 169 of file IORTDetectorConstruction.hh.

169 { return detectorLogicalVolume;}
G4ThreeVector IORTDetectorConstruction::GetDetectorToPhantomPosition ( )
inline

Definition at line 84 of file IORTDetectorConstruction.hh.

85 {
86  return G4ThreeVector(phantomSizeX/2 - detectorSizeX/2 + detectorPosition.getX(),
87  phantomSizeY/2 - detectorSizeY/2 + detectorPosition.getY(),
88  phantomSizeZ/2 - detectorSizeZ/2 + detectorPosition.getZ()
89  );
90 }
CLHEP::Hep3Vector G4ThreeVector
double getY() const
double getX() const
double getZ() const

Here is the call graph for this function:

G4ThreeVector IORTDetectorConstruction::GetDetectorToWorldPosition ( )
inline

Definition at line 78 of file IORTDetectorConstruction.hh.

79  {
80  return phantomPosition + detectorPosition;
81  }

Here is the caller graph for this function:

bool IORTDetectorConstruction::IsInside ( G4double  detectorX,
G4double  detectorY,
G4double  detectorZ,
G4double  phantomX,
G4double  phantomY,
G4double  phantomZ,
G4ThreeVector  detToPhantomPosition 
)
inline

Definition at line 106 of file IORTDetectorConstruction.hh.

113 {
114 // Dimensions check... X Y and Z
115 // Firstly check what dimension we are modifying
116  {
117  if (detectorX > phantomX)
118  {
119  G4cout << "Error: Detector X dimension must be smaller or equal to the corrispondent of the phantom" << G4endl;
120  return false;
121  }
122  if ( (phantomX - detectorX) < detToPhantomPosition.getX())
123  {
124  G4cout << "Error: X dimension doesn't fit with detector to phantom relative position" << G4endl;
125  return false;
126  }
127  }
128 
129  {
130  if (detectorY > phantomY)
131  {
132  G4cout << "Error: Detector Y dimension must be smaller or equal to the corrispondent of the phantom" << G4endl;
133  return false;
134  }
135  if ( (phantomY - detectorY) < detToPhantomPosition.getY())
136  {
137  G4cout << "Error: Y dimension doesn't fit with detector to phantom relative position" << G4endl;
138  return false;
139  }
140  }
141 
142  {
143  if (detectorZ > phantomZ)
144  {
145  G4cout << "Error: Detector Z dimension must be smaller or equal to the corrispondent of the phantom" << G4endl;
146  return false;
147  }
148  if ( (phantomZ - detectorZ) < detToPhantomPosition.getZ())
149  {
150  G4cout << "Error: Z dimension doesn't fit with detector to phantom relative position" << G4endl;
151  return false;
152  }
153  }
154 
155  return true;
156 }
double getY() const
double getX() const
G4GLOB_DLL std::ostream G4cout
double getZ() const
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

void IORTDetectorConstruction::PrintParameters ( )

Definition at line 713 of file IORTDetectorConstruction.cc.

714 {
715 
716  G4cout << "The (X,Y,Z) dimensions of the phantom are : (" <<
717  G4BestUnit( phantom -> GetXHalfLength()*2., "Length") << ',' <<
718  G4BestUnit( phantom -> GetYHalfLength()*2., "Length") << ',' <<
719  G4BestUnit( phantom -> GetZHalfLength()*2., "Length") << ')' << G4endl;
720 
721  G4cout << "The (X,Y,Z) dimensions of the detector are : (" <<
722  G4BestUnit( detector -> GetXHalfLength()*2., "Length") << ',' <<
723  G4BestUnit( detector -> GetYHalfLength()*2., "Length") << ',' <<
724  G4BestUnit( detector -> GetZHalfLength()*2., "Length") << ')' << G4endl;
725 
726  G4cout << "Displacement between Phantom and World is: ";
727  G4cout << "DX= "<< G4BestUnit(phantomPosition.getX(),"Length") <<
728  "DY= "<< G4BestUnit(phantomPosition.getY(),"Length") <<
729  "DZ= "<< G4BestUnit(phantomPosition.getZ(),"Length") << G4endl;
730 
731  G4cout << "The (X,Y,Z) sizes of the Voxels are: (" <<
732  G4BestUnit(sizeOfVoxelAlongX, "Length") << ',' <<
733  G4BestUnit(sizeOfVoxelAlongY, "Length") << ',' <<
734  G4BestUnit(sizeOfVoxelAlongZ, "Length") << ')' << G4endl;
735 
736  G4cout << "The number of Voxels along (X,Y,Z) is: (" <<
737  numberOfVoxelsAlongX << ',' <<
738  numberOfVoxelsAlongY <<',' <<
739  numberOfVoxelsAlongZ << ')' << G4endl;
740 
741 }
double getY() const
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
double getX() const
G4GLOB_DLL std::ostream G4cout
double getZ() const
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

Here is the caller graph for this function:

void IORTDetectorConstruction::SetAngleDiscoIORT0 ( G4double  phi0)

Definition at line 618 of file IORTDetectorConstruction.cc.

619 {
620 
621  AngleDiscoIORT0 = phi0;
622 }

Here is the caller graph for this function:

void IORTDetectorConstruction::SetDetectorPosition ( )
inline

Definition at line 94 of file IORTDetectorConstruction.hh.

95  {
96  // Adjust detector position
97  detectorPosition.setX(detectorToPhantomPosition.getX() - phantomSizeX/2 + detectorSizeX/2);
98  detectorPosition.setY(detectorToPhantomPosition.getY() - phantomSizeY/2 + detectorSizeY/2);
99  detectorPosition.setZ(detectorToPhantomPosition.getZ() - phantomSizeZ/2 + detectorSizeZ/2);
100 
101  //G4cout << "*************** DetectorToPhantomPosition " << detectorToPhantomPosition/cm << "\n";
102  //G4cout << "*************** DetectorPosition " << detectorPosition/cm << "\n";
103  }
double getY() const
void setY(double)
void setZ(double)
void setX(double)
double getX() const
double getZ() const

Here is the call graph for this function:

Here is the caller graph for this function:

void IORTDetectorConstruction::SetDetectorSize ( G4double  sizeX,
G4double  sizeY,
G4double  sizeZ 
)

Definition at line 528 of file IORTDetectorConstruction.cc.

529 {
530  if (sizeX > 0.) {detectorSizeX = sizeX;}
531  if (sizeY > 0.) {detectorSizeY = sizeY;}
532  if (sizeZ > 0.) {detectorSizeZ = sizeZ;}
533  SetVoxelSize(sizeOfVoxelAlongX, sizeOfVoxelAlongY, sizeOfVoxelAlongZ);
534 }
void SetVoxelSize(G4double sizeX, G4double sizeY, G4double sizeZ)

Here is the call graph for this function:

Here is the caller graph for this function:

void IORTDetectorConstruction::SetDetectorToPhantomPosition ( G4ThreeVector  DetectorToPhantomPosition)

Definition at line 549 of file IORTDetectorConstruction.cc.

550 {
551  detectorToPhantomPosition = displ;
552 }

Here is the caller graph for this function:

G4bool IORTDetectorConstruction::SetDiscoMaterialIORT ( G4String  material)

Definition at line 466 of file IORTDetectorConstruction.cc.

467 {
468 
469  if (G4Material* dMat = G4NistManager::Instance()->FindOrBuildMaterial(material, false) )
470  {
471  DiscoMaterialIORT = dMat;
472 
473  if (logicDiscoIORT)
474  {
475  logicDiscoIORT -> SetMaterial(dMat);
476 
477  G4RunManager::GetRunManager() -> PhysicsHasBeenModified();
479  G4cout << "The material of Protection disc 1 has been changed to " << material << G4endl;
480  }
481  }
482  else
483  {
484  G4cout << "WARNING: material \"" << material << "\" doesn't exist in NIST elements/materials"
485  " table [located in $G4INSTALL/source/materials/src/G4NistMaterialBuilder.cc]" << G4endl;
486  G4cout << "Use command \"/parameter/nist\" to see full materials list!" << G4endl;
487  return false;
488  }
489 
490  return true;
491 }
static G4NistManager * Instance()
G4GLOB_DLL std::ostream G4cout
def SetMaterial
Definition: EmPlot.py:25
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

Here is the caller graph for this function:

G4bool IORTDetectorConstruction::SetDiscoMaterialIORT1 ( G4String  material)

Definition at line 493 of file IORTDetectorConstruction.cc.

494 {
495 
496  if (G4Material* d1Mat = G4NistManager::Instance()->FindOrBuildMaterial(material, false) )
497  {
498  DiscoMaterialIORT1 = d1Mat;
499 
500  if (logicDiscoIORT1)
501  {
502  logicDiscoIORT1 -> SetMaterial(d1Mat);
503 
504  G4RunManager::GetRunManager() -> PhysicsHasBeenModified();
506  G4cout << "The material of Protection disc 2 has been changed to " << material << G4endl;
507  }
508  }
509  else
510  {
511  G4cout << "WARNING: material \"" << material << "\" doesn't exist in NIST elements/materials"
512  " table [located in $G4INSTALL/source/materials/src/G4NistMaterialBuilder.cc]" << G4endl;
513  G4cout << "Use command \"/parameter/nist\" to see full materials list!" << G4endl;
514  return false;
515  }
516 
517  return true;
518 }
static G4NistManager * Instance()
G4GLOB_DLL std::ostream G4cout
def SetMaterial
Definition: EmPlot.py:25
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

Here is the caller graph for this function:

void IORTDetectorConstruction::SetDiscoXPositionIORT ( G4double  xpos)

Definition at line 573 of file IORTDetectorConstruction.cc.

574 {
575 
576  DiscoXPositionIORT = xpos;
577 
578 }

Here is the caller graph for this function:

void IORTDetectorConstruction::SetDiscoXPositionIORT1 ( G4double  xpos)

Definition at line 612 of file IORTDetectorConstruction.cc.

613 {
614 
615  DiscoXPositionIORT1 = xpos;
616 }

Here is the caller graph for this function:

void IORTDetectorConstruction::SetDiscoYPositionIORT ( G4double  ypos)

Definition at line 580 of file IORTDetectorConstruction.cc.

581 {
582 
583  DiscoYPositionIORT = ypos;
584 
585 }

Here is the caller graph for this function:

void IORTDetectorConstruction::SetDiscoZPositionIORT ( G4double  zpos)

Definition at line 587 of file IORTDetectorConstruction.cc.

588 {
589 
590  DiscoZPositionIORT = zpos;
591 
592 }

Here is the caller graph for this function:

void IORTDetectorConstruction::SetheightDiscoIORT ( G4double  height)

Definition at line 567 of file IORTDetectorConstruction.cc.

568 {
569  if (height > 0.) {heightDiscoIORT = height;}
570 
571 }

Here is the caller graph for this function:

void IORTDetectorConstruction::SetheightDiscoIORT1 ( G4double  height)

Definition at line 606 of file IORTDetectorConstruction.cc.

607 {
608  if (height > 0.) {heightDiscoIORT1 = height;}
609 
610 }

Here is the caller graph for this function:

void IORTDetectorConstruction::SetinnerRadiusDiscoIORT ( G4double  innerr)

Definition at line 561 of file IORTDetectorConstruction.cc.

562 {
563  if (innerr > 0.) {innerRadiusDiscoIORT = innerr;}
564 
565 }

Here is the caller graph for this function:

void IORTDetectorConstruction::SetinnerRadiusDiscoIORT1 ( G4double  innerr)

Definition at line 600 of file IORTDetectorConstruction.cc.

601 {
602  if (innerr > 0.) {innerRadiusDiscoIORT1 = innerr;}
603 
604 }

Here is the caller graph for this function:

void IORTDetectorConstruction::SetOuterRadiusDiscoIORT ( G4double  outerr)

Definition at line 555 of file IORTDetectorConstruction.cc.

556 {
557  if (outerr > 0.) {OuterRadiusDiscoIORT = outerr;}
558 
559 }

Here is the caller graph for this function:

void IORTDetectorConstruction::SetOuterRadiusDiscoIORT1 ( G4double  outerr)

Definition at line 594 of file IORTDetectorConstruction.cc.

595 {
596  if (outerr > 0.) {OuterRadiusDiscoIORT1 = outerr;}
597 
598 }

Here is the caller graph for this function:

G4bool IORTDetectorConstruction::SetPhantomMaterial ( G4String  material)

Definition at line 438 of file IORTDetectorConstruction.cc.

439 {
440 
441  if (G4Material* pMat = G4NistManager::Instance()->FindOrBuildMaterial(material, false) )
442  {
443  phantomMaterial = pMat;
444  detectorMaterial = pMat;
445  if (detectorLogicalVolume && phantomLogicalVolume)
446  {
447  detectorLogicalVolume -> SetMaterial(pMat);
448  phantomLogicalVolume -> SetMaterial(pMat);
449 
450  G4RunManager::GetRunManager() -> PhysicsHasBeenModified();
452  G4cout << "The material of Phantom/Detector has been changed to " << material << G4endl;
453  }
454  }
455  else
456  {
457  G4cout << "WARNING: material \"" << material << "\" doesn't exist in NIST elements/materials"
458  " table [located in $G4INSTALL/source/materials/src/G4NistMaterialBuilder.cc]" << G4endl;
459  G4cout << "Use command \"/parameter/nist\" to see full materials list!" << G4endl;
460  return false;
461  }
462 
463  return true;
464 }
static G4NistManager * Instance()
G4GLOB_DLL std::ostream G4cout
def SetMaterial
Definition: EmPlot.py:25
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

Here is the caller graph for this function:

void IORTDetectorConstruction::SetPhantomPosition ( G4ThreeVector  pos)

Definition at line 543 of file IORTDetectorConstruction.cc.

544 {
545  phantomPosition = pos;
546 }
static const G4double pos

Here is the caller graph for this function:

void IORTDetectorConstruction::SetPhantomSize ( G4double  sizeX,
G4double  sizeY,
G4double  sizeZ 
)

Definition at line 520 of file IORTDetectorConstruction.cc.

521 {
522  if (sizeX > 0.) phantomSizeX = sizeX;
523  if (sizeY > 0.) phantomSizeY = sizeY;
524  if (sizeZ > 0.) phantomSizeZ = sizeZ;
525 }

Here is the caller graph for this function:

void IORTDetectorConstruction::SetVoxelSize ( G4double  sizeX,
G4double  sizeY,
G4double  sizeZ 
)

Definition at line 537 of file IORTDetectorConstruction.cc.

538 {
539  if (sizeX > 0.) {sizeOfVoxelAlongX = sizeX;}
540  if (sizeY > 0.) {sizeOfVoxelAlongY = sizeY;}
541  if (sizeZ > 0.) {sizeOfVoxelAlongZ = sizeZ;}
542 }

Here is the caller graph for this function:

void IORTDetectorConstruction::UpdateGeometry ( )

Definition at line 628 of file IORTDetectorConstruction.cc.

629 {
630  /*
631  * Check parameters consistency
632  */
633  ParametersCheck();
634 
635  G4GeometryManager::GetInstance() -> OpenGeometry();
636  if (phantom)
637  {
638  phantom -> SetXHalfLength(phantomSizeX/2);
639  phantom -> SetYHalfLength(phantomSizeY/2);
640  phantom -> SetZHalfLength(phantomSizeZ/2);
641  phantomPhysicalVolume -> SetTranslation(phantomPosition);
642  }
643  else ConstructPhantom();
644 
645  // Get the center of the detector
647  if (detector)
648  {
649  detector -> SetXHalfLength(detectorSizeX/2);
650  detector -> SetYHalfLength(detectorSizeY/2);
651  detector -> SetZHalfLength(detectorSizeZ/2);
652  detectorPhysicalVolume -> SetTranslation(detectorPosition);
653  }
654  else ConstructDetector();
655 
656  // update disc function
657  delete solidDiscoIORT0;
658  delete logicDiscoIORT0;
659  delete physiDiscoIORT0;
660  delete solidDiscoIORT;
661  delete logicDiscoIORT;
662  delete physiDiscoIORT;
663  delete solidDiscoIORT1;
664  delete logicDiscoIORT1;
665  delete physiDiscoIORT1;
666  ConstructDisc();
667 
668 
669  // Round to nearest integer number of voxel
670  numberOfVoxelsAlongX = G4lrint(detectorSizeX / sizeOfVoxelAlongX);
671  sizeOfVoxelAlongX = ( detectorSizeX / numberOfVoxelsAlongX );
672 
673  numberOfVoxelsAlongY = G4lrint(detectorSizeY / sizeOfVoxelAlongY);
674  sizeOfVoxelAlongY = ( detectorSizeY / numberOfVoxelsAlongY );
675 
676  numberOfVoxelsAlongZ = G4lrint(detectorSizeZ / sizeOfVoxelAlongZ);
677  sizeOfVoxelAlongZ = ( detectorSizeZ / numberOfVoxelsAlongZ );
678 
679  //G4cout << "*************** DetectorToWorldPosition " << GetDetectorToWorldPosition()/cm << "\n";
680  ConstructSensitiveDetector(GetDetectorToWorldPosition());
681 
682  volumeOfVoxel = sizeOfVoxelAlongX * sizeOfVoxelAlongY * sizeOfVoxelAlongZ;
683  massOfVoxel = detectorMaterial -> GetDensity() * volumeOfVoxel;
684  // This will clear the existing matrix (together with all data inside it)!
685  matrix = IORTMatrix::GetInstance(numberOfVoxelsAlongX,
686  numberOfVoxelsAlongY,
687  numberOfVoxelsAlongZ,
688  massOfVoxel);
689 
690  // Inform the kernel about the new geometry
692  G4RunManager::GetRunManager() -> PhysicsHasBeenModified();
693 
694  PrintParameters();
695 }
static G4GeometryManager * GetInstance()
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79
int G4lrint(double ad)
Definition: templates.hh:163
static IORTMatrix * GetInstance()
Definition: IORTMatrix.cc:61

Here is the call graph for this function:

Here is the caller graph for this function:


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