Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:08

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 // ------------------------------------------------------------
0027 //      GEANT 4 class header file
0028 //
0029 //      History:
0030 //      21-5-98  1 version , V. Grichine
0031 //      28-05-01, V.Ivanchenko minor changes to provide ANSI -wall compilation
0032 //      19-05-06, V.Ivanchenko rename from G4SynchrotronRadiation
0033 //
0034 // ------------------------------------------------------------
0035 
0036 #ifndef G4SynchrotronRadiationInMat_h
0037 #define G4SynchrotronRadiationInMat_h 1
0038 
0039 #include "globals.hh"
0040 #include "G4Electron.hh"
0041 #include "G4Gamma.hh"
0042 #include "G4PhysicsLogVector.hh"
0043 #include "G4PhysicsTable.hh"
0044 #include "G4Positron.hh"
0045 #include "G4Step.hh"
0046 #include "G4ThreeVector.hh"
0047 #include "G4Track.hh"
0048 #include "G4TransportationManager.hh"
0049 #include "G4VDiscreteProcess.hh"
0050 #include "G4VParticleChange.hh"
0051 
0052 class G4ParticleDefinition;
0053 class G4PropagatorInField;
0054 
0055 class G4SynchrotronRadiationInMat : public G4VDiscreteProcess
0056 {
0057  public:
0058   explicit G4SynchrotronRadiationInMat(
0059     const G4String& processName = "SynchrotronRadiation",
0060     G4ProcessType type          = fElectromagnetic);
0061 
0062   ~G4SynchrotronRadiationInMat();
0063 
0064   G4SynchrotronRadiationInMat& operator=(
0065     const G4SynchrotronRadiationInMat& right) = delete;
0066   G4SynchrotronRadiationInMat(const G4SynchrotronRadiationInMat&) = delete;
0067 
0068   G4double GetMeanFreePath(const G4Track& track, G4double previousStepSize,
0069                            G4ForceCondition* condition) override;
0070 
0071   G4VParticleChange* PostStepDoIt(const G4Track& track,
0072                                   const G4Step& Step) override;
0073 
0074   G4double GetPhotonEnergy(const G4Track& trackData, const G4Step& stepData);
0075 
0076   G4double GetRandomEnergySR(G4double, G4double);
0077 
0078   G4double GetProbSpectrumSRforInt(G4double);
0079   G4double GetIntProbSR(G4double);
0080 
0081   G4double GetProbSpectrumSRforEnergy(G4double);
0082   G4double GetEnergyProbSR(G4double);
0083 
0084   G4double GetIntegrandForAngleK(G4double);
0085   G4double GetAngleK(G4double);
0086   G4double GetAngleNumberAtGammaKsi(G4double);
0087 
0088   G4bool IsApplicable(const G4ParticleDefinition&) override;
0089 
0090   static G4double GetLambdaConst();
0091   static G4double GetEnergyConst();
0092 
0093   void SetRootNumber(G4int rn) { fRootNumber = rn; };
0094   void SetVerboseLevel(G4int v) { fVerboseLevel = v; };
0095   void SetKsi(G4double ksi) { fKsi = ksi; };
0096   void SetEta(G4double eta) { fEta = eta; };
0097   void SetPsiGamma(G4double psg) { fPsiGamma = psg; };
0098   void SetOrderAngleK(G4double ord)
0099   {
0100     fOrderAngleK = ord;
0101   };  // should be 1/3 or 2/3
0102 
0103  private:
0104   // Constant for calculation of mean free path
0105   // sqrt(3.) = 1.73...
0106   static constexpr G4double fLambdaConst =
0107     1.73205080756887729352 * CLHEP::electron_mass_c2 /
0108     (2.5 * CLHEP::fine_structure_const * CLHEP::eplus * ::CLHEP::c_light);
0109 
0110   // Constant for calculation of characterictic energy
0111   static constexpr G4double fEnergyConst =
0112     1.5 * CLHEP::c_light * CLHEP::c_light * CLHEP::eplus * CLHEP::hbar_Planck /
0113     CLHEP::electron_mass_c2;
0114 
0115   // Array of integral probability of synchrotron photons:
0116   // the corresponding energy = 0.0001*i*i*(characteristic energy)
0117   static const G4double fIntegralProbabilityOfSR[200]; 
0118 
0119   const G4ParticleDefinition* theGamma;
0120   const G4ParticleDefinition* theElectron;
0121   const G4ParticleDefinition* thePositron;
0122 
0123   G4PropagatorInField* fFieldPropagator;
0124 
0125   const G4double
0126     LowestKineticEnergy;  // low  energy limit of the cross-section formula
0127 
0128   G4double CutInRange;
0129   G4double GammaCutInKineticEnergyNow;
0130   G4double ElectronCutInKineticEnergyNow;
0131   G4double PositronCutInKineticEnergyNow;
0132   G4double ParticleCutInKineticEnergyNow;
0133   G4double fAlpha;
0134   G4double fKsi;          // omega/omega_c
0135   G4double fPsiGamma;     // Psi-angle*gamma
0136   G4double fEta;          //
0137   G4double fOrderAngleK;  // 1/3 or 2/3
0138 
0139   G4int fRootNumber;
0140   G4int fVerboseLevel;
0141   
0142   G4int secID = -1;  // creator modelID
0143 };
0144 
0145 #endif  // end of G4SynchrotronRadiationInMat.hh