CMS 3D CMS Logo

CMSFTFPNeutronBuilder.cc
Go to the documentation of this file.
1 #include "SimG4Core/PhysicsLists/interface/CMSFTFPNeutronBuilder.hh"
2 #include "G4ParticleDefinition.hh"
3 #include "G4ParticleTable.hh"
4 #include "G4ProcessManager.hh"
5 #include "G4NeutronInelasticCrossSection.hh"
6 #include "G4SystemOfUnits.hh"
7 
8 CMSFTFPNeutronBuilder::CMSFTFPNeutronBuilder(G4bool quasiElastic) {
9  theMin = 4 * GeV;
10  theMax = 100 * TeV;
11  theModel = new G4TheoFSGenerator("FTFP");
12 
13  theStringModel = new G4FTFModel;
14  theStringDecay = new G4ExcitedStringDecay(new G4LundStringFragmentation);
15  theStringModel->SetFragmentationModel(theStringDecay);
16 
17  theCascade = new G4GeneratorPrecompoundInterface;
18  thePreEquilib = new G4PreCompoundModel(new G4ExcitationHandler);
19  theCascade->SetDeExcitation(thePreEquilib);
20 
21  theModel->SetTransport(theCascade);
22 
23  theModel->SetHighEnergyGenerator(theStringModel);
24  if (quasiElastic) {
25  theQuasiElastic = new G4QuasiElasticChannel;
26  theModel->SetQuasiElasticChannel(theQuasiElastic);
27  } else {
28  theQuasiElastic = nullptr;
29  }
30 
31  theModel->SetMinEnergy(theMin);
32  theModel->SetMaxEnergy(100 * TeV);
33 }
34 
35 CMSFTFPNeutronBuilder::~CMSFTFPNeutronBuilder() {
36  delete theStringDecay;
37  delete theStringModel;
38  delete thePreEquilib;
39  delete theCascade;
40  if (theQuasiElastic)
41  delete theQuasiElastic;
42 }
43 
44 void CMSFTFPNeutronBuilder::Build(G4HadronElasticProcess*) {}
45 
46 void CMSFTFPNeutronBuilder::Build(G4HadronFissionProcess*) {}
47 
48 void CMSFTFPNeutronBuilder::Build(G4HadronCaptureProcess*) {}
49 
50 void CMSFTFPNeutronBuilder::Build(G4NeutronInelasticProcess* aP) {
51  theModel->SetMinEnergy(theMin);
52  theModel->SetMaxEnergy(theMax);
53  aP->RegisterMe(theModel);
54  aP->AddDataSet(new G4NeutronInelasticCrossSection);
55 }
GeV
const double GeV
Definition: MathUtil.h:16