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

#include <Doxymodules_field.h>

Inheritance diagram for F05DetectorConstruction:
G4VUserDetectorConstruction

Public Member Functions

 F05DetectorConstruction ()
 
 ~F05DetectorConstruction () override
 
G4VPhysicalVolumeConstruct () override
 
void ConstructSDandField () override
 

Private Member Functions

void DefineMaterials ()
 

Private Attributes

G4MaterialfVacuum = nullptr
 

Static Private Attributes

static G4ThreadLocal F05FieldfField = nullptr
 

Detailed Description

Definition at line 135 of file Doxymodules_field.h.

Constructor & Destructor Documentation

◆ F05DetectorConstruction()

F05DetectorConstruction::F05DetectorConstruction ( )

Definition at line 69 of file F05DetectorConstruction.cc.

70 : fVacuum(nullptr)
71{
72 // materials
74}

◆ ~F05DetectorConstruction()

F05DetectorConstruction::~F05DetectorConstruction ( )
override

Definition at line 78 of file F05DetectorConstruction.cc.

79{
80 delete fField;
81}
static G4ThreadLocal F05Field * fField

Member Function Documentation

◆ Construct()

G4VPhysicalVolume * F05DetectorConstruction::Construct ( )
override

Definition at line 96 of file F05DetectorConstruction.cc.

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

◆ ConstructSDandField()

void F05DetectorConstruction::ConstructSDandField ( )
override

Definition at line 140 of file F05DetectorConstruction.cc.

142{
143 if (!fField) {
144
145 fField = new F05Field();
146
147// G4RepleteEofM* equation = new G4RepleteEofM(fField);
148 auto equation = new G4EqEMFieldWithSpin(fField);
149// equation->SetBField();
150// equation->SetEField();
151// equation->SetSpin();
152
153 G4FieldManager* fieldManager
154 = G4TransportationManager::GetTransportationManager()->GetFieldManager();
155 fieldManager->SetDetectorField(fField);
156
157 G4MagIntegratorStepper* stepper = new G4ClassicalRK4(equation,12);
158
159 G4double minStep = 0.01*mm;
160
161 auto chordFinder =
162 new G4ChordFinder((G4MagneticField*)fField,minStep,stepper);
163
164 // Set accuracy parameters
165 G4double deltaChord = 3.0*mm;
166 chordFinder->SetDeltaChord( deltaChord );
167
168 // Maximum allowed integration error in one integration sub-step
169 G4double deltaOneStep = 0.01*mm;
170 fieldManager->SetAccuraciesWithDeltaOneStep(deltaOneStep);
171
172 G4double deltaIntersection = 0.1*mm;
173 fieldManager->SetDeltaIntersection(deltaIntersection);
174
175 G4TransportationManager* transportManager =
176 G4TransportationManager::GetTransportationManager();
177
178 G4PropagatorInField* fieldPropagator =
179 transportManager->GetPropagatorInField();
180
181 // Limits for relative accuracy of integration
182 G4double epsMin = 2.5e-7;
183 G4double epsMax = 0.001;
184
185 fieldPropagator->SetMinimumEpsilonStep(epsMin);
186 fieldPropagator->SetMaximumEpsilonStep(epsMax);
187
188 fieldManager->SetChordFinder(chordFinder);
189 }
190}

◆ DefineMaterials()

void F05DetectorConstruction::DefineMaterials ( )
private

Definition at line 85 of file F05DetectorConstruction.cc.

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

Member Data Documentation

◆ fVacuum

G4Material* F05DetectorConstruction::fVacuum = nullptr
private

Definition at line 64 of file F05DetectorConstruction.hh.

◆ fField

G4ThreadLocal F05Field * F05DetectorConstruction::fField = nullptr
staticprivate

Definition at line 66 of file F05DetectorConstruction.hh.


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

Applications | User Support | Publications | Collaboration