Geant4  10.02.p03
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
 

Private Member Functions

void ConstructSDandField ()
 
void ConstructSiliconStripDetectors ()
 
G4LogicalVolumeConstructSiSD (G4int)
 
void SetBeamPipeRadius (G4double aDouble)
 
G4double GetBeamPipeRadius ()
 
void SetBeamPipeThickness (G4double aDouble)
 
G4double GetBeamPipeThickness ()
 
G4LogicalVolumeConstructBeamPipe (G4double)
 
void ConstructXtalTarget ()
 

Private Attributes

ExExChDetectorConstructionMessengerfMessenger
 
G4ThreeVector fWorldSize
 
G4BoxfWorldSolid
 
G4LogicalVolumefWorldLogic
 
G4VPhysicalVolumefWorldPhysical
 
G4MaterialfWorldMaterial
 
G4bool bSiSD
 
G4ThreeVector fSSDSize
 
G4double fSSDXtalDistance [3]
 
G4LogicalVolumefSSDLogic [3]
 
G4double fSSDBoxThickness
 
G4ThreeVector fSSDBoxSize
 
G4bool bBeamPipe
 
G4double fBeamPipeRadius
 
G4double fBeamPipeThickness
 
G4bool bXtal
 
G4ThreeVector fXtalCurvatureRadius
 
G4MaterialfXtalMaterial
 
G4ThreeVector fXtalAngle
 
G4ThreeVector fXtalSize
 
G4ThreeVector fXtalCellSize
 
G4ThreeVector fXtalCellAngle
 
G4ThreeVector fXtalMiller
 
G4double fXtalTVA
 
G4VSolidfXtalSolid
 
G4LogicalVolumefXtalLogic
 
G4VPhysicalVolumefXtalPhysical
 

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 46 of file ExExChDetectorConstruction.hh.

Constructor & Destructor Documentation

◆ ExExChDetectorConstruction()

ExExChDetectorConstruction::ExExChDetectorConstruction ( )

Definition at line 76 of file ExExChDetectorConstruction.cc.

76  :
78 
79  //SiSD standard parameters
80  bSiSD = true;
82  3.8 * CLHEP::centimeter,
83  640. * CLHEP::micrometer);
84  fSSDXtalDistance[0] = - (9998.) * CLHEP::millimeter;
85  fSSDXtalDistance[1] = - (320.) * CLHEP::millimeter;
86  fSSDXtalDistance[2] = + (10756.) * CLHEP::millimeter;
87 
88  //SiSD Box standard parameters
90  25. * CLHEP::centimeter,
91  10. * CLHEP::centimeter);
93 
94  //Beampipe standard parameters
95  bBeamPipe = false;
98  bXtal = true;
99  fXtalAngle = G4ThreeVector(0.,0.,0.);
101  70. * CLHEP::millimeter,
102  1.94 * CLHEP::millimeter);
104  0. * CLHEP::meter,
105  0. * CLHEP::meter);
106 
108  5.431 * CLHEP::angstrom,
109  5.431 * CLHEP::angstrom);
110 
112  90.*CLHEP::deg,
113  90.*CLHEP::deg);
114 
115  fXtalTVA = 0.075 * CLHEP::angstrom;
116  fXtalMiller = G4ThreeVector(2,2,0);
117 
118  SetXtalMaterial("G4_Si");
119 
121 }
CLHEP::Hep3Vector G4ThreeVector
static const double millimeter
Definition: SystemOfUnits.h:61
static const double deg
static const double angstrom
Definition: SystemOfUnits.h:81
static const double meter
Definition: SystemOfUnits.h:69
ExExChDetectorConstructionMessenger * fMessenger
void SetXtalMaterial(const G4String &name)
static const double micrometer
Definition: SystemOfUnits.h:79
static const double centimeter
Definition: SystemOfUnits.h:65
Here is the call graph for this function:

◆ ~ExExChDetectorConstruction()

ExExChDetectorConstruction::~ExExChDetectorConstruction ( )

Definition at line 125 of file ExExChDetectorConstruction.cc.

125  {
126 }

Member Function Documentation

◆ AddXtalTarget()

void ExExChDetectorConstruction::AddXtalTarget ( )
inline

Definition at line 93 of file ExExChDetectorConstruction.hh.

