Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions
XrayFluoDetectorConstruction Class Reference

#include <XrayFluoDetectorConstruction.hh>

Inheritance diagram for XrayFluoDetectorConstruction:
G4VUserDetectorConstruction

Public Member Functions

 ~XrayFluoDetectorConstruction ()
 
G4VPhysicalVolumeConstruct ()
 
void UpdateGeometry ()
 
void SetOhmicPosThickness (G4double)
 
void SetSampleMaterial (G4String newMaterial)
 
void SetDetectorType (G4String type)
 
void SetSampleGranularity (G4bool granularity)
 
void PhaseSpaceOn ()
 
void PhaseSpaceOff ()
 
G4bool GetPhaseSpaceFlag ()
 
void SetGrainDia (G4double size)
 
void DeleteGrainObjects ()
 
void PrintApparateParameters ()
 
XrayFluoVDetectorTypeGetDetectorType ()
 
G4double GetWorldSizeZ ()
 
G4double GetWorldSizeXY ()
 
G4double GetDeviceThickness ()
 
G4double GetDeviceSizeX ()
 
G4double GetDeviceSizeY ()
 
G4double GetPixelSizeXY ()
 
G4double GetContactSizeXY ()
 
G4int GetNbOfPixels ()
 
G4int GetNbOfPixelRows ()
 
G4int GetNbOfPixelColumns ()
 
G4MaterialGetOhmicPosMaterial ()
 
G4double GetOhmicPosThickness ()
 
G4MaterialGetOhmicNegMaterial ()
 
G4double GetOhmicNegThickness ()
 
G4ThreeVector GetDetectorPosition ()
 
G4ThreeVector GetSamplePosition ()
 
const G4VPhysicalVolumeGetphysiWorld ()
 
const G4VPhysicalVolumeGetHPGe ()
 
const G4VPhysicalVolumeGetSample ()
 
const G4VPhysicalVolumeGetDia1 ()
 
const G4VPhysicalVolumeGetDia3 ()
 
const G4VPhysicalVolumeGetphysiPixel ()
 
const G4VPhysicalVolumeGetOhmicPos ()
 
const G4VPhysicalVolumeGetOhmicNeg ()
 
const G4VPhysicalVolumeGetWindow ()
 
G4MaterialGetSampleMaterial ()
 
G4MaterialGetPixelMaterial ()
 
G4MaterialGetDia1Material ()
 
G4MaterialGetDia3Material ()
 
G4NavigatorGetGeometryNavigator ()
 
G4double GetSampleThickness ()
 
G4double GetSampleSizeXY ()
 
G4double GetDia1Thickness ()
 
G4double GetDia1SizeXY ()
 
G4double GetDia3Thickness ()
 
G4double GetDia3SizeXY ()
 
- Public Member Functions inherited from G4VUserDetectorConstruction
 G4VUserDetectorConstruction ()
 
virtual ~G4VUserDetectorConstruction ()
 
virtual void ConstructSDandField ()
 
virtual void CloneSD ()
 
virtual void CloneF ()
 
void RegisterParallelWorld (G4VUserParallelWorld *)
 
G4int ConstructParallelGeometries ()
 
void ConstructParallelSD ()
 
G4int GetNumberOfParallelWorld () const
 
G4VUserParallelWorldGetParallelWorld (G4int i) const
 

Static Public Member Functions

static
XrayFluoDetectorConstruction
GetInstance ()
 

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 70 of file XrayFluoDetectorConstruction.hh.

Constructor & Destructor Documentation

XrayFluoDetectorConstruction::~XrayFluoDetectorConstruction ( )

Definition at line 197 of file XrayFluoDetectorConstruction.cc.

References G4cout, and G4endl.

