35 : fParticleName(particlename)
45 G4cout <<
"=== G4ProcessPlacer::RemoveProcess: for: " << fParticleName
48 <<
", will be removed!" <<
G4endl;
51 PrintAlongStepGPILVec();
52 PrintAlongStepDoItVec();
55 PrintPostStepGPILVec();
56 PrintPostStepDoItVec();
58 GetProcessManager()->RemoveProcess(process);
61 PrintAlongStepGPILVec();
62 PrintAlongStepDoItVec();
65 PrintPostStepGPILVec();
66 PrintPostStepDoItVec();
68 G4cout <<
"================================================" <<
G4endl;
72void G4ProcessPlacer::AddProcessAs(
G4VProcess* process, SecondOrLast sol)
77 PrintAlongStepGPILVec();
78 PrintAlongStepDoItVec();
81 PrintPostStepGPILVec();
82 PrintPostStepDoItVec();
91 G4VProcess *transportation =
92 (* (GetProcessManager()->GetProcessList()))[0];
108 GetProcessManager()->AddProcess(process);
109 GetProcessManager()->SetProcessOrderingToSecond(process,
111 GetProcessManager()->SetProcessOrderingToSecond(process,
117 PrintAlongStepGPILVec();
118 PrintAlongStepDoItVec();
121 PrintPostStepGPILVec();
122 PrintPostStepDoItVec();
124 G4cout <<
"================================================" <<
G4endl;
129 G4cout <<
"=== G4ProcessPlacer::AddProcessAsSecondDoIt: for: "
130 << fParticleName <<
G4endl;
131 AddProcessAs(process,
eSecond);
136 G4cout <<
"=== G4ProcessPlacer::AddProcessAsLastDoIt: for: "
137 << fParticleName <<
G4endl;
138 AddProcessAs(process,
eLast);
164 G4Exception(
"G4ProcessPlacer::GetProcessManager()",
"InvalidSetup",
165 FatalException,
"NULL pointer to Process Manager ! Sampler.Configure() must be after PhysicsList instantiation");
167 return processmanager;
170void G4ProcessPlacer::PrintAlongStepGPILVec()
173 G4ProcessVector* processGPILVec =
175 PrintProcVec(processGPILVec);
178void G4ProcessPlacer::PrintAlongStepDoItVec()
181 G4ProcessVector* processDoItVec =
182 GetProcessManager()->GetAlongStepProcessVector(
typeDoIt);
183 PrintProcVec(processDoItVec);
187void G4ProcessPlacer::PrintPostStepGPILVec()
190 G4ProcessVector* processGPILVec =
191 GetProcessManager()->GetPostStepProcessVector(
typeGPIL);
192 PrintProcVec(processGPILVec);
195void G4ProcessPlacer::PrintPostStepDoItVec()
198 G4ProcessVector* processDoItVec =
199 GetProcessManager()->GetPostStepProcessVector(
typeDoIt);
200 PrintProcVec(processDoItVec);
208 G4Exception(
"G4ProcessPlacer::G4ProcessPlacer()",
"InvalidArgument",
214 G4Exception(
"G4ProcessPlacer::G4ProcessPlacer()",
"InvalidSetup",
217 for (
G4int i=0; i<len; ++i)
219 G4VProcess *p = (*processVec)[i];
226 G4cout <<
" " <<
"no process found for position: " << i
227 <<
", in vector of length: " << len <<
G4endl;
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
#define theParticleIterator
G4GLOB_DLL std::ostream G4cout
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleName() const
G4PTblDicIterator * GetIterator() const
static G4ParticleTable * GetParticleTable()
G4ParticleTableIterator< G4String, G4ParticleDefinition * > G4PTblDicIterator
G4ProcessVector * GetAlongStepProcessVector(G4ProcessVectorTypeIndex typ=typeGPIL) const
G4int AddProcess(G4VProcess *aProcess, G4int ordAtRestDoIt=ordInActive, G4int ordAlongSteptDoIt=ordInActive, G4int ordPostStepDoIt=ordInActive)
virtual ~G4ProcessPlacer()
virtual void AddProcessAsSecondDoIt(G4VProcess *process)
virtual void AddProcessAsLastDoIt(G4VProcess *process)
G4ProcessPlacer(const G4String &particlename)
virtual void RemoveProcess(G4VProcess *process)
std::size_t length() const
const G4String & GetProcessName() const