source: trunk/source/processes/electromagnetic/highenergy/src/G4AnnihiToMuPair.cc@ 899

Last change on this file since 899 was 819, checked in by garnier, 18 years ago

import all except CVS

File size: 9.6 KB
Line 
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//
27// $Id: G4AnnihiToMuPair.cc,v 1.3 2006/06/29 19:32:34 gunter Exp $
28// GEANT4 tag $Name: geant4-09-01-patch-02 $
29//
30// ------------ G4AnnihiToMuPair physics process ------
31// by H.Burkhardt, S. Kelner and R. Kokoulin, November 2002
32// -----------------------------------------------------------------------------
33//
34//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......//
35//
36// 27.01.03 : first implementation (hbu)
37// 04.02.03 : cosmetic simplifications (mma)
38// 25.10.04 : migrade to new interfaces of ParticleChange (vi)
39//
40//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
41
42#include "G4AnnihiToMuPair.hh"
43
44#include "G4ios.hh"
45#include "Randomize.hh"
46
47#include "G4Positron.hh"
48#include "G4MuonPlus.hh"
49#include "G4MuonMinus.hh"
50#include "G4Material.hh"
51#include "G4Step.hh"
52
53//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
54
55using namespace std;
56
57G4AnnihiToMuPair::G4AnnihiToMuPair(const G4String& processName,
58 G4ProcessType type):G4VDiscreteProcess (processName, type)
59{
60 //e+ Energy threshold
61 const G4double Mu_massc2 = G4MuonPlus::MuonPlus()->GetPDGMass();
62 LowestEnergyLimit = 2*Mu_massc2*Mu_massc2/electron_mass_c2 - electron_mass_c2;
63
64 //modele ok up to 1000 TeV due to neglected Z-interference
65 HighestEnergyLimit = 1000*TeV;
66
67 CrossSecFactor = 1.;
68}
69
70//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
71
72G4AnnihiToMuPair::~G4AnnihiToMuPair() // (empty) destructor
73{ }
74
75//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
76
77G4bool G4AnnihiToMuPair::IsApplicable(const G4ParticleDefinition& particle)
78{
79 return ( &particle == G4Positron::Positron() );
80}
81
82//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
83
84void G4AnnihiToMuPair::BuildPhysicsTable(const G4ParticleDefinition&)
85// Build cross section and mean free path tables
86//here no tables, just calling PrintInfoDefinition
87{
88 PrintInfoDefinition();
89}
90
91//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
92
93void G4AnnihiToMuPair::SetCrossSecFactor(G4double fac)
94// Set the factor to artificially increase the cross section
95{
96 CrossSecFactor = fac;
97 G4cout << "The cross section for AnnihiToMuPair is artificially "
98 << "increased by the CrossSecFactor=" << CrossSecFactor << G4endl;
99}
100
101//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
102
103G4double G4AnnihiToMuPair::ComputeCrossSectionPerAtom(G4double Epos, G4double Z)
104// Calculates the microscopic cross section in GEANT4 internal units.
105// It gives a good description from threshold to 1000 GeV
106{
107 static const G4double Mmuon = G4MuonPlus::MuonPlus()->GetPDGMass();
108 static const G4double Rmuon = elm_coupling/Mmuon; //classical particle radius
109 static const G4double Sig0 = pi*Rmuon*Rmuon/3.; //constant in crossSection
110
111 G4double CrossSection = 0.;
112 if (Epos < LowestEnergyLimit) return CrossSection;
113
114 G4double xi = LowestEnergyLimit/Epos;
115 G4double SigmaEl = Sig0*xi*(1.+xi/2.)*sqrt(1.-xi); // per electron
116 CrossSection = SigmaEl*Z; // number of electrons per atom
117 CrossSection *= CrossSecFactor; //increase the CrossSection by (default 1)
118 return CrossSection;
119}
120
121//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
122
123G4double G4AnnihiToMuPair::GetMeanFreePath(const G4Track& aTrack,
124 G4double, G4ForceCondition*)
125
126// returns the positron mean free path in GEANT4 internal units
127
128{
129 const G4DynamicParticle* aDynamicPositron = aTrack.GetDynamicParticle();
130 G4double PositronEnergy = aDynamicPositron->GetKineticEnergy()
131 +electron_mass_c2;
132 G4Material* aMaterial = aTrack.GetMaterial();
133 const G4ElementVector* theElementVector = aMaterial->GetElementVector();
134 const G4double* NbOfAtomsPerVolume = aMaterial->GetVecNbOfAtomsPerVolume();
135
136 G4double SIGMA = 0 ;
137
138 for ( size_t i=0 ; i < aMaterial->GetNumberOfElements() ; i++ )
139 {
140 G4double AtomicZ = (*theElementVector)[i]->GetZ();
141 SIGMA += NbOfAtomsPerVolume[i] *
142 ComputeCrossSectionPerAtom(PositronEnergy,AtomicZ);
143 }
144 return SIGMA > DBL_MIN ? 1./SIGMA : DBL_MAX;
145}
146
147//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
148
149G4VParticleChange* G4AnnihiToMuPair::PostStepDoIt(const G4Track& aTrack,
150 const G4Step& aStep)
151//
152// generation of e+e- -> mu+mu-
153//
154{
155
156 aParticleChange.Initialize(aTrack);
157 static const G4double Mele=electron_mass_c2;
158 static const G4double Mmuon=G4MuonPlus::MuonPlus()->GetPDGMass();
159
160 // current Positron energy and direction, return if energy too low
161 const G4DynamicParticle *aDynamicPositron = aTrack.GetDynamicParticle();
162 G4double Epos = aDynamicPositron->GetKineticEnergy()+Mele;
163
164 if (Epos < LowestEnergyLimit)
165 { G4cout
166 << "error in G4AnnihiToMuPair::PostStepDoIt called with energy below"
167 " threshold Epos= "
168 << Epos << G4endl; // shoud never happen
169 G4Exception(10);
170 }
171
172 if (Epos < LowestEnergyLimit)
173 return G4VDiscreteProcess::PostStepDoIt(aTrack,aStep);
174
175 G4ParticleMomentum PositronDirection =
176 aDynamicPositron->GetMomentumDirection();
177 G4double xi = LowestEnergyLimit/Epos; // xi is always less than 1,
178 // goes to 0 at high Epos
179
180 // generate cost
181 //
182 G4double cost;
183 do cost = 2.*G4UniformRand()-1.;
184 while (2.*G4UniformRand() > 1.+xi+cost*cost*(1.-xi) );
185 //1+cost**2 at high Epos
186 G4double sint = sqrt(1.-cost*cost);
187
188 // generate phi
189 //
190 G4double phi=2.*pi*G4UniformRand();
191
192 G4double Ecm = sqrt(0.5*Mele*(Epos+Mele));
193 G4double Pcm = sqrt(Ecm*Ecm-Mmuon*Mmuon);
194 G4double beta = sqrt((Epos-Mele)/(Epos+Mele));
195 G4double gamma = Ecm/Mele; // =sqrt((Epos+Mele)/(2.*Mele));
196 G4double Pt = Pcm*sint;
197
198 // energy and momentum of the muons in the Lab
199 //
200 G4double EmuPlus = gamma*( Ecm+cost*beta*Pcm);
201 G4double EmuMinus = gamma*( Ecm-cost*beta*Pcm);
202 G4double PmuPlusZ = gamma*(beta*Ecm+cost* Pcm);
203 G4double PmuMinusZ = gamma*(beta*Ecm-cost* Pcm);
204 G4double PmuPlusX = Pt*cos(phi);
205 G4double PmuPlusY = Pt*sin(phi);
206 G4double PmuMinusX =-Pt*cos(phi);
207 G4double PmuMinusY =-Pt*sin(phi);
208 // absolute momenta
209 G4double PmuPlus = sqrt(Pt*Pt+PmuPlusZ *PmuPlusZ );
210 G4double PmuMinus = sqrt(Pt*Pt+PmuMinusZ*PmuMinusZ);
211
212 // mu+ mu- directions for Positron in z-direction
213 //
214 G4ThreeVector
215 MuPlusDirection ( PmuPlusX/PmuPlus, PmuPlusY/PmuPlus, PmuPlusZ/PmuPlus );
216 G4ThreeVector
217 MuMinusDirection(PmuMinusX/PmuMinus,PmuMinusY/PmuMinus,PmuMinusZ/PmuMinus);
218
219 // rotate to actual Positron direction
220 //
221 MuPlusDirection.rotateUz(PositronDirection);
222 MuMinusDirection.rotateUz(PositronDirection);
223
224 aParticleChange.SetNumberOfSecondaries(2);
225 // create G4DynamicParticle object for the particle1
226 G4DynamicParticle* aParticle1= new G4DynamicParticle(
227 G4MuonPlus::MuonPlus(),MuPlusDirection,EmuPlus-Mmuon);
228 aParticleChange.AddSecondary(aParticle1);
229 // create G4DynamicParticle object for the particle2
230 G4DynamicParticle* aParticle2= new G4DynamicParticle(
231 G4MuonMinus::MuonMinus(),MuMinusDirection,EmuMinus-Mmuon);
232 aParticleChange.AddSecondary(aParticle2);
233
234 // Kill the incident positron
235 //
236 aParticleChange.ProposeEnergy(0.);
237 aParticleChange.ProposeTrackStatus(fStopAndKill);
238
239 return &aParticleChange;
240}
241
242//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
243
244void G4AnnihiToMuPair::PrintInfoDefinition()
245{
246 G4String comments ="e+e->mu+mu- annihilation, atomic e- at rest.\n";
247 G4cout << G4endl << GetProcessName() << ": " << comments
248 << " threshold at " << LowestEnergyLimit/GeV << " GeV"
249 << " good description up to "
250 << HighestEnergyLimit/TeV << " TeV for all Z." << G4endl;
251}
252
253//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
Note: See TracBrowser for help on using the repository browser.