|
||||
File indexing completed on 2025-01-18 09:58:48
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 // 0027 // 0028 //////////////////////////////////////////////////////////////////////// 0029 // Optical Photon WaveLength Shifting (WLS) Class Definition 0030 //////////////////////////////////////////////////////////////////////// 0031 // 0032 // File: G4OpWLS.hh 0033 // Description: Discrete Process -- Wavelength Shifting of Optical Photons 0034 // Version: 1.0 0035 // Created: 2003-05-13 0036 // Author: John Paul Archambault 0037 // (Adaptation of G4Scintillation and G4OpAbsorption) 0038 // Updated: 2005-07-28 add G4ProcessType to constructor 0039 // 2006-05-07 - add G4VWLSTimeGeneratorProfile 0040 // 0041 //////////////////////////////////////////////////////////////////////// 0042 0043 #ifndef G4OpWLS_h 0044 #define G4OpWLS_h 1 0045 0046 #include "G4VDiscreteProcess.hh" 0047 #include "G4OpticalPhoton.hh" 0048 0049 class G4VWLSTimeGeneratorProfile; 0050 0051 class G4OpWLS : public G4VDiscreteProcess 0052 { 0053 public: 0054 explicit G4OpWLS(const G4String& processName = "OpWLS", 0055 G4ProcessType type = fOptical); 0056 virtual ~G4OpWLS(); 0057 0058 virtual G4bool IsApplicable( 0059 const G4ParticleDefinition& aParticleType) override; 0060 // Returns true -> 'is applicable' only for an optical photon. 0061 0062 virtual void BuildPhysicsTable( 0063 const G4ParticleDefinition& aParticleType) override; 0064 // Build the WLS integral table at the right time 0065 0066 virtual G4double GetMeanFreePath(const G4Track& aTrack, G4double, 0067 G4ForceCondition*) override; 0068 // Returns the absorption length for WLS absorption of optical 0069 // photons in media with a specified attenuation length. 0070 0071 virtual G4VParticleChange* PostStepDoIt(const G4Track& aTrack, 0072 const G4Step& aStep) override; 0073 // This is the method implementing WLS for optical photons. 0074 0075 virtual G4PhysicsTable* GetIntegralTable() const; 0076 // Returns the address of the WLS integral table. 0077 0078 virtual void DumpPhysicsTable() const; 0079 // Prints the WLS integral table. 0080 0081 virtual void UseTimeProfile(const G4String name); 0082 // Selects the time profile generator 0083 0084 virtual void PreparePhysicsTable(const G4ParticleDefinition&) override; 0085 virtual void Initialise(); 0086 0087 void SetVerboseLevel(G4int); 0088 0089 protected: 0090 G4VWLSTimeGeneratorProfile* WLSTimeGeneratorProfile; 0091 G4PhysicsTable* theIntegralTable; 0092 0093 private: 0094 G4OpWLS(const G4OpWLS& right) = delete; 0095 G4OpWLS& operator=(const G4OpWLS& right) = delete; 0096 0097 std::size_t idx_wls = 0; 0098 }; 0099 0100 //////////////////// 0101 // Inline methods 0102 //////////////////// 0103 0104 inline G4bool G4OpWLS::IsApplicable(const G4ParticleDefinition& aParticleType) 0105 { 0106 return (&aParticleType == G4OpticalPhoton::OpticalPhoton()); 0107 } 0108 0109 inline G4PhysicsTable* G4OpWLS::GetIntegralTable() const 0110 { 0111 return theIntegralTable; 0112 } 0113 0114 inline void G4OpWLS::DumpPhysicsTable() const 0115 { 0116 std::size_t PhysicsTableSize = theIntegralTable->entries(); 0117 G4PhysicsFreeVector* v; 0118 0119 for(std::size_t i = 0; i < PhysicsTableSize; ++i) 0120 { 0121 v = (G4PhysicsFreeVector*) (*theIntegralTable)[i]; 0122 v->DumpValues(); 0123 } 0124 } 0125 0126 #endif /* G4OpWLS_h */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |