G4MuPairProductionModel.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 // $Id$
00027 //
00028 // -------------------------------------------------------------------
00029 //
00030 // GEANT4 Class header file
00031 //
00032 //
00033 // File name:     G4MuPairProductionModel
00034 //
00035 // Author:        Vladimir Ivanchenko on base of Laszlo Urban code
00036 //
00037 // Creation date: 18.05.2002
00038 //
00039 // Modifications:
00040 //
00041 // 23-12-02 Change interface in order to move to cut per region (V.Ivanchenko)
00042 // 27-01-03 Make models region aware (V.Ivanchenko)
00043 // 13-02-03 Add name (V.Ivanchenko)
00044 // 10-02-04 Update parameterisation using R.Kokoulin model (V.Ivanchenko)
00045 // 10-02-04 Add lowestKinEnergy (V.Ivanchenko)
00046 // 13-02-06 Add ComputeCrossSectionPerAtom (mma)
00047 // 12-05-06 Add parameter to SelectRandomAtom (A.Bogdanov) 
00048 // 11-10-07 Add ignoreCut flag (V.Ivanchenko) 
00049 // 28-02-08 Reorganized protected methods and members (V.Ivanchenko) 
00050 
00051 //
00052 // Class Description:
00053 //
00054 // Implementation of e+e- pair production by muons
00055 //
00056 
00057 // -------------------------------------------------------------------
00058 //
00059 
00060 #ifndef G4MuPairProductionModel_h
00061 #define G4MuPairProductionModel_h 1
00062 
00063 #include "G4VEmModel.hh"
00064 #include "G4NistManager.hh"
00065 #include <vector>
00066 
00067 class G4Element;
00068 class G4ParticleChangeForLoss;
00069 class G4ParticleChangeForGamma;
00070 
00071 class G4MuPairProductionModel : public G4VEmModel
00072 {
00073 public:
00074 
00075   G4MuPairProductionModel(const G4ParticleDefinition* p = 0,
00076                           const G4String& nam = "muPairProd");
00077 
00078   virtual ~G4MuPairProductionModel();
00079 
00080   virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
00081                         
00082   virtual G4double ComputeCrossSectionPerAtom(
00083                                  const G4ParticleDefinition*,
00084                                  G4double kineticEnergy,
00085                                  G4double Z, G4double A,
00086                                  G4double cutEnergy,
00087                                  G4double maxEnergy);
00088                                  
00089   virtual G4double ComputeDEDXPerVolume(const G4Material*,
00090                                 const G4ParticleDefinition*,
00091                                 G4double kineticEnergy,
00092                                 G4double cutEnergy);
00093 
00094   virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*, 
00095                                  const G4MaterialCutsCouple*,
00096                                  const G4DynamicParticle*,
00097                                  G4double tmin,
00098                                  G4double maxEnergy);
00099 
00100   virtual G4double MinEnergyCut(const G4ParticleDefinition*,
00101                                const G4MaterialCutsCouple*);
00102 
00103   inline void SetLowestKineticEnergy(G4double e);
00104 
00105   inline void SetParticle(const G4ParticleDefinition*);
00106 
00107 protected:
00108 
00109   G4double ComputMuPairLoss(G4double Z, G4double tkin, G4double cut,
00110                             G4double tmax);
00111 
00112   G4double ComputeMicroscopicCrossSection(G4double tkin,
00113                                           G4double Z,
00114                                           G4double cut);
00115 
00116   virtual G4double ComputeDMicroscopicCrossSection(G4double tkin,
00117                                                    G4double Z,
00118                                                    G4double pairEnergy);
00119 
00120   virtual G4double MaxSecondaryEnergy(const G4ParticleDefinition*,
00121                                       G4double kineticEnergy);
00122 
00123   inline void SetCurrentElement(G4double Z);
00124 
00125 private:
00126 
00127   const G4Element* SelectRandomAtom(G4double kinEnergy, 
00128                                     G4double dt, 
00129                                     G4int it,
00130                                     const G4MaterialCutsCouple* couple, 
00131                                     G4double tmin);
00132 
00133   void MakeSamplingTables();
00134 
00135   inline G4double InterpolatedIntegralCrossSection(
00136                      G4double dt, G4double dz, G4int iz,
00137                      G4int it, G4int iy, G4double z);
00138 
00139   // hide assignment operator
00140   G4MuPairProductionModel & operator=(const  G4MuPairProductionModel &right);
00141   G4MuPairProductionModel(const  G4MuPairProductionModel&);
00142 
00143 protected:
00144 
00145   const G4ParticleDefinition* particle;
00146   G4NistManager*              nist;
00147 
00148   G4double factorForCross;
00149   G4double sqrte;
00150   G4double particleMass;
00151   G4double currentZ;
00152   G4double z13;
00153   G4double z23;
00154   G4double lnZ;
00155 
00156   static G4double xgi[8],wgi[8];
00157 
00158 private:
00159 
00160   G4ParticleDefinition*       theElectron;
00161   G4ParticleDefinition*       thePositron;
00162   G4ParticleChangeForLoss*    fParticleChange;
00163 
00164   G4double minPairEnergy;
00165   G4double lowestKinEnergy;
00166 
00167   // tables for sampling
00168   G4int nzdat;
00169   G4int ntdat;
00170   G4int nbiny;
00171   size_t nmaxElements;
00172   static G4double zdat[5], adat[5], tdat[8];
00173   G4double ya[1001], proba[5][8][1001];
00174 
00175   G4double ymin;
00176   G4double ymax;
00177   G4double dy;
00178 
00179   G4bool  samplingTablesAreFilled;
00180   std::vector<G4double> partialSum;
00181 };
00182 
00183 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00184 
00185 inline void G4MuPairProductionModel::SetLowestKineticEnergy(G4double e) 
00186 {
00187   lowestKinEnergy = e;
00188 }
00189 
00190 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00191 
00192 inline
00193 void G4MuPairProductionModel::SetParticle(const G4ParticleDefinition* p)
00194 {
00195   if(!particle) {
00196     particle = p;
00197     particleMass = particle->GetPDGMass();
00198   }
00199 }
00200 
00201 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00202 
00203 inline void G4MuPairProductionModel::SetCurrentElement(G4double Z)
00204 {
00205   if(Z != currentZ) {
00206     currentZ = Z;
00207     G4int iz = G4int(Z);
00208     z13 = nist->GetZ13(iz);
00209     z23 = z13*z13;
00210     lnZ = nist->GetLOGZ(iz);
00211   }
00212 }
00213 
00214 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00215 
00216 inline G4double G4MuPairProductionModel::InterpolatedIntegralCrossSection(
00217                 G4double dt, G4double dz,
00218                 G4int iz, G4int it, G4int iy, G4double z)
00219 {
00220   G4double fac =  1./(zdat[iz]  *(zdat[iz]  +1.));
00221   G4double fac1 = 1./(zdat[iz-1]*(zdat[iz-1]+1.));
00222   G4double f0 = fac1*proba[iz-1][it-1][iy] + 
00223                 (fac*proba[iz][it-1][iy]-fac1*proba[iz-1][it-1][iy])*dz;
00224   G4double f1 = fac1*proba[iz-1][it  ][iy] + 
00225                 (fac*proba[iz][it  ][iy]-fac1*proba[iz-1][it  ][iy])*dz;
00226   return (f0 + (f1-f0)*dt)*z*(z+1.);
00227 }
00228 
00229 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00230 
00231 #endif

Generated on Mon May 27 17:48:55 2013 for Geant4 by  doxygen 1.4.7