00001 // 00002 // ******************************************************************** 00003 // * DISCLAIMER * 00004 // * * 00005 // * The following disclaimer summarizes all the specific disclaimers * 00006 // * of contributors to this software. The specific disclaimers,which * 00007 // * govern, are listed with their locations in: * 00008 // * http://cern.ch/geant4/license * 00009 // * * 00010 // * Neither the authors of this software system, nor their employing * 00011 // * institutes,nor the agencies providing financial support for this * 00012 // * work make any representation or warranty, express or implied, * 00013 // * regarding this software system or assume any liability for its * 00014 // * use. * 00015 // * * 00016 // * This code implementation is the intellectual property of the * 00017 // * GEANT4 collaboration. * 00018 // * By copying, distributing or modifying the Program (or any work * 00019 // * based on the Program) you indicate your acceptance of this * 00020 // * statement, and all its terms. * 00021 // ******************************************************************** 00022 // 00023 // $Id: SiG4UniversalFluctuation.h,v 1.4 2011/06/13 07:18:21 innocent Exp $ 00024 // GEANT4 tag $Name: CMSSW_6_2_0 $ 00025 // 00026 // ------------------------------------------------------------------- 00027 // 00028 // GEANT4 Class header file 00029 // 00030 // 00031 // File name: G4UniversalFluctuation 00032 // 00033 // Author: Vladimir Ivanchenko 00034 // 00035 // Creation date: 03.01.2002 00036 // 00037 // Modifications: 00038 // 00039 // 09-12-02 remove warnings (V.Ivanchenko) 00040 // 28-12-02 add method Dispersion (V.Ivanchenko) 00041 // 07-02-03 change signature (V.Ivanchenko) 00042 // 13-02-03 Add name (V.Ivanchenko) 00043 // 16-10-03 Changed interface to Initialisation (V.Ivanchenko) 00044 // 07-02-05 define problim = 5.e-3 (mma) 00045 // 00046 // Modified for standalone use in CMSSW. danek k. 2/06 00047 // 00048 // Class Description: 00049 // 00050 // Implementation of energy loss fluctuations 00051 00052 // ------------------------------------------------------------------- 00053 // 00054 00055 #ifndef SiG4UniversalFluctuation_h 00056 #define SiG4UniversalFluctuation_h 00057 00058 namespace CLHEP{ 00059 class HepRandomEngine; 00060 class RandPoissonQ; 00061 class RandGaussQ; 00062 class RandFlat; 00063 } 00064 00065 //#include "G4VEmFluctuationModel.hh" 00066 00067 class SiG4UniversalFluctuation { 00068 public: 00069 00070 SiG4UniversalFluctuation(CLHEP::HepRandomEngine&); 00071 00072 ~SiG4UniversalFluctuation(); 00073 00074 // momentum in MeV/c, mass in MeV, tmax (delta cut) in MeV, 00075 // length in mm, meanLoss eloss in MeV. 00076 double SampleFluctuations(const double momentum, 00077 const double mass, 00078 double& tmax, 00079 const double length, 00080 const double meanLoss); 00081 00082 //G4double SampleFluctuations(const G4Material*, 00083 // const G4DynamicParticle*, 00084 // G4double&, 00085 // G4double&, 00086 // G4double&); 00087 00088 //G4double Dispersion( const G4Material*, 00089 // const G4DynamicParticle*, 00090 // G4double&, 00091 // G4double&); 00092 //void InitialiseMe(const G4ParticleDefinition*); 00093 00094 protected: 00095 00096 private: 00097 00098 CLHEP::HepRandomEngine& rndEngine; 00099 CLHEP::RandGaussQ* gaussQDistribution; 00100 CLHEP::RandPoissonQ* poissonQDistribution; 00101 CLHEP::RandFlat* flatDistribution; 00102 // hide assignment operator 00103 //SiG4UniversalFluctuation & operator=(const SiG4UniversalFluctuation &right); 00104 //SiG4UniversalFluctuation(const SiG4UniversalFluctuation&); 00105 00106 //const G4ParticleDefinition* particle; 00107 //const G4Material* lastMaterial; 00108 00109 double particleMass; 00110 double chargeSquare; 00111 00112 // data members to speed up the fluctuation calculation 00113 double ipotFluct; 00114 double electronDensity; 00115 // double zeff; 00116 00117 double f1Fluct; 00118 double f2Fluct; 00119 double e1Fluct; 00120 double e2Fluct; 00121 double rateFluct; 00122 double e1LogFluct; 00123 double e2LogFluct; 00124 double ipotLogFluct; 00125 double e0; 00126 00127 double minNumberInteractionsBohr; 00128 double theBohrBeta2; 00129 double minLoss; 00130 double problim; 00131 double sumalim; 00132 double alim; 00133 double nmaxCont1; 00134 double nmaxCont2; 00135 }; 00136 00137 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... 00138 00139 #endif 00140