|
||||
File indexing completed on 2025-01-18 09:59:01
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: G4QuasiElRatios -- header file 0030 // M.V. Kossov, ITEP(Moscow), 24-OCT-01 0031 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 15-Oct-2006 0032 // ---------------------------------------------------------------------- 0033 // This class has been extracted from the CHIPS model. 0034 // All the dependencies on CHIPS classes have been removed. 0035 // Short description: Provides percentage of quasi-free and quasi-elastic 0036 // reactions in the inelastic reactions. 0037 // ---------------------------------------------------------------------- 0038 0039 #ifndef G4QuasiElRatios_h 0040 #define G4QuasiElRatios_h 1 0041 0042 #include "globals.hh" 0043 #include "G4ios.hh" 0044 #include "Randomize.hh" 0045 #include <vector> 0046 #include "G4LorentzVector.hh" 0047 0048 #include "G4ChipsProtonElasticXS.hh" 0049 #include "G4ChipsNeutronElasticXS.hh" 0050 0051 0052 class G4QuasiElRatios 0053 { 0054 0055 public: 0056 G4QuasiElRatios(); // Constructor 0057 0058 ~G4QuasiElRatios(); // Destructor 0059 0060 // Pair(QuasiFree/Inelastic,QuasiElastic/QuasiFree) 0061 std::pair<G4double,G4double> GetRatios(G4double pIU, G4int prPDG, G4int tgZ, G4int tgN); 0062 // ChargeExchange/QuasiElastic factor pair<for protons (Z), for neutrons(N)> 0063 std::pair<G4double,G4double> GetChExFactor(G4double pIU, G4int pPDG, G4int Z, G4int N); 0064 // scatter (pPDG,p4M) on a virtual nucleon (NPDG,N4M), result: final pair(newN4M,newp4M) 0065 // if(newN4M.e()==0.) - below threshold, XS=0, no scattering of the projectile happened 0066 std::pair<G4LorentzVector,G4LorentzVector> Scatter(G4int NPDG, G4LorentzVector N4M, 0067 G4int pPDG, G4LorentzVector p4M); 0068 // ChExer (pPDG,p4M) on a virtual nucleon (NPDG,N4M), result: final pair(newN4M,newp4M) 0069 // if(newN4M.e()==0.) - keep projectile, XS=0, no interaction of the progectile happened 0070 // User should himself change the charge (PDG) (e.g. pn->np, pi+n->pi0p, pi-p->pi0n etc.) 0071 // Recepy: change target n to p or taget p to n and conserve enrgy, changing projectile 0072 // Do not use for the nucleon, as it is already included in quasielastic, and for pi0. 0073 std::pair<G4LorentzVector,G4LorentzVector> ChExer(G4int NPDG, G4LorentzVector N4M, 0074 G4int pPDG, G4LorentzVector p4M); 0075 // Mean hN El and Tot XS(IU) for the isotopic (Z,N): on p -> (Z=1,N=0), on n -> (Z=0,N=1) 0076 std::pair<G4double,G4double> GetElTot(G4double pIU, G4int hPDG, G4int Z, G4int N); //(IU) 0077 0078 // Calculate ChEx/El ratio coefficient (p is in independent units, (Z,N) is a target) 0079 G4double ChExElCoef(G4double p, G4int Z, G4int N, G4int pPDG); 0080 0081 // For hadron PDG with momentum Mom (GeV/c) on F(p/n) calculate <sig_el,sig_tot> pair(mb) 0082 // F=true corresponds to the Nroton target, F=false corresponds to the Proton target 0083 std::pair<G4double,G4double> GetElTotXS(G4double Mom, G4int PDG, G4bool F);//<sigEl,sigT> 0084 std::pair<G4double,G4double> FetchElTot(G4double pGeV,G4int PDG,G4bool F);//<E,T>fromAMDB 0085 0086 G4bool RelDecayIn2(G4LorentzVector& theMomentum, G4LorentzVector& f4Mom, 0087 G4LorentzVector& s4Mom, G4LorentzVector& dir, 0088 G4double maxCost = 1., G4double minCost = -1.); 0089 0090 private: 0091 G4ChipsProtonElasticXS* PCSmanager; 0092 G4ChipsNeutronElasticXS* NCSmanager; 0093 0094 // These working member functions are in CHIPS units and must not be used externally 0095 G4double GetQF2IN_Ratio(G4double TotCS_mb, G4int A); // QuasiFree/Inelastic (fast) 0096 G4double CalcQF2IN_Ratio(G4double TCSmb, G4int A); // R=QuasuFree/Inelastic (sig_t in mb) 0097 std::pair<G4double,G4double> CalcElTot(G4double pGeV,G4int Index);//(sigEl,sigTot)(Index) 0098 0099 // Body 0100 private: 0101 std::vector<G4double*> *vT; // Vector of pointers to LinTable 0102 std::vector<G4double*> *vL; // Vector of pointers to LogTable 0103 std::vector<std::pair<G4double,G4double>*> *vX; // Vector of ETPointers to LogTable 0104 0105 G4double lastSRatio; // The last sigma value for which R was calculated 0106 G4double lastRRatio; // The last ratio R which was calculated 0107 std::vector<G4int> vARatio; 0108 std::vector<G4double> vHRatio; // Vector of max s initialized in the LinTable 0109 std::vector<G4int> vNRatio; // Vector of topBin number initialized in LinTable 0110 std::vector<G4double> vMRatio; // Vector of rel max ln(s) initialized in LogTable 0111 std::vector<G4int> vKRatio; // Vector of topBin number initialized in LogTable 0112 0113 G4int lastARatio; // theLast of calculated A 0114 G4double lastHRatio; // theLast of max s initialized in the LinTable 0115 G4int lastNRatio; // theLast of topBin number initialized in LinTable 0116 G4double lastMRatio; // theLast of rel max ln(s) initialized in LogTable 0117 G4int lastKRatio; // theLast of topBin number initialized in LogTable 0118 G4double* lastTRatio; // theLast of pointer to LinTable in the C++ heap 0119 G4double* lastLRatio; // theLast of pointer to LogTable in the C++ heap 0120 0121 G4double lastPtot; // The last momentum for which XS was calculated 0122 G4int lastHtot; // The last projPDG for which XS was calculated 0123 G4bool lastFtot; // The last nucleon for which XS was calculated 0124 std::pair<G4double,G4double> lastRtot; // The last result 0125 std::vector<G4int> vItot; // Vector of index for which XS was calculated 0126 std::vector<G4double> vMtot; // Vector of rel max ln(p) initialized in LogTable 0127 std::vector<G4int> vKtot; // Vector of topBin number initialized in LogTable 0128 G4int lastItot; // The Last index for which XS was calculated 0129 G4double lastMtot; // The Last rel max ln(p) initialized in LogTable 0130 G4int lastKtot; // The Last topBin number initialized in LogTable 0131 std::pair<G4double,G4double>* lastXtot; // The Last ETPointers to LogTable in heap 0132 0133 0134 0135 0136 }; 0137 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |