test
CMS 3D CMS Logo

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