CMS 3D CMS Logo

CMSEmNoDeltaRay.cc
Go to the documentation of this file.
3 #include "G4EmParameters.hh"
4 #include "G4ParticleTable.hh"
5 
6 #include "G4ParticleDefinition.hh"
7 #include "G4ProcessManager.hh"
8 #include "G4LossTableManager.hh"
9 #include "G4RegionStore.hh"
10 
11 #include "G4ComptonScattering.hh"
12 #include "G4GammaConversion.hh"
13 #include "G4PhotoElectricEffect.hh"
14 #include "G4UrbanMscModel.hh"
15 
16 #include "G4hMultipleScattering.hh"
17 #include "G4eMultipleScattering.hh"
18 #include "G4MscStepLimitType.hh"
19 
20 #include "G4hhIonisation.hh"
21 
22 #include "G4eBremsstrahlung.hh"
23 #include "G4eplusAnnihilation.hh"
24 
25 #include "G4MuBremsstrahlung.hh"
26 #include "G4MuPairProduction.hh"
27 
28 #include "G4hBremsstrahlung.hh"
29 #include "G4hPairProduction.hh"
30 
31 #include "G4Gamma.hh"
32 #include "G4Electron.hh"
33 #include "G4Positron.hh"
34 #include "G4MuonPlus.hh"
35 #include "G4MuonMinus.hh"
36 #include "G4TauMinus.hh"
37 #include "G4TauPlus.hh"
38 #include "G4PionPlus.hh"
39 #include "G4PionMinus.hh"
40 #include "G4KaonPlus.hh"
41 #include "G4KaonMinus.hh"
42 #include "G4BMesonMinus.hh"
43 #include "G4BMesonPlus.hh"
44 #include "G4DMesonMinus.hh"
45 #include "G4DMesonPlus.hh"
46 #include "G4Proton.hh"
47 #include "G4AntiProton.hh"
48 #include "G4SigmaMinus.hh"
49 #include "G4AntiSigmaMinus.hh"
50 #include "G4SigmaPlus.hh"
51 #include "G4AntiSigmaPlus.hh"
52 #include "G4XiMinus.hh"
53 #include "G4AntiXiMinus.hh"
54 #include "G4OmegaMinus.hh"
55 #include "G4AntiOmegaMinus.hh"
56 #include "G4LambdacPlus.hh"
57 #include "G4AntiLambdacPlus.hh"
58 #include "G4XicPlus.hh"
59 #include "G4AntiXicPlus.hh"
60 #include "G4Deuteron.hh"
61 #include "G4Triton.hh"
62 #include "G4He3.hh"
63 #include "G4Alpha.hh"
64 #include "G4GenericIon.hh"
65 
66 #include "G4BuilderType.hh"
67 #include "G4SystemOfUnits.hh"
68 
69 CMSEmNoDeltaRay::CMSEmNoDeltaRay(const G4String& name, G4int ver, std::string reg):
70  G4VPhysicsConstructor(name), verbose(ver), region(reg) {
71  G4EmParameters* param = G4EmParameters::Instance();
72  param->SetDefaults();
73  param->SetVerbose(verbose);
74  param->SetApplyCuts(true);
75  param->SetMscRangeFactor(0.2);
76  param->SetMscStepLimitType(fMinimal);
77  SetPhysicsType(bElectromagnetic);
78 }
79 
81 
83  // gamma
85 
86  // leptons
88  G4Positron::Positron();
89  G4MuonPlus::MuonPlus();
90  G4MuonMinus::MuonMinus();
91  G4TauMinus::TauMinusDefinition();
92  G4TauPlus::TauPlusDefinition();
93 
94  // mesons
95  G4PionPlus::PionPlusDefinition();
96  G4PionMinus::PionMinusDefinition();
97  G4KaonPlus::KaonPlusDefinition();
98  G4KaonMinus::KaonMinusDefinition();
99  G4DMesonMinus::DMesonMinusDefinition();
100  G4DMesonPlus::DMesonPlusDefinition();
101  G4BMesonMinus::BMesonMinusDefinition();
102  G4BMesonPlus::BMesonPlusDefinition();
103 
104  // barions
105  G4Proton::Proton();
106  G4AntiProton::AntiProton();
107  G4SigmaMinus::SigmaMinusDefinition();
108  G4AntiSigmaMinus::AntiSigmaMinusDefinition();
109  G4SigmaPlus::SigmaPlusDefinition();
110  G4AntiSigmaPlus::AntiSigmaPlusDefinition();
111  G4XiMinus::XiMinusDefinition();
112  G4AntiXiMinus::AntiXiMinusDefinition();
113  G4OmegaMinus::OmegaMinusDefinition();
114  G4AntiOmegaMinus::AntiOmegaMinusDefinition();
115  G4LambdacPlus::LambdacPlusDefinition();
116  G4AntiLambdacPlus::AntiLambdacPlusDefinition();
117  G4XicPlus::XicPlusDefinition();
118  G4AntiXicPlus::AntiXicPlusDefinition();
119 
120  // ions
121  G4Deuteron::Deuteron();
122  G4Triton::Triton();
123  G4He3::He3();
124  G4Alpha::Alpha();
125  G4GenericIon::GenericIonDefinition();
126 }
127 
129  // Add standard EM Processes
130  G4Region* reg = 0;
131  if (region != " ") {
132  G4RegionStore* regStore = G4RegionStore::GetInstance();
133  reg = regStore->GetRegion(region, true);
134  }
135 
136  G4ParticleTable* table = G4ParticleTable::GetParticleTable();
137  EmParticleList emList;
138  for(const auto& particleName : emList.PartNames()) {
139  G4ParticleDefinition* particle = table->FindParticle(particleName);
140  G4ProcessManager* pmanager = particle->GetProcessManager();
141  if(verbose > 1)
142  G4cout << "### " << GetPhysicsName() << " instantiates for "
143  << particleName << " at " << particle << G4endl;
144 
145  if (particleName == "gamma") {
146 
147  pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
148  pmanager->AddDiscreteProcess(new G4ComptonScattering);
149  pmanager->AddDiscreteProcess(new G4GammaConversion);
150 
151  } else if (particleName == "e-") {
152 
153  G4eMultipleScattering* msc = new G4eMultipleScattering;
154  msc->SetStepLimitType(fMinimal);
155  if (reg != 0) {
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, 2);
162  pmanager->AddProcess(new G4eBremsstrahlung, -1,-3, 3);
163 
164  } else if (particleName == "e+") {
165 
166  // G4eIonisation* eioni = new G4eIonisation();
167  // eioni->SetStepFunction(0.8, 1.0*mm);
168  G4eMultipleScattering* msc = new G4eMultipleScattering;
169  msc->SetStepLimitType(fMinimal);
170  if (reg != 0) {
171  G4UrbanMscModel* msc_pos = new G4UrbanMscModel();
172  msc_pos->SetRangeFactor(0.04);
173  msc->AddEmModel(0,msc_pos,reg);
174  }
175  pmanager->AddProcess(msc, -1, 1, 1);
176  pmanager->AddProcess(new G4hhIonisation, -1, 2, 2);
177  pmanager->AddProcess(new G4eBremsstrahlung, -1,-3, 3);
178  pmanager->AddProcess(new G4eplusAnnihilation, 0,-1, 4);
179 
180  } else if (particleName == "mu+" ||
181  particleName == "mu-" ) {
182 
183  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
184  pmanager->AddProcess(new G4hhIonisation, -1, 2, 2);
185  pmanager->AddProcess(new G4MuBremsstrahlung, -1,-3, 3);
186  pmanager->AddProcess(new G4MuPairProduction, -1,-4, 4);
187 
188  } else if (particleName == "alpha" ||
189  particleName == "He3" ||
190  particleName == "GenericIon") {
191 
192  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
193  pmanager->AddProcess(new G4hhIonisation, -1, 2, 2);
194 
195  } else if (particleName == "pi+" ||
196  particleName == "kaon+" ||
197  particleName == "kaon-" ||
198  particleName == "proton" ||
199  particleName == "pi-" ) {
200 
201  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
202  pmanager->AddProcess(new G4hhIonisation, -1, 2, 2);
203  pmanager->AddProcess(new G4hBremsstrahlung(), -1,-3, 3);
204  pmanager->AddProcess(new G4hPairProduction(), -1,-4, 4);
205 
206  } else if (particleName == "B+" ||
207  particleName == "B-" ||
208  particleName == "D+" ||
209  particleName == "D-" ||
210  particleName == "Ds+" ||
211  particleName == "Ds-" ||
212  particleName == "anti_lambda_c+" ||
213  particleName == "anti_omega-" ||
214  particleName == "anti_proton" ||
215  particleName == "anti_sigma_c+" ||
216  particleName == "anti_sigma_c++" ||
217  particleName == "anti_sigma+" ||
218  particleName == "anti_sigma-" ||
219  particleName == "anti_xi_c+" ||
220  particleName == "anti_xi-" ||
221  particleName == "deuteron" ||
222  particleName == "lambda_c+" ||
223  particleName == "omega-" ||
224  particleName == "sigma_c+" ||
225  particleName == "sigma_c++" ||
226  particleName == "sigma+" ||
227  particleName == "sigma-" ||
228  particleName == "tau+" ||
229  particleName == "tau-" ||
230  particleName == "triton" ||
231  particleName == "xi_c+" ||
232  particleName == "xi-" ) {
233 
234  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
235  pmanager->AddProcess(new G4hhIonisation, -1, 2, 2);
236  }
237  }
238 }
const std::vector< G4String > & PartNames() const
virtual void ConstructParticle()
virtual void ConstructProcess()
susybsm::MuonSegmentCollection msc
Definition: classes.h:32
virtual ~CMSEmNoDeltaRay()
std::string region
dbl * Gamma
Definition: mlp_gen.cc:38
CMSEmNoDeltaRay(const G4String &name, G4int ver, std::string reg)