Back to home page

EIC code displayed by LXR

 
 

    


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

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 //         ------------ G4GammaConversionToMuons physics process ------
0028 //         by H.Burkhardt, S. Kelner and R. Kokoulin, April 2002
0029 // -----------------------------------------------------------------------------
0030 //
0031 // 05-08-04: suppression of .icc file (mma)
0032 // 13-08-04, public ComputeCrossSectionPerAtom() and ComputeMeanFreePath() (mma)
0033 //
0034 // class description
0035 //
0036 // gamma ---> mu+ mu-
0037 // inherit from G4VDiscreteProcess
0038 //
0039 
0040 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0041 
0042 #ifndef G4GammaConversionToMuons_h
0043 #define G4GammaConversionToMuons_h 1
0044 
0045 #include "G4ios.hh"
0046 #include "globals.hh"
0047 #include "Randomize.hh"
0048 #include "G4VDiscreteProcess.hh"
0049 #include "G4PhysicsTable.hh"
0050 #include "G4PhysicsLogVector.hh"
0051 #include "G4ParticleDefinition.hh"
0052 #include "G4Element.hh"
0053 #include "G4Step.hh"
0054 #include <vector>
0055 
0056 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0057 
0058 class G4LossTableManager;
0059 class G4BetheHeitler5DModel;
0060 
0061 class G4GammaConversionToMuons : public G4VDiscreteProcess
0062 {
0063 public:  // with description
0064 
0065   explicit G4GammaConversionToMuons(
0066                         const G4String& processName ="GammaToMuPair",
0067                         G4ProcessType type = fElectromagnetic);
0068 
0069   ~G4GammaConversionToMuons() override;
0070 
0071   G4bool IsApplicable(const G4ParticleDefinition&) override;
0072        // true for Gamma only.
0073 
0074   void BuildPhysicsTable(const G4ParticleDefinition&) override;
0075        // here dummy, the total cross section parametrization is used rather
0076        // than tables,  just calling PrintInfoDefinition
0077 
0078   void PrintInfoDefinition();
0079        // Print few lines of informations about the process: validity range,
0080        // origine ..etc..
0081        // Invoked by BuildThePhysicsTable().
0082 
0083   void SetCrossSecFactor(G4double fac);
0084        // Set the factor to artificially increase the crossSection (default 1)
0085 
0086   inline G4double GetCrossSecFactor() const { return CrossSecFactor;}
0087        // Get the factor to artificially increase the cross section
0088 
0089   G4double GetMeanFreePath(const G4Track& aTrack,
0090                            G4double previousStepSize,
0091                            G4ForceCondition* condition) override;
0092        // It returns the MeanFreePath of the process for the current track :
0093        // (energy, material)
0094        // The previousStepSize and G4ForceCondition* are not used.
0095        // This function overloads a virtual function of the base class.
0096        // It is invoked by the ProcessManager of the Particle.
0097 
0098   G4double GetCrossSectionPerAtom(const G4DynamicParticle* aDynamicGamma,
0099                                   const G4Element* anElement);
0100        // It returns the total CrossSectionPerAtom of the process,
0101        // for the current DynamicGamma (energy), in anElement.
0102 
0103   G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
0104                   const G4Step& aStep) override;
0105        // It computes the final state of the process (at end of step),
0106        // returned as a ParticleChange object.
0107        // This function overloads a virtual function of the base class.
0108        // It is invoked by the ProcessManager of the Particle.
0109 
0110   G4double ComputeCrossSectionPerAtom(G4double GammaEnergy, G4int Z);
0111 
0112   G4double ComputeMeanFreePath (G4double GammaEnergy,
0113                                 const G4Material* aMaterial);
0114 
0115   // hide assignment operator as private
0116   G4GammaConversionToMuons& 
0117   operator=(const G4GammaConversionToMuons &right) = delete;
0118   G4GammaConversionToMuons(const G4GammaConversionToMuons& ) = delete;
0119 
0120 private:
0121 
0122   const G4Element* SelectRandomAtom(const G4DynamicParticle* aDynamicGamma,
0123                                     const G4Material* aMaterial);
0124 
0125   G4double Mmuon;
0126   G4double Rc;
0127   G4double LimitEnergy;          // energy limit for accurate x-section
0128   G4double LowestEnergyLimit;    // low  energy limit of the model
0129   G4double HighestEnergyLimit;   // high energy limit of the model
0130   G4double Energy5DLimit = 0.0;  // high energy limit for 5D final state sampling
0131 
0132   G4double MeanFreePath = DBL_MAX;// actual MeanFreePath (current medium)
0133   G4double CrossSecFactor = 1.0;  // factor to artificially increase
0134                                   // the cross section
0135 
0136   G4LossTableManager* fManager;
0137   G4BetheHeitler5DModel* f5Dmodel = nullptr;
0138   const G4ParticleDefinition* theGamma;
0139   const G4ParticleDefinition* theMuonPlus;
0140   const G4ParticleDefinition* theMuonMinus;
0141   std::vector<G4double> temp;
0142 };
0143 
0144 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0145 
0146 #endif
0147