Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
A01EMPhysics.cc
Go to the documentation of this file.
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 //
28 //
29 // $Id$
30 // --------------------------------------------------------------
31 //
32 //
33 // 09-Oct-2003 Change gamma, electron, positorn process T. Koi
34 // 10-Jan-2004 Add Brems. of AlongStepDoIt for e+- T. Koi
35 
36 
37 #include "A01EMPhysics.hh"
38 
39 #include "globals.hh"
40 #include "G4ios.hh"
41 #include <iomanip>
42 
43 
45  : G4VPhysicsConstructor(name)
46 {
47 }
48 
50 {
51 }
52 
53 #include "G4ParticleDefinition.hh"
54 #include "G4ParticleTable.hh"
55 
56 #include "G4Gamma.hh"
57 
58 #include "G4Electron.hh"
59 #include "G4Positron.hh"
60 
61 #include "G4NeutrinoE.hh"
62 #include "G4AntiNeutrinoE.hh"
63 
64 #include "G4ProcessManager.hh"
65 
67 {
68  G4ProcessManager * pManager = 0;
69 
70  //Gamma
71  pManager = G4Gamma::Gamma()->GetProcessManager();
72  pManager->AddDiscreteProcess(new G4GammaConversion());
73  pManager->AddDiscreteProcess(new G4ComptonScattering());
75 
76  //Electorn
78  G4VProcess* theeminusMultipleScattering = new G4eMultipleScattering();
79  G4VProcess* theeminusIonisation = new G4eIonisation();
80  G4VProcess* theeminusBremsstrahlung = new G4eBremsstrahlung();
81  //
82  // add process
83  pManager->AddProcess(theeminusMultipleScattering);
84  pManager->AddProcess(theeminusIonisation);
85  pManager->AddProcess(theeminusBremsstrahlung);
86  //
87  // set ordering for AlongStepDoIt
88  pManager->SetProcessOrdering(theeminusMultipleScattering, idxAlongStep,1);
89  pManager->SetProcessOrdering(theeminusIonisation, idxAlongStep,2);
90  pManager->SetProcessOrdering(theeminusBremsstrahlung, idxAlongStep,3);
91  //
92  // set ordering for PostStepDoIt
93  pManager->SetProcessOrdering(theeminusMultipleScattering, idxPostStep,1);
94  pManager->SetProcessOrdering(theeminusIonisation, idxPostStep,2);
95  pManager->SetProcessOrdering(theeminusBremsstrahlung, idxPostStep,3);
96 
97  //Positron
99  G4VProcess* theeplusMultipleScattering = new G4eMultipleScattering();
100  G4VProcess* theeplusIonisation = new G4eIonisation();
101  G4VProcess* theeplusBremsstrahlung = new G4eBremsstrahlung();
102  G4VProcess* theeplusAnnihilation = new G4eplusAnnihilation();
103 
104  pManager->AddProcess(theeplusMultipleScattering);
105  pManager->AddProcess(theeplusIonisation);
106  pManager->AddProcess(theeplusBremsstrahlung);
107  pManager->AddProcess(theeplusAnnihilation);
108  //
109  // set ordering for AtRestDoIt
110  pManager->SetProcessOrderingToFirst(theeplusAnnihilation, idxAtRest);
111  //
112  // set ordering for AlongStepDoIt
113  pManager->SetProcessOrdering(theeplusMultipleScattering, idxAlongStep,1);
114  pManager->SetProcessOrdering(theeplusIonisation, idxAlongStep,2);
115  pManager->SetProcessOrdering(theeplusBremsstrahlung, idxAlongStep,3);
116  //
117  // set ordering for PostStepDoIt
118  pManager->SetProcessOrdering(theeplusMultipleScattering, idxPostStep,1);
119  pManager->SetProcessOrdering(theeplusIonisation, idxPostStep,2);
120  pManager->SetProcessOrdering(theeplusBremsstrahlung, idxPostStep,3);
121  pManager->SetProcessOrdering(theeplusAnnihilation, idxPostStep,4);
122 
123 }