#include <BLPhysics.hh>
Note: all functions are either inline or abstract, so no .cc file is needed.
Public Member Functions | |
BLPhysics () | |
default constructor. | |
virtual | ~BLPhysics () |
destructor. | |
virtual void | setDoStochastics (BLSetValue value, G4int warn=1)=0 |
setNoStochastics() sets whether or not stochastic processes are to be enabled. Note that Decay is a stochastic process. The argument can be FORCE_ON, FORCE_OFF, and NORMAL (which means use the doStochastics parameter of the physics command). warn controls how warnings are issued: 0=none, 1=printf, 2=G4Exception. | |
virtual G4VUserPhysicsList * | getPhysicsList ()=0 |
getPhysicsList() returns the G4PhysicsList. | |
bool | getStochasticsEnabled () |
getStochasticsEnabled() returns true if stochastics are enabled, false if not. | |
G4double | getRangeCut () |
getRangeCut() returns the range cut. | |
bool | isStochasticProcess (G4VProcess *process) |
isStochasticProcess() returns true if the process is stochastic. | |
bool | isStochasticProcess (G4String name) |
isStochasticProcess() returns true if the process is stochastic. Ionization energy loss processes are considered to NOT be stochastic, because they will be set to return their mean energy loss when stochastics are off. | |
void | setProcessEnable (G4String pattern, bool onoff) |
setProcessEnable() will disable or enable all processes that contain pattern in their name. | |
Protected Attributes | |
bool | stochasticsEnabled |
G4double | minRangeCut |
BLPhysics::BLPhysics | ( | ) | [inline] |
default constructor.
References minRangeCut, and stochasticsEnabled.
00040 { stochasticsEnabled = true; minRangeCut = 1.0*mm; }
virtual void BLPhysics::setDoStochastics | ( | BLSetValue | value, | |
G4int | warn = 1 | |||
) | [pure virtual] |
setNoStochastics() sets whether or not stochastic processes are to be enabled. Note that Decay is a stochastic process. The argument can be FORCE_ON, FORCE_OFF, and NORMAL (which means use the doStochastics parameter of the physics command). warn controls how warnings are issued: 0=none, 1=printf, 2=G4Exception.
Implemented in BLCMDphysics.
Referenced by BLCMDtrackermode::callback(), BLManager::displayVisual(), BLCMDtracker::fitTrack(), BLManager::trackBeam(), and BLManager::trackTuneAndReferenceParticles().
virtual G4VUserPhysicsList* BLPhysics::getPhysicsList | ( | ) | [pure virtual] |
getPhysicsList() returns the G4PhysicsList.
Implemented in BLCMDphysics.
Referenced by BLManager::registerPhysics().
bool BLPhysics::getStochasticsEnabled | ( | ) | [inline] |
getStochasticsEnabled() returns true if stochastics are enabled, false if not.
References stochasticsEnabled.
Referenced by BLCMDspacechargelw::restoreStochastics(), and BLCMDspacechargelw::setStochasticsOff().
00058 { return stochasticsEnabled; }
G4double BLPhysics::getRangeCut | ( | ) | [inline] |
getRangeCut() returns the range cut.
References minRangeCut.
Referenced by BLCMDspacechargelw::setStochasticsOff().
00061 { return minRangeCut; }
bool BLPhysics::isStochasticProcess | ( | G4VProcess * | process | ) | [inline] |
isStochasticProcess() returns true if the process is stochastic.
Referenced by BLCMDphysics::setDoStochastics(), and BLCMDspacechargelw::setStochasticsOff().
00065 { return isStochasticProcess(process->GetProcessName()); }
bool BLPhysics::isStochasticProcess | ( | G4String | name | ) | [inline] |
isStochasticProcess() returns true if the process is stochastic. Ionization energy loss processes are considered to NOT be stochastic, because they will be set to return their mean energy loss when stochastics are off.
00071 { 00072 if(name.find("Trans") < name.size()) return false; 00073 if(name.find("Ioni") < name.size()) return false; 00074 if(name.find("Limiter") < name.size()) return false; 00075 if(name.find("BLCMD") < name.size()) return false; 00076 return true; 00077 }
void BLPhysics::setProcessEnable | ( | G4String | pattern, | |
bool | onoff | |||
) | [inline] |
setProcessEnable() will disable or enable all processes that contain pattern in their name.
00081 { 00082 G4ProcessTable *pt = G4ProcessTable::GetProcessTable(); 00083 std::vector<G4String> &pnv = *pt->GetNameList(); 00084 for(unsigned i=0; i<pnv.size(); ++i) { 00085 G4String name = pnv[i]; 00086 if(name.find(pattern) >= name.size()) continue; 00087 pt->SetProcessActivation(name,onoff); 00088 } 00089 }
bool BLPhysics::stochasticsEnabled [protected] |
Referenced by BLPhysics(), getStochasticsEnabled(), and BLCMDphysics::setDoStochastics().
G4double BLPhysics::minRangeCut [protected] |