Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:07

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 //
0027 //
0028 // Hadronic Process: Nuclear De-excitations
0029 // by V. Lara
0030 
0031 #ifndef G4StatMFMacroCanonical_h
0032 #define G4StatMFMacroCanonical_h 1
0033 
0034 #include "G4Fragment.hh"
0035 #include "G4StatMFFragment.hh"
0036 #include "G4VStatMFEnsemble.hh"
0037 #include "G4VStatMFMacroCluster.hh"
0038 #include "G4StatMFMacroNucleon.hh"
0039 #include "G4StatMFMacroBiNucleon.hh"
0040 #include "G4StatMFMacroTriNucleon.hh"
0041 #include "G4StatMFMacroTetraNucleon.hh"
0042 #include "G4StatMFMacroMultiNucleon.hh"
0043 #include "G4StatMFParameters.hh"
0044 #include "G4StatMFChannel.hh"
0045 #include "G4StatMFMacroTemperature.hh"
0046 #include "Randomize.hh"
0047 
0048 
0049 class G4StatMFMacroCanonical : public G4VStatMFEnsemble {
0050 
0051 public:
0052 
0053     // G4StatMFMacroCanonical class must be initialized with a G4Fragment.
0054     G4StatMFMacroCanonical(G4Fragment const & theFragment);
0055 
0056     // destructor
0057     ~G4StatMFMacroCanonical();
0058 
0059 private:
0060     // default constructor
0061     G4StatMFMacroCanonical() {};
0062 
0063 
0064     // copy constructor
0065     G4StatMFMacroCanonical(const G4StatMFMacroCanonical &) : G4VStatMFEnsemble() {};
0066 
0067 
0068     // operators
0069     G4StatMFMacroCanonical & operator=(const G4StatMFMacroCanonical & right);
0070     G4bool operator==(const G4StatMFMacroCanonical & right) const;
0071     G4bool operator!=(const G4StatMFMacroCanonical & right) const;
0072 
0073 
0074 public:
0075 
0076     // Choice of fragment atomic numbers and charges.
0077     G4StatMFChannel * ChooseAandZ(const G4Fragment &theFragment);
0078 
0079 private:
0080 
0081     // Initailization method
0082     void Initialize(const G4Fragment & theFragment);
0083 
0084     //
0085     void CalculateTemperature(const G4Fragment & theFragment);
0086 
0087     // Determines fragments multiplicities and compute total fragment multiplicity
0088     G4double ChooseA(G4int A, std::vector<G4int> & ANumbers);
0089     
0090     // Samples charges of fragments
0091     G4StatMFChannel * ChooseZ(G4int & Z, 
0092                   std::vector<G4int> & FragmentsA);
0093 
0094     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0095 
0096 
0097     // Chemical Potential \mu
0098     G4double _ChemPotentialMu;
0099 
0100     // Chemical Potential \nu
0101     G4double _ChemPotentialNu;
0102 
0103 
0104     // Parameter Kappa
0105     G4double _Kappa;
0106 
0107     // Clusters
0108     std::vector<G4VStatMFMacroCluster*> _theClusters;
0109 
0110   struct DeleteFragment 
0111   {
0112     template<typename T>
0113     void operator()(const T* ptr) const
0114     {
0115       delete ptr;
0116     }
0117   };
0118   
0119 
0120 };
0121 
0122 #endif