Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4SynchrotronRadiation.hh
Go to the documentation of this file.
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$
28 //
29 // ------------------------------------------------------------
30 // GEANT 4 class header file
31 // CERN Geneva Switzerland
32 //
33 //
34 // History:
35 // 21-5-98 1 version , V. Grichine
36 // 28-05-01, V.Ivanchenko minor changes to provide ANSI -wall compilation
37 // 23-05-06, H. Burkhardt: Energy spectrum from function rather than table
38 //
39 //
40 // ------------------------------------------------------------
41 
42 #ifndef G4SynchrotronRadiation_h
43 #define G4SynchrotronRadiation_h 1
44 
45 #include "G4ios.hh"
46 #include "globals.hh"
47 #include "Randomize.hh"
48 #include "G4VDiscreteProcess.hh"
50 #include "G4FieldManager.hh"
51 #include "G4Field.hh"
52 #include "G4ThreeVector.hh"
53 #include "G4PropagatorInField.hh"
54 
55 #include "G4Track.hh"
56 #include "G4Step.hh"
57 
58 #include "G4Gamma.hh"
59 #include "G4Electron.hh"
60 #include "G4Positron.hh"
61 
62 
64 {
65 public:
66 
67  G4SynchrotronRadiation(const G4String& pName = "SynRad",
69 
70  virtual ~G4SynchrotronRadiation();
71 
72  G4double GetMeanFreePath( const G4Track& track,
73  G4double previousStepSize,
75 
76  G4VParticleChange *PostStepDoIt( const G4Track& track,
77  const G4Step& Step );
78 
79  G4double GetPhotonEnergy( const G4Track& trackData,
80  const G4Step& stepData );
81 
83 
86  G4int n, G4double x);
89  void PrintInfoDefinition();
90 
91 private:
92 
95 
96  G4ParticleDefinition* theGamma;
97  const G4ParticleDefinition* theElectron;
98  const G4ParticleDefinition* thePositron;
99 
100  G4double fLambdaConst;
101  G4double fEnergyConst;
102 
103  G4PropagatorInField* fFieldPropagator;
104 
105 };
106 
108 inline G4bool
110 {
111 
112  return ( ( &particle == (const G4ParticleDefinition *)theElectron ) ||
113  ( &particle == (const G4ParticleDefinition *)thePositron ) );
114 }
115 
116 inline G4double
118  G4int n, G4double x)
119 {
120  G4double y;
121  G4double y2=2.0*(y=(2.0*x-a-b)/(b-a)); // Change of variable.
122  G4double d=0,dd=0;
123  for (G4int j=n-1;j>=1;--j) // Clenshaw's recurrence.
124  { G4double sv=d;
125  d=y2*d-dd+c[j];
126  dd=sv;
127  }
128  return y*d-dd+0.5*c[0];
129 }
130 
131 #endif // end of G4SynchrotronRadiation.hh
132