Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
ExUCNDetectorConstruction Class Reference

#include <Doxymodules_exoticphysics.h>

Inheritance diagram for ExUCNDetectorConstruction:
G4VUserDetectorConstruction

Public Member Functions

 ExUCNDetectorConstruction ()
 
virtual ~ExUCNDetectorConstruction ()
 
virtual G4VPhysicalVolumeConstruct ()
 
virtual void ConstructSDandField ()
 

Private Member Functions

void DefineMaterials ()
 

Private Attributes

G4MaterialfVacuum
 
G4MaterialfGuideMaterial
 

Static Private Attributes

static G4ThreadLocal G4UniformGravityFieldfField = 0
 

Detailed Description

Definition at line 86 of file Doxymodules_exoticphysics.h.

Constructor & Destructor Documentation

◆ ExUCNDetectorConstruction()

ExUCNDetectorConstruction::ExUCNDetectorConstruction ( )

◆ ~ExUCNDetectorConstruction()

ExUCNDetectorConstruction::~ExUCNDetectorConstruction ( )
virtual

Definition at line 82 of file ExUCNDetectorConstruction.cc.

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

Member Function Documentation

◆ Construct()

G4VPhysicalVolume * ExUCNDetectorConstruction::Construct ( )
virtual

Definition at line 127 of file ExUCNDetectorConstruction.cc.

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

◆ ConstructSDandField()

void ExUCNDetectorConstruction::ConstructSDandField ( )
virtual

Definition at line 212 of file ExUCNDetectorConstruction.cc.

213{
214 if (!fField) {
215
217
218 G4RepleteEofM* equation = new G4RepleteEofM(fField);
219// G4RepleteEofM* equation = new G4RepleteEofM(fField,12);
220// G4EqGravityField* equation = new G4EqGravityField(fField);
221
222 G4FieldManager* fieldManager
223 = G4TransportationManager::GetTransportationManager()->GetFieldManager();
224 fieldManager->SetDetectorField(fField);
225
226 G4MagIntegratorStepper* stepper = new G4ClassicalRK4(equation,8);
227// G4MagIntegratorStepper* stepper = new G4ClassicalRK4(equation,12);
228
229 G4double minStep = 0.01*mm;
230
231 G4ChordFinder* chordFinder =
232 new G4ChordFinder((G4MagneticField*)fField,minStep,stepper);
233
234 // Set accuracy parameters
235 G4double deltaChord = 3.0*mm;
236 chordFinder->SetDeltaChord( deltaChord );
237
238 G4double deltaOneStep = 0.01*mm;
239 fieldManager->SetAccuraciesWithDeltaOneStep(deltaOneStep);
240
241 G4double deltaIntersection = 0.1*mm;
242 fieldManager->SetDeltaIntersection(deltaIntersection);
243
244 G4TransportationManager* transportManager =
245 G4TransportationManager::GetTransportationManager();
246
247 G4PropagatorInField* fieldPropagator =
248 transportManager->GetPropagatorInField();
249
250 // Dimensionless limits for relative accuracy of integration
251 G4double epsMin = 2.5e-7;
252 G4double epsMax = 0.001; // Will soon be maximum without warning.
253 // The relative accuracy used for a step of length 'l'
254 // a.) epsMin if deltaOneStep / l < epsMin
255 // epsilon_step = b.) epsMax if deltaOneStep / l > epsMax
256 // c.) deltaOneStep / l otherwise
257
258 fieldPropagator->SetMinimumEpsilonStep(epsMin);
259 fieldPropagator->SetMaximumEpsilonStep(epsMax);
260
261 fieldManager->SetChordFinder(chordFinder);
262 }
263}

◆ DefineMaterials()

void ExUCNDetectorConstruction::DefineMaterials ( )
private

Definition at line 89 of file ExUCNDetectorConstruction.cc.

90{
91 G4NistManager* nistMan = G4NistManager::Instance();
92
93 fVacuum = nistMan->FindOrBuildMaterial("G4_Galactic");
94 fGuideMaterial = nistMan->FindOrBuildMaterial("G4_Ni");
95
96 // --- Ni diffuse 10%
97
99
100 // MPT->AddConstProperty("REFLECTIVITY",1.);
101 // Commented out above line as REFLECTIVITY=1 by default in
102 // G4OpBoundaryProcess. Also use AddProperty to set REFLECTIVITY if needed
103 MPT->AddConstProperty("DIFFUSION",0.1);
104 MPT->AddConstProperty("FERMIPOT",252.0); // Gollub, Table 2.1 in neV
105 MPT->AddConstProperty("SPINFLIP",0.);
106 MPT->AddConstProperty("LOSS", 12.5e-5); // Gollub, Table 2.1
107 MPT->AddConstProperty("LOSSCS",0.);
108 MPT->AddConstProperty("ABSCS",4.49); // 1/v loss cross-section at room temp.
109 MPT->AddConstProperty("SCATCS",18.5); // (incoherent) "elastic" scattering cs
110
111 G4double neV = 1.e-9*eV;
112
113 MPT->SetMicroRoughnessParameters(30*nm, 1*nm,
114 180, 1000,
115 0*degree, 90*degree,
116 1*neV, 1000*neV,
117 15, 15,
118 0.01*degree);
119
120 fGuideMaterial->SetMaterialPropertiesTable(MPT);
121
122 G4cout << *(G4Material::GetMaterialTable()) << G4endl;
123}

Member Data Documentation

◆ fVacuum

G4Material* ExUCNDetectorConstruction::fVacuum
private

Definition at line 60 of file ExUCNDetectorConstruction.hh.

◆ fGuideMaterial

G4Material* ExUCNDetectorConstruction::fGuideMaterial
private

Definition at line 61 of file ExUCNDetectorConstruction.hh.

◆ fField

G4ThreadLocal G4UniformGravityField * ExUCNDetectorConstruction::fField = 0
staticprivate

Definition at line 63 of file ExUCNDetectorConstruction.hh.


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

Applications | User Support | Publications | Collaboration