93  {
94  bXtal = true;
96  };
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:

◆ Construct()

G4VPhysicalVolume * ExExChDetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 135 of file ExExChDetectorConstruction.cc.

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

◆ ConstructBeamPipe()

G4LogicalVolume * ExExChDetectorConstruction::ConstructBeamPipe ( G4double  length)
private

Definition at line 398 of file ExExChDetectorConstruction.cc.

398  {
399  G4Material* Galactic =
401  G4Material* Mylar =
403 
404  // Definition of vacuum
405  G4double z = 7.;
406  G4double a = 14.007*CLHEP::g/CLHEP::mole;
408  G4double pressure = 1.E-8 * 1.E-3 * CLHEP::bar;
409  G4double temperature = 300.*CLHEP::kelvin;
410 
411  G4Material* Vacuum = new G4Material("Vacuum",
412  z,
413  a,
414  density,
415  kStateGas,
416  temperature,
417  pressure);
418 
419  // Definition of stainless steel (not in NIST) for pipes
426  G4double density_SS = 8.06*CLHEP::g/CLHEP::cm3;
427  G4int ncomponents_SS =6;
428  G4double fractionmass;
429 
430  G4Material* StainlessSteel =
431  new G4Material("StainlessSteel", density_SS, ncomponents_SS);
432  StainlessSteel->AddElement(elC, fractionmass=0.001);
433  StainlessSteel->AddElement(elSi, fractionmass=0.007);
434  StainlessSteel->AddElement(elCr, fractionmass=0.18);
435  StainlessSteel->AddElement(elMn, fractionmass=0.01);
436  StainlessSteel->AddElement(elFe, fractionmass=0.712);
437  StainlessSteel->AddElement(elNi, fractionmass=0.09);
438 
439  // Visualization attributes
440  G4VisAttributes* fBeamPipeVisAttribute =
441  new G4VisAttributes(G4Colour(0.0,1.0,0.0));
442  fBeamPipeVisAttribute->SetForceSolid(true);
443 
444  G4VisAttributes* fBeamPipeInsideVisAttribute =
445  new G4VisAttributes(G4Colour(0.0,0.0,1.0));
446  fBeamPipeInsideVisAttribute->SetForceSolid(false);
447 
448  // Variables
449  G4double fMylarThickness = 10. * CLHEP::millimeter;
450 
451  //** BeamPipe **//
452  G4Tubs* fBeamPipeEnvelopeSolid =
453  new G4Tubs("BeamPipeEnvelope",
454  0.,
456  length * 0.5 + fMylarThickness * 0.5 * 4.,
457  0*CLHEP::deg,
458  360*CLHEP::deg);
459 
460  G4LogicalVolume* fBeamPipeEnvelopeLogic =
461  new G4LogicalVolume(fBeamPipeEnvelopeSolid,
462  Galactic,
463  "BeamPipeEnvelope");
464 
465 
466  G4Tubs* fBeamPipeSolid = new G4Tubs("BeamPipe",
469  length * 0.5,
470  0*CLHEP::deg,
471  360*CLHEP::deg);
472  G4LogicalVolume* fBeamPipeLogic = new G4LogicalVolume(fBeamPipeSolid,
473  StainlessSteel,
474  "BeamPipe");
475  fBeamPipeLogic->SetVisAttributes(fBeamPipeVisAttribute);
476  new G4PVPlacement(0,
477  G4ThreeVector(),
478  fBeamPipeLogic,
479  "BeamPipe",
480  fBeamPipeEnvelopeLogic,
481  false,
482  0);
483 
484 
485  G4Tubs* fBeamPipeInsideSolid = new G4Tubs("BeamPipeInside",
486  0.,
488  length * 0.5,
489  0*CLHEP::deg,
490  360*CLHEP::deg);
491  G4LogicalVolume* fBeamPipeInsideLogic =
492  new G4LogicalVolume(fBeamPipeInsideSolid,
493  Vacuum,
494  "BeamPipeInside");
495  fBeamPipeInsideLogic->SetVisAttributes(fBeamPipeInsideVisAttribute);
496  new G4PVPlacement(0,
497  G4ThreeVector(),
498  fBeamPipeInsideLogic,
499  "BeamPipeInside",
500  fBeamPipeEnvelopeLogic,
501  false,
502  0);
503 
504 
505  G4Tubs* fBeamPipeMylarSolid =
506  new G4Tubs("BeamPipeMylar",
507  0.,
509  fMylarThickness * 0.5,
510  0*CLHEP::deg,
511  360*CLHEP::deg);
512 
513  G4LogicalVolume* fBeamPipeMylarLogic =
514  new G4LogicalVolume(fBeamPipeMylarSolid,
515  Mylar,
516  "BeamPipeMylar");
517  fBeamPipeMylarLogic->SetVisAttributes(fBeamPipeInsideVisAttribute);
518  new G4PVPlacement(0,
519  G4ThreeVector(0.,
520  0.,
521  +(length + fMylarThickness * 2.) / 2.),
522  fBeamPipeMylarLogic,
523  "BeamPipeMylar",
524  fBeamPipeEnvelopeLogic,
525  false,
526  0);
527 
528  new G4PVPlacement(0,
529  G4ThreeVector(0.,
530  0.,
531  -(length + fMylarThickness * 2.) / 2.),
532  fBeamPipeMylarLogic,
533  "BeamPipeMylar",
534  fBeamPipeEnvelopeLogic,
535  false,
536  1);
537 
538  return fBeamPipeEnvelopeLogic;
539 }
static const double kelvin
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
CLHEP::Hep3Vector G4ThreeVector
static const double millimeter
Definition: SystemOfUnits.h:61
Definition: G4Tubs.hh:85
G4Element * elC
Definition: TRTMaterials.hh:48
void SetForceSolid(G4bool)
static const double mole
int G4int
Definition: G4Types.hh:78
static G4NistManager * Instance()
static const double deg
G4double density
Definition: TRTMaterials.hh:39
static const double bar
static const double g
static const double universe_mean_density
void AddElement(G4Element *element, G4int nAtoms)
Definition: G4Material.cc:364
double G4double
Definition: G4Types.hh:76
G4Element * FindOrBuildElement(G4int Z, G4bool isotopes=true)
void SetVisAttributes(const G4VisAttributes *pVA)
static const double cm3
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ConstructSDandField()

