G4VXTRenergyLoss.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 //
00027 // $Id$
00028 //
00029 // 
00031 // 
00032 // base class for 'fast' parametrisation model describing X-ray transition
00033 // created in some G4Envelope. Anglur distribuiton is very rough !!! (see DoIt
00034 // method
00035 // 
00036 // History:
00037 // 06.10.05 V. Grichine first step to discrete process
00038 // 15.01.02 V. Grichine first version
00039 // 28.07.05, P.Gumplinger add G4ProcessType to constructor
00040 // 28.09.07, V.Ivanchenko general cleanup without change of algorithms
00041 //
00042 
00043 #ifndef G4VXTRenergyLoss_h
00044 #define G4VXTRenergyLoss_h 1
00045 
00046 #include <complex>
00047 #include "globals.hh"
00048 #include "Randomize.hh"
00049 
00050 #include "G4LogicalVolume.hh"
00051 
00052 #include "G4PhysicsTable.hh"
00053 #include "G4PhysicsLogVector.hh"
00054 #include "G4Gamma.hh"
00055 #include "G4ThreeVector.hh"
00056 #include "G4ParticleMomentum.hh"
00057 #include "G4Step.hh"
00058 #include "G4Track.hh"
00059 #include "G4VContinuousProcess.hh"
00060 #include "G4VDiscreteProcess.hh"
00061 #include "G4DynamicParticle.hh"
00062 #include "G4Material.hh" 
00063 #include "G4PhysicsTable.hh"
00064 #include "G4MaterialPropertiesTable.hh"
00065 #include "G4PhysicsOrderedFreeVector.hh"
00066 #include "G4Integrator.hh"
00067 #include "G4ParticleChange.hh"
00068 
00069 class G4SandiaTable;
00070 class G4VParticleChange;
00071 class G4PhysicsFreeVector;
00072 class G4PhysicsLinearVector;
00073 
00074 class G4VXTRenergyLoss : public G4VDiscreteProcess  // G4VContinuousProcess
00075 {
00076 public:
00077 
00078   G4VXTRenergyLoss (G4LogicalVolume *anEnvelope,G4Material*,G4Material*,
00079                     G4double,G4double,G4int,
00080                     const G4String & processName = "XTRenergyLoss",
00081                     G4ProcessType type = fElectromagnetic);
00082   virtual  ~G4VXTRenergyLoss ();
00083 
00084   // These virtual has to be implemented in inherited particular TR radiators
00085  
00086   virtual  G4double GetStackFactor( G4double energy, G4double gamma,
00087                                                      G4double varAngle );
00088 
00089   G4bool IsApplicable(const G4ParticleDefinition&);
00090 
00091   G4VParticleChange* PostStepDoIt(const G4Track& aTrack, 
00092                                    const G4Step&  aStep);
00093 
00094   G4double GetMeanFreePath(const G4Track& aTrack,
00095                            G4double previousStepSize,
00096                            G4ForceCondition* condition);
00097 
00098   void BuildPhysicsTable(const G4ParticleDefinition&);
00099   void BuildEnergyTable() ;
00100   void BuildAngleForEnergyBank() ;
00101 
00102   void BuildTable(){} ;
00103   void BuildAngleTable() ;
00104   void BuildGlobalAngleTable() ;
00105 
00106   G4complex OneInterfaceXTRdEdx( G4double energy, 
00107                                 G4double gamma,
00108                                 G4double varAngle ) ;
00109 
00110   G4double SpectralAngleXTRdEdx(G4double varAngle) ;
00111 
00112   virtual  G4double SpectralXTRdEdx(G4double energy) ;
00113 
00114   G4double AngleSpectralXTRdEdx(G4double energy) ;
00115 
00116   G4double AngleXTRdEdx(G4double varAngle) ;
00117 
00118 
00120 
00121   G4double OneBoundaryXTRNdensity( G4double energy,
00122                                    G4double gamma,
00123                                    G4double varAngle ) const ;
00124 
00125 
00126   // for photon energy distribution tables
00127 
00128   G4double XTRNSpectralAngleDensity(G4double varAngle) ;
00129   G4double XTRNSpectralDensity(G4double energy) ;
00130   
00131   // for photon angle distribution tables
00132 
00133   G4double XTRNAngleSpectralDensity(G4double energy) ;
00134   G4double XTRNAngleDensity(G4double varAngle) ;
00135 
00136   void GetNumberOfPhotons() ;  
00137 
00138   // Auxiliary functions for plate/gas material parameters
00139 
00140   G4double  GetPlateFormationZone(G4double,G4double,G4double);
00141   G4complex GetPlateComplexFZ(G4double,G4double,G4double);
00142   void      ComputePlatePhotoAbsCof();
00143   G4double  GetPlateLinearPhotoAbs(G4double);
00144   void      GetPlateZmuProduct() ;
00145   G4double  GetPlateZmuProduct(G4double,G4double,G4double);
00146 
00147   G4double  GetGasFormationZone(G4double,G4double,G4double);
00148   G4complex GetGasComplexFZ(G4double,G4double,G4double);
00149   void      ComputeGasPhotoAbsCof();
00150   G4double  GetGasLinearPhotoAbs(G4double);
00151   void      GetGasZmuProduct();
00152   G4double  GetGasZmuProduct(G4double,G4double,G4double);
00153 
00154   G4double  GetPlateCompton(G4double);
00155   G4double  GetGasCompton(G4double);
00156   G4double  GetComptonPerAtom(G4double,G4double);
00157 
00158   G4double  GetXTRrandomEnergy( G4double scaledTkin, G4int iTkin );
00159   G4double  GetXTRenergy( G4int iPlace, G4double position, G4int iTransfer  );
00160 
00161   G4double  GetRandomAngle( G4double energyXTR, G4int iTkin );
00162   G4double  GetAngleXTR(G4int iTR,G4double position,G4int iAngle);
00163 
00164   G4double  GetGamma()   {return fGamma;}; 
00165   G4double  GetEnergy()  {return fEnergy;};                
00166   G4double  GetVarAngle(){return fVarAngle;};
00167                
00168   void SetGamma(G4double gamma)      {fGamma    = gamma;}; 
00169   void SetEnergy(G4double energy)    {fEnergy   = energy;};                
00170   void SetVarAngle(G4double varAngle){fVarAngle = varAngle;};               
00171   void SetAngleRadDistr(G4bool pAngleRadDistr){fAngleRadDistr=pAngleRadDistr;};               
00172   void SetCompton(G4bool pC){fCompton=pC;};               
00173 
00174   G4PhysicsLogVector* GetProtonVector(){ return fProtonEnergyVector;};
00175   G4int GetTotBin(){return fTotBin;};           
00176   G4PhysicsFreeVector* GetAngleVector(G4double energy, G4int n);
00177 
00178 protected:
00179 
00180   G4ParticleDefinition* fPtrGamma ;    // pointer to TR photon
00181 
00182   G4double* fGammaCutInKineticEnergy ; // TR photon cut in energy array
00183 
00184   G4double         fGammaTkinCut ;     // Tkin cut of TR photon in current mat.
00185   G4LogicalVolume* fEnvelope ;
00186   G4PhysicsTable*  fAngleDistrTable ;
00187   G4PhysicsTable*  fEnergyDistrTable ;
00188 
00189   G4PhysicsLogVector* fProtonEnergyVector ;
00190   G4PhysicsLogVector* fXTREnergyVector ;
00191 
00192   G4double fTheMinEnergyTR;            //   min TR energy
00193   G4double fTheMaxEnergyTR;            //   max TR energy
00194   G4double fMinEnergyTR;               //  min TR energy in material
00195   G4double fMaxEnergyTR;               //  max TR energy in material
00196   G4double fTheMaxAngle;               //  max theta of TR quanta
00197   G4double fTheMinAngle;               //  max theta of TR quanta
00198   G4double fMaxThetaTR;                //  max theta of TR quanta
00199   G4int    fBinTR;                     //  number of bins in TR vectors
00200 
00201   G4double fMinProtonTkin;             // min Tkin of proton in tables
00202   G4double fMaxProtonTkin;             // max Tkin of proton in tables
00203   G4int    fTotBin;                    // number of bins in log scale
00204   G4double fGamma;                     // current Lorentz factor
00205   G4double fEnergy;                    // energy and
00206   G4double fVarAngle;                  // angle squared
00207   G4double fLambda;
00208 
00209   G4double fPlasmaCof ;                // physical consts for plasma energy
00210   G4double fCofTR ;  
00211 
00212   G4bool   fExitFlux;
00213   G4bool   fAngleRadDistr;
00214   G4bool   fCompton;
00215   G4double fSigma1; 
00216   G4double fSigma2;                    // plasma energy Sq of matter1/2
00217 
00218   G4int    fMatIndex1;
00219   G4int    fMatIndex2;
00220   G4int    fPlateNumber;
00221 
00222   G4double fTotalDist;
00223   G4double fPlateThick;
00224   G4double fGasThick;     
00225   G4double fAlphaPlate;
00226   G4double fAlphaGas ;
00227 
00228   G4SandiaTable* fPlatePhotoAbsCof;
00229  
00230   G4SandiaTable* fGasPhotoAbsCof;
00231 
00232   G4ParticleChange fParticleChange;
00233 
00234   // G4double fEnergyForAngle;
00235   // G4PhysicsLinearVector* fAngleVector;
00236   G4PhysicsTable*                    fAngleForEnergyTable;
00237   std::vector<G4PhysicsTable*>       fAngleBank;
00238 
00239 };
00240 
00241 #endif

Generated on Mon May 27 17:50:24 2013 for Geant4 by  doxygen 1.4.7