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

#include <Doxymodules_field.h>

Inheritance diagram for F06DetectorConstruction:
G4VUserDetectorConstruction

Public Member Functions

 F06DetectorConstruction ()
 
 ~F06DetectorConstruction () override
 
G4VPhysicalVolumeConstruct () override
 
void ConstructSDandField () override
 

Private Member Functions

void DefineMaterials ()
 

Private Attributes

G4MaterialfVacuum = nullptr
 

Static Private Attributes

static G4ThreadLocal G4UniformGravityFieldfField = nullptr
 

Detailed Description

Definition at line 150 of file Doxymodules_field.h.

Constructor & Destructor Documentation

◆ F06DetectorConstruction()

F06DetectorConstruction::F06DetectorConstruction ( )

Definition at line 70 of file F06DetectorConstruction.cc.

71 : fVacuum(nullptr)
72{
73 // materials
75}

◆ ~F06DetectorConstruction()

F06DetectorConstruction::~F06DetectorConstruction ( )
override

Definition at line 79 of file F06DetectorConstruction.cc.

80{
81 delete fField;
82}
static G4ThreadLocal G4UniformGravityField * fField

Member Function Documentation

◆ Construct()

G4VPhysicalVolume * F06DetectorConstruction::Construct ( )
override

Definition at line 97 of file F06DetectorConstruction.cc.

98{
99 //
100 // World
101 //
102
103 G4double expHall_x = 1.0*m;
104 G4double expHall_y = 1.0*m;
105 G4double expHall_z = 1.0*m;
106
107 auto solidWorld = new G4Box("World", //its name
108 expHall_x,expHall_y,expHall_z); //its size
109
110 auto logicWorld = new G4LogicalVolume(solidWorld,//its solid
111 fVacuum, //its material
112 "World"); //its name
113
114 auto physiWorld = new G4PVPlacement(nullptr, //no rotation
115 G4ThreeVector(), //at (0,0,0)
116 logicWorld, //its logical volume
117 "World", //its name
118 nullptr, //its mother volume
119 false, //no boolean operation
120 0); //copy number
121
122 G4double maxStep = 1.0*mm;
123 G4double maxTime = 41.*s;
124
125 auto stepLimit = new G4UserLimits(maxStep,DBL_MAX,maxTime);
126
127 logicWorld->SetUserLimits(stepLimit);
128
129 //
130 // Visualization attributes
131 //
132 // logicWorld->SetVisAttributes (G4VisAttributes::GetInvisible());
133
134 //
135 //always return the physical World
136 //
137 return physiWorld;
138}

◆ ConstructSDandField()

void F06DetectorConstruction::ConstructSDandField ( )
override

Definition at line 144 of file F06DetectorConstruction.cc.

145{
146 using StepperType = G4ClassicalRK4;
147
148 if (!fField) {
149
151
152 auto equation = new G4RepleteEofM(fField);
153// G4EqGravityField* equation = new G4EqGravityField(fField);
154
155 G4TransportationManager* transportMgr =
156 G4TransportationManager::GetTransportationManager();
157
158 G4FieldManager* fieldManager= transportMgr->GetFieldManager();
159 fieldManager->SetDetectorField(fField);
160
161 const int nVar= 8; // 12 for RepleteEofM
162 auto stepper = new StepperType(equation,nVar);
163
164 G4double minStep = 0.01*mm;
165 G4ChordFinder* chordFinder = nullptr;
166 if( stepper )
167 {
168 auto intgrDriver = new G4IntegrationDriver<StepperType>(minStep,
169 stepper,
170 stepper->GetNumberOfVariables());
171 if( intgrDriver ){
172 chordFinder = new G4ChordFinder(intgrDriver);
173 }
174 }
175
176 // OLD -- and wrong
177 // new G4ChordFinder((G4MagneticField*)fField,minStep,stepper);
178
179 // Set accuracy parameters
180 G4double deltaChord = 3.0*mm;
181 chordFinder->SetDeltaChord( deltaChord );
182
183 G4double deltaIntersection = 0.1*mm;
184 fieldManager->SetDeltaIntersection(deltaIntersection);
185
186 // Control accuracy of integration
187 //
188 G4double deltaOneStep = 0.01*mm;
189 fieldManager->SetAccuraciesWithDeltaOneStep(deltaOneStep);
190 //
191 G4double epsMax = 1.0e-4; // Pure number -- maximum relative integration error
192 G4double epsMin = 2.5e-7; //
193 fieldManager->SetMinimumEpsilonStep(epsMin);
194 fieldManager->SetMaximumEpsilonStep(epsMax);
195 // The acceptable relative accuracy is calculated as deltaOneStep / stepsize
196 // but bounded to the interval between these values!
197
198 fieldManager->SetChordFinder(chordFinder);
199 }
200}

◆ DefineMaterials()

void F06DetectorConstruction::DefineMaterials ( )
private

Definition at line 86 of file F06DetectorConstruction.cc.

87{
88 G4NistManager* nistMan = G4NistManager::Instance();
89
90 fVacuum = nistMan->FindOrBuildMaterial("G4_Galactic");
91
92 G4cout << *(G4Material::GetMaterialTable()) << G4endl;
93}

Member Data Documentation

◆ fVacuum

G4Material* F06DetectorConstruction::fVacuum = nullptr
private

Definition at line 64 of file F06DetectorConstruction.hh.

◆ fField

G4ThreadLocal G4UniformGravityField * F06DetectorConstruction::fField = nullptr
staticprivate

Definition at line 66 of file F06DetectorConstruction.hh.


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

Applications | User Support | Publications | Collaboration