void ExExChDetectorConstruction::ConstructSDandField ( )
privatevirtual

Reimplemented from G4VUserDetectorConstruction.

Definition at line 251 of file ExExChDetectorConstruction.cc.

251  {
252 }
Here is the caller graph for this function:

◆ ConstructSiliconStripDetectors()

void ExExChDetectorConstruction::ConstructSiliconStripDetectors ( )
private

◆ ConstructSiSD()

G4LogicalVolume * ExExChDetectorConstruction::ConstructSiSD ( G4int  copyNo)
private

Definition at line 257 of file ExExChDetectorConstruction.cc.

257  {
260  G4Material* Galactic =
262  G4double fFoilThickness = 0.024 * CLHEP::millimeter;
263 
264  //** SiSD Box **//
265  G4Box* fSSDBoxEnvelopeSolid =
266  new G4Box("SiSDBoxEnvelope",
267  fSSDBoxSize.x()/2.,
268  fSSDBoxSize.y()/2.,
269  fSSDBoxSize.z()/2. + fFoilThickness);
270 
271  G4LogicalVolume* fSSDBoxEnvelopeLogic =
272  new G4LogicalVolume(fSSDBoxEnvelopeSolid,
273  Galactic,
274  "SiSDBoxEnvelope");
275 
276  //** SiSD Active Area **//
277  G4Box* fSSDSolid = new G4Box("SiSD",
278  fSSDSize.x()/2.,
279  fSSDSize.y()/2.,
280  fSSDSize.z()/2.);
281  fSSDLogic[copyNo] = new G4LogicalVolume(fSSDSolid,Si,"SiSD");
282 
283  //** SiSD Box **//
284  G4Box* fSSDBoxSolidA = new G4Box("SiSDBoxA",
285  fSSDBoxSize.x()/2.,
286  fSSDBoxSize.y()/2.,
287  fSSDBoxSize.z()/2.);
288 
289  G4Box* fSSDBoxSolidB = new G4Box("SiSDBoxB",
290  fSSDBoxSize.x()/2. - fSSDBoxThickness/2.,
291  fSSDBoxSize.y()/2. - fSSDBoxThickness/2.,
292  fSSDBoxSize.z()/2. - fSSDBoxThickness/2.);
293 
294  G4Box* fSSDBoxSolidC = new G4Box("SiSDBoxC",
295  fSSDSize.x()/2. + fSSDBoxThickness/2.,
296  fSSDSize.y()/2. + fSSDBoxThickness/2.,
297  fSSDBoxSize.z()/2.);
298 
299  G4Box* fSSDBoxSolidD = new G4Box("SiSDBoxD",
300  fSSDSize.x()/2.,
301  fSSDSize.y()/2.,
302  fSSDBoxSize.z());
303 
304  G4Box* fSSDBoxFoilSolid = new G4Box("SSDBoxFoil",
305  fSSDSize.x()/2.,
306  fSSDSize.y()/2.,
307  fFoilThickness);
308  G4SubtractionSolid* fSSDBoxSolid =
309  new G4SubtractionSolid("SiSDBox",
310  fSSDBoxSolidA,
311  fSSDBoxSolidB);
312 
313  fSSDBoxSolid = new G4SubtractionSolid("SiSDBox",
314  fSSDBoxSolid,
315  fSSDBoxSolidC,
316  0,
318  fSSDBoxSize.y()/4.,
319  0.));
320 
321  G4SubtractionSolid* fSSDBoxInternalSolid =
322  new G4SubtractionSolid("SiSDBoxInternalSolid",
323  fSSDBoxSolidC,
324  fSSDBoxSolidD);
325 
326  G4LogicalVolume* fSSDBoxLogic = new G4LogicalVolume(fSSDBoxSolid,
327  Al,
328  "SiSDBox");
329  G4LogicalVolume* fSSDBoxInternalLogic =
330  new G4LogicalVolume(fSSDBoxInternalSolid,
331  Al,
332  "SiSDBox");
333 
334  G4LogicalVolume* fSSDBoxFoilLogic = new G4LogicalVolume(fSSDBoxFoilSolid,
335  Al,
336  "SiSDBoxFoil");
337 
338  G4VisAttributes* fSSDBoxVisAttribute =
339  new G4VisAttributes(G4Colour(0.7,0.7,0.7));
340  fSSDBoxVisAttribute->SetForceSolid(true);
341  fSSDBoxLogic->SetVisAttributes(fSSDBoxVisAttribute);
342  fSSDBoxInternalLogic->SetVisAttributes(fSSDBoxVisAttribute);
343 
344  G4VisAttributes* fSSDBoxFoilVisAttribute =
345  new G4VisAttributes(G4Colour(0.8,0.8,0.8));
346  fSSDBoxFoilVisAttribute->SetForceSolid(false);
347  fSSDBoxFoilLogic->SetVisAttributes(fSSDBoxFoilVisAttribute);
348 
349  G4VisAttributes* fSiSDVisAttribute =
350  new G4VisAttributes(G4Colour(1.0,0.65,0.0));
351  fSiSDVisAttribute->SetForceSolid(true);
352  fSSDLogic[copyNo]->SetVisAttributes(fSiSDVisAttribute);
353 
354  //** Add to Physical World **//
355  new G4PVPlacement(0,
356  G4ThreeVector(-fSSDBoxSize.x()/4.,fSSDBoxSize.y()/4.,0.),
357  fSSDLogic[copyNo],"SiSD",
358  fSSDBoxEnvelopeLogic,
359  false,
360  copyNo);
361  new G4PVPlacement(0,
362  G4ThreeVector(),
363  fSSDBoxLogic,"SiSDBox",
364  fSSDBoxEnvelopeLogic,
365  false,
366  copyNo);
367 
368  new G4PVPlacement(0,
369  G4ThreeVector(-fSSDBoxSize.x()/4.,fSSDBoxSize.y()/4.,0.),
370  fSSDBoxInternalLogic,"SiSDBox",
371  fSSDBoxEnvelopeLogic,
372  false,
373  copyNo);
374 
375  new G4PVPlacement(0,
377  fSSDBoxSize.y()/4.,
378  (fSSDBoxSize.z()/2. - fFoilThickness/2.)),
379  fSSDBoxFoilLogic,"SiSDBoxFoil",
380  fSSDBoxEnvelopeLogic,
381  false,
382  copyNo);
383 
384  new G4PVPlacement(0,
386  fSSDBoxSize.y()/4.,
387  -(fSSDBoxSize.z()/2. - fFoilThickness/2.)),
388  fSSDBoxFoilLogic,"SiSDBoxFoil",
389  fSSDBoxEnvelopeLogic,
390  false,
391  G4int(copyNo*2+1));
392 
393  return fSSDBoxEnvelopeLogic;
394 }
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
CLHEP::Hep3Vector G4ThreeVector
static const double millimeter
Definition: SystemOfUnits.h:61
Definition: G4Box.hh:64
void SetForceSolid(G4bool)
int G4int
Definition: G4Types.hh:78
static G4NistManager * Instance()
G4Material * Si
Definition: TRTMaterials.hh:78
double x() const
double y() const
double z() const
double G4double
Definition: G4Types.hh:76
void SetVisAttributes(const G4VisAttributes *pVA)
G4Material * Al
Definition: TRTMaterials.hh:74
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ConstructXtalTarget()

