CMS 3D CMS Logo

FTFPCMS_BERT_EMY.cc
Go to the documentation of this file.
1 #include "FTFPCMS_BERT_EMY.h"
4 
5 #include "G4EmStandardPhysics_option3.hh"
6 #include "G4DecayPhysics.hh"
7 #include "G4EmExtraPhysics.hh"
8 #include "G4IonPhysics.hh"
9 #include "G4StoppingPhysics.hh"
10 #include "G4HadronElasticPhysics.hh"
11 #include "G4NeutronTrackingCut.hh"
12 #include "G4HadronicProcessStore.hh"
13 #include "G4EmParameters.hh"
14 
16  int ver = p.getUntrackedParameter<int>("Verbosity", 0);
17  bool emPhys = p.getUntrackedParameter<bool>("EMPhysics", true);
18  bool hadPhys = p.getUntrackedParameter<bool>("HadPhysics", true);
19  bool tracking = p.getParameter<bool>("TrackingCut");
20  double timeLimit = p.getParameter<double>("MaxTrackTime") * CLHEP::ns;
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") << "You are using the simulation engine: FTFP_BERT_EMY \n Flags for EM Physics "
25  << emPhys << ", for Hadronic Physics " << hadPhys << " and tracking cut " << tracking
26  << " t(ns)= " << timeLimit / CLHEP::ns << "\n transition energy Bertini/FTFP from "
27  << minFTFP / CLHEP::GeV << " to " << maxBERT / CLHEP::GeV << ":"
28  << maxBERTpi / CLHEP::GeV << " GeV";
29 
30  if (emPhys) {
31  // EM Physics
32  RegisterPhysics(new G4EmStandardPhysics_option3(ver));
33  G4EmParameters::Instance()->SetMscStepLimitType(fUseSafetyPlus);
34 
35  // Synchroton Radiation & GN Physics
36  G4EmExtraPhysics* gn = new G4EmExtraPhysics(ver);
37  RegisterPhysics(gn);
38  }
39 
40  // Decays
41  this->RegisterPhysics(new G4DecayPhysics(ver));
42 
43  if (hadPhys) {
44  G4HadronicProcessStore::Instance()->SetVerbose(ver);
45 
46  // Hadron Elastic scattering
47  RegisterPhysics(new G4HadronElasticPhysics(ver));
48 
49  // Hadron Physics
50  RegisterPhysics(new CMSHadronPhysicsFTFP_BERT(minFTFP, maxBERT, maxBERTpi));
51 
52  // Stopping Physics
53  RegisterPhysics(new G4StoppingPhysics(ver));
54 
55  // Ion Physics
56  RegisterPhysics(new G4IonPhysics(ver));
57 
58  // Neutron tracking cut
59  if (tracking) {
60  G4NeutronTrackingCut* ncut = new G4NeutronTrackingCut(ver);
61  ncut->SetTimeLimit(timeLimit);
62  RegisterPhysics(ncut);
63  }
64  }
65 }
MessageLogger.h
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
CMSHadronPhysicsFTFP_BERT.h
FTFPCMS_BERT_EMY::FTFPCMS_BERT_EMY
FTFPCMS_BERT_EMY(const edm::ParameterSet &p)
Definition: FTFPCMS_BERT_EMY.cc:15
tracking
Definition: TempMeasurements.h:8
PhysicsList
Definition: PhysicsList.h:7
edm::ParameterSet
Definition: ParameterSet.h:47
GeV
const double GeV
Definition: MathUtil.h:16
CMSHadronPhysicsFTFP_BERT
Definition: CMSHadronPhysicsFTFP_BERT.h:19
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
FTFPCMS_BERT_EMY.h