Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:45

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     inline G4Nucleus( const G4Nucleus &right )
0063     { *this = right; }
0064     
0065     inline G4Nucleus& operator = (const G4Nucleus& right)
0066     {
0067       if (this != &right) {
0068         theA=right.theA;
0069         theZ=right.theZ;
0070         theL=right.theL;
0071         aEff=right.aEff;
0072         zEff=right.zEff;
0073         fIsotope = right.fIsotope;
0074         pnBlackTrackEnergy=right.pnBlackTrackEnergy; 
0075         dtaBlackTrackEnergy=right.dtaBlackTrackEnergy;
0076         pnBlackTrackEnergyfromAnnihilation =
0077                      right.pnBlackTrackEnergyfromAnnihilation; 
0078         dtaBlackTrackEnergyfromAnnihilation =
0079                      right.dtaBlackTrackEnergyfromAnnihilation; 
0080         theTemp = right.theTemp;
0081         excitationEnergy = right.excitationEnergy;
0082         momentum = right.momentum;
0083         fermiMomentum = right.fermiMomentum;
0084       }
0085       return *this;
0086     }
0087    
0088     inline G4bool operator==( const G4Nucleus &right ) const
0089     { return ( this == (G4Nucleus *) &right ); }
0090     
0091     inline G4bool operator!=( const G4Nucleus &right ) const
0092     { return ( this != (G4Nucleus *) &right ); }
0093     
0094     void ChooseParameters( const G4Material *aMaterial );
0095 
0096     void SetParameters( const G4double A, const G4double Z, const G4int numberOfLambdas = 0 );
0097     void SetParameters( const G4int A, const G4int Z, const G4int numberOfLambdas = 0 );
0098    
0099     inline G4int GetA_asInt() const
0100     { return theA; }   
0101     
0102     inline G4int GetN_asInt() const
0103     { return theA-theZ-theL; }   
0104     
0105     inline G4int GetZ_asInt() const
0106     { return theZ; }   
0107 
0108     inline G4int GetL() const  // Number of Lambdas (in the case of a hypernucleus)
0109     { return theL; }
0110 
0111     inline const G4Isotope* GetIsotope()
0112     { return fIsotope; }
0113 
0114     inline void SetIsotope(const G4Isotope* iso)
0115     { 
0116       fIsotope = iso;
0117       if(iso) { 
0118     theZ = iso->GetZ();
0119         theA = iso->GetN();
0120     theL = 0;
0121         aEff = theA;
0122         zEff = theZ;
0123       }
0124     }
0125 
0126     G4DynamicParticle *ReturnTargetParticle() const;
0127     
0128     G4double AtomicMass( const G4double A, const G4double Z, const G4int numberOfLambdas = 0 ) const;
0129     G4double AtomicMass( const G4int A, const G4int Z, const G4int numberOfLambdas = 0 ) const;
0130 
0131     G4double GetThermalPz( const G4double mass, const G4double temp ) const;
0132     
0133     G4ReactionProduct GetThermalNucleus(G4double aMass, G4double temp=-1) const;
0134     
0135     G4ReactionProduct GetBiasedThermalNucleus(G4double aMass, G4ThreeVector aVelocity, G4double temp=-1) const;
0136 
0137     void DoKinematicsOfThermalNucleus(const G4double mu, const G4double vT_norm, const G4ThreeVector& aVelocity,
0138                                       G4ReactionProduct& result) const;
0139   
0140     G4double Cinema( G4double kineticEnergy );
0141     
0142     G4double EvaporationEffects( G4double kineticEnergy );
0143 
0144     G4double AnnihilationEvaporationEffects(G4double kineticEnergy, G4double ekOrg);
0145     
0146     inline G4double GetPNBlackTrackEnergy() const
0147     { return pnBlackTrackEnergy; }
0148     
0149     inline G4double GetDTABlackTrackEnergy() const
0150     { return dtaBlackTrackEnergy; }
0151     
0152     inline G4double GetAnnihilationPNBlackTrackEnergy() const
0153     { return pnBlackTrackEnergyfromAnnihilation; }
0154     
0155     inline G4double GetAnnihilationDTABlackTrackEnergy() const
0156     { return dtaBlackTrackEnergyfromAnnihilation; }
0157     
0158 // ******************  methods introduced by ChV ***********************    
0159    // return fermi momentum
0160      G4ThreeVector GetFermiMomentum();
0161 
0162 /*
0163   // return particle to be absorbed. 
0164      G4DynamicParticle* ReturnAbsorbingParticle(G4double weight);
0165 */
0166 
0167   //  final nucleus fragmentation. Return List of particles
0168   // which should be used for further tracking.
0169      G4ReactionProductVector* Fragmentate();
0170      
0171 
0172   // excitation Energy...
0173      void AddExcitationEnergy(G4double anEnergy);
0174   
0175   
0176   // momentum of absorbed Particles ..
0177      void AddMomentum(const G4ThreeVector aMomentum);
0178      
0179   // return excitation Energy
0180      G4double GetEnergyDeposit() {return excitationEnergy; }
0181      
0182 
0183 
0184 // ****************************** end ChV ******************************
0185 
0186 
0187  private:
0188     
0189     G4int    theA;
0190     G4int    theZ;
0191     G4int    theL;  // Number of Lambdas (in the case of hypernucleus)
0192     G4double aEff;  // effective atomic weight
0193     G4double zEff;  // effective atomic number
0194 
0195     const G4Isotope* fIsotope;
0196     
0197     G4double pnBlackTrackEnergy;  // the kinetic energy available for
0198                                   // proton/neutron black track particles
0199     G4double dtaBlackTrackEnergy; // the kinetic energy available for
0200                                   // deuteron/triton/alpha particles
0201     G4double pnBlackTrackEnergyfromAnnihilation;
0202                      // kinetic energy available for proton/neutron black 
0203                      // track particles based on baryon annihilation 
0204     G4double dtaBlackTrackEnergyfromAnnihilation;
0205                      // kinetic energy available for deuteron/triton/alpha 
0206                      // black track particles based on baryon annihilation 
0207 
0208 
0209 // ************************** member variables by ChV *******************
0210   // Excitation Energy leading to evaporation or deexcitation.
0211      G4double  excitationEnergy;
0212      
0213   // Momentum, accumulated by absorbing Particles
0214      G4ThreeVector momentum;
0215      
0216   // Fermi Gas model: at present, we assume constant nucleon density for all 
0217   // nuclei. The radius of a nucleon is taken to be 1 fm.
0218   // see for example S.Fl"ugge, Encyclopedia of Physics, Vol XXXIX, 
0219   // Structure of Atomic Nuclei (Berlin-Gottingen-Heidelberg, 1957) page 426.
0220 
0221   // maximum momentum possible from fermi gas model:
0222      G4double fermiMomentum; 
0223      G4double theTemp; // temperature
0224 // ****************************** end ChV ******************************
0225 
0226  };
0227  
0228 #endif
0229