void ExExChDetectorConstruction::ConstructXtalTarget ( )
private

Definition at line 543 of file ExExChDetectorConstruction.cc.

543  {
544  if(fXtalCurvatureRadius.x() != 0.){
545  double fXtalAngleOut =
547  fXtalSolid = new G4Tubs("Target",
550  fXtalSize.y()/2.,
551  fXtalAngle.y(),
552  fXtalAngleOut);
553  }
554  else{
555  fXtalSolid = new G4Box("Target",
556  fXtalSize.x()/2.,
557  fXtalSize.y()/2.,
558  fXtalSize.z()/2.);
559  }
560 
562 
563  G4RotationMatrix* vRotationMatrix =
564  new G4RotationMatrix; // Rotates X and Z axes only
565 
566  if(fXtalCurvatureRadius.x() != 0.){
567  vRotationMatrix->rotateX(fXtalAngle.x()-CLHEP::pi*0.5);
568  vRotationMatrix->rotateY(fXtalAngle.y());
569  vRotationMatrix->rotateZ(fXtalAngle.z());
570  fXtalPhysical =
571  new G4PVPlacement(vRotationMatrix,
573  fXtalLogic,"Target",
574  fWorldLogic,
575  false,
576  0);
577  }
578  else{
579  vRotationMatrix->rotateX(fXtalAngle.x());
580  vRotationMatrix->rotateY(fXtalAngle.y());
581  vRotationMatrix->rotateZ(fXtalAngle.z());
582  fXtalPhysical =
583  new G4PVPlacement(vRotationMatrix,
584  G4ThreeVector(0.,0.,0.),
585  fXtalLogic,"Target",
586  fWorldLogic,
587  false,
588  0);
589  }
590 
591  //----------------------------------------
592  // Create XLogicalLattice
593  //----------------------------------------
594  XLogicalLattice* logicalLattice = new XLogicalLattice();
595  double vScatteringConstant =
597  logicalLattice->SetScatteringConstant(vScatteringConstant);
598 
599  //----------------------------------------
600  // Create XLogicalBase
601  //----------------------------------------
602  XLogicalAtomicLatticeDiamond *diamond_lattice =
604  G4Element* element = G4NistManager::
606  XLogicalBase *base = new XLogicalBase(element,diamond_lattice);
607 
608  //----------------------------------------
609  // Create XUnitCell
610  //----------------------------------------
611  XUnitCell* myCell = new XUnitCell();
612  myCell->SetSize(fXtalCellSize);
613  myCell->AddBase(base);
614 
615  //----------------------------------------
616  // Create XPhysicalLattice
617  //----------------------------------------
618  XPhysicalLattice* physicalLattice =
619  new XPhysicalLattice(fXtalPhysical, logicalLattice);
620  physicalLattice->SetUnitCell(myCell);
621  physicalLattice->SetMillerOrientation(G4int(fXtalMiller.x()),
622  G4int(fXtalMiller.y()),
623  G4int(fXtalMiller.z()));
624  physicalLattice->SetLatticeOrientation(fXtalAngle.x(),
625  fXtalAngle.y(),
626  fXtalAngle.z());
627  physicalLattice->SetThermalVibrationAmplitude(fXtalTVA);
628  physicalLattice->SetCurvatureRadius(fXtalCurvatureRadius);
629 
630  //----------------------------------------
631  // Register XPhysicalLattice
632  //----------------------------------------
633  if(XLatticeManager3::
634  GetXLatticeManager()->GetXPhysicalLattice(fXtalPhysical)
635  != physicalLattice){
637  GetXLatticeManager()->RegisterLattice(physicalLattice);
638  }
639 
640 }
G4double GetZ() const
Definition: G4Material.cc:625
void SetThermalVibrationAmplitude(G4double)
static XLatticeManager3 * GetXLatticeManager()
CLHEP::Hep3Vector G4ThreeVector
HepRotation & rotateX(double delta)
Definition: Rotation.cc:66
CLHEP::HepRotation G4RotationMatrix
void SetSize(G4ThreeVector)
Definition: XUnitCell.cc:73
Definition: G4Box.hh:64
Definition: G4Tubs.hh:85
void SetScatteringConstant(G4double)
HepRotation & rotateY(double delta)
Definition: Rotation.cc:79
int G4int
Definition: G4Types.hh:78
static G4NistManager * Instance()
void SetUnitCell(XUnitCell *)
static const double pi
Definition: SystemOfUnits.h:53
void AddBase(XLogicalBase *)
Definition: XUnitCell.cc:97
static const double second
double x() const
bool RegisterLattice(XPhysicalLattice *)
void SetMillerOrientation(int, int, int)
double y() const
void SetCurvatureRadius(G4ThreeVector)
void SetLatticeOrientation(G4double, G4double)
double z() const
HepRotation & rotateZ(double delta)
Definition: Rotation.cc:92
G4Element * FindOrBuildElement(G4int Z, G4bool isotopes=true)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DefineMaterials()

