CMS 3D CMS Logo

FTFPCMS_BERT_EMM.cc
Go to the documentation of this file.
1 #include "FTFPCMS_BERT_EMM.h"
5 
6 #include "G4DecayPhysics.hh"
7 #include "G4EmExtraPhysics.hh"
8 #include "G4IonPhysics.hh"
9 #include "G4StoppingPhysics.hh"
10 #include "G4HadronElasticPhysics.hh"
11 
12 #include "G4Version.hh"
13 #if G4VERSION_NUMBER >= 1110
14 #include "G4HadronicParameters.hh"
15 #endif
16 
18  int ver = p.getUntrackedParameter<int>("Verbosity", 0);
19  bool emPhys = p.getUntrackedParameter<bool>("EMPhysics", true);
20  bool hadPhys = p.getUntrackedParameter<bool>("HadPhysics", true);
21  double minFTFP = p.getParameter<double>("EminFTFP") * CLHEP::GeV;
22  double maxBERT = p.getParameter<double>("EmaxBERT") * CLHEP::GeV;
23  double maxBERTpi = p.getParameter<double>("EmaxBERTpi") * CLHEP::GeV;
24  edm::LogVerbatim("PhysicsList") << "CMS Physics List FTFP_BERT_EMM: "
25  << "\n Flags for EM Physics: " << emPhys << "; Hadronic Physics: " << hadPhys
26  << "\n Transition energy Bertini/FTFP from " << minFTFP / CLHEP::GeV << " to "
27  << maxBERT / CLHEP::GeV << "; for pions to " << maxBERTpi / CLHEP::GeV << " GeV";
28 
29  if (emPhys) {
30  // EM Physics
31  RegisterPhysics(new CMSEmStandardPhysics(ver, p));
32 
33  // Synchroton Radiation & GN Physics
34  G4EmExtraPhysics* gn = new G4EmExtraPhysics(ver);
35  RegisterPhysics(gn);
36 #if G4VERSION_NUMBER >= 1110
37  bool mu = p.getParameter<bool>("G4MuonPairProductionByMuon");
38  gn->MuonToMuMu(mu);
39  edm::LogVerbatim("PhysicsList") << " Muon pair production by muons: " << mu;
40 #endif
41  }
42 
43  // Decays
44  this->RegisterPhysics(new G4DecayPhysics(ver));
45 
46  if (hadPhys) {
47 #if G4VERSION_NUMBER >= 1110
48  bool ngen = p.getParameter<bool>("G4NeutronGeneralProcess");
49  bool bc = p.getParameter<bool>("G4BCHadronicProcess");
50  bool hn = p.getParameter<bool>("G4LightHyperNucleiTracking");
51  auto param = G4HadronicParameters::Instance();
52  param->SetEnableNeutronGeneralProcess(ngen);
53  param->SetEnableBCParticles(bc);
54  param->SetEnableHyperNuclei(hn);
55  edm::LogVerbatim("PhysicsList") << " Eneble neutron general process: " << ngen
56  << "\n Enable b- and c- hadron physics: " << bc
57  << "\n Enable light hyper-nuclei physics: " << hn;
58 #endif
59 
60  // Hadron Elastic scattering
61  RegisterPhysics(new G4HadronElasticPhysics(ver));
62 
63  // Hadron Physics
64  RegisterPhysics(new CMSHadronPhysicsFTFP_BERT(minFTFP, maxBERT, maxBERTpi, minFTFP, maxBERT));
65 
66  // Stopping Physics
67  RegisterPhysics(new G4StoppingPhysics(ver));
68 
69  // Ion Physics
70  RegisterPhysics(new G4IonPhysics(ver));
71  }
72 }
Log< level::Info, true > LogVerbatim
FTFPCMS_BERT_EMM(const edm::ParameterSet &p)