]>
Commit | Line | Data |
---|---|---|
b94a914b | 1 | // $Id$ |
2 | // Category: physics | |
3 | // | |
e5967ab3 | 4 | // Author: I. Hrivnacova |
5 | // | |
6 | // Class TG4PhysicsConstructorEM | |
696e37fa | 7 | // ----------------------------- |
e5967ab3 | 8 | // See the class description in the header file. |
696e37fa | 9 | // According to ExN04EMPhysics.cc,v 1.1.2.1 2001/06/28 19:07:37 gunter Exp |
10 | // GEANT4 tag Name: geant4-03-02 | |
b94a914b | 11 | |
12 | #include "TG4PhysicsConstructorEM.h" | |
e5967ab3 | 13 | #include "TG4ProcessControlMap.h" |
14 | #include "TG4ProcessMCMap.h" | |
b94a914b | 15 | |
16 | #include <G4ParticleDefinition.hh> | |
17 | #include <G4ProcessManager.hh> | |
696e37fa | 18 | #include <G4Gamma.hh> |
19 | #include <G4Electron.hh> | |
20 | #include <G4Positron.hh> | |
21 | #include <G4NeutrinoE.hh> | |
22 | #include <G4AntiNeutrinoE.hh> | |
b94a914b | 23 | |
72095f7c | 24 | //_____________________________________________________________________________ |
b94a914b | 25 | TG4PhysicsConstructorEM::TG4PhysicsConstructorEM(const G4String& name) |
6d72374b | 26 | : TG4VPhysicsConstructor(name) { |
27 | // | |
28 | } | |
29 | ||
30 | //_____________________________________________________________________________ | |
31 | TG4PhysicsConstructorEM::TG4PhysicsConstructorEM(G4int verboseLevel, | |
32 | const G4String& name) | |
33 | : TG4VPhysicsConstructor(name, verboseLevel) { | |
b94a914b | 34 | // |
b94a914b | 35 | } |
36 | ||
72095f7c | 37 | //_____________________________________________________________________________ |
b94a914b | 38 | TG4PhysicsConstructorEM::~TG4PhysicsConstructorEM() { |
39 | // | |
40 | } | |
41 | ||
696e37fa | 42 | // private methods |
43 | ||
44 | //_____________________________________________________________________________ | |
45 | void TG4PhysicsConstructorEM::ConstructProcessForGamma() | |
46 | { | |
47 | // Constructs electromagnetic processes for gamma. | |
48 | // --- | |
49 | ||
50 | // add processes | |
51 | G4ProcessManager* pManager = G4Gamma::Gamma()->GetProcessManager(); | |
52 | pManager->AddDiscreteProcess(&fPhotoEffect); | |
53 | pManager->AddDiscreteProcess(&fComptonEffect); | |
54 | pManager->AddDiscreteProcess(&fPairProduction); | |
55 | ||
56 | // map to G3 controls | |
57 | TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance(); | |
58 | controlMap->Add(&fPhotoEffect, kPHOT); | |
59 | controlMap->Add(&fComptonEffect, kCOMP); | |
60 | controlMap->Add(&fPairProduction, kPAIR); | |
61 | ||
62 | // map to AliMCProcess codes | |
63 | TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance(); | |
64 | mcMap->Add(&fPhotoEffect, kPPhotoelectric); | |
65 | mcMap->Add(&fComptonEffect, kPCompton); | |
66 | mcMap->Add(&fPairProduction, kPPair); | |
67 | } | |
68 | ||
69 | ||
70 | //_____________________________________________________________________________ | |
71 | void TG4PhysicsConstructorEM::ConstructProcessForElectron() | |
72 | { | |
73 | // Constructs electromagnetic processes for e-. | |
74 | // --- | |
75 | ||
76 | // add process | |
77 | G4ProcessManager* pManager = G4Electron::Electron()->GetProcessManager(); | |
78 | pManager->AddDiscreteProcess(&fElectronBremsStrahlung); | |
79 | pManager->AddProcess(&fElectronIonisation, ordInActive, 2, 2); | |
80 | pManager->AddProcess(&fElectronMultipleScattering); | |
81 | ||
82 | // set ordering | |
83 | pManager->SetProcessOrdering(&fElectronMultipleScattering, idxAlongStep, 1); | |
84 | pManager->SetProcessOrdering(&fElectronMultipleScattering, idxPostStep, 1); | |
85 | ||
86 | // map to G3 controls | |
87 | TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance(); | |
88 | controlMap->Add(&fElectronBremsStrahlung, kBREM); | |
89 | controlMap->Add(&fElectronIonisation, kLOSS); | |
90 | controlMap->Add(&fElectronMultipleScattering, kMULS); | |
91 | ||
92 | // map to AliMCProcess codes | |
93 | TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance(); | |
94 | mcMap->Add(&fElectronBremsStrahlung, kPBrem); | |
95 | mcMap->Add(&fElectronMultipleScattering, kPMultipleScattering); | |
96 | mcMap->Add(&fElectronIonisation, kPEnergyLoss); | |
97 | } | |
98 | ||
99 | //_____________________________________________________________________________ | |
100 | void TG4PhysicsConstructorEM::ConstructProcessForPositron() | |
101 | { | |
102 | // Constructs electromagnetic processes for e+. | |
103 | // --- | |
104 | ||
105 | // add processes | |
106 | G4ProcessManager * pManager = G4Positron::Positron()->GetProcessManager(); | |
107 | pManager->AddDiscreteProcess(&fPositronBremsStrahlung); | |
108 | pManager->AddDiscreteProcess(&fAnnihilation); | |
109 | pManager->AddRestProcess(&fAnnihilation); | |
110 | pManager->AddProcess(&fPositronIonisation, ordInActive,2, 2); | |
111 | pManager->AddProcess(&fPositronMultipleScattering); | |
112 | ||
113 | // set ordering | |
114 | pManager->SetProcessOrdering(&fPositronMultipleScattering, idxAlongStep, 1); | |
115 | pManager->SetProcessOrdering(&fPositronMultipleScattering, idxPostStep, 1); | |
116 | ||
117 | // map to G3 controls | |
118 | TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance(); | |
119 | controlMap->Add(&fPositronBremsStrahlung, kBREM); | |
120 | controlMap->Add(&fAnnihilation, kANNI); | |
121 | controlMap->Add(&fPositronIonisation, kLOSS); | |
122 | controlMap->Add(&fPositronMultipleScattering, kMULS); | |
123 | ||
124 | // map to AliMCProcess codes | |
125 | TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance(); | |
126 | mcMap->Add(&fPositronBremsStrahlung, kPBrem); | |
127 | mcMap->Add(&fAnnihilation, kPAnnihilation); | |
128 | mcMap->Add(&fPositronIonisation, kPEnergyLoss); | |
129 | mcMap->Add(&fPositronMultipleScattering, kPMultipleScattering); | |
130 | } | |
131 | ||
b94a914b | 132 | // protected methods |
133 | ||
72095f7c | 134 | //_____________________________________________________________________________ |
b94a914b | 135 | void TG4PhysicsConstructorEM::ConstructParticle() |
136 | { | |
696e37fa | 137 | // Instantiates particles. |
b94a914b | 138 | // --- |
696e37fa | 139 | |
140 | // gamma | |
141 | G4Gamma::GammaDefinition(); | |
142 | ||
143 | // electron | |
144 | G4Electron::ElectronDefinition(); | |
145 | G4Positron::PositronDefinition(); | |
146 | G4NeutrinoE::NeutrinoEDefinition(); | |
147 | G4AntiNeutrinoE::AntiNeutrinoEDefinition(); | |
b94a914b | 148 | } |
149 | ||
72095f7c | 150 | //_____________________________________________________________________________ |
b94a914b | 151 | void TG4PhysicsConstructorEM::ConstructProcess() |
152 | { | |
696e37fa | 153 | // Constructs electromagnetic processes for e+. |
b94a914b | 154 | // --- |
155 | ||
696e37fa | 156 | ConstructProcessForGamma(); |
157 | ConstructProcessForElectron(); | |
158 | ConstructProcessForPositron(); | |
e5967ab3 | 159 | |
6d72374b | 160 | if (VerboseLevel() > 0) { |
b94a914b | 161 | G4cout << "### Electromagnetic physics constructed." << G4endl; |
6d72374b | 162 | } |
b94a914b | 163 | } |