Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer 3 // * License and Disclaimer * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th 5 // * The Geant4 software is copyright of the Copyright Holders of * 6 // * the Geant4 Collaboration. It is provided 6 // * the Geant4 Collaboration. It is provided under the terms and * 7 // * conditions of the Geant4 Software License 7 // * conditions of the Geant4 Software License, included in the file * 8 // * LICENSE and available at http://cern.ch/ 8 // * LICENSE and available at http://cern.ch/geant4/license . These * 9 // * include a list of copyright holders. 9 // * include a list of copyright holders. * 10 // * 10 // * * 11 // * Neither the authors of this software syst 11 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 12 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 13 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 14 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file 15 // * use. Please see the license in the file LICENSE and URL above * 16 // * for the full disclaimer and the limitatio 16 // * for the full disclaimer and the limitation of liability. * 17 // * 17 // * * 18 // * This code implementation is the result 18 // * This code implementation is the result of the scientific and * 19 // * technical work of the GEANT4 collaboratio 19 // * technical work of the GEANT4 collaboration. * 20 // * By using, copying, modifying or distri 20 // * By using, copying, modifying or distributing the software (or * 21 // * any work based on the software) you ag 21 // * any work based on the software) you agree to acknowledge its * 22 // * use in resulting scientific publicati 22 // * use in resulting scientific publications, and indicate your * 23 // * acceptance of all terms of the Geant4 Sof 23 // * acceptance of all terms of the Geant4 Software license. * 24 // ******************************************* 24 // ******************************************************************** 25 // 25 // >> 26 // >> 27 // $Id: G4SynchrotronRadiationInMat.hh,v 1.2 2006/06/29 19:55:45 gunter Exp $ >> 28 // GEANT4 tag $Name: geant4-08-01-patch-01 $ >> 29 // 26 // ------------------------------------------- 30 // ------------------------------------------------------------ 27 // GEANT 4 class header file 31 // GEANT 4 class header file >> 32 // CERN Geneva Switzerland 28 // 33 // 29 // History: << 34 // >> 35 // History: 30 // 21-5-98 1 version , V. Grichine 36 // 21-5-98 1 version , V. Grichine 31 // 28-05-01, V.Ivanchenko minor changes t 37 // 28-05-01, V.Ivanchenko minor changes to provide ANSI -wall compilation 32 // 19-05-06, V.Ivanchenko rename from G4S 38 // 19-05-06, V.Ivanchenko rename from G4SynchrotronRadiation 33 // 39 // >> 40 // 34 // ------------------------------------------- 41 // ------------------------------------------------------------ 35 42 36 #ifndef G4SynchrotronRadiationInMat_h 43 #ifndef G4SynchrotronRadiationInMat_h 37 #define G4SynchrotronRadiationInMat_h 1 44 #define G4SynchrotronRadiationInMat_h 1 38 45 >> 46 #include "G4ios.hh" 39 #include "globals.hh" 47 #include "globals.hh" 40 #include "G4Electron.hh" << 48 #include "Randomize.hh" 41 #include "G4Gamma.hh" << 49 #include "G4VDiscreteProcess.hh" 42 #include "G4PhysicsLogVector.hh" << 50 #include "G4TransportationManager.hh" 43 #include "G4PhysicsTable.hh" << 51 #include "G4FieldManager.hh" 44 #include "G4Positron.hh" << 52 #include "G4Field.hh" 45 #include "G4Step.hh" << 46 #include "G4ThreeVector.hh" 53 #include "G4ThreeVector.hh" >> 54 #include "G4PropagatorInField.hh" >> 55 47 #include "G4Track.hh" 56 #include "G4Track.hh" 48 #include "G4TransportationManager.hh" << 57 #include "G4Step.hh" 49 #include "G4VDiscreteProcess.hh" << 58 50 #include "G4VParticleChange.hh" << 59 >> 60 #include "G4Gamma.hh" >> 61 #include "G4Electron.hh" >> 62 #include "G4Positron.hh" >> 63 >> 64 >> 65 #include "G4PhysicsTable.hh" >> 66 #include "G4PhysicsLogVector.hh" 51 67 52 class G4ParticleDefinition; << 53 class G4PropagatorInField; << 54 68 55 class G4SynchrotronRadiationInMat : public G4V 69 class G4SynchrotronRadiationInMat : public G4VDiscreteProcess 56 { 70 { 57 public: << 71 public: 58 explicit G4SynchrotronRadiationInMat( << 72 59 const G4String& processName = "Synchrotron << 73 G4SynchrotronRadiationInMat(const G4String& processName = 60 G4ProcessType type = fElectromagn << 74 "SynchrotronRadiation", 61 << 75 G4ProcessType type = fElectromagnetic); 62 ~G4SynchrotronRadiationInMat(); << 76 63 << 77 virtual ~G4SynchrotronRadiationInMat(); 64 G4SynchrotronRadiationInMat& operator=( << 78 65 const G4SynchrotronRadiationInMat& right) << 79 private: 66 G4SynchrotronRadiationInMat(const G4Synchrot << 80 67 << 81 G4SynchrotronRadiationInMat & operator=(const G4SynchrotronRadiationInMat &right); 68 G4double GetMeanFreePath(const G4Track& trac << 82 69 G4ForceCondition* c << 83 G4SynchrotronRadiationInMat(const G4SynchrotronRadiationInMat&); 70 << 84 71 G4VParticleChange* PostStepDoIt(const G4Trac << 85 public: ///////////////// Post Step functions ////////////////////////// 72 const G4Step << 86 73 << 87 G4double GetMeanFreePath( const G4Track& track, 74 G4double GetPhotonEnergy(const G4Track& trac << 88 G4double previousStepSize, 75 << 89 G4ForceCondition* condition ); 76 G4double GetRandomEnergySR(G4double, G4doubl << 90 77 << 91 G4VParticleChange *PostStepDoIt( const G4Track& track, 78 G4double GetProbSpectrumSRforInt(G4double); << 92 const G4Step& Step ); 79 G4double GetIntProbSR(G4double); << 93 80 << 94 G4double GetPhotonEnergy( const G4Track& trackData, 81 G4double GetProbSpectrumSRforEnergy(G4double << 95 const G4Step& stepData ); 82 G4double GetEnergyProbSR(G4double); << 96 83 << 97 G4double GetRandomEnergySR( G4double, G4double ); 84 G4double GetIntegrandForAngleK(G4double); << 98 85 G4double GetAngleK(G4double); << 99 G4double GetProbSpectrumSRforInt( G4double ); 86 G4double GetAngleNumberAtGammaKsi(G4double); << 100 G4double GetIntProbSR( G4double ); 87 << 101 88 G4bool IsApplicable(const G4ParticleDefiniti << 102 G4double GetProbSpectrumSRforEnergy( G4double ); 89 << 103 G4double GetEnergyProbSR( G4double ); 90 static G4double GetLambdaConst(); << 104 91 static G4double GetEnergyConst(); << 105 G4double GetIntegrandForAngleK( G4double ); 92 << 106 G4double GetAngleK( G4double ); 93 void SetRootNumber(G4int rn) { fRootNumber = << 107 G4double GetAngleNumberAtGammaKsi( G4double ); 94 void SetVerboseLevel(G4int v) { fVerboseLeve << 108 95 void SetKsi(G4double ksi) { fKsi = ksi; }; << 109 96 void SetEta(G4double eta) { fEta = eta; }; << 110 97 void SetPsiGamma(G4double psg) { fPsiGamma = << 111 G4bool IsApplicable(const G4ParticleDefinition&); 98 void SetOrderAngleK(G4double ord) << 112 99 { << 113 static G4double GetLambdaConst(){ return fLambdaConst; }; 100 fOrderAngleK = ord; << 114 static G4double GetEnergyConst(){ return fEnergyConst; }; 101 }; // should be 1/3 or 2/3 << 115 102 << 116 void SetRootNumber(G4int rn){ fRootNumber = rn; }; 103 private: << 117 void SetVerboseLevel(G4int v){ fVerboseLevel = v; }; 104 // Constant for calculation of mean free pat << 118 void SetKsi(G4double ksi){ fKsi = ksi; }; 105 // sqrt(3.) = 1.73... << 119 void SetEta(G4double eta){ fEta = eta; }; 106 static constexpr G4double fLambdaConst = << 120 void SetPsiGamma(G4double psg){ fPsiGamma = psg; }; 107 1.73205080756887729352 * CLHEP::electron_m << 121 void SetOrderAngleK(G4double ord){ fOrderAngleK = ord; }; // should be 1/3 or 2/3 108 (2.5 * CLHEP::fine_structure_const * CLHEP << 122 109 << 123 protected: 110 // Constant for calculation of charactericti << 124 111 static constexpr G4double fEnergyConst = << 125 private: 112 1.5 * CLHEP::c_light * CLHEP::c_light * CL << 126 113 CLHEP::electron_mass_c2; << 127 static const G4double fLambdaConst; 114 << 128 115 // Array of integral probability of synchrot << 129 static const G4double fEnergyConst; 116 // the corresponding energy = 0.0001*i*i*(ch << 130 117 static const G4double fIntegralProbabilityOf << 131 static const G4double fIntegralProbabilityOfSR[200]; >> 132 >> 133 >> 134 const G4double >> 135 LowestKineticEnergy; // low energy limit of the cross-section formula >> 136 >> 137 const G4double >> 138 HighestKineticEnergy; // high energy limit of the cross-section formula >> 139 >> 140 G4int TotBin; // number of bins in the tables >> 141 >> 142 G4double CutInRange; 118 143 119 const G4ParticleDefinition* theGamma; 144 const G4ParticleDefinition* theGamma; 120 const G4ParticleDefinition* theElectron; 145 const G4ParticleDefinition* theElectron; 121 const G4ParticleDefinition* thePositron; 146 const G4ParticleDefinition* thePositron; 122 147 123 G4PropagatorInField* fFieldPropagator; << 148 const G4double* GammaCutInKineticEnergy; >> 149 const G4double* ElectronCutInKineticEnergy; >> 150 const G4double* PositronCutInKineticEnergy; >> 151 const G4double* ParticleCutInKineticEnergy; 124 152 125 const G4double << 126 LowestKineticEnergy; // low energy limit << 127 153 128 G4double CutInRange; << 129 G4double GammaCutInKineticEnergyNow; 154 G4double GammaCutInKineticEnergyNow; 130 G4double ElectronCutInKineticEnergyNow; 155 G4double ElectronCutInKineticEnergyNow; 131 G4double PositronCutInKineticEnergyNow; 156 G4double PositronCutInKineticEnergyNow; 132 G4double ParticleCutInKineticEnergyNow; 157 G4double ParticleCutInKineticEnergyNow; >> 158 133 G4double fAlpha; 159 G4double fAlpha; 134 G4double fKsi; // omega/omega_c << 160 G4int fRootNumber; 135 G4double fPsiGamma; // Psi-angle*gamma << 161 G4double fKsi; // omega/omega_c 136 G4double fEta; // << 162 G4double fPsiGamma; // Psi-angle*gamma 137 G4double fOrderAngleK; // 1/3 or 2/3 << 163 G4double fEta; // 138 << 164 G4double fOrderAngleK; // 1/3 or 2/3 139 G4int fRootNumber; << 165 140 G4int fVerboseLevel; << 166 141 << 167 G4int fVerboseLevel; 142 G4int secID = -1; // creator modelID << 168 G4PropagatorInField* fFieldPropagator; >> 169 143 }; 170 }; 144 171 >> 172 ////////////////////////// INLINE METHODS ///////////////////////////// >> 173 >> 174 inline G4bool >> 175 G4SynchrotronRadiationInMat::IsApplicable( const G4ParticleDefinition& particle ) >> 176 { >> 177 >> 178 return ( ( &particle == (const G4ParticleDefinition *)theElectron ) || >> 179 ( &particle == (const G4ParticleDefinition *)thePositron ) ); >> 180 >> 181 // return ( particle.GetPDGCharge() != 0.0 ); >> 182 } >> 183 145 #endif // end of G4SynchrotronRadiationInMat. 184 #endif // end of G4SynchrotronRadiationInMat.hh >> 185 146 186