G4QNucleus.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id$
00028 //
00029 //      ---------------- G4QNucleus ----------------
00030 //             by Mikhail Kossov, Sept 1999.
00031 //  class header for the nuclei and nuclear environment of the CHIPS Model
00032 // -----------------------------------------------------------------------
00033 //  Short description: a class describing properties of nuclei, which
00034 //  are necessary for the CHIPS Model.
00035 // -----------------------------------------------------------------------
00036 
00037 #ifndef G4QNucleus_h
00038 #define G4QNucleus_h 1
00039 
00040 #include <utility>
00041 #include <vector>
00042 #include <CLHEP/Units/SystemOfUnits.h>
00043 
00044 #include "globals.hh"
00045 #include "G4RandomDirection.hh"
00046 #include "G4QCandidateVector.hh"
00047 #include "G4QHadronVector.hh"
00048 #include "G4LorentzRotation.hh"
00049 #include "G4QChipolino.hh"
00050 
00051 class G4QNucleus : public G4QHadron
00052 {
00053 public:
00054   G4QNucleus();                                            // Default Constructor
00055   G4QNucleus(G4int nucPDG);                                // At Rest PDG-Constructor
00056   G4QNucleus(G4LorentzVector p, G4int nucPDG);             // Full PDG-Constructor
00057   G4QNucleus(G4QContent nucQC);                            // At Rest QuarkCont-Constructor
00058   G4QNucleus(G4QContent nucQC, G4LorentzVector p);         // Full QuarkCont-Constructor
00059   G4QNucleus(G4int z, G4int n, G4int s=0);                 // At Rest ZNS-Constructor
00060   G4QNucleus(G4int z, G4int n, G4int s, G4LorentzVector p);// Full ZNS-Constructor
00061   G4QNucleus(G4QNucleus* right, G4bool cop3D = false);     // Copy Constructor by pointer
00062   G4QNucleus(const G4QNucleus &right, G4bool cop3D=false); // Copy Constructor by value
00063   ~G4QNucleus();                                           // Public Destructor
00064   // Overloaded Operators
00065   const G4QNucleus& operator=(const G4QNucleus& right);
00066   G4bool operator==(const G4QNucleus &right) const {return this==&right;}
00067   G4bool operator!=(const G4QNucleus &right) const {return this!=&right;}
00068   // Specific Selectors
00069   G4int      GetPDG()      const {return 90000000+1000*(1000*S+Z)+N;}// PDG Code of Nucleus
00070   G4int      GetZ()        const {return Z;}                                // Get a#of protons
00071   G4int      GetN()        const {return N;}                                // Get a#of neutrons
00072   G4int      GetS()        const {return S;}                                // Get a#of lambdas
00073   G4int      GetA()        const {return Z+N+S;}    // Get A of the nucleus
00074   G4int      GetDZ()       const {return dZ;}                                            // Get a#of protons in dense region
00075   G4int      GetDN()       const {return dN;}                                            // Get a#of neutrons in dense region
00076   G4int      GetDS()       const {return dS;}                                            // Get a#of lambdas in dense region
00077   G4int      GetDA()       const {return dZ+dN+dS;} // Get A of the dense part of nucleus
00078   G4int      GetMaxClust() const {return maxClust;} // Get Max BarNum of Clusters
00079   G4double   GetProbability(G4int bn=0) const {return probVect[bn];} // clust(BarN)probabil
00080   G4double   GetMZNS()     const {return GetQPDG().GetNuclMass(Z,N,S);} // not H or Q
00081   G4double   GetTbIntegral(); // Calculate the integral of T(b)
00082   G4double   GetGSMass()   const {return GetQPDG().GetMass();}//Nucleus GSMass (not Hadron)
00083   G4QContent GetQCZNS()    const                    // Get ZNS quark content of Nucleus
00084   {
00085     if(S>=0) return G4QContent(Z+N+N+S,Z+Z+N+S,S,0,0,0);
00086     else     return G4QContent(Z+N+N+S,Z+Z+N+S,0,0,0,-S);
00087   }
00088   G4int      GetNDefMesonC() const{return nDefMesonC;}; // max#of predefed mesonCandidates
00089   G4int      GetNDefBaryonC()const{return nDefBaryonC;};// max#of predefed baryonCandidates
00090   G4double GetDensity(const G4ThreeVector&aPos) {return rho0*GetRelativeDensity(aPos);}
00091   G4double GetRho0()                 {return rho0;} // One nucleon prob-density 
00092   G4double GetRelativeDensity(const G4ThreeVector& aPosition); // Densyty/rho0
00093   G4double GetRelWSDensity(const G4double& r)       // Wood-Saxon rho/rho0(r)
00094                                         {return 1./(1.+std::exp((r-radius)/WoodSaxonSurf));}    
00095   G4double GetRelOMDensity(const G4double& r2){return std::exp(-r2/radius);} // OscModelRelDens
00096   G4double GetRadius(const G4double maxRelativeDenisty=0.5); // Radius of %ofDensity
00097   G4double GetOuterRadius();                        // Get radius of the most far nucleon
00098   G4double GetDeriv(const G4ThreeVector& point);    // Derivitive of density
00099   G4double GetFermiMomentum(G4double density);      // Returns modul of FermyMomentum(dens)
00100   G4QHadron* GetNextNucleon()
00101   {
00102     //G4cout<<"G4QNucleus::GetNextNucleon: cN="<<currentNucleon<<", A="<<GetA()<<G4endl;
00103     return (currentNucleon>=0&&currentNucleon<GetA()) ? theNucleons[currentNucleon++] : 0;
00104   }
00105   void SubtractNucleon(G4QHadron* pNucleon); // Subtract the nucleon from the 3D Nucleus
00106   void DeleteNucleons();                     // Deletes all residual nucleons
00107   G4LorentzVector GetNucleons4Momentum()
00108   {
00109     G4LorentzVector sum(0.,0.,0.,0.);
00110     for(unsigned i=0; i<theNucleons.size(); i++) sum += theNucleons[i]->Get4Momentum();
00111     sum.setE(std::sqrt(sqr(GetGSMass())+sum.v().mag2())); // Energy is corrected !
00112     return sum;
00113   }
00114   std::vector<G4double> const* GetBThickness() {return &Tb;} // T(b) function, step .1 fm
00115 
00116   // Specific Modifiers
00117   G4bool     EvaporateBaryon(G4QHadron* h1,G4QHadron* h2); // Evaporate Baryon from Nucleus
00118   void       EvaporateNucleus(G4QHadron* hA, G4QHadronVector* oHV);// Evaporate Nucleus
00119   //void DecayBaryon(G4QHadron* dB, G4QHadronVector* oHV); // gamma+N or Delt->N+Pi @@later
00120   void       DecayDibaryon(G4QHadron* dB, G4QHadronVector* oHV);   // deuteron is kept
00121   void       DecayAntiDibaryon(G4QHadron* dB, G4QHadronVector* oHV);// antiDeuteron is kept
00122   void       DecayIsonucleus(G4QHadron* dB, G4QHadronVector* oHV); // nP+(Pi+) or nN+(Pi-)
00123   void       DecayMultyBaryon(G4QHadron* dB, G4QHadronVector* oHV);// A*p, A*n or A*L
00124   void       DecayAntiStrange(G4QHadron* dB, G4QHadronVector* oHV);// nuclei with K+/K0
00125   void       DecayAlphaBar(G4QHadron* dB, G4QHadronVector* oHV);   // alpha+p or alpha+n
00126   void       DecayAlphaDiN(G4QHadron* dB, G4QHadronVector* oHV);   // alpha+p+p
00127   void       DecayAlphaAlpha(G4QHadron* dB, G4QHadronVector* oHV); // alpha+alpha
00128   G4int      SplitBaryon();                         // Is it possible to split baryon/alpha
00129   G4int      HadrToNucPDG(G4int hPDG);              // Converts hadronic PDGCode to nuclear
00130   G4int      NucToHadrPDG(G4int nPDG);              // Converts nuclear PDGCode to hadronic
00131   G4bool     Split2Baryons();                       // Is it possible to split two baryons?
00132   void       ActivateBThickness();                  // Calculate T(b) for nucleus (db=.1fm)
00133   G4double   GetBThickness(G4double b);             // Calculates T(b)
00134   G4double   GetThickness(G4double b);              // Calculates T(b)/rho(0)
00135   void       InitByPDG(G4int newPDG);               // Init existing nucleus by new PDG
00136   void       InitByQC(G4QContent newQC)             // Init existing nucleus by new QCont
00137                                 {G4int PDG=G4QPDGCode(newQC).GetPDGCode(); InitByPDG(PDG);}
00138   void       IncProbability(G4int bn);              // Add one cluster to probability
00139   void       Increase(G4int PDG, G4LorentzVector LV = G4LorentzVector(0.,0.,0.,0.));
00140   void       Increase(G4QContent QC, G4LorentzVector LV = G4LorentzVector(0.,0.,0.,0.));
00141   void       Reduce(G4int PDG);                     // Reduce Nucleus by PDG fragment
00142   void       CalculateMass() {Set4Momentum(G4LorentzVector(0.,0.,0.,GetGSMass()));}
00143   void       SetMaxClust(G4int maxC){maxClust=maxC;}// Set Max BarNum of Clusters
00144   void       InitCandidateVector(G4QCandidateVector& theQCandidates,
00145                                  G4int nM=45, G4int nB=72, G4int nC=117);
00146   void       PrepareCandidates(G4QCandidateVector& theQCandidates, G4bool piF=false, G4bool
00147                                gaF=false, G4LorentzVector LV=G4LorentzVector(0.,0.,0.,0.));
00148   G4int      UpdateClusters(G4bool din);            // Return a#of clusters & calc.probab's
00149   G4QNucleus operator+=(const G4QNucleus& rhs);     // Add a cluster to the  nucleus
00150   G4QNucleus operator-=(const G4QNucleus& rhs);     // Subtract a cluster from a nucleus
00151   G4QNucleus operator*=(const G4int& rhs);          // Multiplication of the Nucleus
00152   G4bool StartLoop();                               // returns size of theNucleons (cN=0)
00153   G4bool ReduceSum(G4ThreeVector* vectors, G4ThreeVector sum);// Reduce zero-sum of vectors
00154   void SimpleSumReduction(G4ThreeVector* vectors, G4ThreeVector sum); // Reduce zero-V-sum
00155   void DoLorentzBoost(const G4LorentzVector& theBoost) // Boost nucleons by 4-vector
00156   {
00157     theMomentum.boost(theBoost);
00158     for(unsigned i=0; i<theNucleons.size(); i++) theNucleons[i]->Boost(theBoost);
00159   }
00160   void DoLorentzRotation(const G4LorentzRotation& theLoRot) // Lorentz Rotate nucleons
00161   {
00162     theMomentum=theLoRot*theMomentum;
00163     for(unsigned i=0; i<theNucleons.size(); i++) theNucleons[i]->LorentzRotate(theLoRot);
00164   }
00165   void DoLorentzBoost(const G4ThreeVector& theBeta)// Boost nucleons by v/c
00166   {
00167     theMomentum.boost(theBeta);
00168     for(unsigned i=0; i<theNucleons.size(); i++) theNucleons[i]->Boost(theBeta);
00169   }
00170   void DoLorentzContraction(const G4LorentzVector&B){DoLorentzContraction(B.vect()/B.e());}
00171   void DoLorentzContraction(const G4ThreeVector& theBeta); // Lorentz Contraction by v/c
00172   void DoTranslation(const G4ThreeVector& theShift); // Used only in G4QFragmentation
00173 
00174   // Static functions
00175   static void SetParameters(G4double fN=.1,G4double fD=.05, G4double cP=4., G4double mR=1.,
00176                             G4double nD=.8*CLHEP::fermi);
00177 
00178   // Specific General Functions
00179   G4int RandomizeBinom(G4double p,G4int N);         // Randomize according to Binomial Law
00180   G4double CoulombBarGen(const G4double& rZ, const G4double& rA, const G4double& cZ,
00181                          const G4double& cA);        // CoulombBarrier in MeV (General)
00182   G4double CoulombBarrier(const G4double& cZ=1, const G4double& cA=1, G4double dZ=0.,
00183                           G4double dA=0.);          // CoulombBarrier in MeV
00184   G4double FissionCoulombBarrier(const G4double& cZ, const G4double& cA, G4double dZ=0.,
00185                           G4double dA=0.);          // Fission CoulombBarrier in MeV
00186   G4double BindingEnergy(const G4double& cZ=0, const G4double& cA=0, G4double dZ=0.,
00187                          G4double dA=0.);
00188   G4double CoulBarPenProb(const G4double& CB, const G4double& E, const G4int& C,
00189                           const G4int& B);
00190   std::pair<G4double, G4double> ChooseImpactXandY(G4double maxImpact); // Randomize bbar
00191   void ChooseNucleons();                            // Initializes 3D Nucleons
00192   void ChoosePositions();                           // Initializes positions of 3D nucleons
00193   void ChooseFermiMomenta();                        // Initializes FermyMoms of 3D nucleons
00194   void InitDensity();                               // Initializes density distribution
00195   void Init3D();                                    // automatically starts the LOOP
00196 private:  
00197   // Specific Encapsulated Functions
00198   void       SetZNSQC(G4int z, G4int n, G4int s);   // Set QC, using Z,N,S
00199   G4QNucleus GetThis() const {return G4QNucleus(Z,N,S);} // @@ Check for memory leak
00200 
00201 // Body
00202 private:
00203   // Static Parameters
00204   static const G4int nDefMesonC =45;
00205   static const G4int nDefBaryonC=72;
00206   //
00207   static G4double freeNuc;        // probability of the quasi-free baryon on surface
00208   static G4double freeDib;        // probability of the quasi-free dibaryon on surface
00209   static G4double clustProb;      // clusterization probability in dense region
00210   static G4double mediRatio;      // relative vacuum hadronization probability
00211   static G4double nucleonDistance;// Distance between nucleons (0.8 fm)
00212   static G4double WoodSaxonSurf;  // Surface parameter of Wood-Saxon density (0.545 fm)
00213   // The basic  
00214   G4int Z;                        // Z of the Nucleus
00215   G4int N;                        // N of the Nucleus
00216   G4int S;                        // S of the Nucleus
00217   // The secondaries
00218   G4int dZ;                       // Z of the dense region of the nucleus
00219   G4int dN;                       // N of the dense region of the nucleus
00220   G4int dS;                       // S of the dense region of the nucleus
00221   G4int maxClust;                 // Baryon Number of the last calculated cluster
00222   G4double probVect[256];         // Cluster probability ("a#of issues" can be real) Vector
00223   // 3D
00224   G4QHadronVector theNucleons;    // Vector of nucleons of which the Nucleus consists of
00225   G4int currentNucleon;           // Current nucleon for the NextNucleon (? M.K.)
00226   G4double rho0;                  // Normalazation density
00227   G4double radius;                // Nuclear radius
00228   std::vector<G4double> Tb;       // T(b) function with step .1 fm (@@ make .1 a parameter)
00229   G4bool TbActive;                // Flag that the T(b) is activated
00230   G4bool RhoActive;               // Flag that the Density is activated
00231 };
00232 
00233 std::ostream& operator<<(std::ostream& lhs, G4QNucleus& rhs);
00234 std::ostream& operator<<(std::ostream& lhs, const G4QNucleus& rhs);
00235 
00236 #endif

Generated on Mon May 27 17:49:38 2013 for Geant4 by  doxygen 1.4.7