BLPhysics Class Reference

#include <BLPhysics.hh>

Inheritance diagram for BLPhysics:

BLCMDphysics

List of all members.


Detailed Description

class BLPhysics is the interface class for selecting the physics processes to be used in the simulation.

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, G4bool quiet=false)=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).
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


Constructor & Destructor Documentation

BLPhysics::BLPhysics (  )  [inline]

default constructor.

References minRangeCut, and stochasticsEnabled.

00040 { stochasticsEnabled = true; minRangeCut = 1.0*mm; }

virtual BLPhysics::~BLPhysics (  )  [inline, virtual]

destructor.

00043 { }


Member Function Documentation

virtual void BLPhysics::setDoStochastics ( BLSetValue  value,
G4bool  quiet = false 
) [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).

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.

00056 { return stochasticsEnabled; }

G4double BLPhysics::getRangeCut (  )  [inline]

getRangeCut() returns the range cut.

References minRangeCut.

00059 { return minRangeCut; }

bool BLPhysics::isStochasticProcess ( G4VProcess *  process  )  [inline]

isStochasticProcess() returns true if the process is stochastic.

Referenced by BLCMDphysics::setDoStochastics().

00063                 { 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.

00069                                                 {
00070                 if(name.find("Trans") < name.size()) return false;
00071                 if(name.find("Ioni") < name.size()) return false;
00072                 if(name.find("Limiter") < name.size()) return false;
00073                 if(name.find("BLCMD") < name.size()) return false;
00074                 return true;
00075         }

void BLPhysics::setProcessEnable ( G4String  pattern,
bool  onoff 
) [inline]

setProcessEnable() will disable or enable all processes that contain pattern in their name.

00079                                                             {
00080                 G4ProcessTable *pt = G4ProcessTable::GetProcessTable();
00081                 std::vector<G4String> &pnv = *pt->GetNameList();
00082                 for(unsigned i=0; i<pnv.size(); ++i) {
00083                         G4String name = pnv[i];
00084                         if(name.find(pattern) >= name.size()) continue;
00085                         pt->SetProcessActivation(name,onoff);
00086                 }
00087         }


Member Data Documentation

G4double BLPhysics::minRangeCut [protected]


The documentation for this class was generated from the following file:
g4beamline