Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:30:28

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 CMSHadronPhysicsFTFP_BERT::CMSHadronPhysicsFTFP_BERT(G4int)
0018     : CMSHadronPhysicsFTFP_BERT(3 * CLHEP::GeV, 6 * CLHEP::GeV, 12 * CLHEP::GeV, 3 * CLHEP::GeV, 6 * CLHEP::GeV) {}
0019 
0020 CMSHadronPhysicsFTFP_BERT::CMSHadronPhysicsFTFP_BERT(G4double e1, G4double e2, G4double e3, G4double e4, G4double e5)
0021     : G4HadronPhysicsFTFP_BERT("hInelastic FTFP_BERT", false) {
0022   minFTFP_pion = e1;
0023   maxBERT_pion = e3;
0024   minFTFP_kaon = e1;
0025   maxBERT_kaon = e2;
0026   minFTFP_kaon = e4;
0027   maxBERT_kaon = e5;
0028   minFTFP_proton = e1;
0029   maxBERT_proton = e2;
0030   minFTFP_neutron = e1;
0031   maxBERT_neutron = e2;
0032 }
0033 
0034 void CMSHadronPhysicsFTFP_BERT::ConstructProcess() {
0035   if (G4Threading::IsMasterThread()) {
0036     DumpBanner();
0037   }
0038   CreateModels();
0039 }
0040 
0041 void CMSHadronPhysicsFTFP_BERT::Neutron() {
0042   G4bool useNGeneral = G4HadronicParameters::Instance()->EnableNeutronGeneralProcess();
0043   if (useNGeneral) {
0044     auto theFTFP = new G4TheoFSGenerator("FTFP");
0045     auto theStringModel = new G4FTFModel();
0046     theStringModel->SetFragmentationModel(new G4ExcitedStringDecay());
0047     theFTFP->SetHighEnergyGenerator(theStringModel);
0048     theFTFP->SetTransport(new G4GeneratorPrecompoundInterface());
0049     theFTFP->SetMinEnergy(minFTFP_neutron);
0050     theFTFP->SetMaxEnergy(G4HadronicParameters::Instance()->GetMaxEnergy());
0051 
0052     auto theBERT = new G4CascadeInterface();
0053     theBERT->SetMaxEnergy(maxBERT_neutron);
0054 
0055     G4HadronicProcess* ni = new G4HadronInelasticProcess("neutronInelastic", G4Neutron::Neutron());
0056     ni->RegisterMe(theFTFP);
0057     ni->RegisterMe(theBERT);
0058     G4HadProcesses::BuildNeutronInelasticAndCapture(ni);
0059     return;
0060   }
0061 
0062   G4HadronPhysicsFTFP_BERT::Neutron();
0063 }