Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer << 3 // * DISCLAIMER * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th << 5 // * The following disclaimer summarizes all the specific disclaimers * 6 // * the Geant4 Collaboration. It is provided << 6 // * of contributors to this software. The specific disclaimers,which * 7 // * conditions of the Geant4 Software License << 7 // * govern, are listed with their locations in: * 8 // * LICENSE and available at http://cern.ch/ << 8 // * http://cern.ch/geant4/license * 9 // * include a list of copyright holders. << 10 // * 9 // * * 11 // * Neither the authors of this software syst 10 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 11 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 12 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 13 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file << 14 // * use. * 16 // * for the full disclaimer and the limitatio << 17 // * 15 // * * 18 // * This code implementation is the result << 16 // * This code implementation is the intellectual property of the * 19 // * technical work of the GEANT4 collaboratio << 17 // * GEANT4 collaboration. * 20 // * By using, copying, modifying or distri << 18 // * By copying, distributing or modifying the Program (or any work * 21 // * any work based on the software) you ag << 19 // * based on the Program) you indicate your acceptance of this * 22 // * use in resulting scientific publicati << 20 // * statement, and all its terms. * 23 // * acceptance of all terms of the Geant4 Sof << 24 // ******************************************* 21 // ******************************************************************** 25 // 22 // 26 ////////////////////////////////////////////// << 27 // 23 // >> 24 // $Id: G4VXTRenergyLoss.hh,v 1.12 2005/10/07 16:19:14 grichine Exp $ >> 25 // GEANT4 tag $Name: geant4-08-00 $ >> 26 // >> 27 // >> 28 /////////////////////////////////////////////////////////////////////////// >> 29 // 28 // base class for 'fast' parametrisation model 30 // base class for 'fast' parametrisation model describing X-ray transition 29 // created in some G4Envelope. Angular distrib << 31 // created in some G4Envelope. Anglur distribuiton is very rough !!! (see DoIt 30 // method 32 // method 31 // << 33 // 32 // History: 34 // History: 33 // 06.10.05 V. Grichine first step to discret << 35 // 06.10.05 V. Grichine first step to discrete process 34 // 15.01.02 V. Grichine first version << 36 // 15.01.02 V. Grichine first version 35 // 28.07.05, P.Gumplinger add G4ProcessType to 37 // 28.07.05, P.Gumplinger add G4ProcessType to constructor 36 // 28.09.07, V.Ivanchenko general cleanup with << 38 // 37 // 19.09.21, V. Grichine, set/get functions fo << 38 39 39 #ifndef G4VXTRenergyLoss_h << 40 #define G4VXTRenergyLoss_h 1 << 41 40 >> 41 #ifndef G4XTRenergyLoss_h >> 42 #define G4XTRenergyLoss_h 1 >> 43 >> 44 >> 45 #include <complex> 42 #include "globals.hh" 46 #include "globals.hh" 43 #include "G4Gamma.hh" << 47 #include "Randomize.hh" >> 48 44 #include "G4LogicalVolume.hh" 49 #include "G4LogicalVolume.hh" 45 #include "G4Material.hh" << 50 46 #include "G4ParticleChange.hh" << 47 #include "G4PhysicsTable.hh" 51 #include "G4PhysicsTable.hh" >> 52 #include "G4PhysicsLogVector.hh" >> 53 #include "G4Gamma.hh" >> 54 #include "G4ThreeVector.hh" >> 55 #include "G4ParticleMomentum.hh" 48 #include "G4Step.hh" 56 #include "G4Step.hh" 49 #include "G4Track.hh" 57 #include "G4Track.hh" >> 58 #include "G4VContinuousProcess.hh" 50 #include "G4VDiscreteProcess.hh" 59 #include "G4VDiscreteProcess.hh" >> 60 #include "G4DynamicParticle.hh" >> 61 #include "G4Material.hh" >> 62 #include "G4PhysicsTable.hh" >> 63 #include "G4MaterialPropertiesTable.hh" >> 64 #include "G4PhysicsOrderedFreeVector.hh" >> 65 #include "G4Integrator.hh" >> 66 #include "G4ParticleChange.hh" >> 67 >> 68 51 69 52 class G4SandiaTable; << 53 class G4VParticleChange; 70 class G4VParticleChange; 54 class G4PhysicsFreeVector; << 55 class G4PhysicsLinearVector; << 56 class G4PhysicsLogVector; << 57 71 58 class G4VXTRenergyLoss : public G4VDiscretePro << 59 { << 60 public: << 61 explicit G4VXTRenergyLoss(G4LogicalVolume* a << 62 G4Material*, G4dou << 63 const G4String& pr << 64 G4ProcessType type << 65 virtual ~G4VXTRenergyLoss(); << 66 72 67 virtual void ProcessDescription(std::ostream << 73 class G4XTRenergyLoss : public G4VDiscreteProcess // G4VContinuousProcess 68 virtual void DumpInfo() const override { Pro << 74 { >> 75 public: 69 76 70 G4VXTRenergyLoss(G4VXTRenergyLoss&) = delete << 77 G4XTRenergyLoss (G4LogicalVolume *anEnvelope,G4Material*,G4Material*, 71 G4VXTRenergyLoss& operator=(const G4VXTRener << 78 G4double,G4double,G4int, >> 79 const G4String & processName = "XTRenergyLoss", >> 80 G4ProcessType type = fElectromagnetic); >> 81 virtual ~G4XTRenergyLoss (); 72 82 73 // Virtual methods to be implemented in inhe << 83 // These virtual has to be implemented in inherited particular TR radiators 74 virtual G4double GetStackFactor(G4double ene << 84 75 G4double var << 85 virtual G4double GetStackFactor( G4double energy, G4double gamma, >> 86 G4double varAngle ); 76 87 77 virtual G4bool IsApplicable(const G4Particle << 78 88 79 virtual G4VParticleChange* PostStepDoIt(cons << 89 G4bool IsApplicable(const G4ParticleDefinition&); 80 cons << 81 90 82 virtual G4double GetMeanFreePath(const G4Tra << 91 G4double GetContinuousStepLimit(const G4Track& aTrack, 83 G4double pr << 92 G4double , 84 G4ForceCond << 93 G4double , >> 94 G4double& ); >> 95 // Returns the continuous step limit defined by the XTR process. 85 96 86 virtual void BuildPhysicsTable(const G4Parti << 97 G4VParticleChange* AlongStepDoIt(const G4Track& aTrack, 87 void BuildEnergyTable(); << 98 const G4Step& aStep); 88 void BuildAngleForEnergyBank(); << 89 99 90 void BuildTable(){}; << 100 G4VParticleChange* PostStepDoIt(const G4Track& aTrack, 91 void BuildAngleTable(); << 101 const G4Step& aStep); 92 void BuildGlobalAngleTable(); << 93 102 94 G4complex OneInterfaceXTRdEdx(G4double energ << 103 G4double GetMeanFreePath(const G4Track& aTrack, 95 G4double varAn << 104 G4double previousStepSize, >> 105 G4ForceCondition* condition); >> 106 >> 107 void BuildTable() ; >> 108 void BuildEnergyTable() ; >> 109 void BuildAngleTable() ; 96 110 97 G4double SpectralAngleXTRdEdx(G4double varAn << 111 G4complex OneInterfaceXTRdEdx( G4double energy, >> 112 G4double gamma, >> 113 G4double varAngle ) ; 98 114 99 virtual G4double SpectralXTRdEdx(G4double en << 115 G4double SpectralAngleXTRdEdx(G4double varAngle) ; 100 116 101 G4double AngleSpectralXTRdEdx(G4double energ << 117 virtual G4double SpectralXTRdEdx(G4double energy) ; 102 118 103 G4double AngleXTRdEdx(G4double varAngle); << 119 G4double AngleSpectralXTRdEdx(G4double energy) ; 104 120 105 G4double OneBoundaryXTRNdensity(G4double ene << 121 G4double AngleXTRdEdx(G4double varAngle) ; 106 G4double var << 107 122 108 // for photon energy distribution tables << 109 G4double XTRNSpectralAngleDensity(G4double v << 110 G4double XTRNSpectralDensity(G4double energy << 111 123 112 // for photon angle distribution tables << 124 ///////////////////////////////////////////////////////////// 113 G4double XTRNAngleSpectralDensity(G4double e << 114 G4double XTRNAngleDensity(G4double varAngle) << 115 125 116 void GetNumberOfPhotons(); << 126 G4double OneBoundaryXTRNdensity( G4double energy, >> 127 G4double gamma, >> 128 G4double varAngle ) const ; 117 129 118 // Auxiliary functions for plate/gas materia << 119 G4double GetPlateFormationZone(G4double, G4d << 120 G4complex GetPlateComplexFZ(G4double, G4doub << 121 void ComputePlatePhotoAbsCof(); << 122 G4double GetPlateLinearPhotoAbs(G4double); << 123 void GetPlateZmuProduct(); << 124 G4double GetPlateZmuProduct(G4double, G4doub << 125 << 126 G4double GetGasFormationZone(G4double, G4dou << 127 G4complex GetGasComplexFZ(G4double, G4double << 128 void ComputeGasPhotoAbsCof(); << 129 G4double GetGasLinearPhotoAbs(G4double); << 130 void GetGasZmuProduct(); << 131 G4double GetGasZmuProduct(G4double, G4double << 132 << 133 G4double GetPlateCompton(G4double); << 134 G4double GetGasCompton(G4double); << 135 G4double GetComptonPerAtom(G4double, G4doubl << 136 << 137 G4double GetXTRrandomEnergy(G4double scaledT << 138 G4double GetXTRenergy(G4int iPlace, G4double << 139 << 140 G4double GetRandomAngle(G4double energyXTR, << 141 G4double GetAngleXTR(G4int iTR, G4double pos << 142 << 143 // set/get methods for class fields << 144 << 145 void SetGamma(G4double gamma) { fGamma = << 146 G4double GetGamma() { return fGamma; }; << 147 void SetEnergy(G4double energy) { fEnerg << 148 G4double GetEnergy() { return fEnergy; }; << 149 void SetVarAngle(G4double varAngle) { fV << 150 G4double GetVarAngle() { return fVarAngle; } << 151 void SetCompton(G4bool pC) { fCompton = pC << 152 G4bool GetCompton() { return fCompton; }; << 153 << 154 G4int GetKrange(){ return fKrange;}; << 155 void SetKrange( G4int kk ){ fKrange = kk;}; << 156 << 157 << 158 void SetAlphaGas(G4double ag){ fAlphaGas << 159 G4double GetAlphaGas() { return fAlphaGas; } << 160 void SetAlphaPlate(G4double ap){ fAlphaP << 161 G4double GetAlphaPlate() { return fAlphaPlat << 162 << 163 void SetTheMinEnergyTR(G4double minetr){ << 164 G4double GetTheMinEnergyTR() { return fTheMi << 165 void SetTheMaxEnergyTR(G4double maxetr){ << 166 G4double GetTheMaxEnergyTR() { return fTheMa << 167 << 168 void SetMinEnergyTR(G4double minetr){ fM << 169 G4double GetMinEnergyTR() { return fMinEnerg << 170 void SetMaxEnergyTR(G4double maxetr){ fM << 171 G4double GetMaxEnergyTR() { return fMaxEnerg << 172 << 173 void SetTheMinAngle(G4double minang){ fT << 174 G4double GetTheMinAngle() { return fTheMinAn << 175 void SetTheMaxAngle(G4double maxang){ fT << 176 G4double GetTheMaxAngle() { return fTheMaxAn << 177 << 178 void SetMinThetaTR(G4double minatr){ fMi << 179 G4double GetMinThetaTR() { return fMinThetaT << 180 void SetMaxThetaTR(G4double maxatr){ fMa << 181 G4double GetMaxThetaTR() { return fMaxThetaT << 182 130 183 // modes of XTR angle distribution << 131 // for photon energy distribution tables 184 << 185 void SetFastAngle(G4bool fatr){ fFastAngle << 186 G4bool GetFastAngle() { return fFastAngle; } << 187 void SetAngleRadDistr(G4bool fatr){ fAngle << 188 G4bool GetAngleRadDistr() { return fAngleRad << 189 << 190 132 >> 133 G4double XTRNSpectralAngleDensity(G4double varAngle) ; >> 134 G4double XTRNSpectralDensity(G4double energy) ; 191 135 >> 136 // for photon angle distribution tables 192 137 193 G4PhysicsLogVector* GetProtonVector() { retu << 138 G4double XTRNAngleSpectralDensity(G4double energy) ; 194 G4int GetTotBin() { return fTotBin; }; << 139 G4double XTRNAngleDensity(G4double varAngle) ; 195 G4PhysicsFreeVector* GetAngleVector(G4double << 196 << 197 protected: << 198 // min TR energy << 199 G4double fTheMinEnergyTR; << 200 // max TR energy << 201 G4double fTheMaxEnergyTR; << 202 G4double fTheMinAngle; // min theta of TR << 203 G4double fTheMaxAngle; // 1.e-4; // max << 204 140 205 // static const members << 141 void GetNumberOfPhotons() ; 206 << 207 // min Tkin of proton in tables << 208 static constexpr G4double fMinProtonTkin = 1 << 209 // max Tkin of proton in tables << 210 static constexpr G4double fMaxProtonTkin = 1 << 211 // physical constants for plasma energy << 212 static constexpr G4double fPlasmaCof = << 213 4. * CLHEP::pi * CLHEP::fine_structure_con << 214 CLHEP::hbarc / CLHEP::electron_mass_c2; << 215 static constexpr G4double fCofTR = CLHEP::fi << 216 << 217 G4int fTotBin; // number of bins in log-ga << 218 G4int fBinTR; // number of bins in TR ene << 219 G4int fKrange; << 220 G4ParticleDefinition* fPtrGamma; // pointer << 221 << 222 G4double* fGammaCutInKineticEnergy; // TR p << 223 G4LogicalVolume* fEnvelope; << 224 G4PhysicsTable* fAngleDistrTable; << 225 G4PhysicsTable* fEnergyDistrTable; << 226 G4PhysicsTable* fAngleForEnergyTable; << 227 G4PhysicsLogVector* fProtonEnergyVector; << 228 G4PhysicsLogVector* fXTREnergyVector; << 229 G4SandiaTable* fPlatePhotoAbsCof; << 230 G4SandiaTable* fGasPhotoAbsCof; << 231 142 232 G4ParticleChange fParticleChange; << 143 // Auxiliary functions for plate/gas material parameters 233 std::vector<G4PhysicsTable*> fAngleBank; << 234 144 235 G4double fGammaTkinCut; // Tkin cut of TR p << 145 G4double GetPlateFormationZone(G4double,G4double,G4double) ; 236 G4double fMinEnergyTR; // min TR energy i << 146 G4complex GetPlateComplexFZ(G4double,G4double,G4double) ; 237 G4double fMaxEnergyTR; // max TR energy i << 147 void ComputePlatePhotoAbsCof() ; 238 G4double fMinThetaTR, fMaxThetaTR; // mi << 148 G4double GetPlateLinearPhotoAbs(G4double) ; 239 G4double fTotalDist; << 149 void GetPlateZmuProduct() ; 240 G4double fPlateThick; << 150 G4double GetPlateZmuProduct(G4double,G4double,G4double) ; 241 G4double fGasThick; << 151 242 G4double fAlphaPlate; << 152 G4double GetGasFormationZone(G4double,G4double,G4double) ; 243 G4double fAlphaGas; << 153 G4complex GetGasComplexFZ(G4double,G4double,G4double) ; 244 G4double fGamma; // current Lorentz fact << 154 void ComputeGasPhotoAbsCof() ; 245 G4double fEnergy; // energy and << 155 G4double GetGasLinearPhotoAbs(G4double) ; 246 G4double fVarAngle; // angle squared! << 156 void GetGasZmuProduct() ; >> 157 G4double GetGasZmuProduct(G4double,G4double,G4double) ; >> 158 >> 159 G4double GetXTRrandomEnergy( G4double scaledTkin, G4int iTkin ) ; >> 160 G4double GetXTRenergy( G4int iPlace, G4double position, G4int iTransfer ); >> 161 >> 162 G4double GetGamma() {return fGamma;}; >> 163 G4double GetEnergy() {return fEnergy;}; >> 164 G4double GetVarAngle(){return fVarAngle;}; >> 165 >> 166 void SetGamma(G4double gamma) {fGamma = gamma;}; >> 167 void SetEnergy(G4double energy) {fEnergy = energy;}; >> 168 void SetVarAngle(G4double varAngle){fVarAngle = varAngle;}; >> 169 >> 170 >> 171 static G4PhysicsLogVector* GetProtonVector(){ return fProtonEnergyVector;}; >> 172 static G4int GetTotBin(){return fTotBin;}; >> 173 >> 174 protected: >> 175 >> 176 G4ParticleDefinition* fPtrGamma ; // pointer to TR photon >> 177 >> 178 G4double* fGammaCutInKineticEnergy ; // TR photon cut in energy array >> 179 G4double fGammaTkinCut ; // Tkin cut of TR photon in current mat. >> 180 G4LogicalVolume* fEnvelope ; >> 181 G4PhysicsTable* fAngleDistrTable ; >> 182 G4PhysicsTable* fEnergyDistrTable ; >> 183 >> 184 static G4PhysicsLogVector* fProtonEnergyVector ; >> 185 >> 186 >> 187 static G4double fTheMinEnergyTR; // static min TR energy >> 188 static G4double fTheMaxEnergyTR; // static max TR energy >> 189 G4double fMinEnergyTR; // min TR energy in material >> 190 G4double fMaxEnergyTR; // max TR energy in material >> 191 static G4double fTheMaxAngle; // max theta of TR quanta >> 192 static G4double fTheMinAngle; // max theta of TR quanta >> 193 G4double fMaxThetaTR; // max theta of TR quanta >> 194 static G4int fBinTR; // number of bins in TR vectors >> 195 >> 196 static G4double fMinProtonTkin; // min Tkin of proton in tables >> 197 static G4double fMaxProtonTkin; // max Tkin of proton in tables >> 198 static G4int fTotBin; // number of bins in log scale >> 199 G4double fGamma; // current Lorentz factor >> 200 G4double fEnergy; // energy and >> 201 G4double fVarAngle; // angle squared 247 G4double fLambda; 202 G4double fLambda; 248 G4double fSigma1; << 249 G4double fSigma2; // plasma energy Sq of ma << 250 203 251 G4int fMatIndex1; << 204 static G4double fPlasmaCof ; // physical consts for plasma energy 252 G4int fMatIndex2; << 205 static G4double fCofTR ; 253 G4int fPlateNumber; << 206 254 207 255 G4bool fExitFlux; 208 G4bool fExitFlux; 256 G4bool fFastAngle, fAngleRadDistr; << 209 G4double fSigma1, fSigma2 ; // plasma energy Sq of matter1/2 257 G4bool fCompton; << 258 210 259 G4int secID = -1; // creator modelID << 211 G4int fMatIndex1, fMatIndex2 ; >> 212 >> 213 G4int fPlateNumber ; >> 214 G4double fTotalDist ; >> 215 G4double** fPlatePhotoAbsCof ; >> 216 G4int fPlateIntervalNumber ; >> 217 G4double fPlateThick ; >> 218 >> 219 G4double** fGasPhotoAbsCof ; >> 220 G4int fGasIntervalNumber ; >> 221 G4double fGasThick ; >> 222 G4double fAlphaPlate, fAlphaGas ; >> 223 >> 224 G4ParticleChange fParticleChange; 260 }; 225 }; >> 226 >> 227 typedef G4XTRenergyLoss G4VXTRenergyLoss; 261 228 262 #endif 229 #endif 263 230