199 {
200  delete detectorMessenger;
201  delete detectorType;
202  G4cout << "XrayFluoDetectorConstruction deleted" << G4endl;
203 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Member Function Documentation

G4VPhysicalVolume * XrayFluoDetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 207 of file XrayFluoDetectorConstruction.cc.

208 {
209  return ConstructApparate();
210 }
void XrayFluoDetectorConstruction::DeleteGrainObjects ( )

Definition at line 780 of file XrayFluoDetectorConstruction.cc.

Referenced by XrayFluoDetectorMessenger::SetNewValue().

781 {
782  if (sampleGranularity) {
783  delete solidGrain;
784  delete logicGrain;
785  delete physiGrain;
786  }
787 
788 }
G4double XrayFluoDetectorConstruction::GetContactSizeXY ( )
inline

Definition at line 122 of file XrayFluoDetectorConstruction.hh.

122 {return ContactSizeXY;};
G4ThreeVector XrayFluoDetectorConstruction::GetDetectorPosition ( )

Definition at line 790 of file XrayFluoDetectorConstruction.cc.

References python.hepunit::cm, and position.

791 {
792 
793 
794 
795  G4double z = DistDe * std::cos(ThetaHPGe);
796  G4double y = DistDe * std::sin(ThetaHPGe);
797  G4double x = 0.*cm;
798 
799  G4ThreeVector position(x,y,z);
800 
801  return position;
802 
803 }
G4double z
Definition: TRTMaterials.hh:39
int position
Definition: filter.cc:7
double G4double
Definition: G4Types.hh:76
XrayFluoVDetectorType * XrayFluoDetectorConstruction::GetDetectorType ( )

Definition at line 190 of file XrayFluoDetectorConstruction.cc.

Referenced by XrayFluoEventAction::XrayFluoEventAction().

191 {
192  return detectorType;
193 }
G4double XrayFluoDetectorConstruction::GetDeviceSizeX ( )
inline

Definition at line 119 of file XrayFluoDetectorConstruction.hh.

119 {return DeviceSizeX;};
G4double XrayFluoDetectorConstruction::GetDeviceSizeY ( )
inline

Definition at line 120 of file XrayFluoDetectorConstruction.hh.

120 {return DeviceSizeY;};
G4double XrayFluoDetectorConstruction::GetDeviceThickness ( )
inline

Definition at line 118 of file XrayFluoDetectorConstruction.hh.

118 {return DeviceThickness;};
const G4VPhysicalVolume* XrayFluoDetectorConstruction::GetDia1 ( )
inline

Definition at line 140 of file XrayFluoDetectorConstruction.hh.

140 {return physiDia1;};
G4Material* XrayFluoDetectorConstruction::GetDia1Material ( )
inline

Definition at line 242 of file XrayFluoDetectorConstruction.hh.

242 {return Dia1Material;};
G4double XrayFluoDetectorConstruction::GetDia1SizeXY ( )
inline

Definition at line 273 of file XrayFluoDetectorConstruction.hh.

273 {return Dia1SizeXY;};
G4double XrayFluoDetectorConstruction::GetDia1Thickness ( )
inline

Definition at line 272 of file XrayFluoDetectorConstruction.hh.

272 {return Dia1Thickness;};
const G4VPhysicalVolume* XrayFluoDetectorConstruction::GetDia3 ( )
inline

Definition at line 141 of file XrayFluoDetectorConstruction.hh.

141 {return physiDia3;};
G4Material* XrayFluoDetectorConstruction::GetDia3Material ( )
inline

Definition at line 243 of file XrayFluoDetectorConstruction.hh.

243 {return Dia3Material;};
G4double XrayFluoDetectorConstruction::GetDia3SizeXY ( )
inline

Definition at line 276 of file XrayFluoDetectorConstruction.hh.

Referenced by XrayFluoPrimaryGeneratorAction::GeneratePrimaries().

276 {return Dia3SizeXY;};
G4double XrayFluoDetectorConstruction::GetDia3Thickness ( )
inline

Definition at line 275 of file XrayFluoDetectorConstruction.hh.

275 {return Dia3Thickness;};
G4Navigator* XrayFluoDetectorConstruction::GetGeometryNavigator ( )
inline

Definition at line 252 of file XrayFluoDetectorConstruction.hh.

252 {return aNavigator;};
const G4VPhysicalVolume* XrayFluoDetectorConstruction::GetHPGe ( )
inline

Definition at line 138 of file XrayFluoDetectorConstruction.hh.

138 {return physiHPGe;};
XrayFluoDetectorConstruction * XrayFluoDetectorConstruction::GetInstance ( void  )
static

Definition at line 156 of file XrayFluoDetectorConstruction.cc.

Referenced by XrayFluoSimulation::RunSimulation().

157 {
158  if (instance == 0)
159  {
160  instance = new XrayFluoDetectorConstruction;
161 
162  }
163  return instance;
164 }
G4int XrayFluoDetectorConstruction::GetNbOfPixelColumns ( )
inline

Definition at line 126 of file XrayFluoDetectorConstruction.hh.

126 {return NbOfPixelColumns;};
G4int XrayFluoDetectorConstruction::GetNbOfPixelRows ( )
inline

Definition at line 125 of file XrayFluoDetectorConstruction.hh.

125 {return NbOfPixelRows;};
G4int XrayFluoDetectorConstruction::GetNbOfPixels ( )
inline
const G4VPhysicalVolume* XrayFluoDetectorConstruction::GetOhmicNeg ( )
inline

Definition at line 145 of file XrayFluoDetectorConstruction.hh.

145 {return physiOhmicNeg;};
G4Material* XrayFluoDetectorConstruction::GetOhmicNegMaterial ( )
inline

Definition at line 131 of file XrayFluoDetectorConstruction.hh.

131 {return OhmicNegMaterial;};
G4double XrayFluoDetectorConstruction::GetOhmicNegThickness ( )
inline

Definition at line 132 of file XrayFluoDetectorConstruction.hh.

132 {return OhmicNegThickness;};
const G4VPhysicalVolume* XrayFluoDetectorConstruction::GetOhmicPos ( )
inline

Definition at line 144 of file XrayFluoDetectorConstruction.hh.

144 {return physiOhmicPos;};
G4Material* XrayFluoDetectorConstruction::GetOhmicPosMaterial ( )
inline

Definition at line 128 of file XrayFluoDetectorConstruction.hh.

128 {return OhmicPosMaterial;};
G4double XrayFluoDetectorConstruction::GetOhmicPosThickness ( )
inline

Definition at line 129 of file XrayFluoDetectorConstruction.hh.

129 {return OhmicPosThickness;};
G4bool XrayFluoDetectorConstruction::GetPhaseSpaceFlag ( )
inline

Definition at line 100 of file XrayFluoDetectorConstruction.hh.

Referenced by XrayFluoEventAction::XrayFluoEventAction().

101  {return phaseSpaceFlag;};
const G4VPhysicalVolume* XrayFluoDetectorConstruction::GetphysiPixel ( )
inline

Definition at line 143 of file XrayFluoDetectorConstruction.hh.

143 {return physiPixel;};
const G4VPhysicalVolume* XrayFluoDetectorConstruction::GetphysiWorld ( )
inline

Definition at line 137 of file XrayFluoDetectorConstruction.hh.

137 {return physiWorld;};
G4Material* XrayFluoDetectorConstruction::GetPixelMaterial ( )
inline

Definition at line 241 of file XrayFluoDetectorConstruction.hh.

241 {return pixelMaterial;};
G4double XrayFluoDetectorConstruction::GetPixelSizeXY ( )
inline

Definition at line 121 of file XrayFluoDetectorConstruction.hh.

121 {return PixelSizeXY;};
const G4VPhysicalVolume* XrayFluoDetectorConstruction::GetSample ( )
inline

Definition at line 139 of file XrayFluoDetectorConstruction.hh.

139 {return physiSample;};
G4Material* XrayFluoDetectorConstruction::GetSampleMaterial ( )
inline

Definition at line 240 of file XrayFluoDetectorConstruction.hh.

240 {return sampleMaterial;};
G4ThreeVector XrayFluoDetectorConstruction::GetSamplePosition ( )
inline

Definition at line 135 of file XrayFluoDetectorConstruction.hh.

135 {return G4ThreeVector(0,0,0);};
CLHEP::Hep3Vector G4ThreeVector
G4double XrayFluoDetectorConstruction::GetSampleSizeXY ( )
inline

Definition at line 270 of file XrayFluoDetectorConstruction.hh.

Referenced by XrayFluoPrimaryGeneratorAction::GeneratePrimaries().

270 {return SampleSizeXY;};
G4double XrayFluoDetectorConstruction::GetSampleThickness ( )
inline

Definition at line 269 of file XrayFluoDetectorConstruction.hh.

269 {return SampleThickness;};
const G4VPhysicalVolume* XrayFluoDetectorConstruction::GetWindow ( )
inline

Definition at line 146 of file XrayFluoDetectorConstruction.hh.

146 {return physiWindow ;};
G4double XrayFluoDetectorConstruction::GetWorldSizeXY ( )
inline

Definition at line 116 of file XrayFluoDetectorConstruction.hh.

116 {return WorldSizeXY;};
G4double XrayFluoDetectorConstruction::GetWorldSizeZ ( )
inline
void XrayFluoDetectorConstruction::PhaseSpaceOff ( )
inline

Definition at line 97 of file XrayFluoDetectorConstruction.hh.

98  {phaseSpaceFlag = false;};
void XrayFluoDetectorConstruction::PhaseSpaceOn ( )
inline

Definition at line 94 of file XrayFluoDetectorConstruction.hh.

Referenced by XrayFluoSimulation::RunSimulation().

95  {phaseSpaceFlag = true;};
void XrayFluoDetectorConstruction::PrintApparateParameters ( )

Definition at line 714 of file XrayFluoDetectorConstruction.cc.

References G4cout, G4endl, G4LogicalVolume::GetMaterial(), G4Material::GetName(), python.hepunit::m, and python.hepunit::mm.

Referenced by SetSampleMaterial().

715 {
716  G4cout << "-----------------------------------------------------------------------"
717  << G4endl
718  << "The sample is a box whose size is: "
719  << G4endl
720  << SampleThickness/cm
721  << " cm * "
722  << SampleSizeXY/cm
723  << " cm * "
724  << SampleSizeXY/cm
725  << " cm"
726  << G4endl
727  <<" Material: " << logicSample->GetMaterial()->GetName()
728  <<G4endl;
729  if (!phaseSpaceFlag) {
730  G4cout <<"The Detector is a slice " << DeviceThickness/(1.e-6*m) << " micron thick of " << pixelMaterial->GetName()
731  <<G4endl
732  << "The Anode is a slice " << OhmicPosThickness/mm << "mm thick of "<< OhmicPosMaterial->GetName()
733  <<G4endl;
734  }
735  G4cout <<"-------------------------------------------------------------------------"
736  << G4endl;
737 }
G4Material * GetMaterial() const
const G4String & GetName() const
Definition: G4Material.hh:176
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
void XrayFluoDetectorConstruction::SetDetectorType ( G4String  type)

Definition at line 166 of file XrayFluoDetectorConstruction.cc.

References FatalException, G4Exception(), XrayFluoSiLiDetectorType::GetInstance(), and XrayFluoHPGeDetectorType::GetInstance().

Referenced by XrayFluoDetectorMessenger::SetNewValue().

167 {
168 
169  if (type=="sili")
170  {
171  detectorType = XrayFluoSiLiDetectorType::GetInstance();
172  }
173  else if (type=="hpge")
174  {
175  detectorType = XrayFluoHPGeDetectorType::GetInstance();
176  }/*
177  else if (type=="aifira")
178  {
179  detectorType = XrayFluoAifSiLi::GetInstance();
180  }*/
181  else
182  {
184  execp << type + "detector type unknown";
185  G4Exception("XrayFluoDataSet::LoadData()","example-xray_fluorescence06",
186  FatalException, execp);
187  }
188 }
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
static XrayFluoSiLiDetectorType * GetInstance()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static XrayFluoHPGeDetectorType * GetInstance()
void XrayFluoDetectorConstruction::SetGrainDia ( G4double  size)
inline

Definition at line 103 of file XrayFluoDetectorConstruction.hh.

Referenced by XrayFluoDetectorMessenger::SetNewValue().

104  {grainDia = size;};
void XrayFluoDetectorConstruction::SetOhmicPosThickness ( G4double  val)

Definition at line 230 of file XrayFluoDetectorConstruction.cc.

References G4cout, G4endl, and XrayFluoNistMaterials::GetMaterial().

Referenced by XrayFluoDetectorMessenger::SetNewValue().

231 {
232 
233  if (!phaseSpaceFlag) {
234 
235 
236  if (val == 0.0) {
237  OhmicPosMaterial = materials->GetMaterial("G4_Galactic");
238  }
239  else {
240  OhmicPosThickness = val;
241  //OhmicPosMaterial = materials->GetMaterial("G4_Cu");
242  OhmicPosMaterial = materials->GetMaterial("G4_Ni");
243  }
244 
245  }
246  else{
247  G4cout << "Not available in this configuration" << G4endl;
248  }
249 
250 }
G4GLOB_DLL std::ostream G4cout
G4Material * GetMaterial(G4String)
#define G4endl
Definition: G4ios.hh:61
void XrayFluoDetectorConstruction::SetSampleGranularity ( G4bool  granularity)
inline

Definition at line 91 of file XrayFluoDetectorConstruction.hh.

Referenced by XrayFluoDetectorMessenger::SetNewValue().

92  {sampleGranularity = granularity;};
void XrayFluoDetectorConstruction::SetSampleMaterial ( G4String  newMaterial)

Definition at line 805 of file XrayFluoDetectorConstruction.cc.

References G4cout, G4endl, XrayFluoNistMaterials::GetMaterial(), PrintApparateParameters(), and G4LogicalVolume::SetMaterial().

Referenced by XrayFluoDetectorMessenger::SetNewValue().

806 {
807 
808 
809  G4cout << "Material Change in Progress " << newMaterial << G4endl;
810  sampleMaterial = materials->GetMaterial(newMaterial);
811  logicSample->SetMaterial(sampleMaterial);
813 
814 }
G4GLOB_DLL std::ostream G4cout
G4Material * GetMaterial(G4String)
#define G4endl
Definition: G4ios.hh:61
void SetMaterial(G4Material *pMaterial)
void XrayFluoDetectorConstruction::UpdateGeometry ( )

Definition at line 740 of file XrayFluoDetectorConstruction.cc.

References G4RunManager::DefineWorldVolume(), G4RunManager::GetRunManager(), G4Region::RemoveRootLogicalVolume(), and CLHEP::HepRotation::rotateX().

Referenced by XrayFluoDetectorMessenger::SetNewValue().

741 {
742 
743  if (solidPixel) delete solidPixel;
744  if (logicPixel) delete logicPixel;
745  if (physiPixel) delete physiPixel;
746  if (solidOhmicNeg) delete solidOhmicNeg;
747  if (logicOhmicNeg) delete logicOhmicNeg;
748  if (physiOhmicNeg) delete physiOhmicNeg;
749  if (solidOhmicPos) delete solidOhmicPos;
750  if (logicOhmicPos) delete logicOhmicPos;
751  if (physiOhmicPos) delete physiOhmicPos;
752  if (solidHPGe) delete solidHPGe;
753  if (logicHPGe) delete logicHPGe;
754  if (physiHPGe) delete physiHPGe;
755 
756  if (sampleRegion) sampleRegion->RemoveRootLogicalVolume(logicSample);
757  if (solidSample) delete solidSample;
758  if (logicSample) delete logicSample;
759  if (physiSample) delete physiSample;
760 
761  if (solidDia1) delete solidDia1;
762  if (logicDia1) delete logicDia1;
763  if (physiDia1) delete physiDia1;
764  if (solidDia3) delete solidDia3;
765  if (logicDia3) delete logicDia3;
766  if (physiDia3) delete physiDia3;
767 
768  if (solidWorld) delete solidWorld;
769  if (logicWorld) delete logicWorld;
770  if (physiWorld) delete physiWorld;
771 
772  zRotPhiHPGe.rotateX(-1.*PhiHPGe);
773  zRotPhiDia1.rotateX(-1.*AlphaDia1);
774  zRotPhiDia3.rotateX(-1.*AlphaDia3);
775  G4RunManager::GetRunManager()->DefineWorldVolume(ConstructApparate());
776 
777 }
HepRotation & rotateX(double delta)
Definition: Rotation.cc:66
virtual void DefineWorldVolume(G4VPhysicalVolume *worldVol, G4bool topologyIsChanged=true)
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void RemoveRootLogicalVolume(G4LogicalVolume *lv, G4bool scan=true)
Definition: G4Region.cc:283

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