G4eBremParametrizedModel.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 // GEANT4 tag $Name: geant4-09-04 $
00028 //
00029 // -------------------------------------------------------------------
00030 //
00031 // GEANT4 Class header file
00032 //
00033 //
00034 // File name:     G4eBremParametrizedModel
00035 //                extention of standard G4eBremsstrahlungModel
00036 //
00037 // Author:        Andreas Schaelicke 
00038 //
00039 // Creation date: 28.03.2008
00040 //
00041 // Modifications:
00042 //
00043 //
00044 // Class Description:
00045 //
00046 // Implementation of energy loss for gamma emission by electrons and
00047 // positrons including an improved version of the LPM effect
00048 
00049 // -------------------------------------------------------------------
00050 //
00051 
00052 #ifndef G4eBremParametrizedModel_h
00053 #define G4eBremParametrizedModel_h 1
00054 
00055 #include "G4VEmModel.hh"
00056 #include "G4NistManager.hh"
00057 
00058 class G4ParticleChangeForLoss;
00059 class G4PhysicsVector;
00060 
00061 class G4eBremParametrizedModel : public G4VEmModel
00062 {
00063 
00064 public:
00065 
00066   G4eBremParametrizedModel(const G4ParticleDefinition* p = 0, 
00067                            const G4String& nam = "eBremParam");
00068 
00069   virtual ~G4eBremParametrizedModel();
00070 
00071   virtual void Initialise(const G4ParticleDefinition*, const G4DataVector&);
00072 
00073   virtual G4double MinEnergyCut(const G4ParticleDefinition*, 
00074                                 const G4MaterialCutsCouple*);
00075 
00076   virtual G4double ComputeDEDXPerVolume(const G4Material*,
00077                                         const G4ParticleDefinition*,
00078                                         G4double kineticEnergy,
00079                                         G4double cutEnergy);
00080                                         
00081   virtual G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
00082                                               G4double tkin, 
00083                                               G4double Z,   G4double,
00084                                               G4double cutEnergy,
00085                                               G4double maxEnergy = DBL_MAX);
00086   
00087   virtual void SampleSecondaries(std::vector<G4DynamicParticle*>*,
00088                                  const G4MaterialCutsCouple*,
00089                                  const G4DynamicParticle*,
00090                                  G4double cutEnergy,
00091                                  G4double maxEnergy);
00092 
00093   virtual void SetupForMaterial(const G4ParticleDefinition*,
00094                                 const G4Material*,G4double);
00095 
00096 
00097 private:
00098 
00099   void InitialiseConstants();
00100 
00101   G4double ComputeBremLoss(G4double cutEnergy);
00102 
00103   G4double ComputeXSectionPerAtom(G4double cutEnergy);
00104 
00105   G4double ComputeDXSectionPerAtom(G4double gammaEnergy);
00106 
00107   void SetParticle(const G4ParticleDefinition* p);
00108 
00109   // * fast inline functions *
00110   inline void SetCurrentElement(const G4double);
00111 
00112   // hide assignment operator
00113   G4eBremParametrizedModel & operator=(const  G4eBremParametrizedModel &right);
00114   G4eBremParametrizedModel(const  G4eBremParametrizedModel&);
00115 
00116 protected:
00117 
00118   G4NistManager*              nist;
00119   const G4ParticleDefinition* particle;
00120   G4ParticleDefinition*       theGamma;
00121   G4ParticleChangeForLoss*    fParticleChange;
00122 
00123   static const G4double xgi[8], wgi[8];
00124 
00125   G4double minThreshold;
00126 
00127   // cash
00128   G4double particleMass;
00129   G4double kinEnergy;
00130   G4double totalEnergy;
00131   G4double currentZ;
00132   G4double z13, z23, lnZ;
00133   G4double densityFactor;
00134   G4double densityCorr;
00135   G4double Fel, Finel;
00136   G4double facFel, facFinel;
00137   G4double fMax,fCoulomb;
00138 
00139   G4bool   isElectron;
00140 
00141 private:
00142 
00143   // consts
00144   G4double lowKinEnergy;
00145   G4double fMigdalConstant;
00146   G4double bremFactor;
00147 
00148   G4bool   isInitialised;
00149 };
00150 
00151 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00152 
00153 inline void G4eBremParametrizedModel::SetCurrentElement(const G4double Z)
00154 {
00155   std::cout<<"SetCurrentElement Z="<<Z<<std::endl;
00156   if(Z != currentZ) {
00157     currentZ = Z;
00158 
00159     G4int iz = G4int(Z);
00160     z13 = nist->GetZ13(iz);
00161     z23 = z13*z13;
00162     lnZ = nist->GetLOGZ(iz);
00163 
00164     Fel = facFel - lnZ/3. ;
00165     Finel = facFinel - 2.*lnZ/3. ;
00166 
00167     fCoulomb = GetCurrentElement()->GetfCoulomb();
00168     fMax = Fel-fCoulomb + Finel/currentZ  +  (1.+1./currentZ)/12.;
00169 
00170   }
00171 }
00172 
00173 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
00174 
00175 
00176 #endif

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