Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:24

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 #ifndef G4VLEPTSModel_hh
0027 #define G4VLEPTSModel_hh
0028 
0029 #include "G4ios.hh"
0030 #include "globals.hh"
0031 #include "Randomize.hh"
0032 #include "G4VEmModel.hh"
0033 #include "G4PhysicsTable.hh"
0034 #include "G4PhysicsLogVector.hh"
0035 #include "G4Element.hh"
0036 #include "G4Electron.hh"
0037 #include "G4Positron.hh"
0038 #include "G4Gamma.hh"
0039 #include "G4Step.hh"
0040 
0041 #include "G4EnergyLossTables.hh"
0042 #include "G4UnitsTable.hh"
0043 #include <iostream> 
0044 
0045 #include "G4LEPTSDiffXS.hh"
0046 #include "G4LEPTSDistribution.hh"
0047 #include "G4LEPTSElossDistr.hh"
0048 #include "G4ForceCondition.hh"
0049 #include <map>
0050 #include <vector>
0051 
0052 enum XSType {XSEnergy=0, 
0053          XSTotal=1, XSElastic=2, XSInelastic=3,
0054          XSIonisation=4, XSExcitation=5, XSDissociation=6,
0055          XSVibration=7, XSAttachment=8, XSRotation=9, XSPositronium=8
0056 };
0057 
0058 
0059 class G4VLEPTSModel : public G4VEmModel
0060 {
0061 
0062 public: 
0063   
0064   G4VLEPTSModel(const G4String& processName);
0065   ~G4VLEPTSModel() override;
0066   
0067   void BuildPhysicsTable(const G4ParticleDefinition& aParticleType); //G4ParticleWithCuts::SetCut()
0068   G4double GetMeanFreePath(const G4Material* mate,
0069                const G4ParticleDefinition* aParticle,
0070                G4double kineticEnergy );
0071   
0072   G4ThreeVector SampleNewDirection(const G4Material* aMaterial, G4ThreeVector Dir, G4double e, G4double el);
0073   G4double SampleAngle(const G4Material* aMaterial, G4double e, G4double el);
0074   G4ThreeVector SampleNewDirection(G4ThreeVector Dir, G4double ang);
0075   
0076   G4VLEPTSModel& operator=(const G4VLEPTSModel &right); //hide assignment operator
0077   G4VLEPTSModel(const G4VLEPTSModel& );
0078   
0079 protected:
0080   void Init();
0081   G4bool ReadParam(G4String fileName, const G4Material* aMaterial);
0082   virtual std::map<G4int,std::vector<G4double> > ReadIXS(G4String fileName, const G4Material* aMaterial);
0083   G4double SampleEnergyLoss(const G4Material* aMaterial, G4double eMin, G4double eMax);
0084   void BuildMeanFreePathTable( const G4Material* aMaterial, std::map< G4int, std::vector<G4double> >& integralXS );
0085   
0086 protected:
0087   G4PhysicsTable * theMeanFreePathTable;
0088   
0089   G4double theLowestEnergyLimit;
0090   G4double theHighestEnergyLimit;
0091   G4int    theNumbBinTable;
0092   
0093   std::map<const G4Material*, G4double > theIonisPot;
0094   std::map<const G4Material*, G4double > theIonisPotInt;
0095   std::map<const G4Material*, G4double > theMolecularMass;
0096 
0097   std::map<const G4Material*, G4LEPTSDiffXS*> theDiffXS;
0098   std::map<const G4Material*, G4LEPTSDistribution*> theRMTDistr;
0099 
0100   std::map<const G4Material*, G4LEPTSElossDistr*> theElostDistr;
0101   std::map<const G4Material*, G4LEPTSDistribution*> theElostDistr2;
0102 
0103   std::map<const G4Material*, G4int> theNXSdat;
0104   std::map<const G4Material*, G4int> theNXSsub;
0105   
0106   G4bool isInitialised{false};
0107   XSType theXSType;
0108 
0109   G4int verboseLevel;
0110 };
0111 
0112 
0113 #endif // G4VLEPTSModel_hh