[819] | 1 | // |
---|
| 2 | // ******************************************************************** |
---|
| 3 | // * License and Disclaimer * |
---|
| 4 | // * * |
---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
| 7 | // * conditions of the Geant4 Software License, included in the file * |
---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
| 9 | // * include a list of copyright holders. * |
---|
| 10 | // * * |
---|
| 11 | // * Neither the authors of this software system, nor their employing * |
---|
| 12 | // * institutes,nor the agencies providing financial support for this * |
---|
| 13 | // * work make any representation or warranty, express or implied, * |
---|
| 14 | // * regarding this software system or assume any liability for its * |
---|
| 15 | // * use. Please see the license in the file LICENSE and URL above * |
---|
| 16 | // * for the full disclaimer and the limitation of liability. * |
---|
| 17 | // * * |
---|
| 18 | // * This code implementation is the result of the scientific and * |
---|
| 19 | // * technical work of the GEANT4 collaboration. * |
---|
| 20 | // * By using, copying, modifying or distributing the software (or * |
---|
| 21 | // * any work based on the software) you agree to acknowledge its * |
---|
| 22 | // * use in resulting scientific publications, and indicate your * |
---|
| 23 | // * acceptance of all terms of the Geant4 Software license. * |
---|
| 24 | // ******************************************************************** |
---|
| 25 | // |
---|
| 26 | // $Id: G4VLowEnergyDiscretePhotonProcess.hh,v 1.4 2006/06/29 19:37:13 gunter Exp $ |
---|
[961] | 27 | // GEANT4 tag $Name: geant4-09-02-ref-02 $ |
---|
[819] | 28 | // |
---|
| 29 | // -------------------------------------------------------------- |
---|
| 30 | // |
---|
| 31 | // File name: G4VLowEnergyDiscretePhotonProcess.hh |
---|
| 32 | // |
---|
| 33 | // Author: Capra Riccardo |
---|
| 34 | // |
---|
| 35 | // Creation date: May 2005 |
---|
| 36 | // |
---|
| 37 | // History: |
---|
| 38 | // ----------- |
---|
| 39 | // 02 May 2005 R. Capra 1st implementation |
---|
| 40 | // 20 May 2005 MGP Modified protected member functions to return a const pointer |
---|
| 41 | // |
---|
| 42 | //---------------------------------------------------------------- |
---|
| 43 | |
---|
| 44 | |
---|
| 45 | |
---|
| 46 | #ifndef G4VLowEnergyDiscretePhotonProcess_hh |
---|
| 47 | #define G4VLowEnergyDiscretePhotonProcess_hh |
---|
| 48 | |
---|
| 49 | // Base class |
---|
| 50 | #include "G4VLowEnergyTestableDiscreteProcess.hh" |
---|
| 51 | |
---|
| 52 | // Forward declaration |
---|
| 53 | class G4String; |
---|
| 54 | class G4ParticleDefinition; |
---|
| 55 | class G4DynamicParticle; |
---|
| 56 | class G4Track; |
---|
| 57 | class G4VCrossSectionHandler; |
---|
| 58 | class G4VEMDataSet; |
---|
| 59 | class G4VDataSetAlgorithm; |
---|
| 60 | |
---|
| 61 | // G4VLowEnergyDiscretePhotonProcess |
---|
| 62 | // A common class for Rayleigh and Compton processes |
---|
| 63 | class G4VLowEnergyDiscretePhotonProcess : public G4VLowEnergyTestableDiscreteProcess |
---|
| 64 | { |
---|
| 65 | public: |
---|
| 66 | // Class constructor |
---|
| 67 | // |
---|
| 68 | // Creates crossSectionHandler and scatterFunctionData |
---|
| 69 | // scatterFunctionData are loaded from the scatterFile file, and are interpolated with scatterInterpolation algorithm |
---|
| 70 | // processName The name of the process |
---|
| 71 | // aCrossSectionFileName The name of the cross-section data file |
---|
| 72 | // aScatterFileName The name of the scatter function data |
---|
| 73 | // aScatterInterpolation The interpolation algorithm |
---|
| 74 | // aLowEnergyLimit The lower energy limit of validity against data |
---|
| 75 | // aHighEnergyLimit The higher energy limit of validity against data |
---|
| 76 | G4VLowEnergyDiscretePhotonProcess(const G4String& processName, |
---|
| 77 | const G4String& aCrossSectionFileName, |
---|
| 78 | const G4String& aScatterFileName, |
---|
| 79 | G4VDataSetAlgorithm* aScatterInterpolation, |
---|
| 80 | G4double aLowEnergyLimit, |
---|
| 81 | G4double aHighEnergyLimit); |
---|
| 82 | |
---|
| 83 | // Class destructor |
---|
| 84 | // |
---|
| 85 | // Deletes crossSectionHandler, meanFreePathTable and scatterFunctionData |
---|
| 86 | virtual ~G4VLowEnergyDiscretePhotonProcess(void); |
---|
| 87 | |
---|
| 88 | |
---|
| 89 | |
---|
| 90 | // Checks if the process is applicable to the particle |
---|
| 91 | // |
---|
| 92 | // For processes inheriting from this class the only applicable particle is the photon |
---|
| 93 | // particleDefinition Is the particle to be checked for the applicability of the process |
---|
| 94 | // true only if the particle is a photon |
---|
| 95 | virtual G4bool IsApplicable(const G4ParticleDefinition& particleDefinition); |
---|
| 96 | |
---|
| 97 | // Updates the crossSectionHandler and builds the meanFreePathTable from it |
---|
| 98 | // |
---|
| 99 | // crossSectionHandler data is loaded from crossSectionFile file |
---|
| 100 | // photon particle is always a photon |
---|
| 101 | virtual void BuildPhysicsTable(const G4ParticleDefinition& photon); |
---|
| 102 | |
---|
| 103 | |
---|
| 104 | |
---|
| 105 | // Returns the low energy limit of the process |
---|
| 106 | // The low energy limit of the process |
---|
| 107 | inline G4double GetLowEnergyLimit(void) const {return lowEnergyLimit;} |
---|
| 108 | |
---|
| 109 | // Returns the high energy limit of the process |
---|
| 110 | // The high energy limit of the process |
---|
| 111 | inline G4double GetHighEnergyLimit(void) const {return highEnergyLimit;} |
---|
| 112 | |
---|
| 113 | |
---|
| 114 | |
---|
| 115 | protected: |
---|
| 116 | // Evaluates the process mean free path |
---|
| 117 | // |
---|
| 118 | // Mean free path evaluation is based on meanFreePathTable generated by the crossSectionHandler with data taken from the crossSectionFile. |
---|
| 119 | // The method uses lowEnergyLimit and highEnergyLimit |
---|
| 120 | // aTrack the particle momentum for which the mean free path must be evaluates (a photon) |
---|
| 121 | // previousStepSize the size of the prevous step (not used by this implementation) |
---|
| 122 | // condition the consition to be updated (not used by this implementation) |
---|
| 123 | // The mean free path for the process |
---|
| 124 | virtual G4double GetMeanFreePath(const G4Track &aTrack, |
---|
| 125 | G4double previousStepSize, |
---|
| 126 | G4ForceCondition* condition); |
---|
| 127 | |
---|
| 128 | // Returns the cross-section handler |
---|
| 129 | // The cross-section handler |
---|
| 130 | inline const G4VCrossSectionHandler* GetCrossSectionHandler(void) const {return crossSectionHandler;} |
---|
| 131 | |
---|
| 132 | // Returns the mean free path table |
---|
| 133 | // The mean free path table |
---|
| 134 | inline const G4VEMDataSet* GetMeanFreePathTable(void) const {return meanFreePathTable;} |
---|
| 135 | |
---|
| 136 | // Returns the scatter function data |
---|
| 137 | // The scatter function data |
---|
| 138 | inline const G4VEMDataSet* GetScatterFunctionData(void) const {return scatterFunctionData;} |
---|
| 139 | |
---|
| 140 | |
---|
| 141 | |
---|
| 142 | // Verifies if the polarization vector is orthonormal to the photon direction |
---|
| 143 | // |
---|
| 144 | // This method is used by polarized processes. It returns always a vector orthonormal to the photon direction. |
---|
| 145 | // When G4DynamicParticle::GetPolarization() is well defined the returned vector matches this vector. |
---|
| 146 | // When G4DynamicParticle::GetPolarization() is sensibly different from a null-vector, the returned vector is |
---|
| 147 | // orthonormal to the photon direction and on the plane made with G4DynamicParticle::GetPolarization() |
---|
| 148 | // When G4DynamicParticle::GetPolarization() is almost a null-vector, the returned vector is a random |
---|
| 149 | // vector orthonormal to the photon direction |
---|
| 150 | // photon The incoming photon |
---|
| 151 | // s Always a vector ortogonal to the photon direction. |
---|
| 152 | G4ThreeVector GetPhotonPolarization(const G4DynamicParticle& photon); |
---|
| 153 | |
---|
| 154 | |
---|
| 155 | |
---|
| 156 | private: |
---|
| 157 | |
---|
| 158 | // Hides copy constructor |
---|
| 159 | G4VLowEnergyDiscretePhotonProcess(const G4VLowEnergyDiscretePhotonProcess& ); |
---|
| 160 | |
---|
| 161 | // Hides assignment operator |
---|
| 162 | G4VLowEnergyDiscretePhotonProcess& operator=(const G4VLowEnergyDiscretePhotonProcess& ); |
---|
| 163 | |
---|
| 164 | // Low energy limit |
---|
| 165 | G4double lowEnergyLimit; |
---|
| 166 | |
---|
| 167 | // High energy limit |
---|
| 168 | G4double highEnergyLimit; |
---|
| 169 | |
---|
| 170 | // Cross-section file name |
---|
| 171 | G4String crossSectionFileName; |
---|
| 172 | |
---|
| 173 | // Cross-section handler |
---|
| 174 | G4VCrossSectionHandler* crossSectionHandler; |
---|
| 175 | |
---|
| 176 | // The mean free path table based on cross-section data |
---|
| 177 | G4VEMDataSet* meanFreePathTable; |
---|
| 178 | |
---|
| 179 | // Scatter function table |
---|
| 180 | G4VEMDataSet* scatterFunctionData; |
---|
| 181 | }; |
---|
| 182 | |
---|
| 183 | #endif /* G4VLowEnergyDiscretePhotonProcess_hh */ |
---|