Geant4  10.02.p03
ExUCNDetectorConstruction Class Reference

#include <ExUCNDetectorConstruction.hh>

Inheritance diagram for ExUCNDetectorConstruction:
Collaboration diagram for ExUCNDetectorConstruction:

Public Member Functions

 ExUCNDetectorConstruction ()
 
virtual ~ExUCNDetectorConstruction ()
 
virtual G4VPhysicalVolumeConstruct ()
 
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
 
G4VUserParallelWorldGetParallelWorld (G4int i) const
 

Private Member Functions

void DefineMaterials ()
 

Private Attributes

G4MaterialfVacuum
 
G4MaterialfGuideMaterial
 

Static Private Attributes

static G4ThreadLocal G4UniformGravityFieldfField = 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 47 of file ExUCNDetectorConstruction.hh.

Constructor & Destructor Documentation

◆ ExUCNDetectorConstruction()

ExUCNDetectorConstruction::ExUCNDetectorConstruction ( )

Definition at line 74 of file ExUCNDetectorConstruction.cc.

Here is the call graph for this function:

◆ ~ExUCNDetectorConstruction()

ExUCNDetectorConstruction::~ExUCNDetectorConstruction ( )
virtual

Definition at line 83 of file ExUCNDetectorConstruction.cc.

84 {
85  if (fField) delete fField;
86 }
static G4ThreadLocal G4UniformGravityField * fField

Member Function Documentation

◆ Construct()

G4VPhysicalVolume * ExUCNDetectorConstruction::Construct ( void  )
virtual

Implements G4VUserDetectorConstruction.

Definition at line 126 of file ExUCNDetectorConstruction.cc.

127 {
128  //
129  // World
130  //
131 
132  G4double worldSizeX = 1.*m;
133  G4double worldSizeY = 1.*m;
134  G4double worldSizeZ = 100.*m;
135 
136  G4Box* solidWorld = new G4Box("World",
137  worldSizeX/2.,worldSizeY/2.,worldSizeZ/2.);
138 
139  G4LogicalVolume* logicWorld = new G4LogicalVolume(solidWorld,
140  fVacuum,
141  "World");
142 
143  G4VPhysicalVolume* physiWorld = new G4PVPlacement(0,
144  G4ThreeVector(),
145  "World",
146  logicWorld,
147  0,
148  false,
149  0);
150 
151 // --------------------------------- Guide -------------------------------------
152 
153  G4double GuideR = 35.*mm;
154  G4double GuideW = 2.*mm;
155  G4double GuideL = 6.*m;
156 
157  G4Tubs* solidGuide = new G4Tubs("SolidGuide",
158  GuideR,GuideR+GuideW,GuideL/2.,0.,twopi);
159 
160  G4LogicalVolume* logicGuide = new G4LogicalVolume(solidGuide,
162  "Guide");
163 
164  new G4PVPlacement(0,G4ThreeVector(),"Guide",logicGuide,physiWorld,false,0);
165 
166 // ------------------------------ End Plate -----------------------------------
167 
168  G4Tubs* solidEndPlate = new G4Tubs("EndPlate",0.,GuideR,GuideW/2.,0.,twopi);
169 
170  G4LogicalVolume* logicEndPlate = new G4LogicalVolume(solidEndPlate,
171  fVacuum,
172  "EndPlate");
173 
174  G4ThreeVector endPlatePos = G4ThreeVector(0.,0.,GuideL/2.+GuideW/2.);
175 
176  new G4PVPlacement(0,endPlatePos,"EndPlate",logicEndPlate,physiWorld,false,0);
177 
178  G4double maxStep = 1.0*mm;
179  G4double maxTime = 100.*s;
180 
181  G4UserLimits* stepLimit = new G4UserLimits(maxStep,DBL_MAX,maxTime);
182 
183  logicWorld->SetUserLimits(stepLimit);
184 
185  //
186  // Visualization attributes
187  //
188 
189  G4VisAttributes* guideColor = new G4VisAttributes(G4Colour(0.0,0.0,1.0));
190  guideColor->SetVisibility(true);
191  guideColor->SetForceWireframe(true);
192 
193  G4VisAttributes* endPlateColor = new G4VisAttributes(G4Colour(1.0,0.0,0.0));
194  endPlateColor->SetVisibility(true);
195  endPlateColor->SetForceSolid(true);
196 
198  logicGuide->SetVisAttributes(guideColor);
199  logicEndPlate->SetVisAttributes(endPlateColor);
200 
201  //
202  //always return the physical World
203  //
204  return physiWorld;
205 }
void SetForceWireframe(G4bool)
CLHEP::Hep3Vector G4ThreeVector
Definition: G4Box.hh:64
void SetVisibility(G4bool)
void SetUserLimits(G4UserLimits *pULimits)
Definition: G4Tubs.hh:85
void SetForceSolid(G4bool)
static const double s
Definition: G4SIunits.hh:168
static const double twopi
Definition: G4SIunits.hh:75
static const G4VisAttributes Invisible
static const double m
Definition: G4SIunits.hh:128
double G4double
Definition: G4Types.hh:76
#define DBL_MAX
Definition: templates.hh:83
static const double mm
Definition: G4SIunits.hh:114
void SetVisAttributes(const G4VisAttributes *pVA)
Here is the call graph for this function:

◆ ConstructSDandField()

void ExUCNDetectorConstruction::ConstructSDandField ( )
virtual

Reimplemented from G4VUserDetectorConstruction.

Definition at line 211 of file ExUCNDetectorConstruction.cc.

212 {
213  if (!fField) {
214 
216 
217  G4RepleteEofM* equation = new G4RepleteEofM(fField);
218 // G4RepleteEofM* equation = new G4RepleteEofM(fField,12);
219 // G4EqGravityField* equation = new G4EqGravityField(fField);
220 
221  G4FieldManager* fieldManager
223  fieldManager->SetDetectorField(fField);
224 
225  G4MagIntegratorStepper* stepper = new G4ClassicalRK4(equation,8);
226 // G4MagIntegratorStepper* stepper = new G4ClassicalRK4(equation,12);
227 
228  G4double minStep = 0.01*mm;
229 
230  G4ChordFinder* chordFinder =
231  new G4ChordFinder((G4MagneticField*)fField,minStep,stepper);
232 
233  // Set accuracy parameters
234  G4double deltaChord = 3.0*mm;
235  chordFinder->SetDeltaChord( deltaChord );
236 
237  G4double deltaOneStep = 0.01*mm;
238  fieldManager->SetAccuraciesWithDeltaOneStep(deltaOneStep);
239 
240  G4double deltaIntersection = 0.1*mm;
241  fieldManager->SetDeltaIntersection(deltaIntersection);
242 
243  G4TransportationManager* transportManager =
245 
246  G4PropagatorInField* fieldPropagator =
247  transportManager->GetPropagatorInField();
248 
249  G4double epsMin = 2.5e-7*mm;
250  G4double epsMax = 0.05*mm;
251 
252  fieldPropagator->SetMinimumEpsilonStep(epsMin);
253  fieldPropagator->SetMaximumEpsilonStep(epsMax);
254 
255  fieldManager->SetChordFinder(chordFinder);
256  }
257 }
static G4ThreadLocal G4UniformGravityField * fField
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 const double mm
Definition: G4SIunits.hh:114
void SetDeltaChord(G4double newval)
Here is the call graph for this function:

◆ DefineMaterials()

void ExUCNDetectorConstruction::DefineMaterials ( )
private

Definition at line 90 of file ExUCNDetectorConstruction.cc.

91 {
93 
94  fVacuum = nistMan->FindOrBuildMaterial("G4_Galactic");
95  fGuideMaterial = nistMan->FindOrBuildMaterial("G4_Ni");
96 
97  // --- Ni diffuse 10%
98 
100 
101  MPT->AddConstProperty("REFLECTIVITY",1.);
102  MPT->AddConstProperty("DIFFUSION",0.1);
103  MPT->AddConstProperty("FERMIPOT",252.0); // Gollub, Table 2.1 in neV
104  MPT->AddConstProperty("SPINFLIP",0.);
105  MPT->AddConstProperty("LOSS", 12.5e-5); // Gollub, Table 2.1
106  MPT->AddConstProperty("LOSSCS",0.);
107  MPT->AddConstProperty("ABSCS",4.49); // 1/v loss cross-section at room temp.
108  MPT->AddConstProperty("SCATCS",18.5); // (incoherent) "elastic" scattering cs
109 
110  G4double neV = 1.e-9*eV;
111 
112  MPT->SetMicroRoughnessParameters(30*nm, 1*nm,
113  180, 1000,
114  0*degree, 90*degree,
115  1*neV, 1000*neV,
116  15, 15,
117  0.01*degree);
118 
120 
122 }
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
void SetMaterialPropertiesTable(G4MaterialPropertiesTable *anMPT)
Definition: G4Material.hh:249
static G4MaterialTable * GetMaterialTable()
Definition: G4Material.cc:589
static G4NistManager * Instance()
G4GLOB_DLL std::ostream G4cout
static const double nm
Definition: G4SIunits.hh:111
void AddConstProperty(const char *key, G4double PropertyValue)
static const double eV
Definition: G4SIunits.hh:212
static const double degree
Definition: G4SIunits.hh:143
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
void SetMicroRoughnessParameters(G4double, G4double, G4int, G4int, G4double, G4double, G4double, G4double, G4int, G4int, G4double)
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ fField

G4ThreadLocal G4UniformGravityField * ExUCNDetectorConstruction::fField = 0
staticprivate

Definition at line 64 of file ExUCNDetectorConstruction.hh.

◆ fGuideMaterial

G4Material* ExUCNDetectorConstruction::fGuideMaterial
private

Definition at line 62 of file ExUCNDetectorConstruction.hh.

◆ fVacuum

G4Material* ExUCNDetectorConstruction::fVacuum
private

Definition at line 61 of file ExUCNDetectorConstruction.hh.


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