21#include <G4ProcessManager.hh>
22#include <G4ProcessVector.hh>
23#include <G4StepStatus.hh>
56 fkTrack->GetNextVolume()->GetLogicalVolume()->GetUserLimits());
64 "No limits defined in " +
65 TString(
fkTrack->GetNextVolume()->GetLogicalVolume()->GetName()));
129 G4ProcessManager* processManager =
130 track->GetDefinition()->GetProcessManager();
131 G4ProcessVector* processVector = processManager->GetProcessList();
133 for (
size_t i = 0; i < processVector->length(); i++) {
150 "TG4SpecialControlsV2",
"ApplyControls",
"No track is set.");
156 G4ProcessManager* processManager =
157 fkTrack->GetDefinition()->GetProcessManager();
158 G4ProcessVector* processVector = processManager->GetProcessList();
165 G4cout <<
"Reset process activation back in "
166 <<
fkTrack->GetNextVolume()->GetName() << G4endl;
168 processManager->SetProcessActivation(
181 for (
size_t i = 0; i < processVector->length(); i++) {
184 G4bool activation = processManager->GetProcessActivation(i);
191 G4cout <<
"Something goes to fSwitchedProcesses" << G4endl;
199 G4cout <<
"Set process inactivation for "
200 << (*processVector)[i]->GetProcessName() <<
" in "
201 <<
fkTrack->GetNextVolume()->GetName() << G4endl;
203 processManager->SetProcessActivation(i,
false);
208 G4cout <<
"Set process activation for "
209 << (*processVector)[i]->GetProcessName() <<
" in "
210 <<
fkTrack->GetNextVolume()->GetName() << G4endl;
212 processManager->SetProcessActivation(i,
true);
225 G4ProcessManager* processManager =
226 fkTrack->GetDefinition()->GetProcessManager();
227 G4ProcessVector* processVector = processManager->GetProcessList();
229 for (
size_t i = 0; i < processVector->length(); i++) {
Definition of the enumeration TG4G3ParticleWSP.
Definition of the TG4G3PhysicsManager class.
Definition of the TG4GeometryServices class.
Definition of the TG4Limits class.
Definition of the TG4SpecialControlsV2 class.
static TG4G3PhysicsManager * Instance()
TG4G3ParticleWSP GetG3ParticleWSP(G4ParticleDefinition *particle) const
static TG4GeometryServices * Instance()
TG4Limits * GetLimits(G4UserLimits *limits) const
static void Warning(const TString &className, const TString &methodName, const TString &text)
static void Exception(const TString &className, const TString &methodName, const TString &text)
static G4bool Compare(G4bool activation, TG4G3ControlValue controlValue)
Extended G4UserLimits class.
TG4G3ControlValue GetControl(G4VProcess *process) const
@ kUnswitch
do not switch the process activation
@ kReswitch
switch the process activation back
@ kSwitch
switch the process activation
G4bool fIsApplicable
Applicability for the current track.
Switch fSwitch
The action to be performed in the current step.
TG4boolVector fSwitchedControls
Vector for storing the current values of the processes activation.
G4ProcessVector fSwitchedProcesses
Vector of the processes the activation of which is changed by this process.
TG4boolVector fProcessActivations
vector of the origin process activations
const G4Track * fkTrack
The current track.
void StartTrack(const G4Track *track)
void RestoreProcessActivations()
virtual ~TG4SpecialControlsV2()
Base class for defining the verbose level and a common messenger.
virtual G4int VerboseLevel() const
TG4G3ControlValue
Enumeration for G3 processes control values.
@ kInActivate
process is not activated
@ kUnsetControlValue
value not set
TG4G3ParticleWSP
The particles types which a special process (cuts, controls) is applicable for.
@ kNofParticlesWSP
not a particle with a special control