void ExExChDetectorConstruction::DefineMaterials ( )

Definition at line 130 of file ExExChDetectorConstruction.cc.

130  {
131 }

◆ GetBeamPipeRadius()

G4double ExExChDetectorConstruction::GetBeamPipeRadius ( )
inlineprivate

Definition at line 81 of file ExExChDetectorConstruction.hh.

◆ GetBeamPipeThickness()

G4double ExExChDetectorConstruction::GetBeamPipeThickness ( )
inlineprivate

Definition at line 84 of file ExExChDetectorConstruction.hh.

Here is the call graph for this function:

◆ GetXtalAngle()

G4ThreeVector ExExChDetectorConstruction::GetXtalAngle ( )
inline

Definition at line 104 of file ExExChDetectorConstruction.hh.

104 {return fXtalAngle;};
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetXtalCellAngle()

G4ThreeVector ExExChDetectorConstruction::GetXtalCellAngle ( )
inline

Definition at line 108 of file ExExChDetectorConstruction.hh.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetXtalCellSize()

G4ThreeVector ExExChDetectorConstruction::GetXtalCellSize ( )
inline

Definition at line 106 of file ExExChDetectorConstruction.hh.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetXtalCurvatureRadius()

G4ThreeVector ExExChDetectorConstruction::GetXtalCurvatureRadius ( )
inline

