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

#include <ExExChDetectorConstruction.hh>

Inheritance diagram for ExExChDetectorConstruction:
Collaboration diagram for ExExChDetectorConstruction:

Public Member Functions

 ExExChDetectorConstruction ()
 
 ~ExExChDetectorConstruction ()
 
void DefineMaterials ()
 
G4VPhysicalVolumeConstruct ()
 
void AddXtalTarget ()
 
void SetXtalMaterial (const G4String &name)
 
G4String GetXtalMaterial ()
 
void SetXtalCurvatureRadius (G4ThreeVector)
 
G4ThreeVector GetXtalCurvatureRadius ()
 
void SetXtalSize (G4ThreeVector)
 
G4ThreeVector GetXtalSize ()
 
void SetXtalAngle (G4ThreeVector)
 
G4ThreeVector GetXtalAngle ()
 
void SetXtalCellSize (G4ThreeVector)
 
G4ThreeVector GetXtalCellSize ()
 
void SetXtalCellAngle (G4ThreeVector)
 
G4ThreeVector GetXtalCellAngle ()
 
void SetXtalThermalVibrationAmplitude (G4double)
 
G4double GetXtalThermalVibrationAmplitude ()
 
void SetXtalMiller (G4ThreeVector)
 
G4ThreeVector GetXtalMiller ()
 
- Public Member Functions inherited from G4VUserDetectorConstruction
 G4VUserDetectorConstruction ()
 
virtual ~G4VUserDetectorConstruction ()
 
virtual void CloneSD ()
 
virtual void CloneF ()
 
void RegisterParallelWorld (G4VUserParallelWorld *)
 
G4int ConstructParallelGeometries ()
 
void ConstructParallelSD ()
 
G4int GetNumberOfParallelWorld () const
 
G4VUserParallelWorldGetParallelWorld (G4int i) const
 

Additional Inherited Members

- Protected Member Functions inherited from G4VUserDetectorConstruction
void SetSensitiveDetector (const G4String &logVolName, G4VSensitiveDetector *aSD, G4bool multi=false)
 
void SetSensitiveDetector (G4LogicalVolume *logVol, G4VSensitiveDetector *aSD)
 

Detailed Description

Definition at line 49 of file ExExChDetectorConstruction.hh.

Constructor & Destructor Documentation

ExExChDetectorConstruction::ExExChDetectorConstruction ( )

Definition at line 79 of file ExExChDetectorConstruction.cc.

79  :
80 fWorldLogic(0),fXtalLogic(0){
81 
82  //SiSD standard parameters
83  fSiSD = true;
84  fSSDSize = G4ThreeVector(3.8 * CLHEP::centimeter,
85  3.8 * CLHEP::centimeter,
86  640. * CLHEP::micrometer);
87  fSSDXtalDistance[0] = - (9998.) * CLHEP::millimeter;
88  fSSDXtalDistance[1] = - (320.) * CLHEP::millimeter;
89  fSSDXtalDistance[2] = + (10756.) * CLHEP::millimeter;
90 
91  //SiSD Box standard parameters
92  fSSDBoxSize = G4ThreeVector(25. * CLHEP::centimeter,
93  25. * CLHEP::centimeter,
94  10. * CLHEP::centimeter);
95  fSSDBoxThickness = 4. * CLHEP::millimeter;
96 
97  //Beampipe standard parameters
98  fBeamPipe = false;
99  fBeamPipeThickness = (0.3) * CLHEP::centimeter;
100  fBeamPipeRadius = (15.6) * CLHEP::centimeter;
101  fXtal = true;
102  fXtalAngle = G4ThreeVector(0.,0.,0.);
103  fXtalSize = G4ThreeVector(1. * CLHEP::millimeter,
104  70. * CLHEP::millimeter,
105  1.94 * CLHEP::millimeter);
106  fXtalCurvatureRadius = G4ThreeVector(38.416 * CLHEP::meter,
107  0. * CLHEP::meter,
108  0. * CLHEP::meter);
109 
110  fXtalCellSize = G4ThreeVector(5.431 * CLHEP::angstrom,
111  5.431 * CLHEP::angstrom,
112  5.431 * CLHEP::angstrom);
113 
114  fXtalCellAngle = G4ThreeVector(90.*CLHEP::deg,
115  90.*CLHEP::deg,
116  90.*CLHEP::deg);
117 
118  fXtalTVA = 0.075 * CLHEP::angstrom;
119  fXtalMiller = G4ThreeVector(2,2,0);
120 
121  SetXtalMaterial("G4_Si");
122 
123  fMessenger = new ExExChDetectorConstructionMessenger(this);
124 }
CLHEP::Hep3Vector G4ThreeVector
static constexpr double centimeter
Definition: SystemOfUnits.h:66
static constexpr double meter
Definition: SystemOfUnits.h:70
static constexpr double millimeter
Definition: SystemOfUnits.h:62
static constexpr double micrometer
Definition: SystemOfUnits.h:80
static constexpr double deg
void SetXtalMaterial(const G4String &name)
static constexpr double angstrom
Definition: SystemOfUnits.h:82

