CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CMSEmStandardPhysicsSync.cc
Go to the documentation of this file.
2 
3 #include "G4ParticleDefinition.hh"
4 #include "G4ProcessManager.hh"
5 #include "G4LossTableManager.hh"
6 #include "G4EmProcessOptions.hh"
7 #include "G4RegionStore.hh"
8 
9 #include "G4ComptonScattering.hh"
10 #include "G4GammaConversion.hh"
11 #include "G4PhotoElectricEffect.hh"
12 
13 #include "G4hMultipleScattering.hh"
14 #include "G4eMultipleScattering.hh"
15 #include "G4MscStepLimitType.hh"
16 #include "G4UrbanMscModel93.hh"
17 
18 #include "G4eIonisation.hh"
19 #include "G4eBremsstrahlung.hh"
20 #include "G4eplusAnnihilation.hh"
21 
22 #include "G4MuIonisation.hh"
23 #include "G4MuBremsstrahlung.hh"
24 #include "G4MuPairProduction.hh"
25 
26 #include "G4hIonisation.hh"
27 #include "G4ionIonisation.hh"
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 "G4SynchrotronRadiation.hh"
67 #include "G4SynchrotronRadiationInMat.hh"
68 
69 CMSEmStandardPhysicsSync::CMSEmStandardPhysicsSync(const G4String& name, G4int ver, G4bool type, std::string reg) :
70  G4VPhysicsConstructor(name), verbose(ver), srType(type), region(reg) {
71  G4LossTableManager::Instance();
72 }
73 
75 
77  // gamma
79 
80  // leptons
81  G4Electron::Electron();
82  G4Positron::Positron();
83  G4MuonPlus::MuonPlus();
84  G4MuonMinus::MuonMinus();
85  G4TauMinus::TauMinusDefinition();
86  G4TauPlus::TauPlusDefinition();
87 
88  // mesons
89  G4PionPlus::PionPlusDefinition();
90  G4PionMinus::PionMinusDefinition();
91  G4KaonPlus::KaonPlusDefinition();
92  G4KaonMinus::KaonMinusDefinition();
93  G4DMesonMinus::DMesonMinusDefinition();
94  G4DMesonPlus::DMesonPlusDefinition();
95  G4BMesonMinus::BMesonMinusDefinition();
96  G4BMesonPlus::BMesonPlusDefinition();
97 
98  // barions
99  G4Proton::Proton();
100  G4AntiProton::AntiProton();
101  G4SigmaMinus::SigmaMinusDefinition();
102  G4AntiSigmaMinus::AntiSigmaMinusDefinition();
103  G4SigmaPlus::SigmaPlusDefinition();
104  G4AntiSigmaPlus::AntiSigmaPlusDefinition();
105  G4XiMinus::XiMinusDefinition();
106  G4AntiXiMinus::AntiXiMinusDefinition();
107  G4OmegaMinus::OmegaMinusDefinition();
108  G4AntiOmegaMinus::AntiOmegaMinusDefinition();
109  G4LambdacPlus::LambdacPlusDefinition();
110  G4AntiLambdacPlus::AntiLambdacPlusDefinition();
111  G4XicPlus::XicPlusDefinition();
112  G4AntiXicPlus::AntiXicPlusDefinition();
113 
114  // ions
115  G4Deuteron::Deuteron();
116  G4Triton::Triton();
117  G4He3::He3();
118  G4Alpha::Alpha();
119  G4GenericIon::GenericIonDefinition();
120 }
121 
123  // Add standard EM Processes
124  G4Region* reg = 0;
125  if (region != " ") {
126  G4RegionStore* regStore = G4RegionStore::GetInstance();
127  reg = regStore->GetRegion(region, true);
128  }
129 
130  theParticleIterator->reset();
131  while( (*theParticleIterator)() ){
132  G4ParticleDefinition* particle = theParticleIterator->value();
133  G4ProcessManager* pmanager = particle->GetProcessManager();
134  G4String particleName = particle->GetParticleName();
135  if(verbose > 1)
136  G4cout << "### " << GetPhysicsName() << " instantiates for "
137  << particleName << G4endl;
138 
139  if (particleName == "gamma") {
140 
141  pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
142  pmanager->AddDiscreteProcess(new G4ComptonScattering);
143  pmanager->AddDiscreteProcess(new G4GammaConversion);
144 
145  } else if (particleName == "e-") {
146 
147  G4eIonisation* eioni = new G4eIonisation();
148  eioni->SetStepFunction(0.8, 1.0*mm);
149  G4eMultipleScattering* msc = new G4eMultipleScattering;
150  msc->SetStepLimitType(fMinimal);
151  if (reg != 0) {
152  G4UrbanMscModel93* msc_el = new G4UrbanMscModel93();
153  msc_el->SetRangeFactor(0.04);
154  msc->AddEmModel(0,msc_el,reg);
155  }
156  pmanager->AddProcess(msc, -1, 1, 1);
157  pmanager->AddProcess(eioni, -1, 2, 2);
158  pmanager->AddProcess(new G4eBremsstrahlung, -1,-3, 3);
159  if (srType)
160  pmanager->AddProcess(new G4SynchrotronRadiation, -1,-1,4);
161  else
162  pmanager->AddProcess(new G4SynchrotronRadiationInMat, -1,-1,4);
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  G4UrbanMscModel93* msc_pos = new G4UrbanMscModel93();
172  msc_pos->SetRangeFactor(0.04);
173  msc->AddEmModel(0,msc_pos,reg);
174  }
175  pmanager->AddProcess(msc, -1, 1, 1);
176  pmanager->AddProcess(eioni, -1, 2, 2);
177  pmanager->AddProcess(new G4eBremsstrahlung, -1,-3, 3);
178  if (srType)
179  pmanager->AddProcess(new G4SynchrotronRadiation, -1,-1,5);
180  else
181  pmanager->AddProcess(new G4SynchrotronRadiationInMat, -1,-1,5);
182  pmanager->AddProcess(new G4eplusAnnihilation, 0,-1, 4);
183 
184  } else if (particleName == "mu+" ||
185  particleName == "mu-" ) {
186 
187  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
188  pmanager->AddProcess(new G4MuIonisation, -1, 2, 2);
189  pmanager->AddProcess(new G4MuBremsstrahlung, -1,-3, 3);
190  pmanager->AddProcess(new G4MuPairProduction, -1,-4, 4);
191 
192  } else if (particleName == "alpha" ||
193  particleName == "He3" ||
194  particleName == "GenericIon") {
195 
196  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
197  pmanager->AddProcess(new G4ionIonisation, -1, 2, 2);
198 
199  } else if (particleName == "pi+" ||
200  particleName == "kaon+" ||
201  particleName == "kaon-" ||
202  particleName == "proton" ||
203  particleName == "pi-" ) {
204 
205  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
206  pmanager->AddProcess(new G4hIonisation, -1, 2, 2);
207  pmanager->AddProcess(new G4hBremsstrahlung(), -1,-3, 3);
208  pmanager->AddProcess(new G4hPairProduction(), -1,-4, 4);
209 
210  } else if (particleName == "B+" ||
211  particleName == "B-" ||
212  particleName == "D+" ||
213  particleName == "D-" ||
214  particleName == "Ds+" ||
215  particleName == "Ds-" ||
216  particleName == "anti_lambda_c+" ||
217  particleName == "anti_omega-" ||
218  particleName == "anti_proton" ||
219  particleName == "anti_sigma_c+" ||
220  particleName == "anti_sigma_c++" ||
221  particleName == "anti_sigma+" ||
222  particleName == "anti_sigma-" ||
223  particleName == "anti_xi_c+" ||
224  particleName == "anti_xi-" ||
225  particleName == "deuteron" ||
226  particleName == "lambda_c+" ||
227  particleName == "omega-" ||
228  particleName == "sigma_c+" ||
229  particleName == "sigma_c++" ||
230  particleName == "sigma+" ||
231  particleName == "sigma-" ||
232  particleName == "tau+" ||
233  particleName == "tau-" ||
234  particleName == "triton" ||
235  particleName == "xi_c+" ||
236  particleName == "xi-" ) {
237 
238  pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
239  pmanager->AddProcess(new G4hIonisation, -1, 2, 2);
240  }
241  }
242 
243  // Setup options
244  //
245  G4EmProcessOptions opt;
246  opt.SetVerbose(verbose);
247  // ApplyCuts
248  //
249  opt.SetApplyCuts(true);
250 
251  // Physics tables
252  //
253  opt.SetMinEnergy(100.*eV);
254  opt.SetMaxEnergy(10.*TeV);
255  opt.SetDEDXBinning(77);
256  opt.SetLambdaBinning(77);
257 
258 }
type
Definition: HCALResponse.h:22
CMSEmStandardPhysicsSync(const G4String &name, G4int ver, G4bool type, std::string reg)
dbl * Gamma
Definition: mlp_gen.cc:38