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: A01EMPhysics.cc,v 1.2 2006/12/13 15:49:03 gunter Exp $ |
---|
27 | // -------------------------------------------------------------- |
---|
28 | // |
---|
29 | // |
---|
30 | // 09-Oct-2003 Change gamma, electron, positorn process T. Koi |
---|
31 | // 10-Jan-2004 Add Brems. of AlongStepDoIt for e+- T. Koi |
---|
32 | |
---|
33 | |
---|
34 | #include "A01EMPhysics.hh" |
---|
35 | |
---|
36 | #include "globals.hh" |
---|
37 | #include "G4ios.hh" |
---|
38 | #include <iomanip> |
---|
39 | |
---|
40 | |
---|
41 | A01EMPhysics::A01EMPhysics(const G4String& name,G4bool ifDisplace) |
---|
42 | : G4VPhysicsConstructor(name) |
---|
43 | { ifDisp = ifDisplace; |
---|
44 | } |
---|
45 | |
---|
46 | A01EMPhysics::~A01EMPhysics() |
---|
47 | { |
---|
48 | } |
---|
49 | |
---|
50 | #include "G4ParticleDefinition.hh" |
---|
51 | #include "G4ParticleTable.hh" |
---|
52 | |
---|
53 | #include "G4Gamma.hh" |
---|
54 | |
---|
55 | #include "G4Electron.hh" |
---|
56 | #include "G4Positron.hh" |
---|
57 | |
---|
58 | #include "G4NeutrinoE.hh" |
---|
59 | #include "G4AntiNeutrinoE.hh" |
---|
60 | |
---|
61 | #include "G4ProcessManager.hh" |
---|
62 | |
---|
63 | void A01EMPhysics::ConstructProcess() |
---|
64 | { |
---|
65 | G4ProcessManager * pManager = 0; |
---|
66 | |
---|
67 | //Gamma |
---|
68 | pManager = G4Gamma::Gamma()->GetProcessManager(); |
---|
69 | pManager->AddDiscreteProcess(new G4GammaConversion()); |
---|
70 | pManager->AddDiscreteProcess(new G4ComptonScattering()); |
---|
71 | pManager->AddDiscreteProcess(new G4PhotoElectricEffect()); |
---|
72 | |
---|
73 | //Electorn |
---|
74 | pManager = G4Electron::Electron()->GetProcessManager(); |
---|
75 | G4MultipleScattering* theeminusMultipleScattering = new G4MultipleScattering(); |
---|
76 | theeminusMultipleScattering->SetLateralDisplasmentFlag(ifDisp); |
---|
77 | G4VProcess* theeminusIonisation = new G4eIonisation(); |
---|
78 | G4VProcess* theeminusBremsstrahlung = new G4eBremsstrahlung(); |
---|
79 | // |
---|
80 | // add process |
---|
81 | pManager->AddProcess(theeminusMultipleScattering); |
---|
82 | pManager->AddProcess(theeminusIonisation); |
---|
83 | pManager->AddProcess(theeminusBremsstrahlung); |
---|
84 | // |
---|
85 | // set ordering for AlongStepDoIt |
---|
86 | pManager->SetProcessOrdering(theeminusMultipleScattering, idxAlongStep,1); |
---|
87 | pManager->SetProcessOrdering(theeminusIonisation, idxAlongStep,2); |
---|
88 | pManager->SetProcessOrdering(theeminusBremsstrahlung, idxAlongStep,3); |
---|
89 | // |
---|
90 | // set ordering for PostStepDoIt |
---|
91 | pManager->SetProcessOrdering(theeminusMultipleScattering, idxPostStep,1); |
---|
92 | pManager->SetProcessOrdering(theeminusIonisation, idxPostStep,2); |
---|
93 | pManager->SetProcessOrdering(theeminusBremsstrahlung, idxPostStep,3); |
---|
94 | |
---|
95 | //Positron |
---|
96 | pManager = G4Positron::Positron()->GetProcessManager(); |
---|
97 | G4MultipleScattering* theeplusMultipleScattering = new G4MultipleScattering(); |
---|
98 | theeplusMultipleScattering->SetLateralDisplasmentFlag(ifDisp); |
---|
99 | G4VProcess* theeplusIonisation = new G4eIonisation(); |
---|
100 | G4VProcess* theeplusBremsstrahlung = new G4eBremsstrahlung(); |
---|
101 | G4VProcess* theeplusAnnihilation = new G4eplusAnnihilation(); |
---|
102 | |
---|
103 | pManager->AddProcess(theeplusMultipleScattering); |
---|
104 | pManager->AddProcess(theeplusIonisation); |
---|
105 | pManager->AddProcess(theeplusBremsstrahlung); |
---|
106 | pManager->AddProcess(theeplusAnnihilation); |
---|
107 | // |
---|
108 | // set ordering for AtRestDoIt |
---|
109 | pManager->SetProcessOrderingToFirst(theeplusAnnihilation, idxAtRest); |
---|
110 | // |
---|
111 | // set ordering for AlongStepDoIt |
---|
112 | pManager->SetProcessOrdering(theeplusMultipleScattering, idxAlongStep,1); |
---|
113 | pManager->SetProcessOrdering(theeplusIonisation, idxAlongStep,2); |
---|
114 | pManager->SetProcessOrdering(theeplusBremsstrahlung, idxAlongStep,3); |
---|
115 | // |
---|
116 | // set ordering for PostStepDoIt |
---|
117 | pManager->SetProcessOrdering(theeplusMultipleScattering, idxPostStep,1); |
---|
118 | pManager->SetProcessOrdering(theeplusIonisation, idxPostStep,2); |
---|
119 | pManager->SetProcessOrdering(theeplusBremsstrahlung, idxPostStep,3); |
---|
120 | pManager->SetProcessOrdering(theeplusAnnihilation, idxPostStep,4); |
---|
121 | |
---|
122 | } |
---|