Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-09-14 22:43:22

0001 
0002 #include "SimG4Core/PhysicsLists/interface/CMSHadronPhysicsFTFP_BERT.h"
0003 
0004 #include "G4TheoFSGenerator.hh"
0005 #include "G4FTFModel.hh"
0006 #include "G4ExcitedStringDecay.hh"
0007 #include "G4GeneratorPrecompoundInterface.hh"
0008 #include "G4CascadeInterface.hh"
0009 
0010 #include "G4HadronicParameters.hh"
0011 #include "G4HadronicProcess.hh"
0012 #include "G4HadronInelasticProcess.hh"
0013 #include "G4HadProcesses.hh"
0014 #include "G4SystemOfUnits.hh"
0015 #include "G4Threading.hh"
0016 
0017 #include "G4Version.hh"
0018 
0019 CMSHadronPhysicsFTFP_BERT::CMSHadronPhysicsFTFP_BERT(G4int)
0020     : CMSHadronPhysicsFTFP_BERT(3 * CLHEP::GeV, 6 * CLHEP::GeV, 12 * CLHEP::GeV, 3 * CLHEP::GeV, 6 * CLHEP::GeV) {}
0021 
0022 CMSHadronPhysicsFTFP_BERT::CMSHadronPhysicsFTFP_BERT(G4double e1, G4double e2, G4double e3, G4double e4, G4double e5)
0023     : G4HadronPhysicsFTFP_BERT("hInelastic FTFP_BERT", false) {
0024   minFTFP_pion = e1;
0025   maxBERT_pion = e3;
0026   minFTFP_kaon = e1;
0027   maxBERT_kaon = e2;
0028   minFTFP_kaon = e4;
0029   maxBERT_kaon = e5;
0030   minFTFP_proton = e1;
0031   maxBERT_proton = e2;
0032   minFTFP_neutron = e1;
0033   maxBERT_neutron = e2;
0034 }
0035 
0036 void CMSHadronPhysicsFTFP_BERT::ConstructProcess() {
0037   if (G4Threading::IsMasterThread()) {
0038     DumpBanner();
0039   }
0040   CreateModels();
0041 }
0042 
0043 void CMSHadronPhysicsFTFP_BERT::Neutron() {
0044 #if G4VERSION_NUMBER >= 1100
0045   G4bool useNGeneral = G4HadronicParameters::Instance()->EnableNeutronGeneralProcess();
0046   if (useNGeneral) {
0047     auto theFTFP = new G4TheoFSGenerator("FTFP");
0048     auto theStringModel = new G4FTFModel();
0049     theStringModel->SetFragmentationModel(new G4ExcitedStringDecay());
0050     theFTFP->SetHighEnergyGenerator(theStringModel);
0051     theFTFP->SetTransport(new G4GeneratorPrecompoundInterface());
0052     theFTFP->SetMinEnergy(minFTFP_neutron);
0053     theFTFP->SetMaxEnergy(G4HadronicParameters::Instance()->GetMaxEnergy());
0054 
0055     auto theBERT = new G4CascadeInterface();
0056     theBERT->SetMaxEnergy(maxBERT_neutron);
0057 
0058     G4HadronicProcess* ni = new G4HadronInelasticProcess("neutronInelastic", G4Neutron::Neutron());
0059     ni->RegisterMe(theFTFP);
0060     ni->RegisterMe(theBERT);
0061     G4HadProcesses::BuildNeutronInelasticAndCapture(ni);
0062     return;
0063   }
0064 #endif
0065 
0066   G4HadronPhysicsFTFP_BERT::Neutron();
0067 }