Geant4 Cross Reference |
>> 1 // This code implementation is the intellectual property of >> 2 // the GEANT4 collaboration. 1 // 3 // 2 // ******************************************* << 4 // By copying, distributing or modifying the Program (or any work 3 // * License and Disclaimer << 5 // based on the Program) you indicate your acceptance of this statement, 4 // * << 6 // and all its terms. 5 // * The Geant4 software is copyright of th << 6 // * the Geant4 Collaboration. It is provided << 7 // * conditions of the Geant4 Software License << 8 // * LICENSE and available at http://cern.ch/ << 9 // * include a list of copyright holders. << 10 // * << 11 // * Neither the authors of this software syst << 12 // * institutes,nor the agencies providing fin << 13 // * work make any representation or warran << 14 // * regarding this software system or assum << 15 // * use. Please see the license in the file << 16 // * for the full disclaimer and the limitatio << 17 // * << 18 // * This code implementation is the result << 19 // * technical work of the GEANT4 collaboratio << 20 // * By using, copying, modifying or distri << 21 // * any work based on the software) you ag << 22 // * use in resulting scientific publicati << 23 // * acceptance of all terms of the Geant4 Sof << 24 // ******************************************* << 25 // << 26 // << 27 // 7 // >> 8 // $Id: G4OpRayleigh.hh,v 1.3.4.1 1999/12/07 20:52:51 gunter Exp $ >> 9 // GEANT4 tag $Name: geant4-01-00 $ 28 // 10 // >> 11 // 29 ////////////////////////////////////////////// 12 //////////////////////////////////////////////////////////////////////// 30 // Optical Photon Rayleigh Scattering Class De 13 // Optical Photon Rayleigh Scattering Class Definition 31 ////////////////////////////////////////////// 14 //////////////////////////////////////////////////////////////////////// 32 // 15 // 33 // File: G4OpRayleigh.hh 16 // File: G4OpRayleigh.hh 34 // Description: Discrete Process -- Rayleigh s << 17 // Description: Discrete Process -- Rayleigh scattering of optical photons 35 // Version: 1.0 18 // Version: 1.0 36 // Created: 1996-05-31 19 // Created: 1996-05-31 37 // Author: Juliet Armstrong 20 // Author: Juliet Armstrong 38 // Updated: 2014-08-20 allow for more mate << 21 // Updated: 1999-10-29 add method and class descriptors 39 // 2005-07-28 add G4ProcessType t << 40 // 1999-10-29 add method and clas << 41 // 1997-04-09 by Peter Gumplinger 22 // 1997-04-09 by Peter Gumplinger 42 // > new physics/tracking scheme 23 // > new physics/tracking scheme >> 24 // mail: gum@triumf.ca 43 // 25 // 44 ////////////////////////////////////////////// 26 //////////////////////////////////////////////////////////////////////// 45 27 46 #ifndef G4OpRayleigh_h 28 #ifndef G4OpRayleigh_h 47 #define G4OpRayleigh_h 1 29 #define G4OpRayleigh_h 1 48 30 >> 31 ///////////// >> 32 // Includes >> 33 ///////////// >> 34 >> 35 #include "globals.hh" >> 36 #include "templates.hh" >> 37 #include "Randomize.hh" >> 38 #include "G4ThreeVector.hh" >> 39 #include "G4ParticleMomentum.hh" >> 40 #include "G4Step.hh" 49 #include "G4VDiscreteProcess.hh" 41 #include "G4VDiscreteProcess.hh" >> 42 #include "G4DynamicParticle.hh" >> 43 #include "G4Material.hh" 50 #include "G4OpticalPhoton.hh" 44 #include "G4OpticalPhoton.hh" 51 #include "G4PhysicsTable.hh" 45 #include "G4PhysicsTable.hh" >> 46 #include "G4PhysicsOrderedFreeVector.hh" 52 47 53 class G4OpRayleigh : public G4VDiscreteProcess << 48 // Class Description: >> 49 // Discrete Process -- Rayleigh scattering of optical photons. >> 50 // Class inherits publicly from G4VDiscreteProcess. >> 51 // Class Description - End: >> 52 >> 53 ///////////////////// >> 54 // Class Definition >> 55 ///////////////////// >> 56 >> 57 class G4OpRayleigh : public G4VDiscreteProcess 54 { 58 { 55 public: << 56 explicit G4OpRayleigh(const G4String& proces << 57 G4ProcessType type << 58 virtual ~G4OpRayleigh(); << 59 59 60 virtual G4bool IsApplicable( << 60 private: 61 const G4ParticleDefinition& aParticleType) << 61 62 // Returns true -> 'is applicable' only for << 62 ////////////// >> 63 // Operators >> 64 ////////////// >> 65 >> 66 // G4OpRayleigh& operator=(const G4OpRayleigh &right); >> 67 >> 68 public: // Without description >> 69 >> 70 //////////////////////////////// >> 71 // Constructors and Destructor >> 72 //////////////////////////////// >> 73 >> 74 G4OpRayleigh(const G4String& processName = "Rayleigh Scattering"); >> 75 >> 76 // G4OpRayleigh(const G4OpRayleigh &right); >> 77 >> 78 ~G4OpRayleigh(); 63 79 64 virtual void BuildPhysicsTable( << 80 //////////// 65 const G4ParticleDefinition& aParticleType) << 81 // Methods 66 // Build thePhysicsTable at a right time << 82 //////////// 67 83 68 virtual G4double GetMeanFreePath(const G4Tra << 84 public: // With description 69 G4ForceCond << 70 // Returns the mean free path for Rayleigh s << 71 85 72 virtual G4VParticleChange* PostStepDoIt(cons << 86 G4bool IsApplicable(const G4ParticleDefinition& aParticleType); 73 cons << 87 // Returns true -> 'is applicable' only for an optical photon. 74 // This is the method implementing Rayleigh << 75 88 76 virtual G4PhysicsTable* GetPhysicsTable() co << 89 G4double GetMeanFreePath(const G4Track& aTrack, 77 // Returns the address of the physics table. << 90 G4double , >> 91 G4ForceCondition* ); >> 92 // Returns the mean free path for Rayleigh scattering in water. >> 93 // --- Not yet implemented for other materials! --- 78 94 79 virtual void DumpPhysicsTable() const; << 95 G4VParticleChange* PostStepDoIt(const G4Track& aTrack, 80 // Prints the physics table. << 96 const G4Step& aStep); >> 97 // This is the method implementing Rayleigh scattering. 81 98 82 virtual void PreparePhysicsTable(const G4Par << 99 G4PhysicsTable* GetPhysicsTable() const; 83 virtual void Initialise(); << 100 // Returns the address of the physics table. 84 101 85 void SetVerboseLevel(G4int); << 102 void DumpPhysicsTable() const; >> 103 // Prints the physics table. 86 104 87 protected: << 105 private: 88 G4PhysicsTable* thePhysicsTable; << 89 106 90 private: << 107 void BuildThePhysicsTable(); 91 G4OpRayleigh(const G4OpRayleigh& right) = de << 92 G4OpRayleigh& operator=(const G4OpRayleigh& << 93 108 94 /// Calculates the mean free paths for a mat << 109 ///////////////////// 95 /// photon energy << 110 // Helper Functions 96 G4PhysicsFreeVector* CalculateRayleighMeanFr << 111 ///////////////////// 97 const G4Material* material) const; << 112 >> 113 G4PhysicsOrderedFreeVector* RayleighAttenuationLengthGenerator( >> 114 G4MaterialPropertiesTable *aMPT); >> 115 >> 116 /////////////////////// >> 117 // Class Data Members >> 118 /////////////////////// >> 119 >> 120 protected: >> 121 >> 122 G4PhysicsTable* thePhysicsTable; >> 123 // A Physics Table can be either a cross-sections table or >> 124 // an energy table (or can be used for other specific >> 125 // purposes). 98 126 99 size_t idx_rslength = 0; << 100 }; 127 }; 101 128 102 //////////////////// 129 //////////////////// 103 // Inline methods 130 // Inline methods 104 //////////////////// 131 //////////////////// 105 132 106 inline G4bool G4OpRayleigh::IsApplicable( << 133 inline 107 const G4ParticleDefinition& aParticleType) << 134 G4bool G4OpRayleigh::IsApplicable(const G4ParticleDefinition& aParticleType) 108 { 135 { 109 return (&aParticleType == G4OpticalPhoton::O << 136 return ( &aParticleType == G4OpticalPhoton::OpticalPhoton() ); 110 } 137 } 111 138 112 inline void G4OpRayleigh::DumpPhysicsTable() c << 139 inline >> 140 void G4OpRayleigh::DumpPhysicsTable() const >> 141 113 { 142 { 114 for(size_t i = 0; i < thePhysicsTable->entri << 143 G4int PhysicsTableSize = thePhysicsTable->entries(); 115 { << 144 G4PhysicsOrderedFreeVector *v; 116 ((G4PhysicsFreeVector*) (*thePhysicsTable) << 145 117 } << 146 for (G4int i = 0 ; i < PhysicsTableSize ; i++ ) >> 147 { >> 148 v = (G4PhysicsOrderedFreeVector*)(*thePhysicsTable)[i]; >> 149 v->DumpValues(); >> 150 } 118 } 151 } 119 152 120 inline G4PhysicsTable* G4OpRayleigh::GetPhysic 153 inline G4PhysicsTable* G4OpRayleigh::GetPhysicsTable() const 121 { 154 { 122 return thePhysicsTable; 155 return thePhysicsTable; 123 } 156 } >> 157 124 158 125 #endif /* G4OpRayleigh_h */ 159 #endif /* G4OpRayleigh_h */ 126 160