source: trunk/source/physics_lists/builders/src/G4EmStandardPhysics_option1.cc @ 847

Last change on this file since 847 was 825, checked in by garnier, 16 years ago

import all except CVS

File size: 7.7 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer                                           *
4// *                                                                  *
5// * The  Geant4 software  is  copyright of the Copyright Holders  of *
6// * the Geant4 Collaboration.  It is provided  under  the terms  and *
7// * conditions of the Geant4 Software License,  included in the file *
8// * LICENSE and available at  http://cern.ch/geant4/license .  These *
9// * include a list of copyright holders.                             *
10// *                                                                  *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work  make  any representation or  warranty, express or implied, *
14// * regarding  this  software system or assume any liability for its *
15// * use.  Please see the license in the file  LICENSE  and URL above *
16// * for the full disclaimer and the limitation of liability.         *
17// *                                                                  *
18// * This  code  implementation is the result of  the  scientific and *
19// * technical work of the GEANT4 collaboration.                      *
20// * By using,  copying,  modifying or  distributing the software (or *
21// * any work based  on the software)  you  agree  to acknowledge its *
22// * use  in  resulting  scientific  publications,  and indicate your *
23// * acceptance of all terms of the Geant4 Software license.          *
24// ********************************************************************
25//
26// $Id: G4EmStandardPhysics_option1.cc,v 1.3 2007/06/11 15:07:38 vnivanch Exp $
27// GEANT4 tag $Name: geant4-09-01-patch-02 $
28//
29//---------------------------------------------------------------------------
30//
31// ClassName:   G4EmStandardPhysics_option1
32//
33// Author:      V.Ivanchenko 09.11.2005
34//
35// Modified:
36// 19.12.2005 V.Ivanchenko StepFunction for electrons (1.0, 1.0*mm)
37// 21.06.2006 V.Ivanchenko use recent msc with step limitation off
38// 23.06.2006 V.Ivanchenko set dRoverRange = 0.8 for e- and e+
39// 13.11.2006 V.Ivanchenko use G4hMultipleScattering
40// 23.11.2006 V.Ivanchenko remove mscStepLimit option and improve cout
41// 13.02.2007 V.Ivanchenko set skin=0.0
42// 15.05.2007 V.Ivanchenko rename to _option1
43//
44//----------------------------------------------------------------------------
45//
46
47#include "G4EmStandardPhysics_option1.hh"
48#include "G4ParticleDefinition.hh"
49#include "G4ProcessManager.hh"
50#include "G4LossTableManager.hh"
51#include "G4EmProcessOptions.hh"
52
53#include "G4ComptonScattering.hh"
54#include "G4GammaConversion.hh"
55#include "G4PhotoElectricEffect.hh"
56
57#include "G4hMultipleScattering.hh"
58#include "G4MultipleScattering.hh"
59#include "G4MscStepLimitType.hh"
60
61#include "G4eIonisation.hh"
62#include "G4eBremsstrahlung.hh"
63#include "G4eplusAnnihilation.hh"
64
65#include "G4MuIonisation.hh"
66#include "G4MuBremsstrahlung.hh"
67#include "G4MuPairProduction.hh"
68
69#include "G4hIonisation.hh"
70#include "G4ionIonisation.hh"
71
72#include "G4Gamma.hh"
73#include "G4Electron.hh"
74#include "G4Positron.hh"
75#include "G4MuonPlus.hh"
76#include "G4MuonMinus.hh"
77#include "G4PionPlus.hh"
78#include "G4PionMinus.hh"
79#include "G4KaonPlus.hh"
80#include "G4KaonMinus.hh"
81#include "G4Proton.hh"
82#include "G4AntiProton.hh"
83#include "G4Deuteron.hh"
84#include "G4Triton.hh"
85#include "G4He3.hh"
86#include "G4Alpha.hh"
87#include "G4GenericIon.hh"
88
89//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
90
91G4EmStandardPhysics_option1::G4EmStandardPhysics_option1(
92    G4int ver, const G4String& name)
93  : G4VPhysicsConstructor(name), verbose(ver)
94{
95  G4LossTableManager::Instance();
96}
97
98//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
99
100G4EmStandardPhysics_option1::~G4EmStandardPhysics_option1()
101{}
102
103//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
104
105void G4EmStandardPhysics_option1::ConstructParticle()
106{
107// gamma
108  G4Gamma::Gamma();
109
110// leptons
111  G4Electron::Electron();
112  G4Positron::Positron();
113  G4MuonPlus::MuonPlus();
114  G4MuonMinus::MuonMinus();
115
116// mesons
117  G4PionPlus::PionPlusDefinition();
118  G4PionMinus::PionMinusDefinition();
119  G4KaonPlus::KaonPlusDefinition();
120  G4KaonMinus::KaonMinusDefinition();
121
122// barions
123  G4Proton::Proton();
124  G4AntiProton::AntiProton();
125
126// ions
127  G4Deuteron::Deuteron();
128  G4Triton::Triton();
129  G4He3::He3();
130  G4Alpha::Alpha();
131  G4GenericIon::GenericIonDefinition();
132}
133
134//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
135
136void G4EmStandardPhysics_option1::ConstructProcess()
137{
138  // Add standard EM Processes
139
140  theParticleIterator->reset();
141  while( (*theParticleIterator)() ){
142    G4ParticleDefinition* particle = theParticleIterator->value();
143    G4ProcessManager* pmanager = particle->GetProcessManager();
144    G4String particleName = particle->GetParticleName();
145    if(verbose > 1)
146      G4cout << "### " << GetPhysicsName() << " instantiates for " 
147             << particleName << G4endl;
148
149    if (particleName == "gamma") {
150
151      pmanager->AddDiscreteProcess(new G4PhotoElectricEffect);
152      pmanager->AddDiscreteProcess(new G4ComptonScattering);
153      pmanager->AddDiscreteProcess(new G4GammaConversion);
154
155    } else if (particleName == "e-") {
156
157      G4eIonisation* eioni = new G4eIonisation();
158      eioni->SetStepFunction(0.8, 1.0*mm);
159      G4MultipleScattering* msc = new G4MultipleScattering;
160      msc->SetStepLimitType(fMinimal);
161      pmanager->AddProcess(msc,                   -1, 1, 1);
162      pmanager->AddProcess(eioni,                 -1, 2, 2);
163      pmanager->AddProcess(new G4eBremsstrahlung, -1, 3, 3);
164
165    } else if (particleName == "e+") {
166
167      G4eIonisation* eioni = new G4eIonisation();
168      eioni->SetStepFunction(0.8, 1.0*mm);
169      G4MultipleScattering* msc = new G4MultipleScattering;
170      msc->SetStepLimitType(fMinimal);
171      pmanager->AddProcess(msc,                     -1, 1, 1);
172      pmanager->AddProcess(eioni,                   -1, 2, 2);
173      pmanager->AddProcess(new G4eBremsstrahlung,   -1, 3, 3);
174      pmanager->AddProcess(new G4eplusAnnihilation,  0,-1, 4);
175
176    } else if (particleName == "mu+" ||
177               particleName == "mu-"    ) {
178
179      pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
180      pmanager->AddProcess(new G4MuIonisation,        -1, 2, 2);
181      pmanager->AddProcess(new G4MuBremsstrahlung,    -1, 3, 3);
182      pmanager->AddProcess(new G4MuPairProduction,    -1, 4, 4);
183
184    } else if (particleName == "alpha" ||
185               particleName == "He3" ||
186               particleName == "GenericIon") {
187
188      pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
189      pmanager->AddProcess(new G4ionIonisation,       -1, 2, 2);
190
191    } else if (particleName == "anti_omega-" ||
192               particleName == "anti_proton" ||
193               particleName == "anti_sigma+" ||
194               particleName == "anti_sigma-" ||
195               particleName == "anti_xi-" ||
196               particleName == "deuteron" ||
197               particleName == "kaon+" ||
198               particleName == "kaon-" ||
199               particleName == "omega-" ||
200               particleName == "pi+" ||
201               particleName == "pi-" ||
202               particleName == "proton" ||
203               particleName == "sigma+" ||
204               particleName == "sigma-" ||
205               particleName == "tau+" ||
206               particleName == "tau-" ||
207               particleName == "triton" ||
208               particleName == "xi-" ) {
209
210      pmanager->AddProcess(new G4hMultipleScattering, -1, 1, 1);
211      pmanager->AddProcess(new G4hIonisation,         -1, 2, 2);
212    }
213  }
214  G4EmProcessOptions opt;
215  opt.SetVerbose(verbose);
216}
217
218//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Note: See TracBrowser for help on using the repository browser.