CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
G4RPGNeutronBuilder.cc
Go to the documentation of this file.
1 #include "SimG4Core/PhysicsLists/interface/G4RPGNeutronBuilder.hh"
2 #include "G4ParticleDefinition.hh"
3 #include "G4ParticleTable.hh"
4 #include "G4ProcessManager.hh"
5 
6 G4RPGNeutronBuilder::G4RPGNeutronBuilder() : theRPGNeutronModel(0),
7  theNeutronFissionModel(0),
8  theNeutronCaptureModel(0) {
9  theMin = 0;
10  theIMin = theMin;
11  theMax = 20*TeV;
12  theIMax = 55*GeV;
13 }
14 
15 G4RPGNeutronBuilder::~G4RPGNeutronBuilder() {
16  if (theNeutronFissionModel) delete theNeutronFissionModel;
17  if (theNeutronCaptureModel) delete theNeutronCaptureModel;
18  if (theRPGNeutronModel) delete theRPGNeutronModel;
19 }
20 
21 void G4RPGNeutronBuilder::Build(G4HadronElasticProcess *) {
22  G4cout << "Info - G4RPGNeutronBuilder::Build() not adding elastic" << G4endl;
23 }
24 
25 void G4RPGNeutronBuilder::Build(G4HadronFissionProcess * aP) {
26  theNeutronFissionModel = new G4LFission();
27  theNeutronFissionModel->SetMinEnergy(theMin);
28  theNeutronFissionModel->SetMaxEnergy(theMax);
29  aP->RegisterMe(theNeutronFissionModel);
30 }
31 
32 void G4RPGNeutronBuilder::Build(G4HadronCaptureProcess * aP) {
33  theNeutronCaptureModel = new G4LCapture();
34  theNeutronCaptureModel->SetMinEnergy(theMin);
35  theNeutronCaptureModel->SetMaxEnergy(theMax);
36  aP->RegisterMe(theNeutronCaptureModel);
37 }
38 
39 void G4RPGNeutronBuilder::Build(G4NeutronInelasticProcess * aP) {
40  if ( theIMax > 1.*eV ) {
41  theRPGNeutronModel = new G4RPGNeutronInelastic();
42  theRPGNeutronModel->SetMinEnergy(theIMin);
43  theRPGNeutronModel->SetMaxEnergy(theIMax);
44  aP->RegisterMe(theRPGNeutronModel);
45  }
46 }