Back to home page

EIC code displayed by LXR

 
 

    


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

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 physics class: G4ChipsProtonElasticXS -- header file
0030 // M.V. Kossov, ITEP(Moscow), 24-OCT-01
0031 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 12-Jan-2010 (from G4QElCrSect)
0032 //
0033 // -------------------------------------------------------------------------------
0034 // Short description: Interaction cross-sections for the elastic process. 
0035 // Class extracted from CHIPS and integrated in Geant4 by W.Pokorski
0036 // -------------------------------------------------------------------------------
0037 
0038 #ifndef G4ChipsProtonElasticXS_h
0039 #define G4ChipsProtonElasticXS_h 1
0040 
0041 #include <vector>
0042 #include "Randomize.hh"
0043 #include "G4VCrossSectionDataSet.hh"
0044 
0045 class G4ChipsProtonElasticXS : public G4VCrossSectionDataSet
0046 {
0047 public:
0048 
0049   G4ChipsProtonElasticXS();               // Constructor
0050 
0051   ~G4ChipsProtonElasticXS();
0052 
0053   static const char* Default_Name() {return "ChipsProtonElasticXS";}
0054 
0055   virtual void CrossSectionDescription(std::ostream&) const;  
0056 
0057   virtual G4bool IsIsoApplicable(const G4DynamicParticle* Pt, G4int Z, G4int A,    
0058                  const G4Element* elm,
0059                  const G4Material* mat );
0060 
0061   // At present momentum (pMom) in MeV/c, CS in mb (@@ Units)
0062   virtual G4double GetIsoCrossSection(const G4DynamicParticle*, G4int tgZ, G4int A,  
0063                       const G4Isotope* iso = 0,
0064                       const G4Element* elm = 0,
0065                       const G4Material* mat = 0);
0066 
0067   virtual G4double GetChipsCrossSection(G4double momentum, G4int Z, G4int N, G4int pdg);
0068 
0069   G4double GetExchangeT(G4int tZ, G4int tN, G4int pPDG); // Randomizes -t=Q2 (in IU=MeV^2)
0070   G4double GetHMaxT();                   // Currrent Max(-t=Q2)/2. (in IU=MeV^2)
0071 
0072 private:
0073 
0074   G4double CalculateCrossSection(G4bool CS, G4int F, G4int I, G4int pPDG, G4int Z, G4int N,
0075                                                                               G4double pP);
0076   G4double GetSlope(G4int tZ, G4int tN, G4int pPDG);     // Slope of the 1st diff. maximum
0077 
0078   G4double GetPTables(G4double lpP, G4double lPm, G4int PDG, G4int tZ, G4int tN); // newLP
0079   G4double GetTabValues(G4double lp, G4int pPDG, G4int tgZ, G4int tgN); // return CS(Si/Bi)
0080   G4double GetQ2max(G4int pPDG, G4int tgZ, G4int tgN, G4double pP); // return -t=Q2
0081 
0082 // Body
0083 private:
0084   // --- Data formating AMDB (define the precalculated table structure) ---
0085    const G4int nPoints;// #of points in the AMDB tables     
0086    const G4int nLast;  // the Last element in the table
0087    G4double    lPMin;  // Min tabulated logarithmic Momentum  
0088    G4double    lPMax;  // Max tabulated logarithmic Momentum  
0089    G4double    dlnP;   // Log step in the table     
0090   // ---- Local (for particular pP, pPDG, tZ, tN) -----
0091    G4bool    onlyCS;   // flag to calculate only CS (not S1/B1,S2/B2,S3/B3)
0092    G4double  lastSIG;  // Last calculated cross section
0093    G4double  lastLP;   // Last log(mom_of_the_incident_hadron in GeV)
0094    G4double  lastTM;   // Last t_maximum                       
0095    G4int     lastN;    // The last N of calculated nucleus
0096    G4int     lastZ;    // The last Z of calculated nucleus
0097    G4double  lastP;    // Last used in the cross section Momentum
0098    G4double  lastTH;   // Last value of the Momentum Threshold
0099    G4double  lastCS;   // Last value of the Cross Section
0100    G4int     lastI;    // The last position in the DAMDB
0101    G4double  theSS;    // The Last squared slope of first diffruction 
0102    G4double  theS1;    // The Last mantissa of first diffruction 
0103    G4double  theB1;    // The Last slope of first diffruction    
0104    G4double  theS2;    // The Last mantissa of second diffruction
0105    G4double  theB2;    // The Last slope of second diffruction   
0106    G4double  theS3;    // The Last mantissa of third diffruction 
0107    G4double  theB3;    // The Last slope of third diffruction    
0108    G4double  theS4;    // The Last mantissa of 4-th diffruction 
0109    G4double  theB4;    // The Last slope of 4-th diffruction    
0110   // ---- Global (AMBD of P-dependent tables for pPDG,tZ,tN) -----
0111    G4int     lastTZ;   // Last atomic number of the target
0112    G4int     lastTN;   // Last number of neutrons of the target
0113    G4double  lastPIN;  // Last initialized max momentum
0114    G4double* lastCST;  // Last cross-section table
0115    G4double* lastPAR;  // Last parameters for functional calculation
0116    G4double* lastSST;  // E-dep of squared slope of the first difruction 
0117    G4double* lastS1T;  // E-dep of mantissa of the first difruction 
0118    G4double* lastB1T;  // E-dep of the slope of the first difruction
0119    G4double* lastS2T;  // E-dep of mantissa of the second difruction
0120    G4double* lastB2T;  // E-dep of the slope of theSecond difruction
0121    G4double* lastS3T;  // E-dep of mantissa of the third difruction 
0122    G4double* lastB3T;  // E-dep of the slope of the third difruction
0123    G4double* lastS4T;  // E-dep of mantissa of the 4-th difruction 
0124    G4double* lastB4T;  // E-dep of the slope of the 4-th difruction
0125 
0126    std::vector <G4double*> PAR;   // Vector of parameters for functional calculations
0127    std::vector <G4double*> CST;   // Vector of cross-section table
0128    std::vector <G4double*> SST;   // Vector of the first squared slope
0129    std::vector <G4double*> S1T;   // Vector of the first mantissa
0130    std::vector <G4double*> B1T;   // Vector of the first slope
0131    std::vector <G4double*> S2T;   // Vector of the secon mantissa
0132    std::vector <G4double*> B2T;   // Vector of the second slope
0133    std::vector <G4double*> S3T;   // Vector of the third mantissa
0134    std::vector <G4double*> B3T;   // Vector of the third slope
0135    std::vector <G4double*> S4T;   // Vector of the 4-th mantissa (gloria)
0136    std::vector <G4double*> B4T;   // Vector of the 4-th slope    (gloria)
0137     
0138    std::vector <G4int> colN;  // Vector of N for calculated nuclei (isotops)
0139    std::vector <G4int> colZ;  // Vector of Z for calculated nuclei (isotops)
0140    std::vector <G4double> colP;  // Vector of last momenta for the reaction
0141    std::vector <G4double> colTH; // Vector of energy thresholds for the reaction
0142    std::vector <G4double> colCS; // Vector of last cross sections for the reaction
0143     
0144    std::vector <G4double> PIN;   // Vector of max initialized log(P) in the table
0145 
0146  };
0147 #endif