CMS 3D CMS Logo

CMSEmStandardPhysicsEMMT.cc
Go to the documentation of this file.
4 
5 #include <CLHEP/Units/SystemOfUnits.h>
6 #include "G4ParticleDefinition.hh"
7 #include "G4EmParameters.hh"
8 #include "G4EmBuilder.hh"
9 
10 #include "G4hMultipleScattering.hh"
11 #include "G4ionIonisation.hh"
12 
13 #include "G4ParticleTable.hh"
14 #include "G4Gamma.hh"
15 #include "G4Electron.hh"
16 #include "G4Positron.hh"
17 #include "G4GenericIon.hh"
18 
19 #include "G4MuonNuclearProcess.hh"
20 #include "G4MuonVDNuclearModel.hh"
21 #include "G4MuonPlus.hh"
22 #include "G4MuonMinus.hh"
23 
24 #include "G4PhysicsListHelper.hh"
25 #include "G4BuilderType.hh"
26 
28  : G4VPhysicsConstructor("CMSEmStandard_emmt"), fParameterSet(p) {
29  SetVerboseLevel(ver);
30  G4EmParameters* param = G4EmParameters::Instance();
31  param->SetDefaults();
32  param->SetVerbose(ver);
33  param->SetApplyCuts(true);
34  param->SetStepFunction(0.8, 1 * CLHEP::mm);
35  param->SetMscRangeFactor(0.2);
36  param->SetMscStepLimitType(fMinimal);
37  param->SetFluo(false);
38  SetPhysicsType(bElectromagnetic);
39  double tcut = p.getParameter<double>("G4TrackingCut") * CLHEP::MeV;
40  param->SetLowestElectronEnergy(tcut);
41  param->SetLowestMuHadEnergy(tcut);
42 }
43 
45 
47  // minimal set of particles for EM physics
48  G4EmBuilder::ConstructMinimalEmSet();
49 }
50 
52  if (verboseLevel > 0) {
53  edm::LogVerbatim("PhysicsList") << "### " << GetPhysicsName() << " Construct EM Processes";
54  }
55 
56  G4EmBuilder::PrepareEMPhysics();
57 
58  G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
59  // processes used by several particles
60  G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc");
61  G4NuclearStopping* pnuc(nullptr);
62 
63  // register specialized tracking for e-/e+ and gammas
64  auto* trackingManager = new CMSEmStandardPhysicsTrackingManager(fParameterSet);
65  G4Electron::Electron()->SetTrackingManager(trackingManager);
66  G4Positron::Positron()->SetTrackingManager(trackingManager);
67  G4Gamma::Gamma()->SetTrackingManager(trackingManager);
68 
69  // generic ion
70  G4ParticleDefinition* particle = G4GenericIon::GenericIon();
71  G4ionIonisation* ionIoni = new G4ionIonisation();
72  ph->RegisterProcess(hmsc, particle);
73  ph->RegisterProcess(ionIoni, particle);
74 
75  // muons, hadrons ions
76  G4EmBuilder::ConstructCharged(hmsc, pnuc);
77 
78  // add muon-nuclear processes (normally done by G4EmExtraPhysics)
79  G4MuonNuclearProcess* muNucProcess = new G4MuonNuclearProcess();
80  G4MuonVDNuclearModel* muNucModel = new G4MuonVDNuclearModel();
81  muNucProcess->RegisterMe(muNucModel);
82  ph->RegisterProcess(muNucProcess, G4MuonPlus::MuonPlus());
83  ph->RegisterProcess(muNucProcess, G4MuonMinus::MuonMinus());
84 }
Log< level::Info, true > LogVerbatim
CMSEmStandardPhysicsEMMT(G4int ver, const edm::ParameterSet &p)
const edm::ParameterSet & fParameterSet