4 // Author: I. Hrivnacova
6 // Class TG4PhysicsConstructorEM
7 // -----------------------------
8 // See the class description in the header file.
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
12 #include "TG4PhysicsConstructorEM.h"
13 #include "TG4ProcessControlMap.h"
14 #include "TG4ProcessMCMap.h"
16 #include <G4ParticleDefinition.hh>
17 #include <G4ProcessManager.hh>
19 #include <G4Electron.hh>
20 #include <G4Positron.hh>
21 #include <G4NeutrinoE.hh>
22 #include <G4AntiNeutrinoE.hh>
24 //_____________________________________________________________________________
25 TG4PhysicsConstructorEM::TG4PhysicsConstructorEM(const G4String& name)
26 : TG4VPhysicsConstructor(name) {
30 //_____________________________________________________________________________
31 TG4PhysicsConstructorEM::TG4PhysicsConstructorEM(G4int verboseLevel,
33 : TG4VPhysicsConstructor(name, verboseLevel) {
37 //_____________________________________________________________________________
38 TG4PhysicsConstructorEM::~TG4PhysicsConstructorEM() {
44 //_____________________________________________________________________________
45 void TG4PhysicsConstructorEM::ConstructProcessForGamma()
47 // Constructs electromagnetic processes for gamma.
51 G4ProcessManager* pManager = G4Gamma::Gamma()->GetProcessManager();
52 pManager->AddDiscreteProcess(&fPhotoEffect);
53 pManager->AddDiscreteProcess(&fComptonEffect);
54 pManager->AddDiscreteProcess(&fPairProduction);
57 TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
58 controlMap->Add(&fPhotoEffect, kPHOT);
59 controlMap->Add(&fComptonEffect, kCOMP);
60 controlMap->Add(&fPairProduction, kPAIR);
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);
70 //_____________________________________________________________________________
71 void TG4PhysicsConstructorEM::ConstructProcessForElectron()
73 // Constructs electromagnetic processes for e-.
77 G4ProcessManager* pManager = G4Electron::Electron()->GetProcessManager();
78 pManager->AddDiscreteProcess(&fElectronBremsStrahlung);
79 pManager->AddProcess(&fElectronIonisation, ordInActive, 2, 2);
80 pManager->AddProcess(&fElectronMultipleScattering);
83 pManager->SetProcessOrdering(&fElectronMultipleScattering, idxAlongStep, 1);
84 pManager->SetProcessOrdering(&fElectronMultipleScattering, idxPostStep, 1);
87 TG4ProcessControlMap* controlMap = TG4ProcessControlMap::Instance();
88 controlMap->Add(&fElectronBremsStrahlung, kBREM);
89 controlMap->Add(&fElectronIonisation, kLOSS);
90 controlMap->Add(&fElectronMultipleScattering, kMULS);
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);
99 //_____________________________________________________________________________
100 void TG4PhysicsConstructorEM::ConstructProcessForPositron()
102 // Constructs electromagnetic processes for e+.
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);
114 pManager->SetProcessOrdering(&fPositronMultipleScattering, idxAlongStep, 1);
115 pManager->SetProcessOrdering(&fPositronMultipleScattering, idxPostStep, 1);
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);
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);
134 //_____________________________________________________________________________
135 void TG4PhysicsConstructorEM::ConstructParticle()
137 // Instantiates particles.
141 G4Gamma::GammaDefinition();
144 G4Electron::ElectronDefinition();
145 G4Positron::PositronDefinition();
146 G4NeutrinoE::NeutrinoEDefinition();
147 G4AntiNeutrinoE::AntiNeutrinoEDefinition();
150 //_____________________________________________________________________________
151 void TG4PhysicsConstructorEM::ConstructProcess()
153 // Constructs electromagnetic processes for e+.
156 ConstructProcessForGamma();
157 ConstructProcessForElectron();
158 ConstructProcessForPositron();
160 if (VerboseLevel() > 0) {
161 G4cout << "### Electromagnetic physics constructed." << G4endl;