Back to home page

EIC code displayed by LXR

 
 

    


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

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 // Hadronic Process: Nuclear De-excitations
0027 // by V. Lara (May 1998)
0028 //
0029 // Modifications:
0030 // 30 June 1998 by V. Lara:
0031 //      -Using G4ParticleTable and therefore G4IonTable
0032 //       it can return all kind of fragments produced in 
0033 //       deexcitation
0034 //      -It uses default algorithms for:
0035 //              Evaporation: G4StatEvaporation
0036 //              MultiFragmentation: G4DummyMF (a dummy one)
0037 //              Fermi Breakup model: G4StatFermiBreakUp
0038 //
0039 // 03 September 2008 by J. M. Quesada for external choice of inverse 
0040 //    cross section option
0041 // 06 September 2008 JMQ Also external choices have been added for 
0042 //    superimposed Coulomb barrier (if useSICBis set true, by default is false) 
0043 // 23 January 2012 by V.Ivanchenko remove obsolete data members; added access
0044 //    methods to deexcitation components
0045 //                   
0046 
0047 #ifndef G4ExcitationHandler_h
0048 #define G4ExcitationHandler_h 1
0049 
0050 #include "globals.hh"
0051 #include "G4Fragment.hh"
0052 #include "G4ReactionProductVector.hh"
0053 #include "G4IonTable.hh"
0054 #include "G4DeexPrecoParameters.hh"
0055 #include "G4NistManager.hh"
0056 
0057 class G4VMultiFragmentation;
0058 class G4VFermiBreakUp;
0059 class G4VEvaporation;
0060 class G4VEvaporationChannel;
0061 class G4ParticleTable;
0062 
0063 class G4ExcitationHandler 
0064 {
0065 public:
0066 
0067   G4ExcitationHandler(); 
0068   ~G4ExcitationHandler();
0069 
0070   G4ReactionProductVector* BreakItUp(const G4Fragment &theInitialState);
0071 
0072   // short model description used for automatic web documentation
0073   void ModelDescription(std::ostream& outFile) const;
0074 
0075   void Initialise();
0076 
0077   // user defined sub-models
0078   // deletion is responsibility of this handler if isLocal=true 
0079   void SetEvaporation(G4VEvaporation* ptr, G4bool isLocal=false);
0080   void SetMultiFragmentation(G4VMultiFragmentation* ptr);
0081   void SetFermiModel(G4VFermiBreakUp* ptr);
0082   void SetPhotonEvaporation(G4VEvaporationChannel* ptr);
0083   void SetDeexChannelsType(G4DeexChannelType val);
0084 
0085   //======== Obsolete methods to be removed =====
0086 
0087   // parameters of sub-models
0088   inline void SetMaxZForFermiBreakUp(G4int aZ);
0089   inline void SetMaxAForFermiBreakUp(G4int anA);
0090   inline void SetMaxAandZForFermiBreakUp(G4int anA,G4int aZ);
0091   inline void SetMinEForMultiFrag(G4double anE);
0092 
0093   // access methods
0094   G4VEvaporation* GetEvaporation();
0095   G4VMultiFragmentation* GetMultiFragmentation();
0096   G4VFermiBreakUp* GetFermiModel();
0097   G4VEvaporationChannel* GetPhotonEvaporation();
0098 
0099   // for inverse cross section choice
0100   inline void SetOPTxs(G4int opt);
0101   // for superimposed Coulomb Barrier for inverse cross sections
0102   inline void UseSICB();
0103 
0104   //==============================================
0105 
0106   G4ExcitationHandler(const G4ExcitationHandler &right) = delete;
0107   const G4ExcitationHandler & operator
0108   =(const G4ExcitationHandler &right) = delete;
0109   G4bool operator==(const G4ExcitationHandler &right) const = delete;
0110   G4bool operator!=(const G4ExcitationHandler &right) const = delete;
0111 
0112 private:
0113 
0114   void SetParameters();
0115 
0116   inline void SortSecondaryFragment(G4Fragment*);
0117   
0118   G4VEvaporation* theEvaporation{nullptr};
0119   G4VMultiFragmentation* theMultiFragmentation;
0120   G4VFermiBreakUp* theFermiModel;
0121   G4VEvaporationChannel* thePhotonEvaporation;
0122   G4ParticleTable* thePartTable;
0123   G4IonTable* theTableOfIons;
0124   G4NistManager* nist;
0125 
0126   const G4ParticleDefinition* theElectron;
0127   const G4ParticleDefinition* theNeutron;
0128   const G4ParticleDefinition* theProton;
0129   const G4ParticleDefinition* theDeuteron;
0130   const G4ParticleDefinition* theTriton;
0131   const G4ParticleDefinition* theHe3;
0132   const G4ParticleDefinition* theAlpha;
0133   const G4ParticleDefinition* theLambda;
0134 
0135   G4int icID{0};
0136 
0137   G4int maxZForFermiBreakUp{9};
0138   G4int maxAForFermiBreakUp{17};
0139 
0140   G4int  fVerbose{1};
0141   G4int  fWarnings{0};
0142 
0143   G4double minEForMultiFrag;
0144   G4double minExcitation;
0145   G4double maxExcitation;
0146   G4double fLambdaMass;
0147 
0148   G4bool isInitialised{false};
0149   G4bool isEvapLocal{true};
0150   G4bool isActive{true};
0151 
0152   // list of fragments to store final result   
0153   std::vector<G4Fragment*> theResults;
0154 
0155   // list of fragments to store intermediate result   
0156   std::vector<G4Fragment*> results;
0157 
0158   // list of fragments to apply Evaporation or Fermi Break-Up
0159   std::vector<G4Fragment*> theEvapList;          
0160 };
0161 
0162 inline void G4ExcitationHandler::SetMaxZForFermiBreakUp(G4int aZ)
0163 {
0164   maxZForFermiBreakUp = aZ;
0165 }
0166 
0167 inline void G4ExcitationHandler::SetMaxAForFermiBreakUp(G4int anA)
0168 {
0169   maxAForFermiBreakUp = anA;
0170 }
0171 
0172 inline void G4ExcitationHandler::SetMaxAandZForFermiBreakUp(G4int anA, G4int aZ)
0173 {
0174   SetMaxAForFermiBreakUp(anA);
0175   SetMaxZForFermiBreakUp(aZ);
0176 }
0177 
0178 inline void G4ExcitationHandler::SetMinEForMultiFrag(G4double anE)
0179 {
0180   minEForMultiFrag = anE;
0181 }
0182 
0183 inline void G4ExcitationHandler::SortSecondaryFragment(G4Fragment* frag)
0184 { 
0185   G4int A = frag->GetA_asInt();  
0186 
0187   // gamma, e-, p, n
0188   if(A <= 1 || frag->IsLongLived()) { 
0189     theResults.push_back(frag); 
0190   } else if(frag->GetExcitationEnergy() < minExcitation) {
0191     // cold fragments
0192     G4int Z = frag->GetZ_asInt(); 
0193        
0194     // is stable or d, t, He3, He4
0195     if(nist->GetIsotopeAbundance(Z, A) > 0.0 || (A == 3 && (Z == 1 || Z == 2)) ) {
0196       theResults.push_back(frag); // stable fragment 
0197     } else {
0198       theEvapList.push_back(frag);
0199     }
0200     // hot fragments are unstable
0201   } else { 
0202     theEvapList.push_back(frag);  
0203   }
0204 }
0205 
0206 #endif