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 "G4SystemOfUnits.hh"
15 #include "G4Threading.hh"
16 
17 #include "G4Version.hh"
18 
20  : CMSHadronPhysicsFTFP_BERT(3 * CLHEP::GeV, 6 * CLHEP::GeV, 12 * CLHEP::GeV, 3 * CLHEP::GeV, 6 * CLHEP::GeV) {}
21 
22 CMSHadronPhysicsFTFP_BERT::CMSHadronPhysicsFTFP_BERT(G4double e1, G4double e2, G4double e3, G4double e4, G4double e5)
23  : G4HadronPhysicsFTFP_BERT("hInelastic FTFP_BERT", false) {
24  minFTFP_pion = e1;
25  maxBERT_pion = e3;
26  minFTFP_kaon = e1;
27  maxBERT_kaon = e2;
28  minFTFP_kaon = e4;
29  maxBERT_kaon = e5;
30  minFTFP_proton = e1;
31  maxBERT_proton = e2;
32  minFTFP_neutron = e1;
33  maxBERT_neutron = e2;
34 }
35 
37  if (G4Threading::IsMasterThread()) {
38  DumpBanner();
39  }
40  CreateModels();
41 }
42 
44 #if G4VERSION_NUMBER >= 1100
45  G4bool useNGeneral = G4HadronicParameters::Instance()->EnableNeutronGeneralProcess();
46  if (useNGeneral) {
47  auto theFTFP = new G4TheoFSGenerator("FTFP");
48  auto theStringModel = new G4FTFModel();
49  theStringModel->SetFragmentationModel(new G4ExcitedStringDecay());
50  theFTFP->SetHighEnergyGenerator(theStringModel);
51  theFTFP->SetTransport(new G4GeneratorPrecompoundInterface());
52  theFTFP->SetMinEnergy(minFTFP_neutron);
53  theFTFP->SetMaxEnergy(G4HadronicParameters::Instance()->GetMaxEnergy());
54 
55  auto theBERT = new G4CascadeInterface();
56  theBERT->SetMaxEnergy(maxBERT_neutron);
57 
58  G4HadronicProcess* ni = new G4HadronInelasticProcess("neutronInelastic", G4Neutron::Neutron());
59  ni->RegisterMe(theFTFP);
60  ni->RegisterMe(theBERT);
61  G4HadProcesses::BuildNeutronInelasticAndCapture(ni);
62  return;
63  }
64 #endif
65 
66  G4HadronPhysicsFTFP_BERT::Neutron();
67 }