source: trunk/examples/extended/analysis/A01/src/A01EMPhysics.cc@ 812

Last change on this file since 812 was 807, checked in by garnier, 17 years ago

update

File size: 4.9 KB
RevLine 
[807]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.8 2006/06/29 16:32:30 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
41A01EMPhysics::A01EMPhysics(const G4String& name)
42 : G4VPhysicsConstructor(name)
43{
44}
45
46A01EMPhysics::~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
63void 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 G4VProcess* theeminusMultipleScattering = new G4MultipleScattering();
76 G4VProcess* theeminusIonisation = new G4eIonisation();
77 G4VProcess* theeminusBremsstrahlung = new G4eBremsstrahlung();
78 //
79 // add process
80 pManager->AddProcess(theeminusMultipleScattering);
81 pManager->AddProcess(theeminusIonisation);
82 pManager->AddProcess(theeminusBremsstrahlung);
83 //
84 // set ordering for AlongStepDoIt
85 pManager->SetProcessOrdering(theeminusMultipleScattering, idxAlongStep,1);
86 pManager->SetProcessOrdering(theeminusIonisation, idxAlongStep,2);
87 pManager->SetProcessOrdering(theeminusBremsstrahlung, idxAlongStep,3);
88 //
89 // set ordering for PostStepDoIt
90 pManager->SetProcessOrdering(theeminusMultipleScattering, idxPostStep,1);
91 pManager->SetProcessOrdering(theeminusIonisation, idxPostStep,2);
92 pManager->SetProcessOrdering(theeminusBremsstrahlung, idxPostStep,3);
93
94 //Positron
95 pManager = G4Positron::Positron()->GetProcessManager();
96 G4VProcess* theeplusMultipleScattering = new G4MultipleScattering();
97 G4VProcess* theeplusIonisation = new G4eIonisation();
98 G4VProcess* theeplusBremsstrahlung = new G4eBremsstrahlung();
99 G4VProcess* theeplusAnnihilation = new G4eplusAnnihilation();
100
101 pManager->AddProcess(theeplusMultipleScattering);
102 pManager->AddProcess(theeplusIonisation);
103 pManager->AddProcess(theeplusBremsstrahlung);
104 pManager->AddProcess(theeplusAnnihilation);
105 //
106 // set ordering for AtRestDoIt
107 pManager->SetProcessOrderingToFirst(theeplusAnnihilation, idxAtRest);
108 //
109 // set ordering for AlongStepDoIt
110 pManager->SetProcessOrdering(theeplusMultipleScattering, idxAlongStep,1);
111 pManager->SetProcessOrdering(theeplusIonisation, idxAlongStep,2);
112 pManager->SetProcessOrdering(theeplusBremsstrahlung, idxAlongStep,3);
113 //
114 // set ordering for PostStepDoIt
115 pManager->SetProcessOrdering(theeplusMultipleScattering, idxPostStep,1);
116 pManager->SetProcessOrdering(theeplusIonisation, idxPostStep,2);
117 pManager->SetProcessOrdering(theeplusBremsstrahlung, idxPostStep,3);
118 pManager->SetProcessOrdering(theeplusAnnihilation, idxPostStep,4);
119
120}
Note: See TracBrowser for help on using the repository browser.