Definition at line 100 of file ExExChDetectorConstruction.hh.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetXtalMaterial()

G4String ExExChDetectorConstruction::GetXtalMaterial ( )

Definition at line 664 of file ExExChDetectorConstruction.cc.

664  {
665  if(fXtalMaterial) {
666  return fXtalMaterial->GetName();
667  }
668  return "";
669 }
const G4String & GetName() const
Definition: G4Material.hh:178
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetXtalMiller()

G4ThreeVector ExExChDetectorConstruction::GetXtalMiller ( )
inline

Definition at line 112 of file ExExChDetectorConstruction.hh.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetXtalSize()

G4ThreeVector ExExChDetectorConstruction::GetXtalSize ( )
inline

Definition at line 102 of file ExExChDetectorConstruction.hh.

102 {return fXtalSize;};
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetXtalThermalVibrationAmplitude()

G4double ExExChDetectorConstruction::GetXtalThermalVibrationAmplitude ( )
inline

Definition at line 110 of file ExExChDetectorConstruction.hh.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetBeamPipeRadius()

void ExExChDetectorConstruction::SetBeamPipeRadius ( G4double  aDouble)
inlineprivate

Definition at line 80 of file ExExChDetectorConstruction.hh.

◆ SetBeamPipeThickness()

void ExExChDetectorConstruction::SetBeamPipeThickness ( G4double  aDouble)
inlineprivate

