]>
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) |
26 | : G4VPhysicsConstructor(name) | |
27 | { | |
28 | // | |
29 | SetVerboseLevel(1); | |
30 | } | |
31 | ||
72095f7c | 32 | //_____________________________________________________________________________ |
b94a914b | 33 | TG4PhysicsConstructorEM::~TG4PhysicsConstructorEM() { |
34 | // | |
35 | } | |
36 | ||
696e37fa | 37 | // private methods |
38 | ||
39 | //_____________________________________________________________________________ | |
40 | void TG4PhysicsConstructorEM::ConstructProcessForGamma() | |
41 | { | |
42 | // Constructs electromagnetic processes for gamma. | |
43 | // --- | |
44 | ||
45 | // add processes | |
46 | G4ProcessManager* pManager = G4Gamma::Gamma()->GetProcessManager(); | |
47 | pManager->AddDiscreteProcess(&fPhotoEffect); | |
48 | pManager->AddDiscreteProcess(&fComptonEffect); | |
49 | pManager->AddDiscreteProcess(&fPairProduction); | |
50 | ||
51 | // map to G3 controls | |
52 | TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance(); | |
53 | controlMap->Add(&fPhotoEffect, kPHOT); | |
54 | controlMap->Add(&fComptonEffect, kCOMP); | |
55 | controlMap->Add(&fPairProduction, kPAIR); | |
56 | ||
57 | // map to AliMCProcess codes | |
58 | TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance(); | |
59 | mcMap->Add(&fPhotoEffect, kPPhotoelectric); | |
60 | mcMap->Add(&fComptonEffect, kPCompton); | |
61 | mcMap->Add(&fPairProduction, kPPair); | |
62 | } | |
63 | ||
64 | ||
65 | //_____________________________________________________________________________ | |
66 | void TG4PhysicsConstructorEM::ConstructProcessForElectron() | |
67 | { | |
68 | // Constructs electromagnetic processes for e-. | |
69 | // --- | |
70 | ||
71 | // add process | |
72 | G4ProcessManager* pManager = G4Electron::Electron()->GetProcessManager(); | |
73 | pManager->AddDiscreteProcess(&fElectronBremsStrahlung); | |
74 | pManager->AddProcess(&fElectronIonisation, ordInActive, 2, 2); | |
75 | pManager->AddProcess(&fElectronMultipleScattering); | |
76 | ||
77 | // set ordering | |
78 | pManager->SetProcessOrdering(&fElectronMultipleScattering, idxAlongStep, 1); | |
79 | pManager->SetProcessOrdering(&fElectronMultipleScattering, idxPostStep, 1); | |
80 | ||
81 | // map to G3 controls | |
82 | TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance(); | |
83 | controlMap->Add(&fElectronBremsStrahlung, kBREM); | |
84 | controlMap->Add(&fElectronIonisation, kLOSS); | |
85 | controlMap->Add(&fElectronMultipleScattering, kMULS); | |
86 | ||
87 | // map to AliMCProcess codes | |
88 | TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance(); | |
89 | mcMap->Add(&fElectronBremsStrahlung, kPBrem); | |
90 | mcMap->Add(&fElectronMultipleScattering, kPMultipleScattering); | |
91 | mcMap->Add(&fElectronIonisation, kPEnergyLoss); | |
92 | } | |
93 | ||
94 | //_____________________________________________________________________________ | |
95 | void TG4PhysicsConstructorEM::ConstructProcessForPositron() | |
96 | { | |
97 | // Constructs electromagnetic processes for e+. | |
98 | // --- | |
99 | ||
100 | // add processes | |
101 | G4ProcessManager * pManager = G4Positron::Positron()->GetProcessManager(); | |
102 | pManager->AddDiscreteProcess(&fPositronBremsStrahlung); | |
103 | pManager->AddDiscreteProcess(&fAnnihilation); | |
104 | pManager->AddRestProcess(&fAnnihilation); | |
105 | pManager->AddProcess(&fPositronIonisation, ordInActive,2, 2); | |
106 | pManager->AddProcess(&fPositronMultipleScattering); | |
107 | ||
108 | // set ordering | |
109 | pManager->SetProcessOrdering(&fPositronMultipleScattering, idxAlongStep, 1); | |
110 | pManager->SetProcessOrdering(&fPositronMultipleScattering, idxPostStep, 1); | |
111 | ||
112 | // map to G3 controls | |
113 | TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance(); | |
114 | controlMap->Add(&fPositronBremsStrahlung, kBREM); | |
115 | controlMap->Add(&fAnnihilation, kANNI); | |
116 | controlMap->Add(&fPositronIonisation, kLOSS); | |
117 | controlMap->Add(&fPositronMultipleScattering, kMULS); | |
118 | ||
119 | // map to AliMCProcess codes | |
120 | TG4ProcessMCMap* mcMap = TG4ProcessMCMap::Instance(); | |
121 | mcMap->Add(&fPositronBremsStrahlung, kPBrem); | |
122 | mcMap->Add(&fAnnihilation, kPAnnihilation); | |
123 | mcMap->Add(&fPositronIonisation, kPEnergyLoss); | |
124 | mcMap->Add(&fPositronMultipleScattering, kPMultipleScattering); | |
125 | } | |
126 | ||
b94a914b | 127 | // protected methods |
128 | ||
72095f7c | 129 | //_____________________________________________________________________________ |
b94a914b | 130 | void TG4PhysicsConstructorEM::ConstructParticle() |
131 | { | |
696e37fa | 132 | // Instantiates particles. |
b94a914b | 133 | // --- |
696e37fa | 134 | |
135 | // gamma | |
136 | G4Gamma::GammaDefinition(); | |
137 | ||
138 | // electron | |
139 | G4Electron::ElectronDefinition(); | |
140 | G4Positron::PositronDefinition(); | |
141 | G4NeutrinoE::NeutrinoEDefinition(); | |
142 | G4AntiNeutrinoE::AntiNeutrinoEDefinition(); | |
b94a914b | 143 | } |
144 | ||
72095f7c | 145 | //_____________________________________________________________________________ |
b94a914b | 146 | void TG4PhysicsConstructorEM::ConstructProcess() |
147 | { | |
696e37fa | 148 | // Constructs electromagnetic processes for e+. |
b94a914b | 149 | // --- |
150 | ||
696e37fa | 151 | ConstructProcessForGamma(); |
152 | ConstructProcessForElectron(); | |
153 | ConstructProcessForPositron(); | |
e5967ab3 | 154 | |
b94a914b | 155 | if (verboseLevel>0) |
156 | G4cout << "### Electromagnetic physics constructed." << G4endl; | |
157 | } |