Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:18

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 // G4ForwardXrayTR
0027 //
0028 // Class for description
0029 //
0030 // Class for forward X-ray transition radiation generated
0031 // by relativistic charged particle crossed interface between material 1
0032 // and material 2 (1 -> 2)
0033 
0034 // History:
0035 // 22.09.97, V. Grichine (Vladimir.Grichine@cern.ch)
0036 // 26.01.00, V.Grichine, new constructor and protected DM for fast sim. models
0037 // 10.03.03, V.Ivanchenko migrade to "cut per region"
0038 // 03.06.03, V.Ivanchenko fix compilation warnings
0039 
0040 #ifndef G4FORWARDXRAYTR_H
0041 #define G4FORWARDXRAYTR_H
0042 
0043 #include "globals.hh"
0044 #include "G4Track.hh"
0045 #include "G4TransitionRadiation.hh"
0046 #include "G4VParticleChange.hh"
0047 
0048 class G4ParticleDefinition;
0049 class G4PhysicsTable;
0050 class G4PhysicsLogVector;
0051 
0052 class G4ForwardXrayTR : public G4TransitionRadiation
0053 {
0054  public:
0055   explicit G4ForwardXrayTR(const G4String& matName1, const G4String& matName2,
0056                            const G4String& processName = "XrayTR");
0057 
0058   explicit G4ForwardXrayTR(const G4String& processName = "XrayTR");
0059 
0060   ~G4ForwardXrayTR();
0061 
0062   G4ForwardXrayTR(const G4ForwardXrayTR& right) = delete;
0063   G4ForwardXrayTR& operator=(const G4ForwardXrayTR& right) = delete;
0064 
0065   ///////////////////////    Methods    /////////////////////////////////
0066 
0067   void ProcessDescription(std::ostream&) const override;
0068   void DumpInfo() const override { ProcessDescription(G4cout); };
0069 
0070   void BuildXrayTRtables();
0071 
0072   G4double GetMeanFreePath(const G4Track&, G4double,
0073                            G4ForceCondition* condition) override;
0074 
0075   G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
0076                                   const G4Step& aStep) override;
0077 
0078   G4double GetEnergyTR(G4int iMat, G4int jMat, G4int iTkin) const;
0079 
0080   G4double GetThetaTR(G4int iMat, G4int jMat, G4int iTkin) const;
0081 
0082   ///////////////////// Angle distribution  /////////////////////////////
0083 
0084   G4double SpectralAngleTRdensity(G4double energy,
0085                                   G4double varAngle) const override;
0086 
0087   G4double AngleDensity(G4double energy, G4double varAngle) const;
0088 
0089   G4double EnergyInterval(G4double energy1, G4double energy2,
0090                           G4double varAngle) const;
0091 
0092   G4double AngleSum(G4double varAngle1, G4double varAngle2) const;
0093 
0094   /////////////////////////  Energy distribution ///////////////////////////////
0095 
0096   G4double SpectralDensity(G4double energy, G4double x) const;
0097 
0098   G4double AngleInterval(G4double energy, G4double varAngle1,
0099                          G4double varAngle2) const;
0100 
0101   G4double EnergySum(G4double energy1, G4double energy2) const;
0102 
0103   ///////////////////////////   Access functions  ////////////////////////////
0104 
0105   G4PhysicsTable* GetAngleDistrTable();
0106   G4PhysicsTable* GetEnergyDistrTable();
0107 
0108   static G4int GetSympsonNumber();
0109   static G4int GetBinTR();
0110 
0111   static G4double GetMinProtonTkin();
0112   static G4double GetMaxProtonTkin();
0113   static G4int GetTotBin();
0114 
0115  protected:  // for access from X-ray TR fast simulation models
0116   static constexpr G4double fTheMinEnergyTR =
0117     1. * CLHEP::keV;  //  static min TR energy
0118   static constexpr G4double fTheMaxEnergyTR =
0119     100. * CLHEP::keV;                              //  static max TR energy
0120   static constexpr G4double fTheMaxAngle = 1.0e-3;  //  max theta of TR quanta
0121   static constexpr G4double fTheMinAngle = 5.0e-6;  //  min theta of TR quanta
0122   static constexpr G4double fMinProtonTkin =
0123     100. * CLHEP::GeV;  // min Tkin of proton in tables
0124   static constexpr G4double fMaxProtonTkin =
0125     100. * CLHEP::TeV;  // max Tkin of proton in tables
0126   static constexpr G4double fPlasmaCof =
0127     4.0 * CLHEP::pi * CLHEP::fine_structure_const * CLHEP::hbarc *
0128     CLHEP::hbarc * CLHEP::hbarc /
0129     CLHEP::electron_mass_c2;  // physical consts for plasma energy
0130   static constexpr G4double fCofTR = CLHEP::fine_structure_const / CLHEP::pi;
0131 
0132   static constexpr G4int fSympsonNumber =
0133     100;                                // Accuracy of Sympson integration
0134   static constexpr G4int fBinTR  = 50;  //  number of bins in TR vectors
0135   static constexpr G4int fTotBin = 50;  // number of bins in log scale
0136 
0137   const std::vector<G4double>* fGammaCutInKineticEnergy;
0138   // TR photon cut in energy array
0139 
0140   G4ParticleDefinition* fPtrGamma;  // pointer to TR photon
0141 
0142   G4PhysicsTable* fAngleDistrTable;
0143   G4PhysicsTable* fEnergyDistrTable;
0144 
0145   G4PhysicsLogVector* fProtonEnergyVector;
0146 
0147   G4double fMinEnergyTR;   //  min TR energy in material
0148   G4double fMaxEnergyTR;   //  max TR energy in material
0149   G4double fMaxThetaTR;    //  max theta of TR quanta
0150   G4double fGamma;         // current Lorentz factor
0151   G4double fGammaTkinCut;  // Tkin cut of TR photon in current mat.
0152   G4double fSigma1;        // plasma energy Sq of matter1
0153   G4double fSigma2;        // plasma energy Sq of matter2
0154 
0155   G4int secID = -1;  // creator modelID
0156 };
0157 
0158 #endif  // G4FORWARDXRAYTR_H