Here is the call graph for this function:

ExExChDetectorConstruction::~ExExChDetectorConstruction ( )

Definition at line 128 of file ExExChDetectorConstruction.cc.

128  {
129 }

Member Function Documentation

void ExExChDetectorConstruction::AddXtalTarget ( )
inline

Definition at line 96 of file ExExChDetectorConstruction.hh.

96  {
97  fXtal = true;
99  };
void GeometryHasBeenModified(G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79

Here is the call graph for this function:

Here is the caller graph for this function:

G4VPhysicalVolume * ExExChDetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 138 of file ExExChDetectorConstruction.cc.

138  {
139  //** World **//
140  fWorldSize = G4ThreeVector(1. * CLHEP::meter,
141  1. * CLHEP::meter,
142  30. * CLHEP::meter);
143  fWorldMaterial = G4NistManager::
144  Instance()->FindOrBuildMaterial("G4_Galactic");
145 
146  fWorldSolid = new G4Box("World",
147  fWorldSize.x()/2.,
148  fWorldSize.y()/2.,
149  fWorldSize.z()/2.);
150 
151  fWorldLogic = new G4LogicalVolume(fWorldSolid,
152  fWorldMaterial,
153  "World");
154 
155  fWorldPhysical = new G4PVPlacement(0,
156  G4ThreeVector(),
157  fWorldLogic,
158  "World",
159  0,
160  false,
161  0);
162 
163  //** SiSD **//
164 
165  if(fSiSD){
166  for(unsigned int i1=0;i1<3;i1++){
167  G4LogicalVolume* fSSDBoxLogic = ConstructSiSD(i1);
168 
169  G4ThreeVector vBoxPosition =
170  G4ThreeVector(+fSSDBoxSize.x()/4.,
171  -fSSDBoxSize.y()/4.,
172  fSSDXtalDistance[i1]);
173 
174  new G4PVPlacement(0,
175  vBoxPosition,
176  fSSDBoxLogic,"SiSD",
177  fWorldLogic,
178  false,
179  i1);
180  }
181  }
182  //** BeamPipe **//
183  if(fBeamPipe){
184  G4double fBeamPipeFromSiSDDistance = 20. * CLHEP::centimeter;
185 
186  G4ThreeVector fBeamPipeA0Position =
187  G4ThreeVector(0.,
188  0.,
189  fSSDXtalDistance[0] + std::fabs(fSSDXtalDistance[1] -
190  fSSDXtalDistance[0])/2.);
191 
192  G4double fBeamPipeA0Length =
193  std::fabs(fSSDXtalDistance[1] - fSSDXtalDistance[0]) -
194  2. * (fSSDSize.z()/2.) - 2. * fBeamPipeFromSiSDDistance;
195 
196  G4LogicalVolume* fBeamPipeA0Logic =
197  ConstructBeamPipe(fBeamPipeA0Length);
198 
199  new G4PVPlacement(0,
200  fBeamPipeA0Position,
201  fBeamPipeA0Logic,
202  "BeamPipeA0",
203  fWorldLogic,
204  false,
205  0);
206 
207  G4ThreeVector fBeamPipeA1Position =
208  G4ThreeVector(0.,0.,+ std::fabs(fSSDXtalDistance[2]) /2.);
209  G4double fBeamPipeA1Length =
210  std::fabs(fSSDXtalDistance[2]) - 2. * (fSSDSize.z()/2.) -
211  2. * fBeamPipeFromSiSDDistance;
212 
213  G4LogicalVolume* fBeamPipeA1Logic =
214  ConstructBeamPipe(fBeamPipeA1Length);
215 
216  new G4PVPlacement(0,
217  fBeamPipeA1Position,
218  fBeamPipeA1Logic,
219  "BeamPipeA1",
220  fWorldLogic,
221  false,
222  1);
223  }
224 #ifndef G4MULTITHREADED
225  G4String SDname;
226  G4VSensitiveDetector* telescope =
227  new ExExChSensitiveDetector(SDname="/telescope");
229  for(unsigned int i1=0;i1<3;i1++){
230  fSSDLogic[i1]->SetSensitiveDetector(telescope);
231  }
232 #endif
233  //** Crystal **//
234  if(fXtal){
235  ConstructXtalTarget();
236  }
237 
238  return fWorldPhysical;
239 }
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
CLHEP::Hep3Vector G4ThreeVector
double x() const
Definition: G4Box.hh:64
static G4NistManager * Instance()
double z() const
static constexpr double centimeter
Definition: SystemOfUnits.h:66
static constexpr double meter
Definition: SystemOfUnits.h:70
void AddNewDetector(G4VSensitiveDetector *aSD)
Definition: G4SDManager.cc:71
static G4SDManager * GetSDMpointer()
Definition: G4SDManager.cc:40
double y() const
double G4double
Definition: G4Types.hh:76
void SetSensitiveDetector(G4VSensitiveDetector *pSDetector)

Here is the call graph for this function:

void ExExChDetectorConstruction::DefineMaterials ( )

Definition at line 133 of file ExExChDetectorConstruction.cc.

133  {
134 }
G4ThreeVector ExExChDetectorConstruction::GetXtalAngle ( )
inline

Definition at line 107 of file ExExChDetectorConstruction.hh.

107 {return fXtalAngle;};

Here is the caller graph for this function:

G4ThreeVector ExExChDetectorConstruction::GetXtalCellAngle ( )
inline

Definition at line 111 of file ExExChDetectorConstruction.hh.

111 {return fXtalCellAngle;};

Here is the caller graph for this function:

G4ThreeVector ExExChDetectorConstruction::GetXtalCellSize ( )
inline

Definition at line 109 of file ExExChDetectorConstruction.hh.

109 {return fXtalCellSize;};

Here is the caller graph for this function:

G4ThreeVector ExExChDetectorConstruction::GetXtalCurvatureRadius ( )
inline

Definition at line 103 of file ExExChDetectorConstruction.hh.

103 {return fXtalCurvatureRadius;};

Here is the caller graph for this function:

G4String ExExChDetectorConstruction::GetXtalMaterial ( )

Definition at line 667 of file ExExChDetectorConstruction.cc.

667  {
668  if(fXtalMaterial) {
669  return fXtalMaterial->GetName();
670  }
671  return "";
672 }
const G4String & GetName() const
Definition: G4Material.hh:178

Here is the call graph for this function:

Here is the caller graph for this function:

G4ThreeVector ExExChDetectorConstruction::GetXtalMiller ( )
inline

Definition at line 115 of file ExExChDetectorConstruction.hh.

115 {return fXtalMiller;};

Here is the caller graph for this function:

G4ThreeVector ExExChDetectorConstruction::GetXtalSize ( )
inline

Definition at line 105 of file ExExChDetectorConstruction.hh.

105 {return fXtalSize;};

Here is the caller graph for this function:

G4double ExExChDetectorConstruction::GetXtalThermalVibrationAmplitude ( )
inline

Definition at line 113 of file ExExChDetectorConstruction.hh.

113 {return fXtalTVA;};

Here is the caller graph for this function:

void ExExChDetectorConstruction::SetXtalAngle ( G4ThreeVector  angle)

Definition at line 694 of file ExExChDetectorConstruction.cc.

694  {
695  if(fXtalAngle != angle) {
697  fXtalAngle = angle;
698  }
699 }
void GeometryHasBeenModified(G4bool prop=true)
static G4double angle[DIM]
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79

Here is the call graph for this function:

Here is the caller graph for this function:

void ExExChDetectorConstruction::SetXtalCellAngle ( G4ThreeVector  cellangle)

Definition at line 721 of file ExExChDetectorConstruction.cc.

722  {
723  if(fXtalCellAngle != cellangle) {
725  fXtalCellAngle = cellangle;
726  }
727 }
void GeometryHasBeenModified(G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79

Here is the call graph for this function:

Here is the caller graph for this function:

void ExExChDetectorConstruction::SetXtalCellSize ( G4ThreeVector  cellsize)

Definition at line 703 of file ExExChDetectorConstruction.cc.

703  {
704  if(fXtalCellSize != cellsize) {
706  fXtalCellSize = cellsize;
707  }
708 }
void GeometryHasBeenModified(G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79

Here is the call graph for this function:

Here is the caller graph for this function:

void ExExChDetectorConstruction::SetXtalCurvatureRadius ( G4ThreeVector  cr)

Definition at line 676 of file ExExChDetectorConstruction.cc.

676  {
677  if(fXtalCurvatureRadius != cr) {
679  fXtalCurvatureRadius = cr;
680  }
681 }
void GeometryHasBeenModified(G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79

Here is the call graph for this function:

Here is the caller graph for this function:

void ExExChDetectorConstruction::SetXtalMaterial ( const G4String name)

Definition at line 647 of file ExExChDetectorConstruction.cc.

647  {
648  G4Material* vMaterial = G4Material::GetMaterial(name, false);
649 
650  if(!vMaterial){
651  vMaterial = G4NistManager::Instance()->FindOrBuildMaterial(name);
652  }
653 
654  if (vMaterial && vMaterial != fXtalMaterial) {
655  G4cout << "DetectorConstructor::SetXtalMaterial() - New Xtal Material: "
656  << vMaterial->GetName() << G4endl;
657  fXtalMaterial = vMaterial;
658  if(fXtalLogic){
659  fXtalLogic->SetMaterial(vMaterial);
661  }
662  }
663 }
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
Definition: G4Material.cc:602
const G4String & GetName() const
Definition: G4Material.hh:178
static G4NistManager * Instance()
G4GLOB_DLL std::ostream G4cout
void PhysicsHasBeenModified()
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79
#define G4endl
Definition: G4ios.hh:61
void SetMaterial(G4Material *pMaterial)

Here is the call graph for this function:

Here is the caller graph for this function:

void ExExChDetectorConstruction::SetXtalMiller ( G4ThreeVector  miller)

Definition at line 712 of file ExExChDetectorConstruction.cc.

712  {
713  if(fXtalMiller != miller) {
715  fXtalMiller = miller;
716  }
717 }
void GeometryHasBeenModified(G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79

Here is the call graph for this function:

Here is the caller graph for this function:

void ExExChDetectorConstruction::SetXtalSize ( G4ThreeVector  size)

Definition at line 685 of file ExExChDetectorConstruction.cc.

685  {
686  if(fXtalSize != size) {
688  fXtalSize = size;
689  }
690 }
void GeometryHasBeenModified(G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79

Here is the call graph for this function:

Here is the caller graph for this function:

void ExExChDetectorConstruction::SetXtalThermalVibrationAmplitude ( G4double  thermvibr)

Definition at line 731 of file ExExChDetectorConstruction.cc.

732  {
733  if(fXtalTVA != thermvibr) {
735  fXtalTVA = thermvibr;
736  }
737 }
void GeometryHasBeenModified(G4bool prop=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79

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: