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

#include <Doxymodules_field.h>

Inheritance diagram for F04PhysicsList:
G4VModularPhysicsList G4VUserPhysicsList

Public Member Functions

 F04PhysicsList (G4String)
 
 ~F04PhysicsList () override
 
void SetStepMax (G4double)
 
F04StepMaxGetStepMaxProcess ()
 
void AddStepMax ()
 
void ConstructParticle () override
 
void ConstructProcess () override
 

Private Attributes

G4double fMaxChargedStep = DBL_MAX
 
F04PhysicsListMessengerfMessenger = nullptr
 

Static Private Attributes

static G4ThreadLocal F04StepMaxfStepMaxProcess = nullptr
 

Detailed Description

Definition at line 110 of file Doxymodules_field.h.

Constructor & Destructor Documentation

◆ F04PhysicsList()

F04PhysicsList::F04PhysicsList ( G4String  physName)

Definition at line 72 of file F04PhysicsList.cc.

73{
74 G4LossTableManager::Instance();
75
76 defaultCutValue = 1.*mm;
77
79
80 SetVerboseLevel(1);
81
82// G4PhysListFactory factory;
83 G4VModularPhysicsList* phys = nullptr;
84 if (physName == "QGSP_BERT") {
85 phys = new QGSP_BERT;
86 } else {
87 phys = new FTFP_BERT;
88 }
89
90// if (factory.IsReferencePhysList(physName))
91// phys =factory.GetReferencePhysList(physName);
92
93 // Physics List is defined via environment variable PHYSLIST
94// if (!phys) phys = factory.ReferencePhysList();
95
96 if (!phys) G4Exception("F04PhysicsList::F04PhysicsList","InvalidSetup",
97 FatalException,"PhysicsList does not exist");
98
99 for (G4int i = 0; ; ++i) {
100 auto elem =
101 const_cast<G4VPhysicsConstructor*> (phys->GetPhysics(i));
102 if (elem == nullptr) break;
103 G4cout << "RegisterPhysics: " << elem->GetPhysicsName() << G4endl;
104 RegisterPhysics(elem);
105 }
106
107 RegisterPhysics(new G4StepLimiterPhysics());
108 RegisterPhysics(new G4OpticalPhysics());
109}
Provide control of the physics list and cut parameters.
F04PhysicsListMessenger * fMessenger

◆ ~F04PhysicsList()

F04PhysicsList::~F04PhysicsList ( )
override

Definition at line 113 of file F04PhysicsList.cc.

114{
115 delete fMessenger;
116
117 //delete fStepMaxProcess;
118}

Member Function Documentation

◆ SetStepMax()

void F04PhysicsList::SetStepMax ( G4double  step)

Definition at line 256 of file F04PhysicsList.cc.

257{
258 fMaxChargedStep = step ;
260}
G4double fMaxChargedStep
static G4ThreadLocal F04StepMax * fStepMaxProcess
void SetStepMax(G4double)
Definition F04StepMax.cc:55

◆ GetStepMaxProcess()

F04StepMax * F04PhysicsList::GetStepMaxProcess ( )

Definition at line 264 of file F04PhysicsList.cc.

265{
266 return fStepMaxProcess;
267}

◆ AddStepMax()

void F04PhysicsList::AddStepMax ( )

Definition at line 271 of file F04PhysicsList.cc.

272{
273 // Step limitation seen as a process
274
275 auto particleIterator=GetParticleIterator();
276 particleIterator->reset();
277 while ((*particleIterator)()){
278 G4ParticleDefinition* particle = particleIterator->value();
279 G4ProcessManager* pmanager = particle->GetProcessManager();
280
281 if (fStepMaxProcess->IsApplicable(*particle) && !particle->IsShortLived())
282 {
283 if (pmanager) pmanager ->AddDiscreteProcess(fStepMaxProcess);
284 }
285 }
286}
G4bool IsApplicable(const G4ParticleDefinition &) override
Definition F04StepMax.cc:48

◆ ConstructParticle()

void F04PhysicsList::ConstructParticle ( )
override

Definition at line 122 of file F04PhysicsList.cc.

