-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added more detailed de-excitation for photo-effect and Compton
- Loading branch information
Showing
4 changed files
with
353 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#ifndef SimG4Core_PhysicsLists_CMSEmStandardPhysicsXS_h | ||
#define SimG4Core_PhysicsLists_CMSEmStandardPhysicsXS_h | ||
|
||
#include "G4VPhysicsConstructor.hh" | ||
#include "globals.hh" | ||
|
||
class CMSEmStandardPhysicsXS : public G4VPhysicsConstructor { | ||
|
||
public: | ||
CMSEmStandardPhysicsXS(G4int ver); | ||
virtual ~CMSEmStandardPhysicsXS(); | ||
|
||
virtual void ConstructParticle(); | ||
virtual void ConstructProcess(); | ||
|
||
private: | ||
G4int verbose; | ||
}; | ||
|
||
#endif | ||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,323 @@ | ||
#include "SimG4Core/PhysicsLists/interface/CMSEmStandardPhysicsXS.h" | ||
|
||
#include "G4ParticleDefinition.hh" | ||
#include "G4LossTableManager.hh" | ||
#include "G4EmProcessOptions.hh" | ||
|
||
#include "G4ComptonScattering.hh" | ||
#include "G4GammaConversion.hh" | ||
#include "G4PhotoElectricEffect.hh" | ||
#include "G4LivermorePhotoElectricModel.hh" | ||
#include "G4KleinNishinaModel.hh" | ||
|
||
#include "G4hMultipleScattering.hh" | ||
#include "G4eMultipleScattering.hh" | ||
#include "G4MuMultipleScattering.hh" | ||
#include "G4CoulombScattering.hh" | ||
#include "G4eCoulombScatteringModel.hh" | ||
#include "G4WentzelVIModel.hh" | ||
#include "G4UrbanMscModel93.hh" | ||
|
||
#include "G4eIonisation.hh" | ||
#include "G4eBremsstrahlung.hh" | ||
#include "G4eplusAnnihilation.hh" | ||
|
||
#include "G4MuIonisation.hh" | ||
#include "G4MuBremsstrahlung.hh" | ||
#include "G4MuPairProduction.hh" | ||
|
||
#include "G4hIonisation.hh" | ||
#include "G4ionIonisation.hh" | ||
#include "G4hBremsstrahlung.hh" | ||
#include "G4hPairProduction.hh" | ||
|
||
#include "G4Gamma.hh" | ||
#include "G4Electron.hh" | ||
#include "G4Positron.hh" | ||
#include "G4MuonPlus.hh" | ||
#include "G4MuonMinus.hh" | ||
#include "G4TauMinus.hh" | ||
#include "G4TauPlus.hh" | ||
#include "G4PionPlus.hh" | ||
#include "G4PionMinus.hh" | ||
#include "G4KaonPlus.hh" | ||
#include "G4KaonMinus.hh" | ||
#include "G4BMesonMinus.hh" | ||
#include "G4BMesonPlus.hh" | ||
#include "G4DMesonMinus.hh" | ||
#include "G4DMesonPlus.hh" | ||
#include "G4Proton.hh" | ||
#include "G4AntiProton.hh" | ||
#include "G4SigmaMinus.hh" | ||
#include "G4AntiSigmaMinus.hh" | ||
#include "G4SigmaPlus.hh" | ||
#include "G4AntiSigmaPlus.hh" | ||
#include "G4XiMinus.hh" | ||
#include "G4AntiXiMinus.hh" | ||
#include "G4OmegaMinus.hh" | ||
#include "G4AntiOmegaMinus.hh" | ||
#include "G4LambdacPlus.hh" | ||
#include "G4AntiLambdacPlus.hh" | ||
#include "G4XicPlus.hh" | ||
#include "G4AntiXicPlus.hh" | ||
#include "G4Deuteron.hh" | ||
#include "G4Triton.hh" | ||
#include "G4He3.hh" | ||
#include "G4Alpha.hh" | ||
#include "G4GenericIon.hh" | ||
|
||
#include "G4PhysicsListHelper.hh" | ||
#include "G4BuilderType.hh" | ||
|
||
#include "G4SystemOfUnits.hh" | ||
|
||
CMSEmStandardPhysicsXS::CMSEmStandardPhysicsXS(G4int ver) : | ||
G4VPhysicsConstructor("CMSEmStandardXS_opt1"), verbose(ver) { | ||
G4LossTableManager::Instance(); | ||
SetPhysicsType(bElectromagnetic); | ||
} | ||
|
||
CMSEmStandardPhysicsXS::~CMSEmStandardPhysicsXS() {} | ||
|
||
void CMSEmStandardPhysicsXS::ConstructParticle() { | ||
// gamma | ||
G4Gamma::Gamma(); | ||
|
||
// leptons | ||
G4Electron::Electron(); | ||
G4Positron::Positron(); | ||
G4MuonPlus::MuonPlus(); | ||
G4MuonMinus::MuonMinus(); | ||
G4TauMinus::TauMinusDefinition(); | ||
G4TauPlus::TauPlusDefinition(); | ||
|
||
// mesons | ||
G4PionPlus::PionPlusDefinition(); | ||
G4PionMinus::PionMinusDefinition(); | ||
G4KaonPlus::KaonPlusDefinition(); | ||
G4KaonMinus::KaonMinusDefinition(); | ||
G4DMesonMinus::DMesonMinusDefinition(); | ||
G4DMesonPlus::DMesonPlusDefinition(); | ||
G4BMesonMinus::BMesonMinusDefinition(); | ||
G4BMesonPlus::BMesonPlusDefinition(); | ||
|
||
// barions | ||
G4Proton::Proton(); | ||
G4AntiProton::AntiProton(); | ||
G4SigmaMinus::SigmaMinusDefinition(); | ||
G4AntiSigmaMinus::AntiSigmaMinusDefinition(); | ||
G4SigmaPlus::SigmaPlusDefinition(); | ||
G4AntiSigmaPlus::AntiSigmaPlusDefinition(); | ||
G4XiMinus::XiMinusDefinition(); | ||
G4AntiXiMinus::AntiXiMinusDefinition(); | ||
G4OmegaMinus::OmegaMinusDefinition(); | ||
G4AntiOmegaMinus::AntiOmegaMinusDefinition(); | ||
G4LambdacPlus::LambdacPlusDefinition(); | ||
G4AntiLambdacPlus::AntiLambdacPlusDefinition(); | ||
G4XicPlus::XicPlusDefinition(); | ||
G4AntiXicPlus::AntiXicPlusDefinition(); | ||
|
||
// ions | ||
G4Deuteron::Deuteron(); | ||
G4Triton::Triton(); | ||
G4He3::He3(); | ||
G4Alpha::Alpha(); | ||
G4GenericIon::GenericIonDefinition(); | ||
} | ||
|
||
void CMSEmStandardPhysicsXS::ConstructProcess() { | ||
|
||
if(verbose > 0) { | ||
G4cout << "### " << GetPhysicsName() << " Construct Processes " << G4endl; | ||
} | ||
|
||
// This EM builder takes default models of Geant4 10 EMV. | ||
// Multiple scattering by Urban for all particles | ||
// except e+e- below 100 MeV for which the Urban93 model is used | ||
|
||
G4PhysicsListHelper* ph = G4PhysicsListHelper::GetPhysicsListHelper(); | ||
|
||
// muon & hadron bremsstrahlung and pair production | ||
G4MuBremsstrahlung* mub = new G4MuBremsstrahlung(); | ||
G4MuPairProduction* mup = new G4MuPairProduction(); | ||
G4hBremsstrahlung* pib = new G4hBremsstrahlung(); | ||
G4hPairProduction* pip = new G4hPairProduction(); | ||
G4hBremsstrahlung* kb = new G4hBremsstrahlung(); | ||
G4hPairProduction* kp = new G4hPairProduction(); | ||
G4hBremsstrahlung* pb = new G4hBremsstrahlung(); | ||
G4hPairProduction* pp = new G4hPairProduction(); | ||
|
||
// muon & hadron multiple scattering | ||
G4MuMultipleScattering* mumsc = new G4MuMultipleScattering(); | ||
mumsc->AddEmModel(0, new G4WentzelVIModel()); | ||
G4MuMultipleScattering* pimsc = new G4MuMultipleScattering(); | ||
pimsc->AddEmModel(0, new G4WentzelVIModel()); | ||
G4MuMultipleScattering* kmsc = new G4MuMultipleScattering(); | ||
kmsc->AddEmModel(0, new G4WentzelVIModel()); | ||
G4MuMultipleScattering* pmsc = new G4MuMultipleScattering(); | ||
pmsc->AddEmModel(0, new G4WentzelVIModel()); | ||
G4hMultipleScattering* hmsc = new G4hMultipleScattering("ionmsc"); | ||
|
||
// high energy limit for e+- scattering models and bremsstrahlung | ||
G4double highEnergyLimit = 100*MeV; | ||
|
||
theParticleIterator->reset(); | ||
while( (*theParticleIterator)() ){ | ||
G4ParticleDefinition* particle = theParticleIterator->value(); | ||
G4String particleName = particle->GetParticleName(); | ||
|
||
if (particleName == "gamma") { | ||
|
||
G4PhotoElectricEffect* photo = new G4PhotoElectricEffect(); | ||
photo->SetEmModel(new G4LivermorePhotoElectricModel(),1); | ||
ph->RegisterProcess(photo, particle); | ||
G4ComptonScattering* compt = new G4ComptonScattering(); | ||
compt->SetEmModel(new G4KleinNishinaModel(), 1); | ||
ph->RegisterProcess(compt, particle); | ||
ph->RegisterProcess(new G4GammaConversion(), particle); | ||
|
||
} else if (particleName == "e-") { | ||
|
||
G4eIonisation* eioni = new G4eIonisation(); | ||
eioni->SetStepFunction(0.8, 1.0*mm); | ||
|
||
G4eMultipleScattering* msc = new G4eMultipleScattering; | ||
msc->SetStepLimitType(fMinimal); | ||
G4UrbanMscModel93* msc1 = new G4UrbanMscModel93(); | ||
G4WentzelVIModel* msc2 = new G4WentzelVIModel(); | ||
msc1->SetHighEnergyLimit(highEnergyLimit); | ||
msc2->SetLowEnergyLimit(highEnergyLimit); | ||
msc->AddEmModel(0, msc1); | ||
msc->AddEmModel(0, msc2); | ||
|
||
G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel(); | ||
G4CoulombScattering* ss = new G4CoulombScattering(); | ||
ss->SetEmModel(ssm, 1); | ||
ss->SetMinKinEnergy(highEnergyLimit); | ||
ssm->SetLowEnergyLimit(highEnergyLimit); | ||
ssm->SetActivationLowEnergyLimit(highEnergyLimit); | ||
|
||
ph->RegisterProcess(msc, particle); | ||
ph->RegisterProcess(eioni, particle); | ||
ph->RegisterProcess(new G4eBremsstrahlung(), particle); | ||
ph->RegisterProcess(ss, particle); | ||
|
||
} else if (particleName == "e+") { | ||
|
||
G4eIonisation* eioni = new G4eIonisation(); | ||
eioni->SetStepFunction(0.8, 1.0*mm); | ||
|
||
G4eMultipleScattering* msc = new G4eMultipleScattering; | ||
msc->SetStepLimitType(fMinimal); | ||
G4UrbanMscModel93* msc1 = new G4UrbanMscModel93(); | ||
G4WentzelVIModel* msc2 = new G4WentzelVIModel(); | ||
msc1->SetHighEnergyLimit(highEnergyLimit); | ||
msc2->SetLowEnergyLimit(highEnergyLimit); | ||
msc->AddEmModel(0, msc1); | ||
msc->AddEmModel(0, msc2); | ||
|
||
G4eCoulombScatteringModel* ssm = new G4eCoulombScatteringModel(); | ||
G4CoulombScattering* ss = new G4CoulombScattering(); | ||
ss->SetEmModel(ssm, 1); | ||
ss->SetMinKinEnergy(highEnergyLimit); | ||
ssm->SetLowEnergyLimit(highEnergyLimit); | ||
ssm->SetActivationLowEnergyLimit(highEnergyLimit); | ||
|
||
ph->RegisterProcess(msc, particle); | ||
ph->RegisterProcess(eioni, particle); | ||
ph->RegisterProcess(new G4eBremsstrahlung(), particle); | ||
ph->RegisterProcess(new G4eplusAnnihilation(), particle); | ||
ph->RegisterProcess(ss, particle); | ||
|
||
} else if (particleName == "mu+" || | ||
particleName == "mu-" ) { | ||
|
||
ph->RegisterProcess(mumsc, particle); | ||
ph->RegisterProcess(new G4MuIonisation(), particle); | ||
ph->RegisterProcess(mub, particle); | ||
ph->RegisterProcess(mup, particle); | ||
ph->RegisterProcess(new G4CoulombScattering(), particle); | ||
|
||
} else if (particleName == "alpha" || | ||
particleName == "He3" ) { | ||
|
||
//ph->RegisterProcess(hmsc, particle); | ||
ph->RegisterProcess(new G4hMultipleScattering(), particle); | ||
ph->RegisterProcess(new G4ionIonisation(), particle); | ||
|
||
} else if (particleName == "GenericIon") { | ||
|
||
ph->RegisterProcess(hmsc, particle); | ||
ph->RegisterProcess(new G4ionIonisation(), particle); | ||
|
||
} else if (particleName == "pi+" || | ||
particleName == "pi-" ) { | ||
|
||
//G4hMultipleScattering* pimsc = new G4hMultipleScattering(); | ||
ph->RegisterProcess(pimsc, particle); | ||
ph->RegisterProcess(new G4hIonisation(), particle); | ||
ph->RegisterProcess(pib, particle); | ||
ph->RegisterProcess(pip, particle); | ||
ph->RegisterProcess(new G4CoulombScattering(), particle); | ||
|
||
} else if (particleName == "kaon+" || | ||
particleName == "kaon-" ) { | ||
|
||
//G4hMultipleScattering* kmsc = new G4hMultipleScattering(); | ||
ph->RegisterProcess(kmsc, particle); | ||
ph->RegisterProcess(new G4hIonisation(), particle); | ||
ph->RegisterProcess(kb, particle); | ||
ph->RegisterProcess(kp, particle); | ||
ph->RegisterProcess(new G4CoulombScattering(), particle); | ||
|
||
// } else if (particleName == "proton" ) { | ||
} else if (particleName == "proton" || | ||
particleName == "anti_proton") { | ||
|
||
//G4hMultipleScattering* pmsc = new G4hMultipleScattering(); | ||
ph->RegisterProcess(pmsc, particle); | ||
ph->RegisterProcess(new G4hIonisation(), particle); | ||
ph->RegisterProcess(pb, particle); | ||
ph->RegisterProcess(pp, particle); | ||
ph->RegisterProcess(new G4CoulombScattering(), particle); | ||
|
||
} else if (particleName == "B+" || | ||
particleName == "B-" || | ||
particleName == "D+" || | ||
particleName == "D-" || | ||
particleName == "Ds+" || | ||
particleName == "Ds-" || | ||
particleName == "anti_He3" || | ||
particleName == "anti_alpha" || | ||
particleName == "anti_deuteron" || | ||
particleName == "anti_lambda_c+" || | ||
particleName == "anti_omega-" || | ||
particleName == "anti_sigma_c+" || | ||
particleName == "anti_sigma_c++" || | ||
particleName == "anti_sigma+" || | ||
particleName == "anti_sigma-" || | ||
particleName == "anti_triton" || | ||
particleName == "anti_xi_c+" || | ||
particleName == "anti_xi-" || | ||
particleName == "deuteron" || | ||
particleName == "lambda_c+" || | ||
particleName == "omega-" || | ||
particleName == "sigma_c+" || | ||
particleName == "sigma_c++" || | ||
particleName == "sigma+" || | ||
particleName == "sigma-" || | ||
particleName == "tau+" || | ||
particleName == "tau-" || | ||
particleName == "triton" || | ||
particleName == "xi_c+" || | ||
particleName == "xi-" ) { | ||
|
||
ph->RegisterProcess(hmsc, particle); | ||
ph->RegisterProcess(new G4hIonisation(), particle); | ||
} | ||
} | ||
G4EmProcessOptions opt; | ||
opt.SetVerbose(verbose); | ||
opt.SetPolarAngleLimit(CLHEP::pi); | ||
opt.SetApplyCuts(true); | ||
} |