[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 | // |
---|
| 27 | // $Id: G4SynchrotronRadiationInMat.hh,v 1.2 2006/06/29 19:55:45 gunter Exp $ |
---|
[1007] | 28 | // GEANT4 tag $Name: geant4-09-02 $ |
---|
[819] | 29 | // |
---|
| 30 | // ------------------------------------------------------------ |
---|
| 31 | // GEANT 4 class header file |
---|
| 32 | // CERN Geneva Switzerland |
---|
| 33 | // |
---|
| 34 | // |
---|
| 35 | // History: |
---|
| 36 | // 21-5-98 1 version , V. Grichine |
---|
| 37 | // 28-05-01, V.Ivanchenko minor changes to provide ANSI -wall compilation |
---|
| 38 | // 19-05-06, V.Ivanchenko rename from G4SynchrotronRadiation |
---|
| 39 | // |
---|
| 40 | // |
---|
| 41 | // ------------------------------------------------------------ |
---|
| 42 | |
---|
| 43 | #ifndef G4SynchrotronRadiationInMat_h |
---|
| 44 | #define G4SynchrotronRadiationInMat_h 1 |
---|
| 45 | |
---|
| 46 | #include "G4ios.hh" |
---|
| 47 | #include "globals.hh" |
---|
| 48 | #include "Randomize.hh" |
---|
| 49 | #include "G4VDiscreteProcess.hh" |
---|
| 50 | #include "G4TransportationManager.hh" |
---|
| 51 | #include "G4FieldManager.hh" |
---|
| 52 | #include "G4Field.hh" |
---|
| 53 | #include "G4ThreeVector.hh" |
---|
| 54 | #include "G4PropagatorInField.hh" |
---|
| 55 | |
---|
| 56 | #include "G4Track.hh" |
---|
| 57 | #include "G4Step.hh" |
---|
| 58 | |
---|
| 59 | |
---|
| 60 | #include "G4Gamma.hh" |
---|
| 61 | #include "G4Electron.hh" |
---|
| 62 | #include "G4Positron.hh" |
---|
| 63 | |
---|
| 64 | |
---|
| 65 | #include "G4PhysicsTable.hh" |
---|
| 66 | #include "G4PhysicsLogVector.hh" |
---|
| 67 | |
---|
| 68 | |
---|
| 69 | class G4SynchrotronRadiationInMat : public G4VDiscreteProcess |
---|
| 70 | { |
---|
| 71 | public: |
---|
| 72 | |
---|
| 73 | G4SynchrotronRadiationInMat(const G4String& processName = |
---|
| 74 | "SynchrotronRadiation", |
---|
| 75 | G4ProcessType type = fElectromagnetic); |
---|
| 76 | |
---|
| 77 | virtual ~G4SynchrotronRadiationInMat(); |
---|
| 78 | |
---|
| 79 | private: |
---|
| 80 | |
---|
| 81 | G4SynchrotronRadiationInMat & operator=(const G4SynchrotronRadiationInMat &right); |
---|
| 82 | |
---|
| 83 | G4SynchrotronRadiationInMat(const G4SynchrotronRadiationInMat&); |
---|
| 84 | |
---|
| 85 | public: ///////////////// Post Step functions ////////////////////////// |
---|
| 86 | |
---|
| 87 | G4double GetMeanFreePath( const G4Track& track, |
---|
| 88 | G4double previousStepSize, |
---|
| 89 | G4ForceCondition* condition ); |
---|
| 90 | |
---|
| 91 | G4VParticleChange *PostStepDoIt( const G4Track& track, |
---|
| 92 | const G4Step& Step ); |
---|
| 93 | |
---|
| 94 | G4double GetPhotonEnergy( const G4Track& trackData, |
---|
| 95 | const G4Step& stepData ); |
---|
| 96 | |
---|
| 97 | G4double GetRandomEnergySR( G4double, G4double ); |
---|
| 98 | |
---|
| 99 | G4double GetProbSpectrumSRforInt( G4double ); |
---|
| 100 | G4double GetIntProbSR( G4double ); |
---|
| 101 | |
---|
| 102 | G4double GetProbSpectrumSRforEnergy( G4double ); |
---|
| 103 | G4double GetEnergyProbSR( G4double ); |
---|
| 104 | |
---|
| 105 | G4double GetIntegrandForAngleK( G4double ); |
---|
| 106 | G4double GetAngleK( G4double ); |
---|
| 107 | G4double GetAngleNumberAtGammaKsi( G4double ); |
---|
| 108 | |
---|
| 109 | |
---|
| 110 | |
---|
| 111 | G4bool IsApplicable(const G4ParticleDefinition&); |
---|
| 112 | |
---|
| 113 | static G4double GetLambdaConst(){ return fLambdaConst; }; |
---|
| 114 | static G4double GetEnergyConst(){ return fEnergyConst; }; |
---|
| 115 | |
---|
| 116 | void SetRootNumber(G4int rn){ fRootNumber = rn; }; |
---|
| 117 | void SetVerboseLevel(G4int v){ fVerboseLevel = v; }; |
---|
| 118 | void SetKsi(G4double ksi){ fKsi = ksi; }; |
---|
| 119 | void SetEta(G4double eta){ fEta = eta; }; |
---|
| 120 | void SetPsiGamma(G4double psg){ fPsiGamma = psg; }; |
---|
| 121 | void SetOrderAngleK(G4double ord){ fOrderAngleK = ord; }; // should be 1/3 or 2/3 |
---|
| 122 | |
---|
| 123 | protected: |
---|
| 124 | |
---|
| 125 | private: |
---|
| 126 | |
---|
| 127 | static const G4double fLambdaConst; |
---|
| 128 | |
---|
| 129 | static const G4double fEnergyConst; |
---|
| 130 | |
---|
| 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; |
---|
| 143 | |
---|
| 144 | const G4ParticleDefinition* theGamma; |
---|
| 145 | const G4ParticleDefinition* theElectron; |
---|
| 146 | const G4ParticleDefinition* thePositron; |
---|
| 147 | |
---|
| 148 | const G4double* GammaCutInKineticEnergy; |
---|
| 149 | const G4double* ElectronCutInKineticEnergy; |
---|
| 150 | const G4double* PositronCutInKineticEnergy; |
---|
| 151 | const G4double* ParticleCutInKineticEnergy; |
---|
| 152 | |
---|
| 153 | |
---|
| 154 | G4double GammaCutInKineticEnergyNow; |
---|
| 155 | G4double ElectronCutInKineticEnergyNow; |
---|
| 156 | G4double PositronCutInKineticEnergyNow; |
---|
| 157 | G4double ParticleCutInKineticEnergyNow; |
---|
| 158 | |
---|
| 159 | G4double fAlpha; |
---|
| 160 | G4int fRootNumber; |
---|
| 161 | G4double fKsi; // omega/omega_c |
---|
| 162 | G4double fPsiGamma; // Psi-angle*gamma |
---|
| 163 | G4double fEta; // |
---|
| 164 | G4double fOrderAngleK; // 1/3 or 2/3 |
---|
| 165 | |
---|
| 166 | |
---|
| 167 | G4int fVerboseLevel; |
---|
| 168 | G4PropagatorInField* fFieldPropagator; |
---|
| 169 | |
---|
| 170 | }; |
---|
| 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 | |
---|
| 184 | #endif // end of G4SynchrotronRadiationInMat.hh |
---|
| 185 | |
---|