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 // 00030 // Optical Photon WaveLength Shifting (WLS) Class Definition 00032 // 00033 // File: G4OpWLS.hh 00034 // Description: Discrete Process -- Wavelength Shifting of Optical Photons 00035 // Version: 1.0 00036 // Created: 2003-05-13 00037 // Author: John Paul Archambault 00038 // (Adaptation of G4Scintillation and G4OpAbsorption) 00039 // Updated: 2005-07-28 add G4ProcessType to constructor 00040 // 2006-05-07 - add G4VWLSTimeGeneratorProfile 00041 // mail: gum@triumf.ca 00042 // jparcham@phys.ualberta.ca 00043 // 00045 00046 #ifndef G4OpWLS_h 00047 #define G4OpWLS_h 1 00048 00050 // Includes 00052 00053 #include "globals.hh" 00054 #include "templates.hh" 00055 #include "Randomize.hh" 00056 #include "G4Poisson.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 "G4MaterialPropertiesTable.hh" 00066 #include "G4PhysicsOrderedFreeVector.hh" 00067 #include "G4VWLSTimeGeneratorProfile.hh" 00068 00069 // Class Description: 00070 // Discrete Process -- Bulk absorption of Optical Photons. 00071 // Class inherits publicly from G4VDiscreteProcess 00072 // Class Description - End: 00073 00075 // Class Definition 00077 00078 class G4VWLSTimeGeneratorProfile; 00079 00080 class G4OpWLS : public G4VDiscreteProcess 00081 { 00082 00083 public: 00084 00086 // Constructors and Destructor 00088 00089 G4OpWLS(const G4String& processName = "OpWLS", 00090 G4ProcessType type = fOptical); 00091 ~G4OpWLS(); 00092 00093 private: 00094 00095 G4OpWLS(const G4OpWLS &right); 00096 00098 // Operators 00100 00101 G4OpWLS& operator=(const G4OpWLS &right); 00102 00103 public: 00104 00106 // Methods 00108 00109 G4bool IsApplicable(const G4ParticleDefinition& aParticleType); 00110 // Returns true -> 'is applicable' only for an optical photon. 00111 00112 G4double GetMeanFreePath(const G4Track& aTrack, 00113 G4double , 00114 G4ForceCondition* ); 00115 // Returns the absorption length for bulk absorption of optical 00116 // photons in media with a specified attenuation length. 00117 00118 G4VParticleChange* PostStepDoIt(const G4Track& aTrack, 00119 const G4Step& aStep); 00120 // This is the method implementing bulk absorption of optical 00121 // photons. 00122 00123 G4PhysicsTable* GetIntegralTable() const; 00124 // Returns the address of the WLS integral table. 00125 00126 void DumpPhysicsTable() const; 00127 // Prints the WLS integral table. 00128 00129 void UseTimeProfile(const G4String name); 00130 // Selects the time profile generator 00131 00132 private: 00133 00134 void BuildThePhysicsTable(); 00135 // Is the WLS integral table; 00136 00137 protected: 00138 00139 G4VWLSTimeGeneratorProfile* WLSTimeGeneratorProfile; 00140 G4PhysicsTable* theIntegralTable; 00141 00142 }; 00143 00145 // Inline methods 00147 00148 inline 00149 G4bool G4OpWLS::IsApplicable(const G4ParticleDefinition& aParticleType) 00150 { 00151 return ( &aParticleType == G4OpticalPhoton::OpticalPhoton() ); 00152 } 00153 00154 inline 00155 G4PhysicsTable* G4OpWLS::GetIntegralTable() const 00156 { 00157 return theIntegralTable; 00158 } 00159 00160 inline 00161 void G4OpWLS::DumpPhysicsTable() const 00162 { 00163 G4int PhysicsTableSize = theIntegralTable->entries(); 00164 G4PhysicsOrderedFreeVector *v; 00165 00166 for (G4int i = 0 ; i < PhysicsTableSize ; i++ ) 00167 { 00168 v = (G4PhysicsOrderedFreeVector*)(*theIntegralTable)[i]; 00169 v->DumpValues(); 00170 } 00171 } 00172 00173 #endif /* G4OpWLS_h */