Geant4  10.02.p03
F05DetectorConstruction Class Reference

#include <F05DetectorConstruction.hh>

Inheritance diagram for F05DetectorConstruction:
Collaboration diagram for F05DetectorConstruction:

Public Member Functions

 F05DetectorConstruction ()
 
virtual ~F05DetectorConstruction ()
 
virtual G4VPhysicalVolume * Construct ()
 
virtual void ConstructSDandField ()
 
- 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
 
G4VUserParallelWorld * GetParallelWorld (G4int i) const
 

Private Member Functions

void DefineMaterials ()
 

Private Attributes

G4Material * fVacuum
 
G4double fWorldSizeXY
 
G4double fWorldSizeZ
 
G4Box * fSolidWorld
 
G4LogicalVolume * fLogicWorld
 
G4VPhysicalVolume * fPhysiWorld
 

Static Private Attributes

static G4ThreadLocal F05Field * fField = 0
 

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 51 of file F05DetectorConstruction.hh.

Constructor & Destructor Documentation

◆ F05DetectorConstruction()

F05DetectorConstruction::F05DetectorConstruction ( )

Definition at line 70 of file F05DetectorConstruction.cc.

Here is the call graph for this function:

◆ ~F05DetectorConstruction()

F05DetectorConstruction::~F05DetectorConstruction ( )
virtual

Definition at line 80 of file F05DetectorConstruction.cc.

81 {
82  if (fField) delete fField;
83 }
static G4ThreadLocal F05Field * fField

Member Function Documentation

◆ Construct()

G4VPhysicalVolume * F05DetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 98 of file F05DetectorConstruction.cc.

99 {
100  //
101  // World
102  //
103 
104  fWorldSizeXY = 20.0*m;
105  fWorldSizeZ = 1.0*mm;
106 
107  fSolidWorld = new G4Box("World", //its name
108  fWorldSizeXY/2,fWorldSizeXY/2,fWorldSizeZ/2); //its size
109 
110  fLogicWorld = new G4LogicalVolume(fSolidWorld, //its solid
111  fVacuum, //its material
112  "World"); //its name
113 
114  fPhysiWorld = new G4PVPlacement(0, //no rotation
115  G4ThreeVector(), //at (0,0,0)
116  fLogicWorld, //its logical volume
117  "World", //its name
118  0, //its mother volume
119  false, //no boolean operation
120  0); //copy number
121 
122  G4UserLimits* stepLimit;
123  stepLimit = new G4UserLimits(5*mm);
124 
125  fLogicWorld->SetUserLimits(stepLimit);
126 
127  //
128  // Visualization attributes
129  //
130  // fLogicWorld->SetVisAttributes (G4VisAttributes::Invisible);
131 
132  //
133  //always return the physical World
134  //
135  return fPhysiWorld;
136 }
CLHEP::Hep3Vector G4ThreeVector
Definition: G4Box.hh:64
void SetUserLimits(G4UserLimits *pULimits)
static const double m
Definition: G4SIunits.hh:128
static const double mm
Definition: G4SIunits.hh:114
Here is the call graph for this function:

◆ ConstructSDandField()

void F05DetectorConstruction::ConstructSDandField ( )
virtual

Reimplemented from G4VUserDetectorConstruction.

Definition at line 142 of file F05DetectorConstruction.cc.

144 {
145  if (!fField) {
146 
147  fField = new F05Field();
148 
149 // G4RepleteEofM* equation = new G4RepleteEofM(fField);
151 // equation->SetBField();
152 // equation->SetEField();
153 // equation->SetSpin();
154 
155  G4FieldManager* fieldManager
157  fieldManager->SetDetectorField(fField);
158 
159  G4MagIntegratorStepper* stepper = new G4ClassicalRK4(equation,12);
160 
161  G4double minStep = 0.01*mm;
162 
163  G4ChordFinder* chordFinder =
164  new G4ChordFinder((G4MagneticField*)fField,minStep,stepper);
165 
166  // Set accuracy parameters
167  G4double deltaChord = 3.0*mm;
168  chordFinder->SetDeltaChord( deltaChord );
169 
170  G4double deltaOneStep = 0.01*mm;
171  fieldManager->SetAccuraciesWithDeltaOneStep(deltaOneStep);
172 
173  G4double deltaIntersection = 0.1*mm;
174  fieldManager->SetDeltaIntersection(deltaIntersection);
175 
176  G4TransportationManager* transportManager =
178 
179  G4PropagatorInField* fieldPropagator =
180  transportManager->GetPropagatorInField();
181 
182  G4double epsMin = 2.5e-7*mm;
183  G4double epsMax = 0.05*mm;
184 
185  fieldPropagator->SetMinimumEpsilonStep(epsMin);
186  fieldPropagator->SetMaximumEpsilonStep(epsMax);
187 
188  fieldManager->SetChordFinder(chordFinder);
189  }
190 }
G4bool SetDetectorField(G4Field *detectorField)
void SetChordFinder(G4ChordFinder *aChordFinder)
void SetAccuraciesWithDeltaOneStep(G4double valDeltaOneStep)
G4FieldManager * GetFieldManager() const
static G4TransportationManager * GetTransportationManager()
void SetDeltaIntersection(G4double valueDintersection)
void SetMinimumEpsilonStep(G4double newEpsMin)
G4PropagatorInField * GetPropagatorInField() const
double G4double
Definition: G4Types.hh:76
void SetMaximumEpsilonStep(G4double newEpsMax)
static G4ThreadLocal F05Field * fField
static const double mm
Definition: G4SIunits.hh:114
void SetDeltaChord(G4double newval)
Here is the call graph for this function:

◆ DefineMaterials()

void F05DetectorConstruction::DefineMaterials ( )
private

Definition at line 87 of file F05DetectorConstruction.cc.

88 {
90 
91  fVacuum = nistMan->FindOrBuildMaterial("G4_Galactic");
92 
94 }
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
static G4MaterialTable * GetMaterialTable()
Definition: G4Material.cc:589
static G4NistManager * Instance()
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ fField

G4ThreadLocal F05Field * F05DetectorConstruction::fField = 0
staticprivate

Definition at line 74 of file F05DetectorConstruction.hh.

◆ fLogicWorld

G4LogicalVolume* F05DetectorConstruction::fLogicWorld
private

Definition at line 71 of file F05DetectorConstruction.hh.

◆ fPhysiWorld

G4VPhysicalVolume* F05DetectorConstruction::fPhysiWorld
private

Definition at line 72 of file F05DetectorConstruction.hh.

◆ fSolidWorld

G4Box* F05DetectorConstruction::fSolidWorld
private

Definition at line 70 of file F05DetectorConstruction.hh.

◆ fVacuum

G4Material* F05DetectorConstruction::fVacuum
private

Definition at line 65 of file F05DetectorConstruction.hh.

◆ fWorldSizeXY

G4double F05DetectorConstruction::fWorldSizeXY
private

Definition at line 67 of file F05DetectorConstruction.hh.

◆ fWorldSizeZ

G4double F05DetectorConstruction::fWorldSizeZ
private

Definition at line 68 of file F05DetectorConstruction.hh.


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