00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef G4SynchrotronRadiation_h
00043 #define G4SynchrotronRadiation_h 1
00044
00045 #include "G4ios.hh"
00046 #include "globals.hh"
00047 #include "Randomize.hh"
00048 #include "G4VDiscreteProcess.hh"
00049 #include "G4TransportationManager.hh"
00050 #include "G4FieldManager.hh"
00051 #include "G4Field.hh"
00052 #include "G4ThreeVector.hh"
00053 #include "G4PropagatorInField.hh"
00054
00055 #include "G4Track.hh"
00056 #include "G4Step.hh"
00057
00058 #include "G4Gamma.hh"
00059 #include "G4Electron.hh"
00060 #include "G4Positron.hh"
00061
00062
00063 class G4SynchrotronRadiation : public G4VDiscreteProcess
00064 {
00065 public:
00066
00067 G4SynchrotronRadiation(const G4String& pName = "SynRad",
00068 G4ProcessType type = fElectromagnetic);
00069
00070 virtual ~G4SynchrotronRadiation();
00071
00072 G4double GetMeanFreePath( const G4Track& track,
00073 G4double previousStepSize,
00074 G4ForceCondition* condition );
00075
00076 G4VParticleChange *PostStepDoIt( const G4Track& track,
00077 const G4Step& Step );
00078
00079 G4double GetPhotonEnergy( const G4Track& trackData,
00080 const G4Step& stepData );
00081
00082 G4double GetRandomEnergySR( G4double, G4double );
00083
00084 G4double InvSynFracInt(G4double x);
00085 G4double Chebyshev(G4double a,G4double b,const G4double c[],
00086 G4int n, G4double x);
00087 G4bool IsApplicable(const G4ParticleDefinition&);
00088 void BuildPhysicsTable(const G4ParticleDefinition& );
00089 void PrintInfoDefinition();
00090
00091 private:
00092
00093 G4SynchrotronRadiation & operator=(const G4SynchrotronRadiation &right);
00094 G4SynchrotronRadiation(const G4SynchrotronRadiation&);
00095
00096 G4ParticleDefinition* theGamma;
00097 const G4ParticleDefinition* theElectron;
00098 const G4ParticleDefinition* thePositron;
00099
00100 G4double fLambdaConst;
00101 G4double fEnergyConst;
00102
00103 G4PropagatorInField* fFieldPropagator;
00104
00105 };
00106
00108 inline G4bool
00109 G4SynchrotronRadiation::IsApplicable( const G4ParticleDefinition& particle )
00110 {
00111
00112 return ( ( &particle == (const G4ParticleDefinition *)theElectron ) ||
00113 ( &particle == (const G4ParticleDefinition *)thePositron ) );
00114 }
00115
00116 inline G4double
00117 G4SynchrotronRadiation::Chebyshev(G4double a, G4double b, const G4double c[],
00118 G4int n, G4double x)
00119 {
00120 G4double y;
00121 G4double y2=2.0*(y=(2.0*x-a-b)/(b-a));
00122 G4double d=0,dd=0;
00123 for (G4int j=n-1;j>=1;--j)
00124 { G4double sv=d;
00125 d=y2*d-dd+c[j];
00126 dd=sv;
00127 }
00128 return y*d-dd+0.5*c[0];
00129 }
00130
00131 #endif // end of G4SynchrotronRadiation.hh
00132