Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4NeutronTrackingCut Class Reference

#include <G4NeutronTrackingCut.hh>

+ Inheritance diagram for G4NeutronTrackingCut:

Public Member Functions

 G4NeutronTrackingCut (G4int ver=0)
 
 G4NeutronTrackingCut (const G4String &name, G4int ver=0)
 
virtual ~G4NeutronTrackingCut ()
 
virtual void ConstructParticle ()
 
virtual void ConstructProcess ()
 
void SetTimeLimit (G4double)
 
void SetKineticEnergyLimit (G4double)
 
- 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
 
G4int GetInstanceID () const
 
virtual void TerminateWorker ()
 
void SetVerboseLevel (G4int value)
 
G4int GetVerboseLevel () const
 

Additional Inherited Members

- Static Public Member Functions inherited from G4VPhysicsConstructor
static const G4VPCManagerGetSubInstanceManager ()
 
- Protected Types inherited from G4VPhysicsConstructor
using PhysicsBuilder_V = G4VPCData::PhysicsBuilders_V
 
- Protected Member Functions inherited from G4VPhysicsConstructor
G4bool RegisterProcess (G4VProcess *process, G4ParticleDefinition *particle)
 
G4ParticleTable::G4PTblDicIteratorGetParticleIterator () const
 
PhysicsBuilder_V GetBuilders () const
 
void AddBuilder (G4PhysicsBuilderInterface *bld)
 
- Protected Attributes inherited from G4VPhysicsConstructor
G4int verboseLevel = 0
 
G4String namePhysics = ""
 
G4int typePhysics = 0
 
G4ParticleTabletheParticleTable = nullptr
 
G4int g4vpcInstanceID = 0
 
- Static Protected Attributes inherited from G4VPhysicsConstructor
static G4RUN_DLL G4VPCManager subInstanceManager
 

Detailed Description

Definition at line 45 of file G4NeutronTrackingCut.hh.

Constructor & Destructor Documentation

◆ G4NeutronTrackingCut() [1/2]

G4NeutronTrackingCut::G4NeutronTrackingCut ( G4int ver = 0)

Definition at line 58 of file G4NeutronTrackingCut.cc.

59 : G4VPhysicsConstructor("neutronTrackingCut"), verbose(ver)
60{
61 timeLimit = 10*CLHEP::microsecond;
62 kineticEnergyLimit = 0.0;
64}
@ bUnknown
G4VPhysicsConstructor(const G4String &="")

◆ G4NeutronTrackingCut() [2/2]

G4NeutronTrackingCut::G4NeutronTrackingCut ( const G4String & name,
G4int ver = 0 )

Definition at line 66 of file G4NeutronTrackingCut.cc.

68{}

◆ ~G4NeutronTrackingCut()

G4NeutronTrackingCut::~G4NeutronTrackingCut ( )
virtual

Definition at line 70 of file G4NeutronTrackingCut.cc.

71{}

Member Function Documentation

◆ ConstructParticle()

void G4NeutronTrackingCut::ConstructParticle ( )
virtual

Implements G4VPhysicsConstructor.

Definition at line 73 of file G4NeutronTrackingCut.cc.

74{
76}
static G4Neutron * NeutronDefinition()
Definition G4Neutron.cc:96

◆ ConstructProcess()

void G4NeutronTrackingCut::ConstructProcess ( )
virtual

Implements G4VPhysicsConstructor.

Definition at line 78 of file G4NeutronTrackingCut.cc.

79{
80 auto particle = G4Neutron::Neutron();
81 auto proc = dynamic_cast<G4NeutronGeneralProcess*>(G4PhysListUtil::FindProcess(particle, fNeutronGeneral));
82 if(nullptr != proc) { return; }
83
84 G4NeutronKiller* pNeutronKiller = new G4NeutronKiller();
85 G4ProcessManager * pmanager = particle->GetProcessManager();
86
87 if(verbose > 0 && G4Threading::IsMasterThread()) {
88 G4String pn = particle->GetParticleName();//Avoid data-race when passing
89 //this string to G4MTcout
90 G4cout << "### Adding tracking cuts for " << pn
91 << " TimeCut(ns)= " << timeLimit/ns
92 << " KinEnergyCut(MeV)= " << kineticEnergyLimit/MeV
93 << G4endl;
94 }
95 pmanager->AddDiscreteProcess(pNeutronKiller);
96 pNeutronKiller->SetKinEnergyLimit(kineticEnergyLimit);
97 pNeutronKiller->SetTimeLimit(timeLimit);
98
101}
@ fNeutronGeneral
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout
void RegisterExtraProcess(G4VProcess *)
void RegisterParticleForExtraProcess(G4VProcess *, const G4ParticleDefinition *)
static G4HadronicProcessStore * Instance()
void SetTimeLimit(G4double)
void SetKinEnergyLimit(G4double)
static G4Neutron * Neutron()
Definition G4Neutron.cc:101
static G4VProcess * FindProcess(const G4ParticleDefinition *, G4int subtype)
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
G4bool IsMasterThread()

◆ SetKineticEnergyLimit()

void G4NeutronTrackingCut::SetKineticEnergyLimit ( G4double val)
inline

Definition at line 77 of file G4NeutronTrackingCut.hh.

78{
79 kineticEnergyLimit = val;
80}

◆ SetTimeLimit()

void G4NeutronTrackingCut::SetTimeLimit ( G4double val)
inline

Definition at line 72 of file G4NeutronTrackingCut.hh.

73{
74 timeLimit = val;
75}

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