Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // 26 // 26 // >> 27 // $Id: G4AnnihiToMuPair.cc 97391 2016-06-02 10:08:45Z gcosmo $ 27 // 28 // 28 // ------------ G4AnnihiToMuPair physi 29 // ------------ G4AnnihiToMuPair physics process ------ 29 // by H.Burkhardt, S. Kelner and R. Ko 30 // by H.Burkhardt, S. Kelner and R. Kokoulin, November 2002 30 // ------------------------------------------- 31 // ----------------------------------------------------------------------------- 31 // 32 // 32 //....oooOO0OOooo........oooOO0OOooo........oo 33 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......// 33 // 34 // 34 // 27.01.03 : first implementation (hbu) 35 // 27.01.03 : first implementation (hbu) 35 // 04.02.03 : cosmetic simplifications (mma) 36 // 04.02.03 : cosmetic simplifications (mma) 36 // 25.10.04 : migrade to new interfaces of Par 37 // 25.10.04 : migrade to new interfaces of ParticleChange (vi) 37 // 28.02.18 : cross section now including SSS << 38 // 38 // 39 //....oooOO0OOooo........oooOO0OOooo........oo 39 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 40 40 41 #include "G4AnnihiToMuPair.hh" 41 #include "G4AnnihiToMuPair.hh" 42 42 43 #include "G4Exp.hh" << 43 #include "G4ios.hh" 44 #include "G4LossTableManager.hh" << 44 #include "Randomize.hh" 45 #include "G4Material.hh" << 46 #include "G4MuonMinus.hh" << 47 #include "G4MuonPlus.hh" << 48 #include "G4PhysicalConstants.hh" 45 #include "G4PhysicalConstants.hh" >> 46 #include "G4SystemOfUnits.hh" >> 47 49 #include "G4Positron.hh" 48 #include "G4Positron.hh" >> 49 #include "G4MuonPlus.hh" >> 50 #include "G4MuonMinus.hh" >> 51 #include "G4Material.hh" 50 #include "G4Step.hh" 52 #include "G4Step.hh" 51 #include "G4SystemOfUnits.hh" << 52 #include "G4TauMinus.hh" << 53 #include "G4TauPlus.hh" << 54 #include "G4ios.hh" << 55 #include "Randomize.hh" << 56 53 57 //....oooOO0OOooo........oooOO0OOooo........oo 54 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 58 55 >> 56 using namespace std; >> 57 59 G4AnnihiToMuPair::G4AnnihiToMuPair(const G4Str 58 G4AnnihiToMuPair::G4AnnihiToMuPair(const G4String& processName, 60 G4ProcessType type):G4VDiscreteProcess (pr 59 G4ProcessType type):G4VDiscreteProcess (processName, type) 61 { 60 { 62 //e+ Energy threshold << 61 //e+ Energy threshold 63 if(processName == "AnnihiToTauPair") { << 62 const G4double Mu_massc2 = G4MuonPlus::MuonPlus()->GetPDGMass(); 64 SetProcessSubType(fAnnihilationToTauTau); << 63 LowestEnergyLimit = 2.*Mu_massc2*Mu_massc2/electron_mass_c2 - electron_mass_c2; 65 part1 = G4TauPlus::TauPlus(); << 64 66 part2 = G4TauMinus::TauMinus(); << 65 //modele ok up to 1000 TeV due to neglected Z-interference 67 fInfo = "e+e->tau+tau-"; << 66 HighestEnergyLimit = 1000.*TeV; 68 } else { << 67 69 SetProcessSubType(fAnnihilationToMuMu); << 68 CurrentSigma = 0.0; 70 part1 = G4MuonPlus::MuonPlus(); << 69 CrossSecFactor = 1.; 71 part2 = G4MuonMinus::MuonMinus(); << 70 SetProcessSubType(6); 72 } << 73 fMass = part1->GetPDGMass(); << 74 fLowEnergyLimit = 2. * fMass * fMass / CLHEP << 75 71 76 // model is ok up to 1000 TeV due to neglect << 77 fHighEnergyLimit = 1000. * TeV; << 78 << 79 fCurrentSigma = 0.0; << 80 fCrossSecFactor = 1.; << 81 fManager = G4LossTableManager::Instance(); << 82 fManager->Register(this); << 83 } 72 } 84 73 85 //....oooOO0OOooo........oooOO0OOooo........oo 74 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 86 75 87 G4AnnihiToMuPair::~G4AnnihiToMuPair() // (empt 76 G4AnnihiToMuPair::~G4AnnihiToMuPair() // (empty) destructor 88 { << 77 { } 89 fManager->DeRegister(this); << 90 } << 91 78 92 //....oooOO0OOooo........oooOO0OOooo........oo 79 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 93 80 94 G4bool G4AnnihiToMuPair::IsApplicable(const G4 81 G4bool G4AnnihiToMuPair::IsApplicable(const G4ParticleDefinition& particle) 95 { 82 { 96 return ( &particle == G4Positron::Positron() 83 return ( &particle == G4Positron::Positron() ); 97 } 84 } 98 85 99 //....oooOO0OOooo........oooOO0OOooo........oo 86 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 100 87 101 void G4AnnihiToMuPair::BuildPhysicsTable(const 88 void G4AnnihiToMuPair::BuildPhysicsTable(const G4ParticleDefinition&) >> 89 // Build cross section and mean free path tables >> 90 //here no tables, just calling PrintInfoDefinition 102 { 91 { >> 92 CurrentSigma = 0.0; 103 PrintInfoDefinition(); 93 PrintInfoDefinition(); 104 } 94 } 105 95 106 //....oooOO0OOooo........oooOO0OOooo........oo 96 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 107 97 108 void G4AnnihiToMuPair::SetCrossSecFactor(G4dou 98 void G4AnnihiToMuPair::SetCrossSecFactor(G4double fac) 109 // Set the factor to artificially increase the 99 // Set the factor to artificially increase the cross section 110 { 100 { 111 fCrossSecFactor = fac; << 101 CrossSecFactor = fac; 112 //G4cout << "The cross section for AnnihiToM << 102 G4cout << "The cross section for AnnihiToMuPair is artificially " 113 // << "increased by the CrossSecFactor << 103 << "increased by the CrossSecFactor=" << CrossSecFactor << G4endl; 114 } 104 } 115 105 116 //....oooOO0OOooo........oooOO0OOooo........oo 106 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 117 107 118 G4double G4AnnihiToMuPair::ComputeCrossSection << 108 G4double G4AnnihiToMuPair::ComputeCrossSectionPerAtom(G4double Epos, G4double Z) 119 // Calculates the microscopic cross section in 109 // Calculates the microscopic cross section in GEANT4 internal units. 120 // It gives a good description from threshold 110 // It gives a good description from threshold to 1000 GeV 121 { 111 { 122 G4double rmuon = CLHEP::elm_coupling/fMass; << 112 static const G4double Mmuon = G4MuonPlus::MuonPlus()->GetPDGMass(); 123 G4double sig0 = CLHEP::pi*rmuon*rmuon/3.; << 113 static const G4double Rmuon = elm_coupling/Mmuon; //classical particle radius 124 const G4double pial = CLHEP::pi*CLHEP::fine_ << 114 static const G4double Sig0 = pi*Rmuon*Rmuon/3.; //constant in crossSection 125 115 126 if (e <= fLowEnergyLimit) return 0.0; << 116 G4double CrossSection = 0.; >> 117 if (Epos < LowestEnergyLimit) return CrossSection; 127 118 128 const G4double xi = fLowEnergyLimit/e; << 119 G4double xi = LowestEnergyLimit/Epos; 129 const G4double piaxi = pial * std::sqrt(xi); << 120 G4double SigmaEl = Sig0*xi*(1.+xi/2.)*sqrt(1.-xi); // per electron 130 G4double sigma = sig0 * xi * (1. + xi*0.5); << 121 CrossSection = SigmaEl*Z; // number of electrons per atom 131 //G4cout << "### xi= " << xi << " piaxi=" << << 122 return CrossSection; 132 << 133 // argument of the exponent below 0.1 or abo << 134 // Sigma per electron * number of electrons << 135 if(xi <= 1.0 - 100*piaxi*piaxi) { << 136 sigma *= std::sqrt(1.0 - xi); << 137 } << 138 else if (xi >= 1.0 - 0.01 * piaxi * piaxi) { << 139 sigma *= piaxi; << 140 } << 141 else { << 142 sigma *= piaxi / (1. - G4Exp(-piaxi / std: << 143 } << 144 // G4cout << "### sigma= " << sigma << G4end << 145 return sigma; << 146 } 123 } 147 124 148 //....oooOO0OOooo........oooOO0OOooo........oo 125 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 149 126 150 G4double G4AnnihiToMuPair::ComputeCrossSection << 127 G4double G4AnnihiToMuPair::CrossSectionPerVolume(G4double PositronEnergy, 151 << 128 const G4Material* aMaterial) 152 { 129 { 153 return ComputeCrossSectionPerElectron(energy << 130 const G4ElementVector* theElementVector = aMaterial->GetElementVector(); 154 } << 131 const G4double* NbOfAtomsPerVolume = aMaterial->GetVecNbOfAtomsPerVolume(); 155 132 156 //....oooOO0OOooo........oooOO0OOooo........oo << 133 G4double SIGMA = 0.0; 157 134 158 G4double G4AnnihiToMuPair::CrossSectionPerVolu << 135 for ( size_t i=0 ; i < aMaterial->GetNumberOfElements() ; ++i ) 159 const G4Material* aMaterial) << 136 { 160 { << 137 G4double AtomicZ = (*theElementVector)[i]->GetZ(); 161 return ComputeCrossSectionPerElectron(energy << 138 SIGMA += NbOfAtomsPerVolume[i] * >> 139 ComputeCrossSectionPerAtom(PositronEnergy,AtomicZ); >> 140 } >> 141 return SIGMA; 162 } 142 } 163 143 164 //....oooOO0OOooo........oooOO0OOooo........oo 144 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 165 145 166 G4double G4AnnihiToMuPair::GetMeanFreePath(con 146 G4double G4AnnihiToMuPair::GetMeanFreePath(const G4Track& aTrack, 167 G4d 147 G4double, G4ForceCondition*) >> 148 168 // returns the positron mean free path in GEAN 149 // returns the positron mean free path in GEANT4 internal units >> 150 169 { 151 { 170 const G4DynamicParticle* aDynamicPositron = 152 const G4DynamicParticle* aDynamicPositron = aTrack.GetDynamicParticle(); 171 G4double energy = aDynamicPositron->GetTotal << 153 G4double PositronEnergy = aDynamicPositron->GetKineticEnergy() 172 const G4Material* aMaterial = aTrack.GetMate << 154 +electron_mass_c2; 173 << 155 G4Material* aMaterial = aTrack.GetMaterial(); 174 // cross section before step << 156 CurrentSigma = CrossSectionPerVolume(PositronEnergy, aMaterial); 175 fCurrentSigma = CrossSectionPerVolume(energy << 176 157 177 // increase the CrossSection by CrossSecFact 158 // increase the CrossSection by CrossSecFactor (default 1) 178 return (fCurrentSigma > 0.0) ? 1.0/(fCurrent << 159 G4double mfp = DBL_MAX; >> 160 if(CurrentSigma > DBL_MIN) mfp = 1.0/(CurrentSigma*CrossSecFactor); >> 161 >> 162 return mfp; 179 } 163 } 180 164 181 //....oooOO0OOooo........oooOO0OOooo........oo 165 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 182 166 183 G4VParticleChange* G4AnnihiToMuPair::PostStepD 167 G4VParticleChange* G4AnnihiToMuPair::PostStepDoIt(const G4Track& aTrack, 184 168 const G4Step& aStep) 185 // 169 // 186 // generation of e+e- -> mu+mu- 170 // generation of e+e- -> mu+mu- 187 // 171 // 188 { 172 { >> 173 189 aParticleChange.Initialize(aTrack); 174 aParticleChange.Initialize(aTrack); >> 175 static const G4double Mele=electron_mass_c2; >> 176 static const G4double Mmuon=G4MuonPlus::MuonPlus()->GetPDGMass(); 190 177 191 // current Positron energy and direction, re 178 // current Positron energy and direction, return if energy too low 192 const G4DynamicParticle *aDynamicPositron = 179 const G4DynamicParticle *aDynamicPositron = aTrack.GetDynamicParticle(); 193 const G4double Mele = CLHEP::electron_mass_c << 180 G4double Epos = aDynamicPositron->GetKineticEnergy() + Mele; 194 G4double Epos = aDynamicPositron->GetTotalEn << 195 G4double xs = CrossSectionPerVolume(Epos, aT << 196 181 197 // test of cross section 182 // test of cross section 198 if(xs > 0.0 && fCurrentSigma*G4UniformRand() << 183 if(CurrentSigma*G4UniformRand() > 199 return G4VDiscreteProcess::PostStepDoIt(aT << 184 CrossSectionPerVolume(Epos, aTrack.GetMaterial())) >> 185 { >> 186 return G4VDiscreteProcess::PostStepDoIt(aTrack,aStep); >> 187 } >> 188 >> 189 if (Epos < LowestEnergyLimit) { >> 190 return G4VDiscreteProcess::PostStepDoIt(aTrack,aStep); 200 } 191 } 201 192 202 const G4ThreeVector PosiDirection = aDynamic << 193 G4ParticleMomentum PositronDirection = 203 G4double xi = fLowEnergyLimit/Epos; // xi is << 194 aDynamicPositron->GetMomentumDirection(); 204 // goes << 195 G4double xi = LowestEnergyLimit/Epos; // xi is always less than 1, >> 196 // goes to 0 at high Epos 205 197 206 // generate cost; probability function 1+cos << 198 // generate cost 207 // 199 // 208 G4double cost; 200 G4double cost; 209 do { cost = 2.*G4UniformRand()-1.; } 201 do { cost = 2.*G4UniformRand()-1.; } 210 // Loop checking, 07-Aug-2015, Vladimir Ivan 202 // Loop checking, 07-Aug-2015, Vladimir Ivanchenko 211 while (2.*G4UniformRand() > 1.+xi+cost*cost* 203 while (2.*G4UniformRand() > 1.+xi+cost*cost*(1.-xi) ); 212 G4double sint = std::sqrt(1.-cost*cost); << 204 //1+cost**2 at high Epos >> 205 G4double sint = sqrt(1.-cost*cost); 213 206 214 // generate phi 207 // generate phi 215 // 208 // 216 G4double phi = 2.*CLHEP::pi*G4UniformRand(); << 209 G4double phi=2.*pi*G4UniformRand(); 217 210 218 G4double Ecm = std::sqrt(0.5*Mele*(Epos+Me << 211 G4double Ecm = sqrt(0.5*Mele*(Epos+Mele)); 219 G4double Pcm = std::sqrt(Ecm*Ecm - fMass*f << 212 G4double Pcm = sqrt(Ecm*Ecm-Mmuon*Mmuon); 220 G4double beta = std::sqrt((Epos-Mele)/(Epos << 213 G4double beta = sqrt((Epos-Mele)/(Epos+Mele)); 221 G4double gamma = Ecm/Mele; << 214 G4double gamma = Ecm/Mele; // =sqrt((Epos+Mele)/(2.*Mele)); 222 G4double Pt = Pcm*sint; 215 G4double Pt = Pcm*sint; 223 216 224 // energy and momentum of the muons in the L 217 // energy and momentum of the muons in the Lab 225 // 218 // 226 G4double EmuPlus = gamma*(Ecm + cost*beta* << 219 G4double EmuPlus = gamma*( Ecm+cost*beta*Pcm); 227 G4double EmuMinus = gamma*(Ecm - cost*beta* << 220 G4double EmuMinus = gamma*( Ecm-cost*beta*Pcm); 228 G4double PmuPlusZ = gamma*(beta*Ecm + cost* << 221 G4double PmuPlusZ = gamma*(beta*Ecm+cost* Pcm); 229 G4double PmuMinusZ = gamma*(beta*Ecm - cost* << 222 G4double PmuMinusZ = gamma*(beta*Ecm-cost* Pcm); 230 G4double PmuPlusX = Pt*std::cos(phi); << 223 G4double PmuPlusX = Pt*cos(phi); 231 G4double PmuPlusY = Pt*std::sin(phi); << 224 G4double PmuPlusY = Pt*sin(phi); 232 G4double PmuMinusX =-PmuPlusX; << 225 G4double PmuMinusX =-Pt*cos(phi); 233 G4double PmuMinusY =-PmuPlusY; << 226 G4double PmuMinusY =-Pt*sin(phi); 234 // absolute momenta 227 // absolute momenta 235 G4double PmuPlus = std::sqrt(Pt*Pt+PmuPlusZ << 228 G4double PmuPlus = sqrt(Pt*Pt+PmuPlusZ *PmuPlusZ ); 236 G4double PmuMinus = std::sqrt(Pt*Pt+PmuMinus << 229 G4double PmuMinus = sqrt(Pt*Pt+PmuMinusZ*PmuMinusZ); 237 230 238 // mu+ mu- directions for Positron in z-dire 231 // mu+ mu- directions for Positron in z-direction 239 // 232 // 240 G4ThreeVector MuPlusDirection(PmuPlusX / Pmu << 233 G4ThreeVector 241 G4ThreeVector MuMinusDirection(PmuMinusX / P << 234 MuPlusDirection ( PmuPlusX/PmuPlus, PmuPlusY/PmuPlus, PmuPlusZ/PmuPlus ); >> 235 G4ThreeVector >> 236 MuMinusDirection(PmuMinusX/PmuMinus,PmuMinusY/PmuMinus,PmuMinusZ/PmuMinus); 242 237 243 // rotate to actual Positron direction 238 // rotate to actual Positron direction 244 // 239 // 245 MuPlusDirection.rotateUz(PosiDirection); << 240 MuPlusDirection.rotateUz(PositronDirection); 246 MuMinusDirection.rotateUz(PosiDirection); << 241 MuMinusDirection.rotateUz(PositronDirection); 247 242 248 aParticleChange.SetNumberOfSecondaries(2); 243 aParticleChange.SetNumberOfSecondaries(2); 249 << 250 // create G4DynamicParticle object for the p 244 // create G4DynamicParticle object for the particle1 251 auto aParticle1 = new G4DynamicParticle(part << 245 G4DynamicParticle* aParticle1= new G4DynamicParticle( >> 246 G4MuonPlus::MuonPlus(),MuPlusDirection,EmuPlus-Mmuon); 252 aParticleChange.AddSecondary(aParticle1); 247 aParticleChange.AddSecondary(aParticle1); 253 // create G4DynamicParticle object for the p 248 // create G4DynamicParticle object for the particle2 254 auto aParticle2 = new G4DynamicParticle(part << 249 G4DynamicParticle* aParticle2= new G4DynamicParticle( >> 250 G4MuonMinus::MuonMinus(),MuMinusDirection,EmuMinus-Mmuon); 255 aParticleChange.AddSecondary(aParticle2); 251 aParticleChange.AddSecondary(aParticle2); 256 252 257 // Kill the incident positron 253 // Kill the incident positron 258 // 254 // 259 aParticleChange.ProposeEnergy(0.); 255 aParticleChange.ProposeEnergy(0.); 260 aParticleChange.ProposeTrackStatus(fStopAndK 256 aParticleChange.ProposeTrackStatus(fStopAndKill); 261 257 262 return &aParticleChange; 258 return &aParticleChange; 263 } 259 } 264 260 265 //....oooOO0OOooo........oooOO0OOooo........oo 261 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 266 262 267 void G4AnnihiToMuPair::PrintInfoDefinition() 263 void G4AnnihiToMuPair::PrintInfoDefinition() 268 { 264 { 269 G4String comments = fInfo + " annihilation, << 265 G4String comments ="e+e->mu+mu- annihilation, atomic e- at rest, SubType=."; 270 G4cout << G4endl << GetProcessName() << ": << 266 G4cout << G4endl << GetProcessName() << ": " << comments 271 G4cout << " threshold at " << fLowEne << 267 << GetProcessSubType() << G4endl; 272 << " good description up to " << fHig << 268 G4cout << " threshold at " << LowestEnergyLimit/GeV << " GeV" 273 << G4endl; << 269 << " good description up to " >> 270 << HighestEnergyLimit/TeV << " TeV for all Z." << G4endl; 274 } 271 } 275 272 276 //....oooOO0OOooo........oooOO0OOooo........oo 273 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 277 274