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 | // $Id: G4QNucleus.hh,v 1.33 2007/10/31 13:23:07 mkossov Exp $ |
---|
28 | // GEANT4 tag $Name: $ |
---|
29 | // |
---|
30 | // ---------------- G4QNucleus ---------------- |
---|
31 | // by Mikhail Kossov, Sept 1999. |
---|
32 | // class header for Quasmon initiated Candidates used by the CHIPS Model |
---|
33 | // ---------------------------------------------------------------------- |
---|
34 | |
---|
35 | #ifndef G4QNucleus_h |
---|
36 | #define G4QNucleus_h 1 |
---|
37 | |
---|
38 | #include "G4QCandidateVector.hh" |
---|
39 | #include "G4QHadronVector.hh" |
---|
40 | #include "G4QChipolino.hh" |
---|
41 | #include <utility> |
---|
42 | #include <vector> |
---|
43 | #include "globals.hh" |
---|
44 | |
---|
45 | class G4QNucleus : public G4QHadron |
---|
46 | { |
---|
47 | public: |
---|
48 | G4QNucleus(); // Default Constructor |
---|
49 | G4QNucleus(G4int nucPDG); // At Rest PDG-Constructor |
---|
50 | G4QNucleus(G4LorentzVector p, G4int nucPDG); // Full PDG-Constructor |
---|
51 | G4QNucleus(G4QContent nucQC); // At Rest QuarkCont-Constructor |
---|
52 | G4QNucleus(G4QContent nucQC, G4LorentzVector p); // Full QuarkCont-Constructor |
---|
53 | G4QNucleus(G4int z, G4int n, G4int s=0); // At Rest ZNS-Constructor |
---|
54 | G4QNucleus(G4int z, G4int n, G4int s, G4LorentzVector p);// Full ZNS-Constructor |
---|
55 | //G4QNucleus(const G4QNucleus& right); // Copy Constructor by value |
---|
56 | G4QNucleus(G4QNucleus* right); // Copy Constructor by pointer |
---|
57 | ~G4QNucleus(); // Public Destructor |
---|
58 | // Overloaded Operators |
---|
59 | const G4QNucleus& operator=(const G4QNucleus& right); |
---|
60 | G4bool operator==(const G4QNucleus &right) const {return this==&right;} |
---|
61 | G4bool operator!=(const G4QNucleus &right) const {return this!=&right;} |
---|
62 | // Specific Selectors |
---|
63 | G4int GetPDG() const {return 90000000+1000*(1000*S+Z)+N;}// PDG Code of Nucleus |
---|
64 | G4int GetZ() const {return Z;} // Get a#of protons |
---|
65 | G4int GetN() const {return N;} // Get a#of neutrons |
---|
66 | G4int GetS() const {return S;} // Get a#of lambdas |
---|
67 | G4int GetA() const {return Z+N+S;} // Get A of the nucleus |
---|
68 | G4int GetDZ() const {return dZ;} // Get a#of protons in dense region |
---|
69 | G4int GetDN() const {return dN;} // Get a#of neutrons in dense region |
---|
70 | G4int GetDS() const {return dS;} // Get a#of lambdas in dense region |
---|
71 | G4int GetDA() const {return dZ+dN+dS;} // Get A of the dense part of nucleus |
---|
72 | G4int GetMaxClust() const {return maxClust;} // Get Max BarNum of Clusters |
---|
73 | G4double GetProbability(G4int bn=0) const {return probVect[bn];} // clust(BarN)probabil |
---|
74 | G4double GetMZNS() const {return GetQPDG().GetNuclMass(Z,N,S);} // not H or Q |
---|
75 | G4double GetGSMass() const {return GetQPDG().GetMass();}//Nucleus GSMass (not Hadron) |
---|
76 | G4QContent GetQCZNS() const // Get ZNS quark content of Nucleus |
---|
77 | { |
---|
78 | if(S>=0) return G4QContent(Z+N+N+S,Z+Z+N+S,S,0,0,0); |
---|
79 | else return G4QContent(Z+N+N+S,Z+Z+N+S,0,0,0,-S); |
---|
80 | } |
---|
81 | G4int GetNDefMesonC() const{return nDefMesonC;}; // max#of predefed mesonCandidates |
---|
82 | G4int GetNDefBaryonC()const{return nDefBaryonC;};// max#of predefed baryonCandidates |
---|
83 | std::pair<G4double, G4double> RefetchImpactXandY() const {return theImpactParameter;} |
---|
84 | G4double GetDensity(const G4ThreeVector&aPos) {return rho0*GetRelativeDensity(aPos);} |
---|
85 | G4double GetRelativeDensity(const G4ThreeVector& aPosition); // Densyty/rho0 |
---|
86 | G4double GetRadius(const G4double maxRelativeDenisty=0.5); // Radius of %ofDensity |
---|
87 | G4double GetOuterRadius(); // Get radius of the most far nucleon |
---|
88 | G4double GetDeriv(const G4ThreeVector& point); // Derivitive of density |
---|
89 | G4double GetFermiMomentum(G4double density); // Returns modul of FermyMomentum(dens) |
---|
90 | G4ThreeVector Get3DFermiMomentum(G4double density, G4double maxMom=-1.) |
---|
91 | { |
---|
92 | if(maxMom<0) maxMom=GetFermiMomentum(density); |
---|
93 | return maxMom*RandomUnitSphere(); |
---|
94 | } |
---|
95 | G4QHadron* GetNextNucleon() |
---|
96 | {return (currentNucleon>=0&¤tNucleon<GetA()) ? theNucleons[currentNucleon++] :0;} |
---|
97 | //std::vector<G4double>* GetBThickness() const {return Tb;} // T(b) function, step .1 fm |
---|
98 | std::vector<G4double> const* GetBThickness() {return &Tb;} // T(b) function, step .1 fm |
---|
99 | |
---|
100 | // Specific Modifiers |
---|
101 | G4bool EvaporateBaryon(G4QHadron* h1,G4QHadron* h2); // Evaporate Baryon from Nucleus |
---|
102 | void EvaporateNucleus(G4QHadron* hA, G4QHadronVector* oHV);// Evaporate Nucleus |
---|
103 | //void DecayBaryon(G4QHadron* dB, G4QHadronVector* oHV); // gamma+N or Delt->N+Pi @@later |
---|
104 | void DecayDibaryon(G4QHadron* dB, G4QHadronVector* oHV); // deuteron is kept |
---|
105 | void DecayIsonucleus(G4QHadron* dB, G4QHadronVector* oHV); // nP+(Pi+) or nN+(Pi-) |
---|
106 | void DecayMultyBaryon(G4QHadron* dB, G4QHadronVector* oHV);// A*p, A*n or A*L |
---|
107 | void DecayAntiStrange(G4QHadron* dB, G4QHadronVector* oHV);// nuclei with K+/K0 |
---|
108 | void DecayAlphaBar(G4QHadron* dB, G4QHadronVector* oHV); // alpha+p or alpha+n |
---|
109 | void DecayAlphaDiN(G4QHadron* dB, G4QHadronVector* oHV); // alpha+p+p |
---|
110 | void DecayAlphaAlpha(G4QHadron* dB, G4QHadronVector* oHV); // alpha+alpha |
---|
111 | G4int SplitBaryon(); // Is it possible to split baryon/alpha |
---|
112 | G4int HadrToNucPDG(G4int hPDG); // Converts hadronic PDGCode to nuclear |
---|
113 | G4int NucToHadrPDG(G4int nPDG); // Converts nuclear PDGCode to hadronic |
---|
114 | G4bool Split2Baryons(); // Is it possible to split two baryons? |
---|
115 | void ActivateBThickness(); // Calculate T(b) for nucleus (db=.1fm) |
---|
116 | void InitByPDG(G4int newPDG); // Init existing nucleus by new PDG |
---|
117 | void InitByQC(G4QContent newQC) // Init existing nucleus by new QCont |
---|
118 | {G4int PDG=G4QPDGCode(newQC).GetPDGCode(); InitByPDG(PDG);} |
---|
119 | void IncProbability(G4int bn); // Add one cluster to probability |
---|
120 | void Increase(G4int PDG, G4LorentzVector LV = G4LorentzVector(0.,0.,0.,0.)); |
---|
121 | void Increase(G4QContent QC, G4LorentzVector LV = G4LorentzVector(0.,0.,0.,0.)); |
---|
122 | void Reduce(G4int PDG); // Reduce Nucleus by PDG fragment |
---|
123 | void CalculateMass() {Set4Momentum(G4LorentzVector(0.,0.,0.,GetGSMass()));} |
---|
124 | void SetMaxClust(G4int maxC){maxClust=maxC;}// Set Max BarNum of Clusters |
---|
125 | void InitCandidateVector(G4QCandidateVector& theQCandidates, |
---|
126 | G4int nM=45, G4int nB=72, G4int nC=117); |
---|
127 | void PrepareCandidates(G4QCandidateVector& theQCandidates, G4bool piF=false, G4bool |
---|
128 | gaF=false, G4LorentzVector LV=G4LorentzVector(0.,0.,0.,0.)); |
---|
129 | G4int UpdateClusters(G4bool din); // Return a#of clusters & calc.probab's |
---|
130 | G4QNucleus operator+=(const G4QNucleus& rhs); // Add a cluster to the nucleus |
---|
131 | G4QNucleus operator-=(const G4QNucleus& rhs); // Subtract a cluster from a nucleus |
---|
132 | G4QNucleus operator*=(const G4int& rhs); // Multiplication of the Nucleus |
---|
133 | G4bool StartLoop(); // returns size of theNucleons (cN=0) |
---|
134 | G4bool ReduceSum(G4ThreeVector* momentum, G4double*); // Reduce momentum nonconservation |
---|
135 | void DoLorentzBoost(const G4LorentzVector& theBoost); // Boost nucleons by 4-vector |
---|
136 | void DoLorentzBoost(const G4ThreeVector& theBeta);// Boost nucleons by v/c |
---|
137 | void DoLorentzContraction(const G4LorentzVector&B){DoLorentzContraction(B.vect()/B.e());} |
---|
138 | void DoLorentzContraction(const G4ThreeVector& theBeta); // Lorentz Contraction by v/c |
---|
139 | void DoTranslation(const G4ThreeVector& theShift); // Used only in GHAD-TFT |
---|
140 | |
---|
141 | // Static functions |
---|
142 | static void SetParameters(G4double fN=.1,G4double fD=.05, G4double cP=4., G4double mR=1., |
---|
143 | G4double nD=.8*fermi); |
---|
144 | |
---|
145 | // Specific General Functions |
---|
146 | G4ThreeVector RandomUnitSphere(); // Randomize position inside UnitSphere |
---|
147 | G4int RandomizeBinom(G4double p,G4int N); // Randomize according to Binomial Law |
---|
148 | G4double CoulombBarrier(const G4double& cZ=1, const G4double& cA=1, G4double dZ=0., |
---|
149 | G4double dA=0.); // CoulombBarrier in MeV |
---|
150 | G4double FissionCoulombBarrier(const G4double& cZ, const G4double& cA, G4double dZ=0., |
---|
151 | G4double dA=0.); // Fission CoulombBarrier in MeV |
---|
152 | G4double BindingEnergy(const G4double& cZ=0, const G4double& cA=0, G4double dZ=0., |
---|
153 | G4double dA=0.); |
---|
154 | G4double CoulBarPenProb(const G4double& CB, const G4double& E, const G4int& C, |
---|
155 | const G4int& B); |
---|
156 | std::pair<G4double, G4double> ChooseImpactXandY(G4double maxImpact); // Randomize bbar |
---|
157 | void ChooseNucleons(); // Initializes 3D Nucleons |
---|
158 | void ChoosePositions(); // Initializes positions of 3D nucleons |
---|
159 | void ChooseFermiMomenta(); // Initializes FermyMoms of 3D nucleons |
---|
160 | void InitDensity(); // Initializes density distribution |
---|
161 | void Init3D(); // automatically starts the LOOP |
---|
162 | private: |
---|
163 | // Specific Encapsulated Functions |
---|
164 | void SetZNSQC(G4int z, G4int n, G4int s); // Set QC, using Z,N,S |
---|
165 | G4QNucleus GetThis() const {return G4QNucleus(Z,N,S);} // @@ Check for memory leak |
---|
166 | |
---|
167 | // Body |
---|
168 | private: |
---|
169 | // Static Parameters |
---|
170 | static const G4int nDefMesonC =45; |
---|
171 | static const G4int nDefBaryonC=72; |
---|
172 | // |
---|
173 | static G4double freeNuc; // probability of the quasi-free baryon on surface |
---|
174 | static G4double freeDib; // probability of the quasi-free dibaryon on surface |
---|
175 | static G4double clustProb; // clusterization probability in dense region |
---|
176 | static G4double mediRatio; // relative vacuum hadronization probability |
---|
177 | static G4double nucleonDistance;// Distance between nucleons (0.8 fm) |
---|
178 | // The basic |
---|
179 | G4int Z; // Z of the Nucleus |
---|
180 | G4int N; // N of the Nucleus |
---|
181 | G4int S; // S of the Nucleus |
---|
182 | // The secondaries |
---|
183 | G4int dZ; // Z of the dense region of the nucleus |
---|
184 | G4int dN; // N of the dense region of the nucleus |
---|
185 | G4int dS; // S of the dense region of the nucleus |
---|
186 | G4int maxClust; // Baryon Number of the last calculated cluster |
---|
187 | G4double probVect[256]; // Cluster probability ("a#of issues" can be real) Vector |
---|
188 | // 3D |
---|
189 | std::pair<G4double, G4double> theImpactParameter; // 2D impact parameter vector bbar |
---|
190 | G4QHadronVector theNucleons; // Vector of nucleons of which Nucleus consists of |
---|
191 | G4int currentNucleon; // Current nucleon for the NextNucleon (? M.K.) |
---|
192 | G4double rho0; // Normalazation density |
---|
193 | G4double radius; // Nuclear radius |
---|
194 | //std::vector<G4double>* Tb; // T(b) function with step .1 fm (@@ make .1 a parameter) |
---|
195 | std::vector<G4double> Tb; // T(b) function with step .1 fm (@@ make .1 a parameter) |
---|
196 | }; |
---|
197 | |
---|
198 | std::ostream& operator<<(std::ostream& lhs, G4QNucleus& rhs); |
---|
199 | std::ostream& operator<<(std::ostream& lhs, const G4QNucleus& rhs); |
---|
200 | |
---|
201 | |
---|
202 | #endif |
---|