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