Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4QuasiElRatios.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 //
28 //
29 // GEANT4 physics class: G4QuasiElRatios -- header file
30 // M.V. Kossov, ITEP(Moscow), 24-OCT-01
31 // The last update: M.V. Kossov, CERN/ITEP (Moscow) 15-Oct-2006
32 // ----------------------------------------------------------------------
33 // This class has been extracted from the CHIPS model.
34 // All the dependencies on CHIPS classes have been removed.
35 // Short description: Provides percentage of quasi-free and quasi-elastic
36 // reactions in the inelastic reactions.
37 // ----------------------------------------------------------------------
38 
39 #ifndef G4QuasiElRatios_h
40 #define G4QuasiElRatios_h 1
41 
42 #include "globals.hh"
43 #include "G4ios.hh"
44 #include "Randomize.hh"
45 #include <vector>
46 #include "G4LorentzVector.hh"
47 
50 
51 
53 {
54 protected:
55 
56  G4QuasiElRatios(); // Constructor
57 
58 public:
59 
60  ~G4QuasiElRatios(); // Destructor
61 
62  static G4QuasiElRatios* GetPointer(); // Gives a pointer to this singletone
63 
64  // Pair(QuasiFree/Inelastic,QuasiElastic/QuasiFree)
65  std::pair<G4double,G4double> GetRatios(G4double pIU, G4int prPDG, G4int tgZ, G4int tgN);
66  // ChargeExchange/QuasiElastic factor pair<for protons (Z), for neutrons(N)>
67  std::pair<G4double,G4double> GetChExFactor(G4double pIU, G4int pPDG, G4int Z, G4int N);
68  // scatter (pPDG,p4M) on a virtual nucleon (NPDG,N4M), result: final pair(newN4M,newp4M)
69  // if(newN4M.e()==0.) - below threshold, XS=0, no scattering of the projectile happened
70  std::pair<G4LorentzVector,G4LorentzVector> Scatter(G4int NPDG, G4LorentzVector N4M,
71  G4int pPDG, G4LorentzVector p4M);
72  // ChExer (pPDG,p4M) on a virtual nucleon (NPDG,N4M), result: final pair(newN4M,newp4M)
73  // if(newN4M.e()==0.) - keep projectile, XS=0, no interaction of the progectile happened
74  // User should himself change the charge (PDG) (e.g. pn->np, pi+n->pi0p, pi-p->pi0n etc.)
75  // Recepy: change target n to p or taget p to n and conserve enrgy, changing projectile
76  // Do not use for the nucleon, as it is already included in quasielastic, and for pi0.
77  std::pair<G4LorentzVector,G4LorentzVector> ChExer(G4int NPDG, G4LorentzVector N4M,
78  G4int pPDG, G4LorentzVector p4M);
79  // Mean hN El and Tot XS(IU) for the isotopic (Z,N): on p -> (Z=1,N=0), on n -> (Z=0,N=1)
80  std::pair<G4double,G4double> GetElTot(G4double pIU, G4int hPDG, G4int Z, G4int N); //(IU)
81 
82  // Calculate ChEx/El ratio coefficient (p is in independent units, (Z,N) is a target)
84 
85  // For hadron PDG with momentum Mom (GeV/c) on F(p/n) calculate <sig_el,sig_tot> pair(mb)
86  // F=true corresponds to the Nroton target, F=false corresponds to the Proton target
87  std::pair<G4double,G4double> GetElTotXS(G4double Mom, G4int PDG, G4bool F);//<sigEl,sigT>
88  std::pair<G4double,G4double> FetchElTot(G4double pGeV,G4int PDG,G4bool F);//<E,T>fromAMDB
89 
90  G4bool RelDecayIn2(G4LorentzVector& theMomentum, G4LorentzVector& f4Mom,
91  G4LorentzVector& s4Mom, G4LorentzVector& dir,
92  G4double maxCost = 1., G4double minCost = -1.);
93 
94 private:
95  G4ChipsProtonElasticXS* PCSmanager;
96  G4ChipsNeutronElasticXS* NCSmanager;
97 
98  // These working member functions are in CHIPS units and must not be used externally
99  G4double GetQF2IN_Ratio(G4double TotCS_mb, G4int A); // QuasiFree/Inelastic (fast)
100  G4double CalcQF2IN_Ratio(G4double TCSmb, G4int A); // R=QuasuFree/Inelastic (sig_t in mb)
101  std::pair<G4double,G4double> CalcElTot(G4double pGeV,G4int Index);//(sigEl,sigTot)(Index)
102 
103  // Body
104 private:
105  static G4ThreadLocal std::vector<G4double*> *vT_G4MT_TLS_; // Vector of pointers to LinTable
106  static G4ThreadLocal std::vector<G4double*> *vL_G4MT_TLS_; // Vector of pointers to LogTable
107  static G4ThreadLocal std::vector<std::pair<G4double,G4double>*> *vX_G4MT_TLS_; // Vector of ETPointers to LogTable
108 };
109 #endif
std::pair< G4double, G4double > GetRatios(G4double pIU, G4int prPDG, G4int tgZ, G4int tgN)
static G4QuasiElRatios * GetPointer()
const char * p
Definition: xmltok.h:285
std::pair< G4double, G4double > FetchElTot(G4double pGeV, G4int PDG, G4bool F)
#define G4ThreadLocal
Definition: tls.hh:52
int G4int
Definition: G4Types.hh:78
std::pair< G4double, G4double > GetElTot(G4double pIU, G4int hPDG, G4int Z, G4int N)
std::pair< G4LorentzVector, G4LorentzVector > Scatter(G4int NPDG, G4LorentzVector N4M, G4int pPDG, G4LorentzVector p4M)
std::pair< G4double, G4double > GetChExFactor(G4double pIU, G4int pPDG, G4int Z, G4int N)
bool G4bool
Definition: G4Types.hh:79
std::pair< G4LorentzVector, G4LorentzVector > ChExer(G4int NPDG, G4LorentzVector N4M, G4int pPDG, G4LorentzVector p4M)
G4double ChExElCoef(G4double p, G4int Z, G4int N, G4int pPDG)
G4bool RelDecayIn2(G4LorentzVector &theMomentum, G4LorentzVector &f4Mom, G4LorentzVector &s4Mom, G4LorentzVector &dir, G4double maxCost=1., G4double minCost=-1.)
**D E S C R I P T I O N
std::pair< G4double, G4double > GetElTotXS(G4double Mom, G4int PDG, G4bool F)
double G4double
Definition: G4Types.hh:76