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 // 30 Mar 2010   L. Pandola   1st implementation. 
0032 // 25 May 2011   L. Pandola   Renamed (make v2008 as default Penelope)
0033 // 09 Mar 2012   L. Pandola   Moved the management and calculation of 
0034 //                            cross sections to a separate class
0035 // 07 Oct 2013   L. Pandola   Migration to MT
0036 // 23 Jun 2015   L. Pandola   Added private member to store the PIXE flag
0037 //
0038 // -------------------------------------------------------------------
0039 //
0040 // Class description:
0041 // Low Energy Electromagnetic Physics, e+ and e- ionisation
0042 // with Penelope Model, version 2008
0043 // -------------------------------------------------------------------
0044 
0045 #ifndef G4PENELOPEIONISATIONMODEL_HH
0046 #define G4PENELOPEIONISATIONMODEL_HH 1
0047 
0048 #include "globals.hh"
0049 #include "G4VEmModel.hh"
0050 #include "G4DataVector.hh"
0051 #include "G4ParticleChangeForLoss.hh"
0052 #include "G4VAtomDeexcitation.hh"
0053 
0054 class G4PhysicsFreeVector;
0055 class G4PhysicsLogVector;
0056 class G4ParticleDefinition;
0057 class G4DynamicParticle;
0058 class G4MaterialCutsCouple;
0059 class G4Material;
0060 class G4PenelopeOscillatorManager;
0061 class G4PenelopeOscillator;
0062 class G4PenelopeCrossSection;
0063 class G4PenelopeIonisationXSHandler;
0064 
0065 class G4PenelopeIonisationModel : public G4VEmModel 
0066 {
0067 public:
0068   explicit G4PenelopeIonisationModel(const G4ParticleDefinition* p=nullptr,
0069                 const G4String& processName ="PenIoni");
0070   virtual ~G4PenelopeIonisationModel();
0071 
0072   void Initialise(const G4ParticleDefinition*, const G4DataVector&) override;
0073   void InitialiseLocal(const G4ParticleDefinition*,
0074                G4VEmModel*) override;
0075 
0076   //*This is a dummy method. Never inkoved by the tracking, it just issues 
0077   //*a warning if one tries to get Cross Sections per Atom via the 
0078   //*G4EmCalculator.
0079   G4double ComputeCrossSectionPerAtom(const G4ParticleDefinition*,
0080                       G4double,
0081                       G4double,
0082                       G4double,
0083                       G4double,
0084                       G4double) override;
0085 
0086   G4double CrossSectionPerVolume(const G4Material* material,
0087                  const G4ParticleDefinition* 
0088                  theParticle,
0089                  G4double kineticEnergy,
0090                  G4double cutEnergy,
0091                  G4double maxEnergy = DBL_MAX) override;
0092                      
0093   void SampleSecondaries(std::vector<G4DynamicParticle*>*,
0094              const G4MaterialCutsCouple*,
0095              const G4DynamicParticle*,
0096              G4double tmin,
0097              G4double maxEnergy) override;
0098                    
0099   G4double ComputeDEDXPerVolume(const G4Material*,
0100                 const G4ParticleDefinition*,
0101                 G4double kineticEnergy,
0102                 G4double cutEnergy) override;
0103 
0104   // Min cut in kinetic energy allowed by the model
0105   G4double MinEnergyCut(const G4ParticleDefinition*,
0106             const G4MaterialCutsCouple*) override;      
0107 
0108   void SetVerbosityLevel(G4int lev){fVerboseLevel = lev;};
0109   G4int GetVerbosityLevel(){return fVerboseLevel;};
0110   
0111   G4PenelopeIonisationModel & operator=(const G4PenelopeIonisationModel &right) = delete;
0112   G4PenelopeIonisationModel(const G4PenelopeIonisationModel&) = delete;
0113 
0114 protected:
0115   G4ParticleChangeForLoss* fParticleChange;
0116   const G4ParticleDefinition* fParticle;
0117 
0118 private:
0119   void SetParticle(const G4ParticleDefinition*);
0120   void SampleFinalStateElectron(const G4Material*,
0121                 G4double cutEnergy,
0122                 G4double kineticEnergy);
0123   void SampleFinalStatePositron(const G4Material*,
0124                 G4double cutEnergy,
0125                 G4double kineticEnergy);
0126 
0127   G4PenelopeOscillatorManager* fOscManager;
0128   G4PenelopeIonisationXSHandler* fCrossSectionHandler;
0129   G4VAtomDeexcitation* fAtomDeexcitation;
0130 
0131   G4double fKineticEnergy1;
0132   G4double fCosThetaPrimary;
0133   G4double fEnergySecondary;
0134   G4double fCosThetaSecondary;
0135 
0136   //Intrinsic energy limits of the model: cannot be extended by the parent process
0137   G4double fIntrinsicLowEnergyLimit;
0138   G4double fIntrinsicHighEnergyLimit;
0139 
0140   G4int fVerboseLevel;
0141   G4int fTargetOscillator;
0142   size_t fNBins;
0143   G4bool fIsInitialised;
0144   G4bool fPIXEflag;
0145   //Used only for G4EmCalculator and Unit Tests
0146   G4bool fLocalTable;
0147 };
0148 
0149 #endif
0150