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 // Optical Photon Rayleigh Scattering Class Definition 00033 // 00034 // File: G4OpRayleigh.hh 00035 // Description: Discrete Process -- Rayleigh scattering of optical photons 00036 // Version: 1.0 00037 // Created: 1996-05-31 00038 // Author: Juliet Armstrong 00039 // Updated: 2005-07-28 add G4ProcessType to constructor 00040 // 1999-10-29 add method and class descriptors 00041 // 1997-04-09 by Peter Gumplinger 00042 // > new physics/tracking scheme 00043 // mail: gum@triumf.ca 00044 // 00046 00047 #ifndef G4OpRayleigh_h 00048 #define G4OpRayleigh_h 1 00049 00051 // Includes 00053 00054 #include "globals.hh" 00055 #include "templates.hh" 00056 #include "Randomize.hh" 00057 #include "G4ThreeVector.hh" 00058 #include "G4ParticleMomentum.hh" 00059 #include "G4Step.hh" 00060 #include "G4VDiscreteProcess.hh" 00061 #include "G4DynamicParticle.hh" 00062 #include "G4Material.hh" 00063 #include "G4OpticalPhoton.hh" 00064 #include "G4PhysicsTable.hh" 00065 #include "G4PhysicsOrderedFreeVector.hh" 00066 00067 // Class Description: 00068 // Discrete Process -- Rayleigh scattering of optical photons. 00069 // Class inherits publicly from G4VDiscreteProcess. 00070 // Class Description - End: 00071 00073 // Class Definition 00075 00076 class G4OpRayleigh : public G4VDiscreteProcess 00077 { 00078 00079 public: 00080 00082 // Constructors and Destructor 00084 00085 G4OpRayleigh(const G4String& processName = "OpRayleigh", 00086 G4ProcessType type = fOptical); 00087 ~G4OpRayleigh(); 00088 00089 private: 00090 00091 G4OpRayleigh(const G4OpRayleigh &right); 00092 00094 // Operators 00096 00097 G4OpRayleigh& operator=(const G4OpRayleigh &right); 00098 00099 public: 00100 00102 // Methods 00104 00105 G4bool IsApplicable(const G4ParticleDefinition& aParticleType); 00106 // Returns true -> 'is applicable' only for an optical photon. 00107 00108 G4double GetMeanFreePath(const G4Track& aTrack, 00109 G4double , 00110 G4ForceCondition* ); 00111 // Returns the mean free path for Rayleigh scattering in water. 00112 // --- Not yet implemented for other materials! --- 00113 00114 G4VParticleChange* PostStepDoIt(const G4Track& aTrack, 00115 const G4Step& aStep); 00116 // This is the method implementing Rayleigh scattering. 00117 00118 G4PhysicsTable* GetPhysicsTable() const; 00119 // Returns the address of the physics table. 00120 00121 void DumpPhysicsTable() const; 00122 // Prints the physics table. 00123 00124 private: 00125 00126 void BuildThePhysicsTable(); 00127 00129 // Helper Functions 00131 00132 G4PhysicsOrderedFreeVector* RayleighAttenuationLengthGenerator( 00133 G4MaterialPropertiesTable *aMPT); 00134 00136 // Class Data Members 00138 00139 protected: 00140 00141 G4PhysicsTable* thePhysicsTable; 00142 // A Physics Table can be either a cross-sections table or 00143 // an energy table (or can be used for other specific 00144 // purposes). 00145 00146 private: 00147 00148 G4bool DefaultWater; 00149 00150 }; 00151 00153 // Inline methods 00155 00156 inline 00157 G4bool G4OpRayleigh::IsApplicable(const G4ParticleDefinition& aParticleType) 00158 { 00159 return ( &aParticleType == G4OpticalPhoton::OpticalPhoton() ); 00160 } 00161 00162 inline 00163 void G4OpRayleigh::DumpPhysicsTable() const 00164 00165 { 00166 G4int PhysicsTableSize = thePhysicsTable->entries(); 00167 G4PhysicsOrderedFreeVector *v; 00168 00169 for (G4int i = 0 ; i < PhysicsTableSize ; i++ ) 00170 { 00171 v = (G4PhysicsOrderedFreeVector*)(*thePhysicsTable)[i]; 00172 v->DumpValues(); 00173 } 00174 } 00175 00176 inline G4PhysicsTable* G4OpRayleigh::GetPhysicsTable() const 00177 { 00178 return thePhysicsTable; 00179 } 00180 00181 00182 #endif /* G4OpRayleigh_h */