CMS 3D CMS Logo

CMSEmNoDeltaRay.cc
Go to the documentation of this file.
3 
5 
6 #include "G4EmParameters.hh"
7 #include "G4ParticleTable.hh"
8 
9 #include "G4ParticleDefinition.hh"
10 #include "G4ProcessManager.hh"
11 #include "G4LossTableManager.hh"
12 #include "G4RegionStore.hh"
13 
14 #include "G4ComptonScattering.hh"
15 #include "G4GammaConversion.hh"
16 #include "G4PhotoElectricEffect.hh"
17 #include "G4UrbanMscModel.hh"
18 
19 #include "G4hMultipleScattering.hh"
20 #include "G4eMultipleScattering.hh"
21 #include "G4MscStepLimitType.hh"
22 
23 #include "G4hhIonisation.hh"
24 
25 #include "G4eBremsstrahlung.hh"
26 #include "G4eplusAnnihilation.hh"
27 
28 #include "G4MuBremsstrahlung.hh"
29 #include "G4MuPairProduction.hh"
30 
31 #include "G4hBremsstrahlung.hh"
32 #include "G4hPairProduction.hh"
33 
34 #include "G4Gamma.hh"
35 #include "G4Electron.hh"
36 #include "G4Positron.hh"
37 #include "G4MuonPlus.hh"
38 #include "G4MuonMinus.hh"
39 #include "G4TauMinus.hh"
40 #include "G4TauPlus.hh"
41 #include "G4PionPlus.hh"
42 #include "G4PionMinus.hh"
43 #include "G4KaonPlus.hh"
44 #include "G4KaonMinus.hh"
45 #include "G4BMesonMinus.hh"
46 #include "G4BMesonPlus.hh"
47 #include "G4DMesonMinus.hh"
48 #include "G4DMesonPlus.hh"
49 #include "G4Proton.hh"
50 #include "G4AntiProton.hh"
51 #include "G4SigmaMinus.hh"
52 #include "G4AntiSigmaMinus.hh"
53 #include "G4SigmaPlus.hh"
54 #include "G4AntiSigmaPlus.hh"
55 #include "G4XiMinus.hh"
56 #include "G4AntiXiMinus.hh"
57 #include "G4OmegaMinus.hh"
58 #include "G4AntiOmegaMinus.hh"
59 #include "G4LambdacPlus.hh"
60 #include "G4AntiLambdacPlus.hh"
61 #include "G4XicPlus.hh"
62 #include "G4AntiXicPlus.hh"
63 #include "G4Deuteron.hh"
64 #include "G4Triton.hh"
65 #include "G4He3.hh"
66 #include "G4Alpha.hh"
67 #include "G4GenericIon.hh"
68 
69 #include "G4BuilderType.hh"
70 #include "G4SystemOfUnits.hh"
71 
72 CMSEmNoDeltaRay::CMSEmNoDeltaRay(const G4String& name, G4int ver, const std::string& reg)
73  : G4VPhysicsConstructor(name), verbose(ver), region(reg) {
74  G4EmParameters* param = G4EmParameters::Instance();
75  param->SetDefaults();
76  param->SetVerbose(verbose);
77  param->SetApplyCuts(true);
78  param->SetMscRangeFactor(0.2);
79  param->SetMscStepLimitType(fMinimal);
80  SetPhysicsType(bElectromagnetic);
81 }
82 
84 
86  // gamma
87  G4Gamma::Gamma();
88 
89  // leptons
91  G4Positron::Positron();
92  G4MuonPlus::MuonPlus();
93  G4MuonMinus::MuonMinus();
94  G4TauMinus::TauMinusDefinition();
95  G4TauPlus::TauPlusDefinition();
96 
97  // mesons
98  G4PionPlus::PionPlusDefinition();
99  G4PionMinus::PionMinusDefinition();
100  G4KaonPlus::KaonPlusDefinition();
101  G4KaonMinus::KaonMinusDefinition();
102  G4DMesonMinus::DMesonMinusDefinition();
103  G4DMesonPlus::DMesonPlusDefinition();
104  G4BMesonMinus::BMesonMinusDefinition();
105  G4BMesonPlus::BMesonPlusDefinition();
106 
107  // barions
108  G4Proton::Proton();
109  G4AntiProton::AntiProton();
110  G4SigmaMinus::SigmaMinusDefinition();
111  G4AntiSigmaMinus::AntiSigmaMinusDefinition();
112  G4SigmaPlus::SigmaPlusDefinition();
113  G4AntiSigmaPlus::AntiSigmaPlusDefinition();
114  G4XiMinus::XiMinusDefinition();
115  G4AntiXiMinus::AntiXiMinusDefinition();
116  G4OmegaMinus::OmegaMinusDefinition();
117  G4AntiOmegaMinus::AntiOmegaMinusDefinition();
118  G4LambdacPlus::LambdacPlusDefinition();
119  G4AntiLambdacPlus::AntiLambdacPlusDefinition();
120  G4XicPlus::XicPlusDefinition();
121  G4AntiXicPlus::AntiXicPlusDefinition();
122 
123  // ions
124  G4Deuteron::Deuteron();
125  G4Triton::Triton();
126  G4He3::He3();
127  G4Alpha::Alpha();
128  G4GenericIon::GenericIonDefinition();
129 }
130 
132  // Add standard EM Processes
133  G4Region* reg = nullptr;
134  if (region != " ") {
135  G4RegionStore* regStore = G4RegionStore::GetInstance();
136  reg = regStore->GetRegion(region, false);
137  }
138 
139  G4ParticleTable* table = G4ParticleTable::GetParticleTable();
140  EmParticleList emList;
141  for (const auto& particleName : emList.PartNames()) {
142  G4ParticleDefinition* particle = table->FindParticle(particleName);
143  G4ProcessManager* pmanager = particle->GetProcessManager();
144  if (verbose > 1)
145  edm::LogVerbatim("PhysicsList") << "### " << GetPhysicsName() << " instantiates for " << particleName;
146 
147  if (particleName == "gamma") {
148  pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
149  pmanager->AddDiscreteProcess(new G4ComptonScattering);
150  pmanager->AddDiscreteProcess(new G4GammaConversion);
151 
152  } else if (particleName == "e-") {
153  G4eMultipleScattering* msc = new G4eMultipleScattering;
154  msc->SetStepLimitType(fMinimal);
155  if (reg != nullptr) {
156  G4UrbanMscModel* msc_el = new G4UrbanMscModel();
157  msc_el->SetRangeFactor(0.04);
158  msc->AddEmModel(0, msc_el, reg);
159  }
160  pmanager->AddProcess(msc, -1, 1, -1);
161  pmanager->AddProcess(new G4hhIonisation, -1, 2, 1);
162  pmanager->AddProcess(new G4eBremsstrahlung, -1, -3, 2);
163 
164  } else if (particleName == "e+") {
165  G4eMultipleScattering* msc = new G4eMultipleScattering;
166  msc->SetStepLimitType(fMinimal);
167  if (reg != nullptr) {
168  G4UrbanMscModel* msc_pos = new G4UrbanMscModel();
169  msc_pos->SetRangeFactor(0.04);
170  msc->AddEmModel(0, msc_pos, reg);
171  }
172  pmanager->AddProcess(msc, -1, 1, -1);
173  pmanager->AddProcess(new G4hhIonisation, -1, 2, -1);
174  pmanager->AddProcess(new G4eBremsstrahlung, -1, -3, 1);
175  pmanager->AddProcess(new G4eplusAnnihilation, 0, -1, 2);
176 
177  } else if (particleName == "mu+" || particleName == "mu-") {
178  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, -1);
179  pmanager->AddProcess(new G4hhIonisation, -1, 2, -1);
180  pmanager->AddProcess(new G4MuBremsstrahlung, -1, -3, 1);
181  pmanager->AddProcess(new G4MuPairProduction, -1, -4, 2);
182 
183  } else if (particleName == "alpha" || particleName == "He3" || particleName == "GenericIon") {
184  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, -1);
185  pmanager->AddProcess(new G4hhIonisation, -1, 2, -1);
186 
187  } else if (particleName == "pi+" || particleName == "kaon+" || particleName == "kaon-" ||
188  particleName == "proton" || particleName == "pi-") {
189  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, -1);
190  pmanager->AddProcess(new G4hhIonisation, -1, 2, -1);
191  pmanager->AddProcess(new G4hBremsstrahlung(), -1, -3, 1);
192  pmanager->AddProcess(new G4hPairProduction(), -1, -4, 2);
193 
194  } else if (particle->GetPDGCharge() != 0.0) {
195  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, -1);
196  pmanager->AddProcess(new G4hhIonisation, -1, 2, -1);
197  }
198  }
199 }
EmParticleList.h
VtxSmearedParameters_cfi.Alpha
Alpha
Definition: VtxSmearedParameters_cfi.py:115
MessageLogger.h
CMSEmNoDeltaRay::~CMSEmNoDeltaRay
~CMSEmNoDeltaRay() override
Definition: CMSEmNoDeltaRay.cc:83
CMSEmNoDeltaRay.h
HiggsValidation_cfi.particleName
particleName
Definition: HiggsValidation_cfi.py:7
verbose
static constexpr int verbose
Definition: HLTExoticaSubAnalysis.cc:25
CMSEmNoDeltaRay::verbose
G4int verbose
Definition: CMSEmNoDeltaRay.h:17
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CMSEmNoDeltaRay::region
std::string region
Definition: CMSEmNoDeltaRay.h:18
CMSEmNoDeltaRay::ConstructParticle
void ConstructParticle() override
Definition: CMSEmNoDeltaRay.cc:85
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88271
nanoDQM_cff.Electron
Electron
Definition: nanoDQM_cff.py:62
EmParticleList
Definition: EmParticleList.h:10
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
CMSEmNoDeltaRay::ConstructProcess
void ConstructProcess() override
Definition: CMSEmNoDeltaRay.cc:131
EmParticleList::PartNames
const std::vector< G4String > & PartNames() const
Definition: EmParticleList.cc:52
TableParser.table
table
Definition: TableParser.py:111
CMSEmNoDeltaRay::CMSEmNoDeltaRay
CMSEmNoDeltaRay(const G4String &name, G4int ver, const std::string &reg)
Definition: CMSEmNoDeltaRay.cc:72