CMS 3D CMS Logo

CMSHadronPhysicsFTFP_BERT.cc
Go to the documentation of this file.
1 
3 
4 #include "G4TheoFSGenerator.hh"
5 #include "G4FTFModel.hh"
6 #include "G4ExcitedStringDecay.hh"
7 #include "G4GeneratorPrecompoundInterface.hh"
8 #include "G4CascadeInterface.hh"
9 
10 #include "G4HadronicParameters.hh"
11 #include "G4HadronicProcess.hh"
12 #include "G4HadronInelasticProcess.hh"
13 #include "G4HadProcesses.hh"
14 #include <CLHEP/Units/SystemOfUnits.h>
15 #include "G4Threading.hh"
16 
18  : CMSHadronPhysicsFTFP_BERT(3 * CLHEP::GeV, 6 * CLHEP::GeV, 12 * CLHEP::GeV, 3 * CLHEP::GeV, 6 * CLHEP::GeV) {}
19 
20 CMSHadronPhysicsFTFP_BERT::CMSHadronPhysicsFTFP_BERT(G4double e1, G4double e2, G4double e3, G4double e4, G4double e5)
21  : G4HadronPhysicsFTFP_BERT("hInelastic FTFP_BERT", false) {
22  minFTFP_pion = e1;
23  maxBERT_pion = e3;
24  minFTFP_kaon = e1;
25  maxBERT_kaon = e2;
26  minFTFP_kaon = e4;
27  maxBERT_kaon = e5;
28  minFTFP_proton = e1;
29  maxBERT_proton = e2;
30  minFTFP_neutron = e1;
31  maxBERT_neutron = e2;
32 }
33 
35  if (G4Threading::IsMasterThread()) {
36  DumpBanner();
37  }
38  CreateModels();
39 }
40 
42  G4bool useNGeneral = G4HadronicParameters::Instance()->EnableNeutronGeneralProcess();
43  if (useNGeneral) {
44  auto theFTFP = new G4TheoFSGenerator("FTFP");
45  auto theStringModel = new G4FTFModel();
46  theStringModel->SetFragmentationModel(new G4ExcitedStringDecay());
47  theFTFP->SetHighEnergyGenerator(theStringModel);
48  theFTFP->SetTransport(new G4GeneratorPrecompoundInterface());
49  theFTFP->SetMinEnergy(minFTFP_neutron);
50  theFTFP->SetMaxEnergy(G4HadronicParameters::Instance()->GetMaxEnergy());
51 
52  auto theBERT = new G4CascadeInterface();
53  theBERT->SetMaxEnergy(maxBERT_neutron);
54 
55  G4HadronicProcess* ni = new G4HadronInelasticProcess("neutronInelastic", G4Neutron::Neutron());
56  ni->RegisterMe(theFTFP);
57  ni->RegisterMe(theBERT);
58  G4HadProcesses::BuildNeutronInelasticAndCapture(ni);
59  return;
60  }
61 
62  G4HadronPhysicsFTFP_BERT::Neutron();
63 }