Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-08-23 02:49:37

0001 #include "G4Version.hh"
0002 #if G4VERSION_NUMBER >= 1100
0003 
0004 #include "SimG4Core/PhysicsLists/interface/CMSEmStandardPhysicsEMMT.h"
0005 #include "SimG4Core/PhysicsLists/interface/CMSEmStandardPhysicsTrackingManager.h"
0006 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0007 
0008 #include "G4SystemOfUnits.hh"
0009 #include "G4ParticleDefinition.hh"
0010 #include "G4EmParameters.hh"
0011 #include "G4EmBuilder.hh"
0012 
0013 #include "G4hMultipleScattering.hh"
0014 #include "G4ionIonisation.hh"
0015 
0016 #include "G4ParticleTable.hh"
0017 #include "G4Gamma.hh"
0018 #include "G4Electron.hh"
0019 #include "G4Positron.hh"
0020 #include "G4GenericIon.hh"
0021 
0022 #include "G4MuonNuclearProcess.hh"
0023 #include "G4MuonVDNuclearModel.hh"
0024 #include "G4MuonPlus.hh"
0025 #include "G4MuonMinus.hh"
0026 
0027 #include "G4PhysicsListHelper.hh"
0028 #include "G4BuilderType.hh"
0029 
0030 CMSEmStandardPhysicsEMMT::CMSEmStandardPhysicsEMMT(G4int ver, const edm::ParameterSet& p)
0031     : G4VPhysicsConstructor("CMSEmStandard_emmt"), fParameterSet(p) {
0032   SetVerboseLevel(ver);
0033   G4EmParameters* param = G4EmParameters::Instance();
0034   param->SetDefaults();
0035   param->SetVerbose(ver);
0036   param->SetApplyCuts(true);
0037   param->SetStepFunction(0.8, 1 * CLHEP::mm);
0038   param->SetMscRangeFactor(0.2);
0039   param->SetMscStepLimitType(fMinimal);
0040   param->SetFluo(false);
0041   SetPhysicsType(bElectromagnetic);
0042   double tcut = p.getParameter<double>("G4TrackingCut") * CLHEP::MeV;
0043   param->SetLowestElectronEnergy(tcut);
0044   param->SetLowestMuHadEnergy(tcut);
0045 }
0046 
0047 CMSEmStandardPhysicsEMMT::~CMSEmStandardPhysicsEMMT() {}
0048 
0049 void CMSEmStandardPhysicsEMMT::ConstructParticle() {
0050   // minimal set of particles for EM physics
0051   G4EmBuilder::ConstructMinimalEmSet();
0052 }
0053 
0054 void CMSEmStandardPhysicsEMMT::ConstructProcess() {
0055   if (verboseLevel > 0) {
0056     edm::LogVerbatim("PhysicsList") << "### " << GetPhysicsName() << " Construct EM Processes";
0057   }
0058 
0059   G4EmBuilder::PrepareEMPhysics();
0060 
0061   G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper();
0062   // processes used by several particles
0063   G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc");
0064   G4NuclearStopping* pnuc(nullptr);
0065 
0066   // register specialized tracking for e-/e+ and gammas
0067   auto* trackingManager = new CMSEmStandardPhysicsTrackingManager(fParameterSet);
0068   G4Electron::Electron()->SetTrackingManager(trackingManager);
0069   G4Positron::Positron()->SetTrackingManager(trackingManager);
0070   G4Gamma::Gamma()->SetTrackingManager(trackingManager);
0071 
0072   // generic ion
0073   G4ParticleDefinition* particle = G4GenericIon::GenericIon();
0074   G4ionIonisation* ionIoni = new G4ionIonisation();
0075   ph->RegisterProcess(hmsc, particle);
0076   ph->RegisterProcess(ionIoni, particle);
0077 
0078   // muons, hadrons ions
0079   G4EmBuilder::ConstructCharged(hmsc, pnuc);
0080 
0081   // add muon-nuclear processes (normally done by G4EmExtraPhysics)
0082   G4MuonNuclearProcess* muNucProcess = new G4MuonNuclearProcess();
0083   G4MuonVDNuclearModel* muNucModel = new G4MuonVDNuclearModel();
0084   muNucProcess->RegisterMe(muNucModel);
0085   ph->RegisterProcess(muNucProcess, G4MuonPlus::MuonPlus());
0086   ph->RegisterProcess(muNucProcess, G4MuonMinus::MuonMinus());
0087 }
0088 
0089 #endif