Back to home page

EIC code displayed by LXR

 
 

    


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

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 // Author: Luciano Pandola
0028 //
0029 // History:
0030 // -----------
0031 // 29 Oct 2008   L. Pandola   1st implementation. Migration from EM process 
0032 //                            to EM model
0033 // 02 Oct 2013   L. Pandola   Migration to MT paradigm
0034 //
0035 // -------------------------------------------------------------------
0036 //
0037 // Class description:
0038 // Low Energy Electromagnetic Physics, Positron Annihilation 
0039 // with Penelope Model
0040 // -------------------------------------------------------------------
0041 
0042 #ifndef G4PENELOPEANNIHILATIONMODEL_HH
0043 #define G4PENELOPEANNIHILATIONMODEL_HH 1
0044 
0045 #include "globals.hh"
0046 #include "G4VEmModel.hh"
0047 #include "G4DataVector.hh"
0048 #include "G4ParticleChangeForGamma.hh"
0049 
0050 class G4ParticleDefinition;
0051 class G4DynamicParticle;
0052 class G4MaterialCutsCouple;
0053 class G4Material;
0054 
0055 class G4PenelopeAnnihilationModel : public G4VEmModel 
0056 {
0057 public:
0058   explicit G4PenelopeAnnihilationModel(const G4ParticleDefinition* p=nullptr,
0059                        const G4String& processName ="PenAnnih");
0060   virtual ~G4PenelopeAnnihilationModel();
0061 
0062   void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
0063   void InitialiseLocal(const G4ParticleDefinition*,
0064                                G4VEmModel* ) override;
0065 
0066   G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
0067                       G4double kinEnergy,
0068                       G4double Z,
0069                       G4double A=0,
0070                       G4double cut=0,
0071                       G4double emax=DBL_MAX) override;
0072 
0073   void SampleSecondaries(std::vector<G4DynamicParticle*>*,
0074              const G4MaterialCutsCouple*,
0075              const G4DynamicParticle*,
0076              G4double tmin,
0077              G4double maxEnergy) override;
0078   
0079   void SetVerbosityLevel(G4int lev){fVerboseLevel = lev;};
0080   G4int GetVerbosityLevel(){return fVerboseLevel;};
0081   
0082   G4PenelopeAnnihilationModel & operator=(const G4PenelopeAnnihilationModel &right) = delete;
0083   G4PenelopeAnnihilationModel(const G4PenelopeAnnihilationModel&) = delete;
0084 
0085 protected:
0086   G4ParticleChangeForGamma* fParticleChange;
0087   const G4ParticleDefinition* fParticle;
0088 
0089 private:
0090   G4double ComputeCrossSectionPerElectron(G4double energy);
0091   void SetParticle(const G4ParticleDefinition*);
0092 
0093   //Stored here so it is not recalculated every time
0094   static G4double fPielr2;
0095  
0096   G4double fIntrinsicLowEnergyLimit;
0097   G4double fIntrinsicHighEnergyLimit;
0098   
0099   G4int fVerboseLevel;
0100   G4bool fIsInitialised; 
0101 };
0102 
0103 #endif
0104