Definition at line 83 of file ExExChDetectorConstruction.hh.

◆ SetXtalAngle()

void ExExChDetectorConstruction::SetXtalAngle ( G4ThreeVector  angle)

Definition at line 691 of file ExExChDetectorConstruction.cc.

691  {
692  if(fXtalAngle != angle) {
694  fXtalAngle = angle;
695  }
696 }
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:

◆ SetXtalCellAngle()

void ExExChDetectorConstruction::SetXtalCellAngle ( G4ThreeVector  cellangle)

Definition at line 718 of file ExExChDetectorConstruction.cc.

719  {
720  if(fXtalCellAngle != cellangle) {
722  fXtalCellAngle = cellangle;
723  }
724 }
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:

◆ SetXtalCellSize()

void ExExChDetectorConstruction::SetXtalCellSize ( G4ThreeVector  cellsize)

Definition at line 700 of file ExExChDetectorConstruction.cc.

700  {
701  if(fXtalCellSize != cellsize) {
703  fXtalCellSize = cellsize;
704  }
705 }
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:

◆ SetXtalCurvatureRadius()

void ExExChDetectorConstruction::SetXtalCurvatureRadius ( G4ThreeVector  cr)

Definition at line 673 of file ExExChDetectorConstruction.cc.

673  {
674  if(fXtalCurvatureRadius != cr) {
677  }
678 }
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:

◆ SetXtalMaterial()

void ExExChDetectorConstruction::SetXtalMaterial ( const G4String name)

Definition at line 644 of file ExExChDetectorConstruction.cc.

644  {
645  G4Material* vMaterial = G4Material::GetMaterial(name, false);
646 
647  if(!vMaterial){
648  vMaterial = G4NistManager::Instance()->FindOrBuildMaterial(name);
649  }
650 
651  if (vMaterial && vMaterial != fXtalMaterial) {
652  G4cout << "DetectorConstructor::SetXtalMaterial() - New Xtal Material: "
653  << vMaterial->GetName() << G4endl;
654  fXtalMaterial = vMaterial;
655  if(fXtalLogic){
656  fXtalLogic->SetMaterial(vMaterial);
658  }
659  }
660 }
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
Definition: G4Material.cc:604
static G4NistManager * Instance()
G4GLOB_DLL std::ostream G4cout
void PhysicsHasBeenModified()
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79
#define G4endl
Definition: G4ios.hh:61
const G4String & GetName() const
Definition: G4Material.hh:178
void SetMaterial(G4Material *pMaterial)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetXtalMiller()

void ExExChDetectorConstruction::SetXtalMiller ( G4ThreeVector  miller)

Definition at line 709 of file ExExChDetectorConstruction.cc.

709  {
710  if(fXtalMiller != miller) {
712  fXtalMiller = miller;
713  }
714 }
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:

◆ SetXtalSize()

void ExExChDetectorConstruction::SetXtalSize ( G4ThreeVector  size)

Definition at line 682 of file ExExChDetectorConstruction.cc.

682  {
683  if(fXtalSize != size) {
685  fXtalSize = size;
686  }
687 }
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:

◆ SetXtalThermalVibrationAmplitude()

void ExExChDetectorConstruction::SetXtalThermalVibrationAmplitude ( G4double  thermvibr)

Definition at line 728 of file ExExChDetectorConstruction.cc.

729  {
730  if(fXtalTVA != thermvibr) {
732  fXtalTVA = thermvibr;
733  }
734 }
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:

Member Data Documentation

◆ bBeamPipe

G4bool ExExChDetectorConstruction::bBeamPipe
private

Definition at line 88 of file ExExChDetectorConstruction.hh.

◆ bSiSD

G4bool ExExChDetectorConstruction::bSiSD
private

Definition at line 72 of file ExExChDetectorConstruction.hh.

◆ bXtal

G4bool ExExChDetectorConstruction::bXtal
private

Definition at line 116 of file ExExChDetectorConstruction.hh.

