Geant4  10.02.p03
ExUCNExtraPhysics Class Reference

#include <ExUCNExtraPhysics.hh>

Inheritance diagram for ExUCNExtraPhysics:
Collaboration diagram for ExUCNExtraPhysics:

Public Member Functions

 ExUCNExtraPhysics ()
 
virtual ~ExUCNExtraPhysics ()
 
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
 

Private Member Functions

void ConstructUCN ()
 

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 40 of file ExUCNExtraPhysics.hh.

Constructor & Destructor Documentation

◆ ExUCNExtraPhysics()

ExUCNExtraPhysics::ExUCNExtraPhysics ( )

Definition at line 54 of file ExUCNExtraPhysics.cc.

55  : G4VPhysicsConstructor("Extra") {;}
G4VPhysicsConstructor(const G4String &="")

◆ ~ExUCNExtraPhysics()

ExUCNExtraPhysics::~ExUCNExtraPhysics ( )
virtual

Definition at line 59 of file ExUCNExtraPhysics.cc.

59 {;}

Member Function Documentation

◆ ConstructParticle()

void ExUCNExtraPhysics::ConstructParticle ( void  )
virtual

Implements G4VPhysicsConstructor.

Definition at line 63 of file ExUCNExtraPhysics.cc.

63 {;}

◆ ConstructProcess()

void ExUCNExtraPhysics::ConstructProcess ( void  )
virtual

Implements G4VPhysicsConstructor.

Definition at line 67 of file ExUCNExtraPhysics.cc.

68 {
70  particleIterator->reset();
71 
72  while ((*particleIterator)()) {
73  G4ParticleDefinition* particle = particleIterator->value();
74  G4ProcessManager* pmanager = particle->GetProcessManager();
75  G4String particleName = particle->GetParticleName();
76 
77  if (!pmanager) {
78  std::ostringstream o;
79  o << "Particle " << particleName << "without a Process Manager";
80  G4Exception("ExUCNExtraPhysics::ConstructProcess()","",
81  FatalException,o.str().c_str());
82  }
83 
84  pmanager->AddDiscreteProcess(new G4StepLimiter());
85  pmanager->AddDiscreteProcess(new G4UserSpecialCuts());
86  }
87 
88  ConstructUCN();
89 
90 // G4Transportation::EnableUseMagneticMoment();
91 
92 }
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleName() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
std::vector< G4InuclElementaryParticle >::iterator particleIterator
Definition: G4BigBanger.cc:65
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
Here is the call graph for this function:

◆ ConstructUCN()

void ExUCNExtraPhysics::ConstructUCN ( )
private

Definition at line 96 of file ExUCNExtraPhysics.cc.

97 {
99  particleIterator->reset();
100  G4ProcessManager* pmanager = NULL;
101 
102  while ((*particleIterator)()) {
103  G4ParticleDefinition* particle = particleIterator->value();
104  pmanager = particle->GetProcessManager();
105  G4String particleName = particle->GetParticleName();
106 
107  if (!pmanager) {
108  std::ostringstream o;
109  o << "Particle " << particleName << "without a Process Manager";
110  G4Exception("ExUCNExtraPhysics::ConstructProcess()","",
111  FatalException,o.str().c_str());
112  }
113 
114  if (particleName == "neutron") {
115  pmanager->AddDiscreteProcess(new G4UCNLoss());
116  pmanager->AddDiscreteProcess(new G4UCNAbsorption());
117  pmanager->AddDiscreteProcess(new G4UCNMultiScattering());
118 
119  G4UCNBoundaryProcess* ucnBoundaryProcess =
120  new G4UCNBoundaryProcess();
121  ucnBoundaryProcess->SetMicroRoughness(true);
122  ucnBoundaryProcess->SetVerboseLevel(0);
123 
124  pmanager->AddDiscreteProcess(ucnBoundaryProcess);
125  }
126  }
127 }
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleName() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
std::vector< G4InuclElementaryParticle >::iterator particleIterator
Definition: G4BigBanger.cc:65
G4ParticleTable::G4PTblDicIterator * GetParticleIterator() const
void SetVerboseLevel(G4int value)
Definition: G4VProcess.hh:437
Here is the call graph for this function:
Here is the caller graph for this function:

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