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 // 15 Feb 2010   L. Pandola   1st implementation. 
0032 // 18 Mar 2010   L. Pandola   Removed GetAtomsPerMolecule(), now demanded 
0033 //                            to G4PenelopeOscillatorManager
0034 // 24 May 2011   L. Pandola   Renamed (make v2008 as default Penelope)
0035 // 10 Jun 2011   L. Pandola   Migrated to the new AtomDeexcitation interface
0036 // 09 Oct 2013   L. Pandola   Migration to MT
0037 //
0038 // -------------------------------------------------------------------
0039 //*
0040 // Class description:
0041 // Low Energy Electromagnetic Physics, Compton Scattering
0042 // with Penelope Model, version 2008
0043 // -------------------------------------------------------------------
0044 
0045 #ifndef G4PENELOPECOMPTONMODEL_HH
0046 #define G4PENELOPECOMPTONMODEL_HH 1
0047 
0048 #include "globals.hh"
0049 #include "G4VEmModel.hh"
0050 #include "G4DataVector.hh"
0051 #include "G4ParticleChangeForGamma.hh"
0052 #include "G4AtomicTransitionManager.hh"
0053 #include "G4VAtomDeexcitation.hh"
0054 
0055 class G4ParticleDefinition;
0056 class G4DynamicParticle;
0057 class G4MaterialCutsCouple;
0058 class G4Material;
0059 class G4PenelopeOscillatorManager;
0060 class G4PenelopeOscillator;
0061 
0062 class G4PenelopeComptonModel : public G4VEmModel 
0063 {
0064 
0065 public:
0066   explicit G4PenelopeComptonModel(const G4ParticleDefinition* p=nullptr,
0067              const G4String& processName ="PenCompton");
0068   virtual ~G4PenelopeComptonModel();
0069 
0070   void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
0071   void InitialiseLocal(const G4ParticleDefinition*,
0072                G4VEmModel *masterModel) override;
0073 
0074   G4double CrossSectionPerVolume(const G4Material*,
0075                  const G4ParticleDefinition*,
0076                  G4double kineticEnergy,
0077                  G4double cutEnergy = 0.0,
0078                  G4double maxEnergy = DBL_MAX) override;
0079   
0080   //This is a dummy method. Never inkoved by the tracking, it just issues 
0081   //a warning if one tries to get Cross Sections per Atom via the 
0082   //G4EmCalculator.
0083   G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
0084                       G4double,
0085                       G4double,
0086                       G4double,
0087                       G4double,
0088                       G4double) override;
0089 
0090   void SampleSecondaries(std::vector<G4DynamicParticle*>*,
0091              const G4MaterialCutsCouple*,
0092              const G4DynamicParticle*,
0093              G4double tmin,
0094              G4double maxEnergy) override;
0095   
0096   void SetVerbosityLevel(G4int lev){fVerboseLevel = lev;};
0097   G4int GetVerbosityLevel(){return fVerboseLevel;};
0098 
0099   G4PenelopeComptonModel & operator=(const G4PenelopeComptonModel &right) = delete;
0100   G4PenelopeComptonModel(const G4PenelopeComptonModel&) = delete;
0101 
0102 protected:
0103   G4ParticleChangeForGamma* fParticleChange;
0104   const G4ParticleDefinition* fParticle;
0105 
0106 private:
0107   void SetParticle(const G4ParticleDefinition*);
0108 
0109   //Differential cross section which is numerically integrated
0110   G4double DifferentialCrossSection (G4double cdt,G4double energy,
0111                      G4PenelopeOscillator* osc);
0112 
0113   G4double OscillatorTotalCrossSection(G4double energy,
0114                        G4PenelopeOscillator* osc);
0115 
0116   G4double KleinNishinaCrossSection(G4double energy,const G4Material*);
0117 
0118   G4VAtomDeexcitation*             fAtomDeexcitation;
0119   const G4AtomicTransitionManager* fTransitionManager;
0120   
0121   G4PenelopeOscillatorManager* fOscManager;
0122 
0123   //Intrinsic energy limits of the model: 
0124   //cannot be extended by the parent process
0125   G4double fIntrinsicLowEnergyLimit;
0126   G4double fIntrinsicHighEnergyLimit;
0127 
0128   G4int fVerboseLevel;
0129   G4bool fIsInitialised;
0130 };
0131 
0132 #endif
0133