◆ fBeamPipeRadius

G4double ExExChDetectorConstruction::fBeamPipeRadius
private

Definition at line 89 of file ExExChDetectorConstruction.hh.

◆ fBeamPipeThickness

G4double ExExChDetectorConstruction::fBeamPipeThickness
private

Definition at line 90 of file ExExChDetectorConstruction.hh.

◆ fMessenger

ExExChDetectorConstructionMessenger* ExExChDetectorConstruction::fMessenger
private

Definition at line 57 of file ExExChDetectorConstruction.hh.

◆ fSSDBoxSize

G4ThreeVector ExExChDetectorConstruction::fSSDBoxSize
private

Definition at line 77 of file ExExChDetectorConstruction.hh.

◆ fSSDBoxThickness

G4double ExExChDetectorConstruction::fSSDBoxThickness
private

Definition at line 76 of file ExExChDetectorConstruction.hh.

◆ fSSDLogic

G4LogicalVolume* ExExChDetectorConstruction::fSSDLogic[3]
private

Definition at line 75 of file ExExChDetectorConstruction.hh.

◆ fSSDSize

G4ThreeVector ExExChDetectorConstruction::fSSDSize
private

Definition at line 73 of file ExExChDetectorConstruction.hh.

◆ fSSDXtalDistance

G4double ExExChDetectorConstruction::fSSDXtalDistance[3]
private

Definition at line 74 of file ExExChDetectorConstruction.hh.

◆ fWorldLogic

G4LogicalVolume* ExExChDetectorConstruction::fWorldLogic
private

Definition at line 64 of file ExExChDetectorConstruction.hh.

◆ fWorldMaterial

G4Material* ExExChDetectorConstruction::fWorldMaterial
private

Definition at line 66 of file ExExChDetectorConstruction.hh.

◆ fWorldPhysical

G4VPhysicalVolume* ExExChDetectorConstruction::fWorldPhysical
private

Definition at line 65 of file ExExChDetectorConstruction.hh.

◆ fWorldSize

G4ThreeVector ExExChDetectorConstruction::fWorldSize
private

Definition at line 62 of file ExExChDetectorConstruction.hh.

◆ fWorldSolid

G4Box* ExExChDetectorConstruction::fWorldSolid
private

Definition at line 63 of file ExExChDetectorConstruction.hh.

◆ fXtalAngle

G4ThreeVector ExExChDetectorConstruction::fXtalAngle
private

Definition at line 121 of file ExExChDetectorConstruction.hh.

◆ fXtalCellAngle

G4ThreeVector ExExChDetectorConstruction::fXtalCellAngle
private

Definition at line 124 of file ExExChDetectorConstruction.hh.

◆ fXtalCellSize

G4ThreeVector ExExChDetectorConstruction::fXtalCellSize
private

Definition at line 123 of file ExExChDetectorConstruction.hh.

◆ fXtalCurvatureRadius

G4ThreeVector ExExChDetectorConstruction::fXtalCurvatureRadius
private

Definition at line 118 of file ExExChDetectorConstruction.hh.

◆ fXtalLogic

G4LogicalVolume* ExExChDetectorConstruction::fXtalLogic
private

Definition at line 129 of file ExExChDetectorConstruction.hh.

◆ fXtalMaterial

G4Material* ExExChDetectorConstruction::fXtalMaterial
private

Definition at line 120 of file ExExChDetectorConstruction.hh.

◆ fXtalMiller

G4ThreeVector ExExChDetectorConstruction::fXtalMiller
private

Definition at line 125 of file ExExChDetectorConstruction.hh.

◆ fXtalPhysical

G4VPhysicalVolume* ExExChDetectorConstruction::fXtalPhysical
private

Definition at line 130 of file ExExChDetectorConstruction.hh.

◆ fXtalSize

G4ThreeVector ExExChDetectorConstruction::fXtalSize
private

Definition at line 122 of file ExExChDetectorConstruction.hh.

◆ fXtalSolid

G4VSolid* ExExChDetectorConstruction::fXtalSolid
private

Definition at line 128 of file ExExChDetectorConstruction.hh.

◆ fXtalTVA

G4double ExExChDetectorConstruction::fXtalTVA
private

Definition at line 126 of file ExExChDetectorConstruction.hh.


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