Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
WLSExtraPhysics Class Reference

#include <WLSExtraPhysics.hh>

Inheritance diagram for WLSExtraPhysics:
Collaboration diagram for WLSExtraPhysics:

Public Member Functions

 WLSExtraPhysics ()
 
virtual ~WLSExtraPhysics ()
 
virtual void ConstructParticle ()
 
virtual void ConstructProcess ()
 
- Public Member Functions inherited from G4VPhysicsConstructor
 G4VPhysicsConstructor (const G4String &="")
 
 G4VPhysicsConstructor (const G4String &name, G4int physics_type)
 
virtual ~G4VPhysicsConstructor ()
 
void SetPhysicsName (const G4String &="")
 
const G4StringGetPhysicsName () const
 
void SetPhysicsType (G4int)
 
G4int GetPhysicsType () const
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 
G4int GetInstanceID () const
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VPhysicsConstructor
static const G4VPCManagerGetSubInstanceManager ()
 
- Protected Member Functions inherited from G4VPhysicsConstructor
G4bool RegisterProcess (G4VProcess *process, G4ParticleDefinition *particle)
 
G4ParticleTable::G4PTblDicIteratorGetParticleIterator () const
 
- Protected Attributes inherited from G4VPhysicsConstructor
G4int verboseLevel
 
G4String namePhysics
 
G4int typePhysics
 
G4ParticleTabletheParticleTable
 
G4int g4vpcInstanceID
 
- Static Protected Attributes inherited from G4VPhysicsConstructor
static G4RUN_DLL G4VPCManager subInstanceManager
 

Detailed Description

Definition at line 42 of file WLSExtraPhysics.hh.

Constructor & Destructor Documentation

WLSExtraPhysics::WLSExtraPhysics ( )

Definition at line 44 of file WLSExtraPhysics.cc.

45  : G4VPhysicsConstructor("Extra") { }
G4VPhysicsConstructor(const G4String &="")
WLSExtraPhysics::~WLSExtraPhysics ( )
virtual

Definition at line 49 of file WLSExtraPhysics.cc.

49 { }

Member Function Documentation

void WLSExtraPhysics::ConstructParticle ( void  )
virtual

Implements G4VPhysicsConstructor.

Definition at line 53 of file WLSExtraPhysics.cc.

53 { }
void WLSExtraPhysics::ConstructProcess ( void  )
virtual

Implements G4VPhysicsConstructor.

Definition at line 57 of file WLSExtraPhysics.cc.

58 {
59  G4cout << "WLSExtraPhysics:: Add Extra Physics Processes"
60  << G4endl;
61 
63  particleIterator->reset();
64 
65  while ((*particleIterator)()) {
66  G4ParticleDefinition* particle = particleIterator->value();
67  G4ProcessManager* pmanager = particle->GetProcessManager();
68  G4String particleName = particle->GetParticleName();
69  G4double charge = particle->GetPDGCharge();
70 
71  if (!pmanager) {
72  std::ostringstream o;
73  o << "Particle " << particleName << "without a Process Manager";
74  G4Exception("WLSExtraPhysics::ConstructProcess()","",
75  FatalException,o.str().c_str());
76  }
77 
78  if (particleName == "opticalphoton") break;
79 
80  if (charge != 0.0) {
81  // All charged particles should have a step limiter
82  // to make sure that the steps do not get too long.
83  pmanager->AddDiscreteProcess(new G4StepLimiter());
84  pmanager->AddDiscreteProcess(new G4UserSpecialCuts());
85  } else if (particleName == "neutron") {
86  // time cuts for ONLY neutrons:
87  pmanager->AddDiscreteProcess(new G4UserSpecialCuts());
88  } else {
89  // Energy cuts for all other neutral particles
90  pmanager->AddDiscreteProcess(new G4UserSpecialCuts());
91  }
92  }
93 }
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
const G4String & GetParticleName() const
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
G4GLOB_DLL std::ostream G4cout
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4ProcessManager * GetProcessManager() const
std::vector< G4InuclElementaryParticle >::iterator particleIterator
Definition: G4BigBanger.cc:65
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4double GetPDGCharge() const

Here is the call graph for this function:


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