Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-03 09:09:16

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 // original by H.P. Wellisch
0027 // modified by J.L. Chuma, TRIUMF, 19-Nov-1996
0028 // last modified: 27-Mar-1997
0029 // Chr. Volcker, 10-Nov-1997: new methods and class variables.
0030 // M.G. Pia, 2 Oct 1998: modified GetFermiMomentum (original design was
0031 //                       the source of memory leaks)
0032 // G.Folger, spring 2010:  add integer A/Z interface
0033 // A. Ribon, autumn 2021:  extended to hypernuclei
0034 
0035 #ifndef G4Nucleus_h
0036 #define G4Nucleus_h 1
0037 // Class Description
0038 // This class knows how to describe a nucleus; 
0039 // to be used in your physics implementation (not physics list) in case you need this physics.
0040 // Class Description - End
0041 
0042  
0043 #include "globals.hh"
0044 #include "G4ThreeVector.hh"
0045 #include "G4ParticleTypes.hh"
0046 #include "G4ReactionProduct.hh"
0047 #include "G4DynamicParticle.hh"
0048 #include "G4ReactionProductVector.hh"
0049 #include "Randomize.hh"
0050  
0051 class G4Nucleus 
0052 {
0053   public:
0054     
0055     G4Nucleus();
0056     G4Nucleus(const G4double A, const G4double Z, const G4int numberOfLambdas = 0);
0057     G4Nucleus(const G4int A, const G4int Z, const G4int numberOfLambdas = 0);
0058     G4Nucleus(const G4Material* aMaterial);
0059     
0060     ~G4Nucleus();
0061     
0062     G4Nucleus(const G4Nucleus&) = default;    
0063     G4Nucleus(G4Nucleus&&) = default;    
0064     G4Nucleus& operator = (const G4Nucleus&) = default;
0065     G4Nucleus& operator = (G4Nucleus&&) = default;
0066    
0067     inline G4bool operator==( const G4Nucleus &right ) const
0068     { return ( this == (G4Nucleus *) &right ); }
0069     
0070     inline G4bool operator!=( const G4Nucleus &right ) const
0071     { return ( this != (G4Nucleus *) &right ); }
0072     
0073     void ChooseParameters( const G4Material *aMaterial );
0074 
0075     void SetParameters( const G4double A, const G4double Z, const G4int numberOfLambdas = 0 );
0076     void SetParameters( const G4int A, const G4int Z, const G4int numberOfLambdas = 0 );
0077    
0078     inline G4int GetA_asInt() const
0079     { return theA; }   
0080     
0081     inline G4int GetN_asInt() const
0082     { return theA-theZ-theL; }   
0083     
0084     inline G4int GetZ_asInt() const
0085     { return theZ; }   
0086 
0087     inline G4int GetL() const  // Number of Lambdas (in the case of a hypernucleus)
0088     { return theL; }
0089 
0090     inline const G4Isotope* GetIsotope()
0091     { return fIsotope; }
0092 
0093     inline void SetIsotope(const G4Isotope* iso)
0094     { 
0095       fIsotope = iso;
0096       if(iso) { 
0097     theZ = iso->GetZ();
0098         theA = iso->GetN();
0099     theL = 0;
0100         aEff = theA;
0101         zEff = theZ;
0102       }
0103     }
0104 
0105     G4DynamicParticle *ReturnTargetParticle() const;
0106     
0107     G4double AtomicMass( const G4double A, const G4double Z, const G4int numberOfLambdas = 0 ) const;
0108     G4double AtomicMass( const G4int A, const G4int Z, const G4int numberOfLambdas = 0 ) const;
0109 
0110     G4double GetThermalPz( const G4double mass, const G4double temp ) const;
0111     
0112     G4ReactionProduct GetThermalNucleus(G4double aMass, G4double temp=-1) const;
0113     
0114     G4ReactionProduct GetBiasedThermalNucleus(G4double aMass, G4ThreeVector aVelocity, G4double temp=-1) const;
0115 
0116     void DoKinematicsOfThermalNucleus(const G4double mu, const G4double vT_norm, const G4ThreeVector& aVelocity,
0117                                       G4ReactionProduct& result) const;
0118   
0119     G4double Cinema( G4double kineticEnergy );
0120     
0121     G4double EvaporationEffects( G4double kineticEnergy );
0122 
0123     G4double AnnihilationEvaporationEffects(G4double kineticEnergy, G4double ekOrg);
0124     
0125     inline G4double GetPNBlackTrackEnergy() const
0126     { return pnBlackTrackEnergy; }
0127     
0128     inline G4double GetDTABlackTrackEnergy() const
0129     { return dtaBlackTrackEnergy; }
0130     
0131     inline G4double GetAnnihilationPNBlackTrackEnergy() const
0132     { return pnBlackTrackEnergyfromAnnihilation; }
0133     
0134     inline G4double GetAnnihilationDTABlackTrackEnergy() const
0135     { return dtaBlackTrackEnergyfromAnnihilation; }
0136     
0137 // ******************  methods introduced by ChV ***********************    
0138    // return fermi momentum
0139      G4ThreeVector GetFermiMomentum();
0140 
0141 /*
0142   // return particle to be absorbed. 
0143      G4DynamicParticle* ReturnAbsorbingParticle(G4double weight);
0144 */
0145 
0146   //  final nucleus fragmentation. Return List of particles
0147   // which should be used for further tracking.
0148      G4ReactionProductVector* Fragmentate();
0149      
0150 
0151   // excitation Energy...
0152      void AddExcitationEnergy(G4double anEnergy);
0153   
0154   
0155   // momentum of absorbed Particles ..
0156      void AddMomentum(const G4ThreeVector aMomentum);
0157      
0158   // return excitation Energy
0159      G4double GetEnergyDeposit() {return excitationEnergy; }
0160      
0161 
0162 
0163 // ****************************** end ChV ******************************
0164 
0165 
0166  private:
0167     
0168     G4int    theA;
0169     G4int    theZ;
0170     G4int    theL;  // Number of Lambdas (in the case of hypernucleus)
0171     G4double aEff;  // effective atomic weight
0172     G4double zEff;  // effective atomic number
0173 
0174     const G4Isotope* fIsotope;
0175     
0176     G4double pnBlackTrackEnergy;  // the kinetic energy available for
0177                                   // proton/neutron black track particles
0178     G4double dtaBlackTrackEnergy; // the kinetic energy available for
0179                                   // deuteron/triton/alpha particles
0180     G4double pnBlackTrackEnergyfromAnnihilation;
0181                      // kinetic energy available for proton/neutron black 
0182                      // track particles based on baryon annihilation 
0183     G4double dtaBlackTrackEnergyfromAnnihilation;
0184                      // kinetic energy available for deuteron/triton/alpha 
0185                      // black track particles based on baryon annihilation 
0186 
0187 
0188 // ************************** member variables by ChV *******************
0189   // Excitation Energy leading to evaporation or deexcitation.
0190      G4double  excitationEnergy;
0191      
0192   // Momentum, accumulated by absorbing Particles
0193      G4ThreeVector momentum;
0194      
0195   // Fermi Gas model: at present, we assume constant nucleon density for all 
0196   // nuclei. The radius of a nucleon is taken to be 1 fm.
0197   // see for example S.Fl"ugge, Encyclopedia of Physics, Vol XXXIX, 
0198   // Structure of Atomic Nuclei (Berlin-Gottingen-Heidelberg, 1957) page 426.
0199 
0200   // maximum momentum possible from fermi gas model:
0201      G4double fermiMomentum; 
0202      G4double theTemp; // temperature
0203 // ****************************** end ChV ******************************
0204 
0205  };
0206  
0207 #endif
0208