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

#include <G4NeutronBuilder.hh>

+ Inheritance diagram for G4NeutronBuilder:

Public Member Functions

 G4NeutronBuilder (G4bool fissionFlag=false)
 
virtual ~G4NeutronBuilder ()
 
virtual void Build () final override
 
virtual void RegisterMe (G4PhysicsBuilderInterface *aB) final override
 
- Public Member Functions inherited from G4PhysicsBuilderInterface
 G4PhysicsBuilderInterface ()=default
 
virtual ~G4PhysicsBuilderInterface ()=default
 
virtual void SetMinEnergy (G4double)
 
virtual void SetMaxEnergy (G4double)
 

Detailed Description

Definition at line 52 of file G4NeutronBuilder.hh.

Constructor & Destructor Documentation

◆ G4NeutronBuilder()

G4NeutronBuilder::G4NeutronBuilder ( G4bool fissionFlag = false)

Definition at line 45 of file G4NeutronBuilder.cc.

47{
48 theNeutronInelastic = new G4HadronInelasticProcess( "neutronInelastic", G4Neutron::Definition() );
49 theNeutronCapture = new G4NeutronCaptureProcess;
50 if ( fissionFlag ) {
51 theNeutronFission = new G4NeutronFissionProcess;
52 } else {
53 theNeutronFission = nullptr;
54 }
55}
static G4Neutron * Definition()
Definition G4Neutron.cc:50

◆ ~G4NeutronBuilder()

virtual G4NeutronBuilder::~G4NeutronBuilder ( )
inlinevirtual

Definition at line 56 of file G4NeutronBuilder.hh.

56{}

Member Function Documentation

◆ Build()

void G4NeutronBuilder::Build ( )
finaloverridevirtual

Reimplemented from G4PhysicsBuilderInterface.

Definition at line 57 of file G4NeutronBuilder.cc.

59{
60 std::vector<G4VNeutronBuilder *>::iterator i;
61 for(i=theModelCollections.begin(); i!=theModelCollections.end(); i++)
62 {
63 (*i)->Build(theNeutronInelastic);
64 (*i)->Build(theNeutronCapture);
65 if ( theNeutronFission ) (*i)->Build(theNeutronFission);
66 }
68 theProcMan->AddDiscreteProcess(theNeutronInelastic);
69 theProcMan->AddDiscreteProcess(theNeutronCapture);
70 if ( theNeutronFission ) theProcMan->AddDiscreteProcess(theNeutronFission);
71}
static G4Neutron * Neutron()
Definition G4Neutron.cc:101
G4ProcessManager * GetProcessManager() const
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)

◆ RegisterMe()

void G4NeutronBuilder::RegisterMe ( G4PhysicsBuilderInterface * aB)
finaloverridevirtual

Reimplemented from G4PhysicsBuilderInterface.

Definition at line 73 of file G4NeutronBuilder.cc.

73 {
74 auto bld = dynamic_cast<G4VNeutronBuilder*>(aB);
75 if ( bld != nullptr ) {
76 theModelCollections.push_back(bld);
77 } else {
79 }
80}
virtual void RegisterMe(G4PhysicsBuilderInterface *)

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