Back to home page

EIC code displayed by LXR

 
 

    


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

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 // -------------------------------------------------------------------
0028 //
0029 // GEANT4 Class header file
0030 //
0031 //
0032 // File name:    G4ComponentSAIDTotalXS
0033 //
0034 // Authors:  G.Folger, V.Ivanchenko, D.Wright
0035 //
0036 // Modifications:
0037 //
0038  
0039 //
0040 // Class Description
0041 // Total, elastic and inelastic hadron/nucleon cross sections
0042 // from SAID database, G4SAIDXSDATA environment variable
0043 // should be defined
0044 // Class Description - End
0045 
0046 #ifndef G4ComponentSAIDTotalXS_h
0047 #define G4ComponentSAIDTotalXS_h 1
0048 
0049 #include "G4VComponentCrossSection.hh"
0050 #include "G4ParticleDefinition.hh"
0051 #include "globals.hh"
0052 #include "G4Threading.hh"
0053 
0054 enum G4SAIDCrossSectionType 
0055 { 
0056   saidUnknown = 0, 
0057   saidPP = 1, 
0058   saidNP = 2, 
0059   saidPIPP = 3,
0060   saidPINP = 4,
0061   saidPINP_PI0N = 5, 
0062   saidPINP_ETAN = 6,
0063   saidGP_PI0P = 7,
0064   saidGP_PIPN = 8,
0065   saidGN_PINP = 9,
0066   saidGN_PI0N = 10,
0067   saidGP_ETAP = 11,
0068   saidGP_ETAPP = 12,
0069   numberOfSaidXS = 13
0070 };
0071 
0072 class G4PhysicsVector;
0073 
0074 class G4ComponentSAIDTotalXS : public G4VComponentCrossSection
0075 {
0076 public: //with description
0077 
0078   G4ComponentSAIDTotalXS();
0079 
0080   virtual ~G4ComponentSAIDTotalXS();
0081 
0082   virtual
0083   G4double GetTotalElementCrossSection(const G4ParticleDefinition*,
0084                        G4double kinEnergy, 
0085                        G4int /*Z*/, G4double /*N*/);
0086 
0087   virtual
0088   G4double GetTotalIsotopeCrossSection(const G4ParticleDefinition*,
0089                        G4double kinEnergy,
0090                        G4int /*Z*/, G4int /*N*/);
0091 
0092   virtual
0093   G4double GetInelasticElementCrossSection(const G4ParticleDefinition*,
0094                        G4double kinEnergy, 
0095                        G4int /*Z*/, G4double /*N*/);
0096 
0097   virtual
0098   G4double GetInelasticIsotopeCrossSection(const G4ParticleDefinition*,
0099                        G4double kinEnergy, 
0100                        G4int /*Z*/, G4int /*N*/);
0101 
0102   virtual
0103   G4double GetElasticElementCrossSection(const G4ParticleDefinition*,
0104                      G4double kinEnergy, 
0105                      G4int /*Z*/, G4double /*N*/);
0106 
0107   virtual
0108   G4double GetElasticIsotopeCrossSection(const G4ParticleDefinition*,
0109                      G4double kinEnergy, 
0110                      G4int /*Z*/, G4int /*N*/);
0111 
0112   G4double GetChargeExchangeCrossSection(const G4ParticleDefinition* prim,
0113                      const G4ParticleDefinition* sec,
0114                      G4double kinEnergy, 
0115                      G4int /*Z*/, G4int /*N*/);
0116 
0117   virtual void Description(std::ostream&) const final;
0118 
0119 private:
0120 
0121   G4SAIDCrossSectionType GetType(const G4ParticleDefinition* prim,
0122                  const G4ParticleDefinition* sec,
0123                  G4int Z, G4int N);
0124 
0125   void Initialise(G4SAIDCrossSectionType tp);
0126 
0127   void ReadData(G4int index, G4PhysicsVector*,
0128         const G4String&, const G4String&);
0129 
0130   void PrintWarning(const G4ParticleDefinition* prim,
0131             const G4ParticleDefinition* sec,
0132             G4int /*Z*/, G4int /*N*/,
0133             const G4String&, const G4String&);
0134 
0135   G4ComponentSAIDTotalXS & operator=(const G4ComponentSAIDTotalXS &right);
0136   G4ComponentSAIDTotalXS(const G4ComponentSAIDTotalXS&);
0137 
0138   static const G4String fnames[numberOfSaidXS];
0139   G4PhysicsVector* elastdata[numberOfSaidXS];
0140   G4PhysicsVector* inelastdata[numberOfSaidXS];
0141 
0142 #ifdef G4MULTITHREADED
0143   static G4Mutex saidXSMutex;
0144 #endif
0145 
0146 };
0147 
0148 #endif