123{
124 G4VModularPhysicsList::ConstructParticle();
125
126 G4GenericIon::GenericIonDefinition();
127
128 auto muonPlusDecayTable = new G4DecayTable();
129 muonPlusDecayTable -> Insert(new
130 G4MuonDecayChannelWithSpin("mu+",0.986));
131 muonPlusDecayTable -> Insert(new
133 G4MuonPlus::MuonPlusDefinition() -> SetDecayTable(muonPlusDecayTable);
134
135 auto muonMinusDecayTable = new G4DecayTable();
136 muonMinusDecayTable -> Insert(new
137 G4MuonDecayChannelWithSpin("mu-",0.986));
138 muonMinusDecayTable -> Insert(new
140 G4MuonMinus::MuonMinusDefinition() -> SetDecayTable(muonMinusDecayTable);
141}

◆ ConstructProcess()

void F04PhysicsList::ConstructProcess ( )
override

Definition at line 145 of file F04PhysicsList.cc.

146{
147 G4VModularPhysicsList::ConstructProcess();
148
150 G4AutoDelete::Register(fStepMaxProcess);
151
152 auto decayWithSpin = new G4DecayWithSpin();
153
154 G4ProcessTable* processTable = G4ProcessTable::GetProcessTable();
155
157 decay = processTable->FindProcess("Decay",G4MuonPlus::MuonPlus());
158
159 G4ProcessManager* pmanager;
160 pmanager = G4MuonPlus::MuonPlus()->GetProcessManager();
161
162 if (pmanager) {
163 if (decay) pmanager->RemoveProcess(decay);
164 pmanager->AddProcess(decayWithSpin);
165 // set ordering for PostStepDoIt and AtRestDoIt
166 pmanager ->SetProcessOrdering(decayWithSpin, idxPostStep);
167 pmanager ->SetProcessOrdering(decayWithSpin, idxAtRest);
168 }
169
170 decay = processTable->FindProcess("Decay",G4MuonMinus::MuonMinus());
171
172 pmanager = G4MuonMinus::MuonMinus()->GetProcessManager();
173
174 if (pmanager) {
175 if (decay) pmanager->RemoveProcess(decay);
176 pmanager->AddProcess(decayWithSpin);
177 // set ordering for PostStepDoIt and AtRestDoIt
178 pmanager ->SetProcessOrdering(decayWithSpin, idxPostStep);
179 pmanager ->SetProcessOrdering(decayWithSpin, idxAtRest);
180 }
181
182 G4VProcess* process = processTable->
183 FindProcess("muMinusCaptureAtRest",G4MuonMinus::MuonMinus());
184
185 if (pmanager) {
186 if (process) pmanager->RemoveProcess(process);
188 pmanager->AddRestProcess(process);
189 }
190
191 auto poldecay = new G4PionDecayMakeSpin();
192
193 decay = processTable->FindProcess("Decay",G4PionPlus::PionPlus());
194
195 pmanager = G4PionPlus::PionPlus()->GetProcessManager();
196
197 if (pmanager) {
198 if (decay) pmanager->RemoveProcess(decay);
199 pmanager->AddProcess(poldecay);
200 // set ordering for PostStepDoIt and AtRestDoIt
201 pmanager ->SetProcessOrdering(poldecay, idxPostStep);
202 pmanager ->SetProcessOrdering(poldecay, idxAtRest);
203 }
204
205 decay = processTable->FindProcess("Decay",G4PionMinus::PionMinus());
206
207 pmanager = G4PionMinus::PionMinus()->GetProcessManager();
208
209 if (pmanager) {
210 if (decay) pmanager->RemoveProcess(decay);
211 pmanager->AddProcess(poldecay);
212 // set ordering for PostStepDoIt and AtRestDoIt
213 pmanager ->SetProcessOrdering(poldecay, idxPostStep);
214 pmanager ->SetProcessOrdering(poldecay, idxAtRest);
215 }
216
217 AddStepMax();
218}
ParticleList decay(Cluster *const c)

Member Data Documentation

◆ fMaxChargedStep

G4double F04PhysicsList::fMaxChargedStep = DBL_MAX
private

Definition at line 64 of file F04PhysicsList.hh.

◆ fStepMaxProcess

G4ThreadLocal F04StepMax * F04PhysicsList::fStepMaxProcess = nullptr
staticprivate

Definition at line 65 of file F04PhysicsList.hh.

◆ fMessenger

F04PhysicsListMessenger* F04PhysicsList::fMessenger = nullptr
private

Definition at line 67 of file F04PhysicsList.hh.


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

Applications | User Support | Publications | Collaboration