Changeset 1340 for trunk/source/processes/hadronic/models/pre_equilibrium
- Timestamp:
- Nov 5, 2010, 3:45:55 PM (15 years ago)
- Location:
- trunk/source/processes/hadronic/models/pre_equilibrium
- Files:
-
- 62 edited
-
History (modified) (1 diff)
-
exciton_model/include/G4GNASHTransitions.hh (modified) (3 diffs)
-
exciton_model/include/G4HETCAlpha.hh (modified) (2 diffs)
-
exciton_model/include/G4HETCChargedFragment.hh (modified) (2 diffs)
-
exciton_model/include/G4HETCDeuteron.hh (modified) (2 diffs)
-
exciton_model/include/G4HETCEmissionFactory.hh (modified) (2 diffs)
-
exciton_model/include/G4HETCFragment.hh (modified) (4 diffs)
-
exciton_model/include/G4HETCFragment.icc (modified) (1 diff)
-
exciton_model/include/G4HETCHe3.hh (modified) (3 diffs)
-
exciton_model/include/G4HETCNeutron.hh (modified) (2 diffs)
-
exciton_model/include/G4HETCProton.hh (modified) (2 diffs)
-
exciton_model/include/G4HETCTriton.hh (modified) (2 diffs)
-
exciton_model/include/G4LowEIonFragmentation.hh (modified) (3 diffs)
-
exciton_model/include/G4PreCompoundAlpha.hh (modified) (2 diffs)
-
exciton_model/include/G4PreCompoundDeuteron.hh (modified) (2 diffs)
-
exciton_model/include/G4PreCompoundEmission.hh (modified) (5 diffs)
-
exciton_model/include/G4PreCompoundEmission.icc (modified) (2 diffs)
-
exciton_model/include/G4PreCompoundEmissionFactory.hh (modified) (2 diffs)
-
exciton_model/include/G4PreCompoundFragment.hh (modified) (3 diffs)
-
exciton_model/include/G4PreCompoundFragmentVector.hh (modified) (3 diffs)
-
exciton_model/include/G4PreCompoundFragmentVector.icc (modified) (2 diffs)
-
exciton_model/include/G4PreCompoundHe3.hh (modified) (2 diffs)
-
exciton_model/include/G4PreCompoundIon.hh (modified) (2 diffs)
-
exciton_model/include/G4PreCompoundModel.hh (modified) (8 diffs)
-
exciton_model/include/G4PreCompoundNeutron.hh (modified) (2 diffs)
-
exciton_model/include/G4PreCompoundNucleon.hh (modified) (2 diffs)
-
exciton_model/include/G4PreCompoundParameters.hh (modified) (2 diffs)
-
exciton_model/include/G4PreCompoundProton.hh (modified) (3 diffs)
-
exciton_model/include/G4PreCompoundTransitions.hh (modified) (2 diffs)
-
exciton_model/include/G4PreCompoundTriton.hh (modified) (2 diffs)
-
exciton_model/include/G4VPreCompoundEmissionFactory.hh (modified) (4 diffs)
-
exciton_model/include/G4VPreCompoundFragment.hh (modified) (9 diffs)
-
exciton_model/include/G4VPreCompoundFragment.icc (modified) (6 diffs)
-
exciton_model/include/G4VPreCompoundTransitions.hh (modified) (3 diffs)
-
exciton_model/src/G4GNASHTransitions.cc (modified) (3 diffs)
-
exciton_model/src/G4HETCAlpha.cc (modified) (2 diffs)
-
exciton_model/src/G4HETCChargedFragment.cc (modified) (1 diff)
-
exciton_model/src/G4HETCDeuteron.cc (modified) (2 diffs)
-
exciton_model/src/G4HETCEmissionFactory.cc (modified) (2 diffs)
-
exciton_model/src/G4HETCFragment.cc (modified) (6 diffs)
-
exciton_model/src/G4HETCHe3.cc (modified) (2 diffs)
-
exciton_model/src/G4HETCNeutron.cc (modified) (2 diffs)
-
exciton_model/src/G4HETCProton.cc (modified) (1 diff)
-
exciton_model/src/G4HETCTriton.cc (modified) (2 diffs)
-
exciton_model/src/G4LowEIonFragmentation.cc (modified) (6 diffs)
-
exciton_model/src/G4PreCompoundAlpha.cc (modified) (12 diffs)
-
exciton_model/src/G4PreCompoundDeuteron.cc (modified) (12 diffs)
-
exciton_model/src/G4PreCompoundEmission.cc (modified) (14 diffs)
-
exciton_model/src/G4PreCompoundEmissionFactory.cc (modified) (2 diffs)
-
exciton_model/src/G4PreCompoundFragment.cc (modified) (2 diffs)
-
exciton_model/src/G4PreCompoundFragmentVector.cc (modified) (1 diff)
-
exciton_model/src/G4PreCompoundHe3.cc (modified) (11 diffs)
-
exciton_model/src/G4PreCompoundIon.cc (modified) (3 diffs)
-
exciton_model/src/G4PreCompoundModel.cc (modified) (7 diffs)
-
exciton_model/src/G4PreCompoundNeutron.cc (modified) (11 diffs)
-
exciton_model/src/G4PreCompoundNucleon.cc (modified) (2 diffs)
-
exciton_model/src/G4PreCompoundParameters.cc (modified) (1 diff)
-
exciton_model/src/G4PreCompoundProton.cc (modified) (14 diffs)
-
exciton_model/src/G4PreCompoundTransitions.cc (modified) (6 diffs)
-
exciton_model/src/G4PreCompoundTriton.cc (modified) (10 diffs)
-
exciton_model/src/G4VPreCompoundEmissionFactory.cc (modified) (1 diff)
-
exciton_model/src/G4VPreCompoundFragment.cc (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/pre_equilibrium/History
r1337 r1340 14 14 * Please list in reverse chronological order (last date on top) 15 15 --------------------------------------------------------------- 16 17 20-October 2010 V.Ivanchenko hadr-pre-V09-03-12 18 --------------------------------------------------- 19 G4PreCompoundTransitions - fixed compillation warning introduced in previous tag 20 21 11-October 2010 V.Ivanchenko hadr-pre-V09-03-11 22 --------------------------------------------------- 23 G4PreCompoundTransitions - JMQ fixed bug in the PerformTransition method 24 (use number of particles instead of number of excitons) 25 G4PreCompoundModel - disabled upper limit on excitation energy 26 27 8-September 2010 G.Folger hadr-pre-V09-03-10 28 --------------------------------------------------- 29 G4LowEIonFragmentation: use integer A and Z 30 31 1-September 2010 V.Ivanchenko hadr-pre-V09-03-09 32 --------------------------------------------------- 33 G4PreCompoundEmission - removed SetUp inline method and move its functionality 34 35 31-August 2010 V.Ivanchenko hadr-pre-V09-03-08 36 --------------------------------------------------- 37 G4PreCompoundTransition - fixed typo introduced in previous tag 38 39 28-August 2010 V.Ivanchenko hadr-pre-V09-03-07 40 --------------------------------------------------- 41 General cleaup of all classes: constructors and destructors moved to the 42 source, integer Z and A, G4Pow class 43 is used to speedup computations 44 G4PreCompoundModel - Emission and Transition classes become members created 45 at construction and not at run time, 46 initialisation is performed at construction or when options 47 are changed and not in run time, G4Fragment is not const, 48 it is modified during process of emission of particles 16 49 17 50 11-June 2010 V.Ivanchenko hadr-pre-V09-03-06 -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4GNASHTransitions.hh
r962 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4GNASHTransitions.hh,v 1.4 2010/08/20 07:42:19 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 26 29 #ifndef G4GNASHTransitions_hh 27 30 #define G4GNASHTransitions_hh 1 … … 33 36 { 34 37 public: 35 G4GNASHTransitions() {} 36 virtual ~G4GNASHTransitions() {} 38 39 G4GNASHTransitions(); 40 41 virtual ~G4GNASHTransitions(); 42 43 virtual G4double CalculateProbability(const G4Fragment & aFragment); 44 45 virtual void PerformTransition(G4Fragment & aFragment); 37 46 38 47 private: 39 48 40 G4GNASHTransitions(const G4GNASHTransitions &) : G4VPreCompoundTransitions() {} 41 42 const G4GNASHTransitions& operator=(const G4GNASHTransitions &right); 49 G4GNASHTransitions(const G4GNASHTransitions &); 50 const G4GNASHTransitions& operator=(const G4GNASHTransitions &right); 43 51 44 52 G4bool operator==(const G4GNASHTransitions &right) const; … … 46 54 G4bool operator!=(const G4GNASHTransitions &right) const; 47 55 48 public:49 50 virtual G4double CalculateProbability(const G4Fragment & aFragment);51 52 virtual G4Fragment PerformTransition(const G4Fragment & aFragment);53 54 //JMQ 03/01/0855 public:56 // inline G4double GetTransitionProb1() const57 G4double GetTransitionProb1()58 {return 0;}59 // inline G4double GetTransitionProb2() const60 G4double GetTransitionProb2()61 {return 0;}62 // inline G4double GetTransitionProb3() const63 G4double GetTransitionProb3()64 {return 0;}65 //66 67 56 68 57 }; -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4HETCAlpha.hh
r819 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HETCAlpha.hh,v 1.3 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 26 29 // by V. Lara 30 // 31 // Modified: 32 // 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor 33 // the source, use G4Pow 27 34 28 35 #ifndef G4HETCAlpha_h … … 31 38 #include "G4HETCChargedFragment.hh" 32 39 #include "G4ReactionProduct.hh" 33 #include "G4Alpha.hh"34 35 40 #include "G4AlphaCoulombBarrier.hh" 36 37 41 38 42 class G4HETCAlpha : public G4HETCChargedFragment 39 43 { 40 44 public: 41 // default constructor42 G4HETCAlpha():G4HETCChargedFragment(4,2,&theAlphaCoulombBarrier,"Alpha") {}43 45 44 // copy constructor 45 G4HETCAlpha(const G4HETCAlpha &right): G4HETCChargedFragment(right) {} 46 G4HETCAlpha(); 46 47 47 // destructor 48 ~G4HETCAlpha() {} 48 ~G4HETCAlpha(); 49 49 50 // operators 51 const G4HETCAlpha & operator=(const G4HETCAlpha &right) 52 { 53 if (&right != this) this->G4HETCChargedFragment::operator=(right); 54 return *this; 55 }; 56 57 G4bool operator==(const G4HETCAlpha &right) const 58 { 59 return G4HETCChargedFragment::operator==(right); 60 } 50 protected: 61 51 62 63 G4bool operator!=(const G4HETCAlpha &right) const 64 { 65 return G4HETCChargedFragment::operator!=(right); 66 } 52 virtual G4double GetAlpha(); 67 53 54 virtual G4double GetBeta(); 68 55 69 G4ReactionProduct * GetReactionProduct() const 70 { 71 G4ReactionProduct * theReactionProduct = 72 new G4ReactionProduct(G4Alpha::AlphaDefinition()); 73 theReactionProduct->SetMomentum(GetMomentum().vect()); 74 theReactionProduct->SetTotalEnergy(GetMomentum().e()); 75 #ifdef PRECOMPOUND_TEST 76 theReactionProduct->SetCreatorModel("G4PrecompoundModel"); 77 #endif 78 return theReactionProduct; 79 } 80 81 private: 82 virtual G4double GetAlpha() 83 { 84 G4double C = 0.0; 85 G4double aZ = GetZ() + GetRestZ(); 86 if (aZ <= 30) 87 { 88 C = 0.10; 89 } 90 else if (aZ <= 50) 91 { 92 C = 0.1 + -((aZ-50.)/20.)*0.02; 93 } 94 else if (aZ < 70) 95 { 96 C = 0.08 + -((aZ-70.)/20.)*0.02; 97 } 98 else 99 { 100 C = 0.06; 101 } 102 return 1.0+C; 103 } 104 105 virtual G4double GetBeta() 106 { 107 return -GetCoulombBarrier(); 108 } 109 110 111 virtual G4double GetSpinFactor() 112 { 113 return 1.0; 114 } 56 virtual G4double GetSpinFactor(); 115 57 116 58 virtual G4double K(const G4Fragment & aFragment); 117 59 60 private: 118 61 119 private: 62 // operators 63 G4HETCAlpha(const G4HETCAlpha &right); 64 const G4HETCAlpha & operator=(const G4HETCAlpha &right); 65 G4bool operator==(const G4HETCAlpha &right) const; 66 G4bool operator!=(const G4HETCAlpha &right) const; 120 67 121 68 G4AlphaCoulombBarrier theAlphaCoulombBarrier; -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4HETCChargedFragment.hh
r819 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HETCChargedFragment.hh,v 1.3 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 26 29 // by V. Lara 27 30 … … 30 33 31 34 #include "G4HETCFragment.hh" 32 #include "G4VCoulombBarrier.hh"33 34 35 35 36 class G4HETCChargedFragment : public G4HETCFragment 36 37 { 37 protected:38 // default constructor39 G4HETCChargedFragment() {}40 41 38 public: 42 39 43 // copy constructor 44 G4HETCChargedFragment(const G4HETCChargedFragment &right): 45 G4HETCFragment(right) {} 40 G4HETCChargedFragment(const G4ParticleDefinition*, 41 G4VCoulombBarrier * aCoulombBarrier); 46 42 47 // constructor 48 G4HETCChargedFragment(const G4double anA, 49 const G4double aZ, 50 G4VCoulombBarrier* aCoulombBarrier, 51 const G4String & aName): 52 G4HETCFragment(anA,aZ,aCoulombBarrier,aName) {} 43 virtual ~G4HETCChargedFragment(); 53 44 54 virtual ~G4HETCChargedFragment() {} 45 virtual G4double GetKineticEnergy(const G4Fragment & aFragment); 46 47 private: 55 48 56 49 // operators 50 G4HETCChargedFragment(); 51 G4HETCChargedFragment(const G4HETCChargedFragment &right); 57 52 const G4HETCChargedFragment & 58 operator=(const G4HETCChargedFragment &right) 59 { 60 if (&right != this) this->G4HETCFragment::operator=(right); 61 return *this; 62 } 63 64 G4bool operator==(const G4HETCChargedFragment &right) const 65 { 66 return G4HETCFragment::operator==(right); 67 } 68 69 G4bool operator!=(const G4HETCChargedFragment &right) const 70 { 71 return G4HETCFragment::operator!=(right); 72 } 73 74 75 virtual G4double GetKineticEnergy(const G4Fragment & aFragment); 76 53 operator=(const G4HETCChargedFragment &right); 54 G4bool operator==(const G4HETCChargedFragment &right) const; 55 G4bool operator!=(const G4HETCChargedFragment &right) const; 77 56 78 57 }; -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4HETCDeuteron.hh
r819 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HETCDeuteron.hh,v 1.3 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 26 29 // by V. Lara 30 // 31 // Modified: 32 // 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor 33 // the source, use G4Pow 34 // 27 35 28 36 #ifndef G4HETCDeuteron_h … … 31 39 #include "G4HETCChargedFragment.hh" 32 40 #include "G4ReactionProduct.hh" 33 #include "G4Deuteron.hh"34 35 41 #include "G4DeuteronCoulombBarrier.hh" 36 37 42 38 43 class G4HETCDeuteron : public G4HETCChargedFragment 39 44 { 40 45 public: 41 // default constructor42 G4HETCDeuteron():G4HETCChargedFragment(2,1,&theDeuteronCoulombBarrier,"Deuteron") {}43 46 44 // copy constructor 45 G4HETCDeuteron(const G4HETCDeuteron &right): G4HETCChargedFragment(right) {} 47 G4HETCDeuteron(); 48 49 ~G4HETCDeuteron(); 46 50 47 // destructor 48 ~G4HETCDeuteron() {} 49 50 // operators 51 const G4HETCDeuteron & operator=(const G4HETCDeuteron &right) 52 { 53 if (&right != this) this->G4HETCChargedFragment::operator=(right); 54 return *this; 55 } 51 protected: 56 52 57 G4bool operator==(const G4HETCDeuteron &right) const 58 { 59 return G4HETCChargedFragment::operator==(right); 60 } 53 virtual G4double GetAlpha(); 61 54 62 63 G4bool operator!=(const G4HETCDeuteron &right) const 64 { 65 return G4HETCChargedFragment::operator!=(right); 66 } 55 virtual G4double GetBeta(); 67 56 57 virtual G4double GetSpinFactor(); 68 58 69 G4ReactionProduct * GetReactionProduct() const70 {71 G4ReactionProduct * theReactionProduct =72 new G4ReactionProduct(G4Deuteron::DeuteronDefinition());73 theReactionProduct->SetMomentum(GetMomentum().vect());74 theReactionProduct->SetTotalEnergy(GetMomentum().e());75 #ifdef PRECOMPOUND_TEST76 theReactionProduct->SetCreatorModel("G4PrecompoundModel");77 #endif78 return theReactionProduct;79 }80 81 private:82 virtual G4double GetAlpha()83 {84 G4double C = 0.0;85 G4double aZ = GetZ() + GetRestZ();86 if (aZ >= 70)87 {88 C = 0.10;89 }90 else91 {92 C = ((((0.15417e-06*aZ) - 0.29875e-04)*aZ + 0.21071e-02)*aZ - 0.66612e-01)*aZ + 0.98375;93 }94 return 1.0 + C/2.0;95 }96 97 virtual G4double GetBeta()98 {99 return -GetCoulombBarrier();100 }101 102 virtual G4double GetSpinFactor()103 {104 // 2s+1105 return 3.0;106 }107 108 59 virtual G4double K(const G4Fragment & aFragment); 109 110 60 111 61 private: 112 62 63 // operators 64 G4HETCDeuteron(const G4HETCDeuteron &right); 65 const G4HETCDeuteron & operator=(const G4HETCDeuteron &right); 66 G4bool operator==(const G4HETCDeuteron &right) const; 67 G4bool operator!=(const G4HETCDeuteron &right) const; 68 69 private: 70 113 71 G4DeuteronCoulombBarrier theDeuteronCoulombBarrier; 114 72 -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4HETCEmissionFactory.hh
r819 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HETCEmissionFactory.hh,v 1.3 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 29 // 30 26 31 #ifndef G4HETCEmissionFactory_hh 27 32 #define G4HETCEmissionFactory_hh … … 29 34 #include "G4VPreCompoundEmissionFactory.hh" 30 35 31 32 36 class G4HETCEmissionFactory : public G4VPreCompoundEmissionFactory 33 37 { 34 38 public: 35 39 36 G4HETCEmissionFactory() {}; 37 virtual ~G4HETCEmissionFactory() {}; 40 G4HETCEmissionFactory(); 41 virtual ~G4HETCEmissionFactory(); 42 43 protected: 44 45 virtual std::vector<G4VPreCompoundFragment*> * CreateFragmentVector(); 38 46 39 47 private: 40 48 41 G4HETCEmissionFactory(const G4HETCEmissionFactory & ) : G4VPreCompoundEmissionFactory() {};49 G4HETCEmissionFactory(const G4HETCEmissionFactory & ); 42 50 const G4HETCEmissionFactory & operator=(const G4HETCEmissionFactory & val); 43 51 G4bool operator==(const G4HETCEmissionFactory & val) const; 44 52 G4bool operator!=(const G4HETCEmissionFactory & val) const; 45 53 46 private:47 48 virtual std::vector<G4VPreCompoundFragment*> * CreateFragmentVector();49 50 54 }; 51 55 -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4HETCFragment.hh
r819 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HETCFragment.hh,v 1.3 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 26 29 // by V. Lara 30 // 31 // Modified: 32 // 20.08.2010 V.Ivanchenko added G4Pow and G4PreCompoundParameters pointers 33 // use int Z and A and cleanup 27 34 28 35 #ifndef G4HETCFragment_h … … 30 37 31 38 #include "G4VPreCompoundFragment.hh" 39 #include "Randomize.hh" 32 40 33 41 class G4HETCFragment : public G4VPreCompoundFragment 34 42 { 35 protected:36 // default constructor37 G4HETCFragment() {};38 39 43 public: 40 // copy constructor 41 G4HETCFragment(const G4HETCFragment &right); 42 43 // constructor 44 G4HETCFragment(const G4double anA, const G4double aZ, 45 G4VCoulombBarrier * aCoulombBarrier, 46 const G4String & aName); 44 45 G4HETCFragment(const G4ParticleDefinition*, 46 G4VCoulombBarrier * aCoulombBarrier); 47 47 48 48 virtual ~G4HETCFragment(); 49 50 // ========== 51 // operators 52 // ========== 53 54 const G4HETCFragment& 55 operator= (const G4HETCFragment &right); 56 57 G4int operator==(const G4HETCFragment &right) const; 58 59 G4int operator!=(const G4HETCFragment &right) const; 60 49 50 G4double CalcEmissionProbability(const G4Fragment & aFragment); 51 61 52 protected: 62 53 … … 67 58 virtual G4double GetBeta() = 0; 68 59 69 public: 70 60 inline G4double BetaRand(const G4int N, const G4int L) const; 61 62 private: 71 63 72 G4double CalcEmissionProbability(const G4Fragment & aFragment);73 74 private:75 64 // This method performs integration for probability function over 76 65 // fragment kinetic energy … … 78 67 const G4double & Up, 79 68 const G4Fragment & aFragment); 80 81 // ============================82 // Data members access methods83 // ============================84 85 69 86 inline G4bool IsItPossible(const G4Fragment & aFragment) const; 70 G4HETCFragment(); 71 G4HETCFragment(const G4HETCFragment &right); 72 const G4HETCFragment& 73 operator= (const G4HETCFragment &right); 74 G4int operator==(const G4HETCFragment &right) const; 75 G4int operator!=(const G4HETCFragment &right) const; 87 76 88 protected: 89 90 inline G4double BetaRand(const G4int N, const G4int L) const; 91 77 G4double r2norm; 92 78 }; 93 79 94 #include "G4HETCFragment.icc" 80 inline G4double G4HETCFragment:: 81 BetaRand(const G4int N, const G4int L) const 82 { 83 G4double Y1 = CLHEP::RandGamma::shoot(N,1); 84 G4double Y2 = CLHEP::RandGamma::shoot(L,1); 85 86 return Y1/(Y1+Y2); 87 } 95 88 96 89 #endif -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4HETCFragment.icc
r819 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HETCFragment.icc,v 1.4 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 26 29 // by V. Lara 27 30 28 29 #include <CLHEP/Random/RandGamma.h>30 31 inline G4bool G4HETCFragment::32 IsItPossible(const G4Fragment & aFragment) const33 {34 G4int pplus = aFragment.GetNumberOfCharged();35 G4int pneut = aFragment.GetNumberOfParticles()-pplus;36 return (pneut >= (GetA()-GetZ()) && pplus >= GetZ());37 }38 39 inline G4double G4HETCFragment::40 BetaRand(const G4int N, const G4int L) const41 {42 G4double Y1 = CLHEP::RandGamma::shoot(N,1);43 G4double Y2 = CLHEP::RandGamma::shoot(L,1);44 45 return Y1/(Y1+Y2);46 } -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4HETCHe3.hh
r819 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HETCHe3.hh,v 1.3 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 26 29 // by V. Lara 30 // 31 // Modified: 32 // 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor 33 // the source, use G4Pow 27 34 28 35 #ifndef G4HETCHe3_h … … 31 38 #include "G4HETCChargedFragment.hh" 32 39 #include "G4ReactionProduct.hh" 33 #include "G4He3.hh"34 35 40 #include "G4He3CoulombBarrier.hh" 36 37 41 38 42 class G4HETCHe3 : public G4HETCChargedFragment 39 43 { 40 44 public: 41 // default constructor42 G4HETCHe3():G4HETCChargedFragment(3,2,&theHe3CoulombBarrier,"He3") {}43 45 44 // copy constructor 45 G4HETCHe3(const G4HETCHe3 &right): G4HETCChargedFragment(right) {} 46 G4HETCHe3(); 46 47 47 // destructor 48 ~G4HETCHe3() {} 48 ~G4HETCHe3(); 49 49 50 // operators 51 const G4HETCHe3 & operator=(const G4HETCHe3 &right) 52 { 53 if (&right != this) this->G4HETCChargedFragment::operator=(right); 54 return *this; 55 } 56 57 G4bool operator==(const G4HETCHe3 &right) const 58 { 59 return G4HETCChargedFragment::operator==(right); 60 } 50 protected: 61 51 62 63 G4bool operator!=(const G4HETCHe3 &right) const 64 { 65 return G4HETCChargedFragment::operator!=(right); 66 } 52 virtual G4double GetAlpha(); 67 53 54 virtual G4double GetBeta(); 68 55 69 G4ReactionProduct * GetReactionProduct() const 70 { 71 G4ReactionProduct * theReactionProduct = 72 new G4ReactionProduct(G4He3::He3Definition()); 73 theReactionProduct->SetMomentum(GetMomentum().vect()); 74 theReactionProduct->SetTotalEnergy(GetMomentum().e()); 75 #ifdef PRECOMPOUND_TEST 76 theReactionProduct->SetCreatorModel("G4PrecompoundModel"); 77 #endif 78 return theReactionProduct; 79 } 80 81 private: 82 virtual G4double GetAlpha() 83 { 84 G4double C = 0.0; 85 G4double aZ = GetZ() + GetRestZ(); 86 if (aZ <= 30) 87 { 88 C = 0.10; 89 } 90 else if (aZ <= 50) 91 { 92 C = 0.1 + -((aZ-50.)/20.)*0.02; 93 } 94 else if (aZ < 70) 95 { 96 C = 0.08 + -((aZ-70.)/20.)*0.02; 97 } 98 else 99 { 100 C = 0.06; 101 } 102 return 1.0 + C*(4.0/3.0); 103 } 104 105 106 virtual G4double GetBeta() 107 { 108 return -GetCoulombBarrier(); 109 } 110 111 // virtual G4double FactorialFactor(const G4double N, const G4double P) 112 // { 113 // return 114 // (N-3.0)*(P-2.0)*( 115 // (((N-2.0)*(P-1.0))/2.0) *( 116 // (((N-1.0)*P)/3.0) 117 // ) 118 // ); 119 // } 120 121 virtual G4double GetSpinFactor() 122 { 123 // 2s+1 124 return 2.0; 125 } 56 virtual G4double GetSpinFactor(); 126 57 127 58 virtual G4double K(const G4Fragment & aFragment); … … 129 60 private: 130 61 62 // operators 63 G4HETCHe3(const G4HETCHe3 &right); 64 const G4HETCHe3 & operator=(const G4HETCHe3 &right); 65 G4bool operator==(const G4HETCHe3 &right) const; 66 G4bool operator!=(const G4HETCHe3 &right) const; 67 131 68 G4He3CoulombBarrier theHe3CoulombBarrier; 132 133 69 }; 134 70 -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4HETCNeutron.hh
r819 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HETCNeutron.hh,v 1.4 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 26 29 // by V. Lara 27 30 // 31 // Modified: 32 // 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor 33 // the source, use G4Pow 28 34 29 35 #ifndef G4HETCNeutron_h … … 32 38 #include "G4HETCFragment.hh" 33 39 #include "G4ReactionProduct.hh" 34 #include "G4Neutron.hh"35 #include "G4PreCompoundParameters.hh"36 #include "Randomize.hh"37 38 40 #include "G4NeutronCoulombBarrier.hh" 39 40 41 41 42 class G4HETCNeutron : public G4HETCFragment 42 43 { 43 44 public: 44 // default constructor45 G4HETCNeutron() : G4HETCFragment(1,0,&theNeutronCoulomBarrier,"Neutron") {}46 45 47 // copy constructor 48 G4HETCNeutron(const G4HETCNeutron &right): G4HETCFragment(right) {} 46 G4HETCNeutron(); 49 47 50 // destructor 51 ~G4HETCNeutron() {} 48 ~G4HETCNeutron(); 49 50 virtual G4double GetKineticEnergy(const G4Fragment & aFragment); 51 52 protected: 53 54 virtual G4double GetAlpha(); 55 56 virtual G4double GetBeta(); 57 58 virtual G4double GetSpinFactor(); 59 60 virtual G4double K(const G4Fragment & aFragment); 61 62 private: 52 63 53 64 // operators 54 const G4HETCNeutron & operator=(const G4HETCNeutron &right) {55 if (&right != this) this->G4HETCFragment::operator=(right);56 return *this;57 }65 G4HETCNeutron(const G4HETCNeutron &right); 66 const G4HETCNeutron & operator=(const G4HETCNeutron &right); 67 G4bool operator==(const G4HETCNeutron &right) const; 68 G4bool operator!=(const G4HETCNeutron &right) const; 58 69 59 G4bool operator==(const G4HETCNeutron &right) const 60 { return G4HETCFragment::operator==(right);} 70 G4NeutronCoulombBarrier theNeutronCoulombBarrier; 61 71 62 G4bool operator!=(const G4HETCNeutron &right) const63 { return G4HETCFragment::operator!=(right);}64 65 66 G4ReactionProduct * GetReactionProduct() const67 {68 G4ReactionProduct * theReactionProduct =69 new G4ReactionProduct(G4Neutron::NeutronDefinition());70 theReactionProduct->SetMomentum(GetMomentum().vect());71 theReactionProduct->SetTotalEnergy(GetMomentum().e());72 #ifdef PRECOMPOUND_TEST73 theReactionProduct->SetCreatorModel("G4PrecompoundModel");74 #endif75 return theReactionProduct;76 }77 78 virtual G4double GetKineticEnergy(const G4Fragment & aFragment);79 80 private:81 virtual G4double GetAlpha()82 {83 return 0.76+2.2/std::pow(GetRestA(),1.0/3.0);84 }85 86 virtual G4double GetBeta()87 {88 return (2.12/std::pow(GetRestA(),2.0/3.0)-0.05)*MeV/GetAlpha();89 }90 91 virtual G4double GetSpinFactor()92 {93 // (2s+1)94 return 2.0;95 }96 97 virtual G4double K(const G4Fragment& aFragment);98 99 private:100 101 G4NeutronCoulombBarrier theNeutronCoulomBarrier;102 103 72 }; 104 73 -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4HETCProton.hh
r819 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HETCProton.hh,v 1.3 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 26 29 // by V. Lara 30 // 31 // Modified: 32 // 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor 33 // the source, use G4Pow 27 34 28 35 #ifndef G4HETCProton_h … … 31 38 #include "G4HETCChargedFragment.hh" 32 39 #include "G4ReactionProduct.hh" 33 #include "G4Proton.hh"34 #include "G4PreCompoundParameters.hh"35 #include "Randomize.hh"36 37 40 #include "G4ProtonCoulombBarrier.hh" 38 39 41 40 42 class G4HETCProton : public G4HETCChargedFragment 41 43 { 42 44 public: 43 // default constructor44 G4HETCProton():G4HETCChargedFragment(1,1,&theProtonCoulombBarrier,"Proton") {}45 46 // copy constructor47 G4HETCProton(const G4HETCProton &right): G4HETCChargedFragment(right) {}48 45 49 // destructor 50 ~G4HETCProton() {}; 51 52 // operators 53 const G4HETCProton & operator=(const G4HETCProton &right) 54 { 55 if (&right != this) this->G4HETCChargedFragment::operator=(right); 56 return *this; 57 } 46 G4HETCProton(); 58 47 59 G4bool operator==(const G4HETCProton &right) const 60 { 61 return G4HETCChargedFragment::operator==(right); 62 } 48 ~G4HETCProton(); 63 49 64 65 G4bool operator!=(const G4HETCProton &right) const 66 { 67 return G4HETCChargedFragment::operator!=(right); 68 } 50 protected: 69 51 52 virtual G4double GetAlpha(); 70 53 71 G4ReactionProduct * GetReactionProduct() const 72 { 73 G4ReactionProduct * theReactionProduct = 74 new G4ReactionProduct(G4Proton::ProtonDefinition()); 75 theReactionProduct->SetMomentum(GetMomentum().vect()); 76 theReactionProduct->SetTotalEnergy(GetMomentum().e()); 77 #ifdef PRECOMPOUND_TEST 78 theReactionProduct->SetCreatorModel("G4PrecompoundModel"); 79 #endif 80 return theReactionProduct; 81 } 82 83 private: 84 virtual G4double GetAlpha() 85 { 86 G4double aZ = static_cast<G4double>(GetRestZ()); 87 G4double C = 0.0; 88 if (aZ >= 70) 89 { 90 C = 0.10; 91 } 92 else 93 { 94 C = ((((0.15417e-06*aZ) - 0.29875e-04)*aZ + 0.21071e-02)*aZ - 0.66612e-01)*aZ + 0.98375; 95 } 96 return 1.0 + C; 97 } 98 99 virtual G4double GetBeta() 100 { 101 return -GetCoulombBarrier(); 102 } 103 104 virtual G4double GetSpinFactor() 105 { 106 // 2s+1 107 return 2.0; 108 } 54 virtual G4double GetBeta(); 55 56 virtual G4double GetSpinFactor(); 109 57 110 58 virtual G4double K(const G4Fragment & aFragment); 111 59 112 60 private: 61 62 // operators 63 G4HETCProton(const G4HETCProton &right); 64 const G4HETCProton & operator=(const G4HETCProton &right); 65 G4bool operator==(const G4HETCProton &right) const; 66 G4bool operator!=(const G4HETCProton &right) const; 113 67 114 68 G4ProtonCoulombBarrier theProtonCoulombBarrier; -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4HETCTriton.hh
r819 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HETCTriton.hh,v 1.3 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 26 29 // by V. Lara 30 // 31 // Modified: 32 // 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor 33 // the source, use G4Pow 27 34 28 35 #ifndef G4HETCTriton_h … … 31 38 #include "G4HETCChargedFragment.hh" 32 39 #include "G4ReactionProduct.hh" 33 #include "G4Triton.hh"34 35 40 #include "G4TritonCoulombBarrier.hh" 36 37 41 38 42 class G4HETCTriton : public G4HETCChargedFragment 39 43 { 40 44 public: 41 // default constructor42 G4HETCTriton():G4HETCChargedFragment(3,1,&theTritonCoulombBarrier,"Triton") {}43 45 44 // copy constructor 45 G4HETCTriton(const G4HETCTriton &right): G4HETCChargedFragment(right) {} 46 G4HETCTriton(); 46 47 47 // destructor 48 ~G4HETCTriton() {} 48 ~G4HETCTriton(); 49 50 protected: 51 52 virtual G4double GetAlpha(); 53 54 virtual G4double GetBeta(); 55 56 virtual G4double GetSpinFactor(); 57 58 virtual G4double K(const G4Fragment & aFragment); 59 60 private: 49 61 50 62 // operators 51 const G4HETCTriton & operator=(const G4HETCTriton &right) 52 { 53 if (&right != this) this->G4HETCChargedFragment::operator=(right); 54 return *this; 55 } 63 G4HETCTriton(const G4HETCTriton &right); 64 const G4HETCTriton & operator=(const G4HETCTriton &right); 65 G4bool operator==(const G4HETCTriton &right) const; 66 G4bool operator!=(const G4HETCTriton &right) const; 56 67 57 G4bool operator==(const G4HETCTriton &right) const58 {59 return G4HETCChargedFragment::operator==(right);60 }61 62 63 G4bool operator!=(const G4HETCTriton &right) const64 {65 return G4HETCChargedFragment::operator!=(right);66 }67 68 69 G4ReactionProduct * GetReactionProduct() const70 {71 G4ReactionProduct * theReactionProduct =72 new G4ReactionProduct(G4Triton::TritonDefinition());73 theReactionProduct->SetMomentum(GetMomentum().vect());74 theReactionProduct->SetTotalEnergy(GetMomentum().e());75 #ifdef PRECOMPOUND_TEST76 theReactionProduct->SetCreatorModel("G4PrecompoundModel");77 #endif78 return theReactionProduct;79 }80 81 private:82 virtual G4double GetAlpha()83 {84 G4double C = 0.0;85 G4double aZ = GetZ() + GetRestZ();86 if (aZ >= 70)87 {88 C = 0.10;89 }90 else91 {92 C = ((((0.15417e-06*aZ) - 0.29875e-04)*aZ + 0.21071e-02)*aZ - 0.66612e-01)*aZ + 0.98375;93 }94 95 return 1.0 + C/3.0;96 }97 98 virtual G4double GetBeta()99 {100 return -GetCoulombBarrier();101 }102 103 104 105 virtual G4double GetSpinFactor()106 {107 // 2s+1108 return 2.0;109 }110 111 virtual G4double K(const G4Fragment& aFragment);112 113 private:114 115 68 G4TritonCoulombBarrier theTritonCoulombBarrier; 116 117 69 }; 118 70 -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4LowEIonFragmentation.hh
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4LowEIonFragmentation.hh,v 1. 5 2010/06/11 15:34:18vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 4-beta-01$26 // $Id: G4LowEIonFragmentation.hh,v 1.6 2010/08/20 07:42:19 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 28 // 29 29 //--------------------------------------------------------------------------- 30 30 // 31 // $Id: G4LowEIonFragmentation.hh,v 1. 5 2010/06/11 15:34:18vnivanch Exp $32 // GEANT4 tag $Name: geant4-09-0 4-beta-01$31 // $Id: G4LowEIonFragmentation.hh,v 1.6 2010/08/20 07:42:19 vnivanch Exp $ 32 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 33 33 // 34 34 // ClassName: G4LowEIonFragmentation … … 57 57 G4LowEIonFragmentation(); 58 58 59 ~G4LowEIonFragmentation();59 virtual ~G4LowEIonFragmentation(); 60 60 61 private: 62 63 G4LowEIonFragmentation(const G4LowEIonFragmentation &); 64 65 const G4LowEIonFragmentation& operator=(const G4LowEIonFragmentation &right); 66 67 G4bool operator==(const G4LowEIonFragmentation &right) const; 68 69 G4bool operator!=(const G4LowEIonFragmentation &right) const; 70 71 public: 72 73 G4HadFinalState * ApplyYourself(const G4HadProjectile & thePrimary, G4Nucleus & theNucleus); 61 virtual G4HadFinalState * ApplyYourself(const G4HadProjectile & thePrimary, 62 G4Nucleus & theNucleus); 74 63 75 64 static G4double GetCrossSection() 76 65 { 77 // clog << "area/millibarn = "<<area/millibarn<<G4endl;78 // clog << "hits = "<<hits<<G4endl;79 // clog << "totalTries = "<<totalTries<<G4endl;66 // clog << "area/millibarn = "<<area/millibarn<<G4endl; 67 // clog << "hits = "<<hits<<G4endl; 68 // clog << "totalTries = "<<totalTries<<G4endl; 80 69 return area*static_cast<G4double>(hits)/static_cast<G4double>(totalTries)/millibarn; 81 70 } 71 82 72 private: 83 73 74 G4LowEIonFragmentation(const G4LowEIonFragmentation &); 75 const G4LowEIonFragmentation& operator=(const G4LowEIonFragmentation &right); 76 G4bool operator==(const G4LowEIonFragmentation &right) const; 77 G4bool operator!=(const G4LowEIonFragmentation &right) const; 78 79 // Members 84 80 85 81 G4HadFinalState theResult; … … 89 85 90 86 private: 87 91 88 static G4int hits; 92 89 static G4int totalTries; -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundAlpha.hh
r962 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PreCompoundAlpha.hh,v 1.12 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 26 29 // by V. Lara 27 30 // 28 //J. M. Quesada (July 08) 29 31 // Modified: 32 // J. M. Quesada (July 08) cleanup 33 // 20.08.2010 V.Ivanchenko added int Z and A and cleanup; added 34 // G4ParticleDefinition to constructor, 35 // moved constructor and destructor to source 30 36 31 37 #ifndef G4PreCompoundAlpha_h … … 33 39 34 40 #include "G4PreCompoundIon.hh" 35 #include "G4ReactionProduct.hh"36 #include "G4Alpha.hh"37 41 #include "G4AlphaCoulombBarrier.hh" 38 #include "G4PreCompoundParameters.hh"39 42 40 43 class G4PreCompoundAlpha : public G4PreCompoundIon 41 44 { 42 45 public: 43 // default constructor44 G4PreCompoundAlpha():G4PreCompoundIon(4,2,&theAlphaCoulombBarrier,"Alpha") {}45 46 46 // copy constructor 47 G4PreCompoundAlpha(const G4PreCompoundAlpha &right): G4PreCompoundIon(right){} 47 G4PreCompoundAlpha(); 48 48 49 // destructor 50 ~G4PreCompoundAlpha() {} 49 virtual ~G4PreCompoundAlpha(); 51 50 52 // operators 53 const G4PreCompoundAlpha & operator=(const G4PreCompoundAlpha &right) { 54 if (&right != this) this->G4PreCompoundIon::operator=(right); 55 return *this; 56 }; 51 protected: 57 52 58 G4bool operator==(const G4PreCompoundAlpha &right) const 59 { return G4PreCompoundIon::operator==(right);} 53 virtual G4double GetRj(G4int NumberParticles, G4int NumberCharged); 60 54 55 virtual G4double CrossSection(G4double ekin) ; 56 57 virtual G4double FactorialFactor(G4int N, G4int P); 58 59 virtual G4double CoalescenceFactor(G4int A); 60 61 virtual G4double GetAlpha(); 62 63 G4double GetOpt12(G4double K); 64 65 G4double GetOpt34(G4double K); 61 66 62 G4bool operator!=(const G4PreCompoundAlpha &right) const63 { return G4PreCompoundIon::operator!=(right);}64 65 66 G4ReactionProduct * GetReactionProduct() const;67 68 67 private: 69 68 70 virtual G4double GetRj(const G4int NumberParticles, const G4int NumberCharged); 69 // operators 70 G4PreCompoundAlpha(const G4PreCompoundAlpha &right); 71 const G4PreCompoundAlpha& 72 operator= (const G4PreCompoundAlpha &right); 73 G4int operator==(const G4PreCompoundAlpha &right) const; 74 G4int operator!=(const G4PreCompoundAlpha &right) const; 71 75 72 virtual G4double CrossSection(const G4double K) ; 73 74 virtual G4double FactorialFactor(const G4double N, const G4double P); 75 76 virtual G4double CoalescenceFactor(const G4double A); 77 78 G4double GetOpt0(const G4double K); 79 G4double GetOpt12(const G4double K); 80 G4double GetOpt34(const G4double K); 81 82 G4double GetAlpha(); 83 84 G4double GetBeta(); 85 86 //data members 87 88 G4AlphaCoulombBarrier theAlphaCoulombBarrier; 89 G4double ResidualA; 90 G4double ResidualZ; 91 G4double theA; 92 G4double theZ; 93 G4double ResidualAthrd; 94 G4double FragmentA; 95 G4double FragmentAthrd; 76 G4AlphaCoulombBarrier theAlphaCoulombBarrier; 77 G4double ResidualAthrd; 78 G4double FragmentAthrd; 79 G4int FragmentA; 80 G4int ResidualA; 81 G4int ResidualZ; 82 G4int theA; 83 G4int theZ; 96 84 97 85 }; -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundDeuteron.hh
r962 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PreCompoundDeuteron.hh,v 1.13 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 26 29 // by V. Lara 27 30 // 28 //J. M. Quesada (July 08) 31 // Modified: 32 // J. M. Quesada (July 08) cleanup 33 // 20.08.2010 V.Ivanchenko added int Z and A and cleanup; added 34 // G4ParticleDefinition to constructor, 35 // moved constructor and destructor to source 29 36 30 37 #ifndef G4PreCompoundDeuteron_h … … 32 39 33 40 #include "G4PreCompoundIon.hh" 34 #include "G4ReactionProduct.hh"35 #include "G4Deuteron.hh"36 41 #include "G4DeuteronCoulombBarrier.hh" 37 #include "G4PreCompoundParameters.hh"38 39 42 40 43 class G4PreCompoundDeuteron : public G4PreCompoundIon 41 44 { 42 45 public: 43 // default constructor44 G4PreCompoundDeuteron():G4PreCompoundIon(2,1,&theDeuteronCoulombBarrier,"Deuteron") {}45 46 46 // copy constructor 47 G4PreCompoundDeuteron(const G4PreCompoundDeuteron &right): G4PreCompoundIon(right) {} 47 G4PreCompoundDeuteron(); 48 48 49 // destructor 50 ~G4PreCompoundDeuteron() {} 49 ~G4PreCompoundDeuteron(); 51 50 52 // operators 53 const G4PreCompoundDeuteron & operator=(const G4PreCompoundDeuteron &right) { 54 if (&right != this) this->G4PreCompoundIon::operator=(right); 55 return *this; 56 } 51 protected: 57 52 58 G4bool operator==(const G4PreCompoundDeuteron &right) const 59 { return G4PreCompoundIon::operator==(right);} 53 virtual G4double GetRj(G4int NumberParticles, G4int NumberCharged); 60 54 55 virtual G4double CrossSection(G4double ekin); 56 57 virtual G4double FactorialFactor(G4int N, G4int P); 58 59 virtual G4double CoalescenceFactor(G4int A); 60 61 virtual G4double GetAlpha(); 61 62 62 G4bool operator!=(const G4PreCompoundDeuteron &right) const 63 { return G4PreCompoundIon::operator!=(right);} 63 G4double GetOpt12(G4double K); 64 64 65 G4double GetOpt34(G4double K); 65 66 66 G4ReactionProduct * GetReactionProduct() const;67 68 69 67 private: 70 68 71 virtual G4double GetRj(const G4int NumberParticles, const G4int NumberCharged); 69 // operators 70 G4PreCompoundDeuteron(const G4PreCompoundDeuteron &right); 71 const G4PreCompoundDeuteron& 72 operator= (const G4PreCompoundDeuteron &right); 73 G4int operator==(const G4PreCompoundDeuteron &right) const; 74 G4int operator!=(const G4PreCompoundDeuteron &right) const; 72 75 73 virtual G4double CrossSection(const G4double K) ; 76 G4DeuteronCoulombBarrier theDeuteronCoulombBarrier; 77 G4int ResidualA; 78 G4int ResidualZ; 79 G4int theA; 80 G4int theZ; 81 G4int FragmentA; 82 G4double ResidualAthrd; 83 G4double FragmentAthrd; 84 }; 74 85 75 virtual G4double FactorialFactor(const G4double N, const G4double P);76 77 virtual G4double CoalescenceFactor(const G4double A);78 79 G4double GetOpt0(const G4double K);80 G4double GetOpt12(const G4double K);81 G4double GetOpt34(const G4double K);82 83 G4double GetAlpha();84 85 G4double GetBeta();86 87 //data members88 89 G4DeuteronCoulombBarrier theDeuteronCoulombBarrier;90 G4double ResidualA;91 G4double ResidualZ;92 G4double theA;93 G4double theZ;94 G4double ResidualAthrd;95 G4double FragmentA;96 G4double FragmentAthrd;97 98 };99 86 #endif 100 87 -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundEmission.hh
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PreCompoundEmission.hh,v 1. 7 2009/11/12 14:33:44 gunterExp $27 // GEANT4 tag $Name: geant4-09-0 4-beta-01$26 // $Id: G4PreCompoundEmission.hh,v 1.9 2010/09/01 14:51:21 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 28 // 29 29 // Hadronic Process: Nuclear Preequilibrium … … 34 34 // JMQ (06 September 2008) Also external choice has been added for: 35 35 // - superimposed Coulomb barrier (if useSICB=true) 36 // 20.08.2010 V.Ivanchenko added G4Pow and G4PreCompoundParameters pointers 37 // use int Z and A and cleanup; 38 // inline methods moved from icc file to hh 36 39 37 40 #ifndef G4PreCompoundEmission_h … … 41 44 #include "G4ReactionProduct.hh" 42 45 #include "G4Fragment.hh" 43 #include "Randomize.hh"44 #include "G4PreCompoundParameters.hh"45 46 #include "G4PreCompoundFragmentVector.hh" 46 47 47 48 class G4VPreCompoundEmissionFactory; 48 49 50 class G4Pow; 51 class G4PreCompoundParameters; 49 52 50 53 class G4PreCompoundEmission 51 54 { 52 55 public: 56 53 57 G4PreCompoundEmission(); 58 54 59 ~G4PreCompoundEmission(); 55 60 61 void SetDefaultModel(); 62 63 void SetHETCModel(); 64 65 G4ReactionProduct * PerformEmission(G4Fragment & aFragment); 66 67 inline G4double GetTotalProbability(const G4Fragment & aFragment); 68 69 inline void Initialize(const G4Fragment & aFragment); 70 71 inline void SetOPTxs(G4int); 72 73 inline void UseSICB(G4bool); 74 56 75 private: 76 77 void AngularDistribution(G4VPreCompoundFragment * theFragment, 78 const G4Fragment& aFragment, 79 G4double KineticEnergy); 80 81 G4double rho(G4int p, G4int h, G4double g, G4double E, G4double Ef) const; 82 57 83 G4PreCompoundEmission(const G4PreCompoundEmission &right); 58 84 const G4PreCompoundEmission& operator=(const G4PreCompoundEmission &right); … … 60 86 G4bool operator!=(const G4PreCompoundEmission &right) const; 61 87 62 public:63 64 inline void SetUp(const G4Fragment & aFragment);65 inline void Initialize(const G4Fragment & aFragment);66 67 inline G4double GetTotalProbability(const G4Fragment & aFragment);68 69 G4ReactionProduct * PerformEmission(G4Fragment & aFragment);70 71 void SetDefaultModel();72 void SetHETCModel();73 74 private:75 76 G4ThreeVector AngularDistribution(G4VPreCompoundFragment * theFragment,77 const G4Fragment& aFragment,78 const G4double KineticEnergy) const;79 80 81 82 G4double rho(const G4double p, const G4double h, const G4double g,83 const G4double E, const G4double Ef) const;84 85 G4double factorial(G4double a) const;86 G4double logfactorial(G4double a) const;87 88 //for inverse cross section choice89 public:90 inline void SetOPTxs(G4int);91 //for superimposed CoulomBarrier for inverse cross sections92 inline void UseSICB(G4bool);93 94 95 88 //============== 96 89 // Data Members 97 90 //============== 91 92 G4Pow* g4pow; 93 G4PreCompoundParameters* theParameters; 98 94 99 95 // A vector with the allowed emission fragments … … 101 97 G4VPreCompoundEmissionFactory * theFragmentsFactory; 102 98 103 // Projectile energy 104 G4double ProjEnergy; 105 106 // Projectile direction 107 G4ThreeVector theIncidentDirection; 108 99 // Momentum of emitted fragment 100 G4ThreeVector theFinalMomentum; 109 101 }; 110 102 111 #include "G4PreCompoundEmission.icc" 103 inline G4double 104 G4PreCompoundEmission::GetTotalProbability(const G4Fragment& aFragment) 105 { 106 return theFragmentsVector->CalculateProbabilities(aFragment); 107 } 108 109 inline void 110 G4PreCompoundEmission::Initialize(const G4Fragment& aFragment) 111 { 112 theFragmentsVector->Initialize(aFragment); 113 } 114 115 inline void G4PreCompoundEmission::SetOPTxs(G4int opt) 116 { 117 theFragmentsVector->SetOPTxs(opt); 118 } 119 120 inline void G4PreCompoundEmission::UseSICB(G4bool use) 121 { 122 theFragmentsVector->UseSICB(use); 123 } 112 124 113 125 #endif -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundEmission.icc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PreCompoundEmission.icc,v 1. 5 2009/02/10 16:01:37vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 4-beta-01$26 // $Id: G4PreCompoundEmission.icc,v 1.6 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 28 // 29 29 // … … 36 36 // - superimposed Coulomb barrier (if useSICB=true) 37 37 38 inline void G4PreCompoundEmission::Initialize(const G4Fragment & aFragment)39 {40 theFragmentsVector->Initialize(aFragment);41 return;42 }43 38 44 inline G4double G4PreCompoundEmission::GetTotalProbability(const G4Fragment & aFragment)45 {46 return theFragmentsVector->CalculateProbabilities(aFragment);47 }48 49 inline void G4PreCompoundEmission::SetUp(const G4Fragment & aFragment)50 {51 // This should be the projectile energy. If I would know which is the projectile (proton, neutron)52 // I could remove the binding energy. But, what happens if INC precedes precompound? This approximation53 // seems to work well enough54 ProjEnergy = aFragment.GetExcitationEnergy();55 theIncidentDirection = aFragment.GetMomentum().vect().unit();56 theFragmentsVector->ResetStage();57 return;58 }59 60 //for inverse cross section choice61 inline void G4PreCompoundEmission::SetOPTxs(G4int opt)62 {63 theFragmentsVector->SetOPTxs(opt);64 return;65 }66 //for superimposed Coumlomb Barrier for inverse cross sections67 inline void G4PreCompoundEmission::UseSICB(G4bool use)68 {69 theFragmentsVector->UseSICB(use);70 return;71 }72 -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundEmissionFactory.hh
r819 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PreCompoundEmissionFactory.hh,v 1.3 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 29 // 30 26 31 #ifndef G4PreCompoundEmissionFactory_hh 27 32 #define G4PreCompoundEmissionFactory_hh … … 29 34 #include "G4VPreCompoundEmissionFactory.hh" 30 35 31 32 36 class G4PreCompoundEmissionFactory : public G4VPreCompoundEmissionFactory 33 37 { 34 38 public: 35 39 36 G4PreCompoundEmissionFactory() {}; 37 virtual ~G4PreCompoundEmissionFactory() {}; 40 G4PreCompoundEmissionFactory(); 41 virtual ~G4PreCompoundEmissionFactory(); 42 43 protected: 44 45 virtual std::vector<G4VPreCompoundFragment*> * CreateFragmentVector(); 38 46 39 47 private: 40 48 41 G4PreCompoundEmissionFactory(const G4PreCompoundEmissionFactory & ) : G4VPreCompoundEmissionFactory() {}; 42 const G4PreCompoundEmissionFactory & operator=(const G4PreCompoundEmissionFactory & val); 49 G4PreCompoundEmissionFactory(const G4PreCompoundEmissionFactory & ); 50 const G4PreCompoundEmissionFactory & operator= 51 (const G4PreCompoundEmissionFactory & val); 43 52 G4bool operator==(const G4PreCompoundEmissionFactory & val) const; 44 53 G4bool operator!=(const G4PreCompoundEmissionFactory & val) const; 45 46 private:47 48 virtual std::vector<G4VPreCompoundFragment*> * CreateFragmentVector();49 54 50 55 }; -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundFragment.hh
r962 r1340 24 24 // ******************************************************************** 25 25 // 26 // J. M. Quesada (August 2008).27 // Based on previous work by V. Lara26 // $Id: G4PreCompoundFragment.hh,v 1.6 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 28 // 29 // Modif (03 September 2008) by J. M. Quesada for external choice of inverse 30 // cross section option (default OPTxs=2) 31 // JMQ (06 September 2008) Also external choice has been added for 32 // superimposed Coulomb barrier (if useSICB=true, default false) 33 29 // J. M. Quesada (August 2008). 30 // Based on previous work by V. Lara 31 // 32 // Modified: 33 // 03.09.2008 by J. M. Quesada for external choice of inverse 34 // cross section option (default OPTxs=2) 35 // 06.09.2008 by JMQ Also external choice has been added for 36 // superimposed Coulomb barrier (if useSICB=true, default false) 37 // 20.08.2010 V.Ivanchenko added int Z and A and cleanup; added 38 // G4ParticleDefinition to constructor 34 39 35 40 #ifndef G4PreCompoundFragment_h … … 40 45 class G4PreCompoundFragment : public G4VPreCompoundFragment 41 46 { 42 protected:43 // default constructor44 G4PreCompoundFragment() {};45 46 47 public: 47 // copy constructor 48 G4PreCompoundFragment(const G4PreCompoundFragment &right); 49 50 // constructor 51 G4PreCompoundFragment(const G4double anA, const G4double aZ, 52 G4VCoulombBarrier * aCoulombBarrier, 53 const G4String & aName); 48 49 G4PreCompoundFragment(const G4ParticleDefinition*, 50 G4VCoulombBarrier * aCoulombBarrier); 54 51 55 52 virtual ~G4PreCompoundFragment(); 56 57 // ==========58 // operators59 // ==========60 61 const G4PreCompoundFragment&62 operator= (const G4PreCompoundFragment &right);63 64 G4int operator==(const G4PreCompoundFragment &right) const;65 66 G4int operator!=(const G4PreCompoundFragment &right) const;67 53 68 public:69 70 // Initialization method71 // void Initialize(const G4Fragment & aFragment);72 73 54 // ================================================ 74 55 // Methods for calculating the emission probability … … 81 62 G4double GetKineticEnergy(const G4Fragment & aFragment); 82 63 64 protected: 65 66 virtual G4double 67 ProbabilityDistributionFunction(G4double K, 68 const G4Fragment & aFragment) = 0; 69 83 70 private: 84 71 // This method performs integration for probability function over 85 72 // fragment kinetic energy 86 G4double IntegrateEmissionProbability( const G4double &Low,87 const G4double &Up,73 G4double IntegrateEmissionProbability(G4double Low, 74 G4double Up, 88 75 const G4Fragment & aFragment); 89 protected:90 76 91 virtual G4double 92 ProbabilityDistributionFunction(const G4double K, 93 const G4Fragment & aFragment) = 0; 77 // default constructor 78 G4PreCompoundFragment(); 79 // operators 80 G4PreCompoundFragment(const G4PreCompoundFragment &right); 81 const G4PreCompoundFragment& 82 operator= (const G4PreCompoundFragment &right); 83 G4int operator==(const G4PreCompoundFragment &right) const; 84 G4int operator!=(const G4PreCompoundFragment &right) const; 94 85 95 86 }; -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundFragmentVector.hh
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4PreCompoundFragmentVector.hh,v 1.6 2009/02/10 16:01:37 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 26 // $Id: G4PreCompoundFragmentVector.hh,v 1.7 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 28 // 30 29 // Hadronic Process: Nuclear Preequilibrium 31 30 // by V. Lara 32 31 // 33 // Modif (03 September 2008) by J. M. Quesada for external choice of inverse 32 // Modified: 33 // 03.09.2008 by J. M. Quesada for external choice of inverse 34 34 // cross section option 35 // JMQ (06 September 2008) Also external choice has been added for: 36 // - superimposed Coulomb barrier (if useSICB=true) 35 // 06.09.2008 JMQ Also external choice has been added for: 36 // - superimposed Coulomb barrier (if useSICB=true) 37 // 27.08.2010 V.Ivanchenko simplify and make more efficient by adding extra 38 // vector of probabilities, moved constructor and destructor to source, 39 // simplify run time computations making inlined 40 // 37 41 38 42 #ifndef G4PreCompoundFragmentVector_h … … 40 44 41 45 #include "G4VPreCompoundFragment.hh" 46 #include "G4DataVector.hh" 47 #include "Randomize.hh" 48 #include "globals.hh" 49 #include <vector> 50 51 typedef std::vector<G4VPreCompoundFragment*> pcfvector; 42 52 43 53 class G4PreCompoundFragmentVector 44 54 { 45 typedef std::vector<G4VPreCompoundFragment*> pcfvector;46 55 public: 47 inline G4PreCompoundFragmentVector(pcfvector * avector); 48 inline ~G4PreCompoundFragmentVector(); 49 56 57 G4PreCompoundFragmentVector(pcfvector * avector); 58 59 ~G4PreCompoundFragmentVector(); 60 61 void SetVector(pcfvector * avector); 62 63 void SetOPTxs(G4int); 64 65 void UseSICB(G4bool); 66 67 inline void Initialize(const G4Fragment & aFragment); 68 69 inline G4double CalculateProbabilities(const G4Fragment & aFragment); 70 71 inline G4VPreCompoundFragment * ChooseFragment(); 72 50 73 private: 74 51 75 G4PreCompoundFragmentVector(const G4PreCompoundFragmentVector &right); 52 76 const G4PreCompoundFragmentVector& … … 55 79 G4bool operator!=(const G4PreCompoundFragmentVector &right) const; 56 80 57 public: 81 pcfvector * theChannels; 82 G4DataVector probabilities; 58 83 59 inline void Initialize(const G4Fragment & aFragment); 60 inline void ResetStage(); 61 inline void SetVector(pcfvector * avector); 62 63 G4double CalculateProbabilities(const G4Fragment & aFragment); 64 65 G4VPreCompoundFragment * ChooseFragment(void); 66 67 private: 68 69 pcfvector * theChannels; 70 71 G4double TotalEmissionProbability; 72 73 //for inverse cross section choice 74 public: 75 inline void SetOPTxs(G4int); 76 //for superimposed CoulomBarrier for inverse cross sections 77 inline void UseSICB(G4bool); 78 84 G4int nChannels; 79 85 80 86 }; 81 87 82 #include "G4PreCompoundFragmentVector.icc" 88 inline void 89 G4PreCompoundFragmentVector::Initialize(const G4Fragment & aFragment) 90 { 91 for (G4int i=0; i< nChannels; ++i) { 92 (*theChannels)[i]->Initialize(aFragment); 93 } 94 } 95 96 inline G4double 97 G4PreCompoundFragmentVector::CalculateProbabilities(const G4Fragment & aFragment) 98 { 99 //G4cout << "## G4PreCompoundFragmentVector::CalculateProbabilities" << G4endl; 100 G4double probtot = 0.0; 101 for (G4int i=0; i< nChannels; ++i) { 102 G4double prob = (*theChannels)[i]->CalcEmissionProbability(aFragment); 103 probtot += prob; 104 probabilities[i] = probtot; 105 //G4cout<<" prob= "<<prob<<" for "<<(*theChannels)[i]->GetName()<<G4endl; 106 } 107 return probtot; 108 } 109 110 inline G4VPreCompoundFragment* G4PreCompoundFragmentVector::ChooseFragment() 111 { 112 G4double x = probabilities[nChannels-1]*G4UniformRand(); 113 G4int i=0; 114 for (; i<nChannels; ++i) { 115 if(x <= probabilities[i]) { break; } 116 } 117 return (*theChannels)[i]; 118 } 83 119 84 120 #endif -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundFragmentVector.icc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4PreCompoundFragmentVector.icc,v 1. 4 2008/09/22 10:18:36 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 4-beta-01$27 // $Id: G4PreCompoundFragmentVector.icc,v 1.5 2010/08/28 15:16:55 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 29 // 30 30 // Hadronic Process: Nuclear Preequilibrium … … 36 36 // - superimposed Coulomb barrier (if useSICB=true) 37 37 38 inline G4PreCompoundFragmentVector::G4PreCompoundFragmentVector(pcfvector * avector) :39 theChannels(avector), TotalEmissionProbability(0.0)40 {41 }42 38 43 44 inline G4PreCompoundFragmentVector::~G4PreCompoundFragmentVector()45 {46 }47 48 inline void G4PreCompoundFragmentVector::SetVector(pcfvector * avector)49 {50 theChannels = avector;51 }52 53 inline void54 G4PreCompoundFragmentVector::55 Initialize(const G4Fragment & aFragment)56 {57 TotalEmissionProbability = 0.0;58 for (pcfvector::iterator i=theChannels->begin();59 i != theChannels->end(); i++) (*i)->Initialize(aFragment);60 return;61 }62 63 inline void G4PreCompoundFragmentVector::64 ResetStage()65 {66 for (pcfvector::iterator i=theChannels->begin(); i != theChannels->end(); i++)67 (*i)->ResetStage();68 return;69 }70 71 //for inverse cross section choice72 inline void G4PreCompoundFragmentVector::73 SetOPTxs(G4int opt)74 {75 for (pcfvector::iterator i = theChannels->begin(); i != theChannels->end(); ++i)76 (*i)->SetOPTxs(opt);77 return;78 }79 80 //for superimposed Coulomb Barrier for inverse cross sections81 inline void G4PreCompoundFragmentVector::82 UseSICB(G4bool use)83 {84 for (pcfvector::iterator i = theChannels->begin(); i != theChannels->end(); ++i)85 (*i)->UseSICB(use);86 return;87 } -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundHe3.hh
r962 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PreCompoundHe3.hh,v 1.11 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 26 29 // by V. Lara 27 30 // 28 //J. M. Quesada (July 08) 31 // Modified: 32 // J. M. Quesada (July 08) cleanup 33 // 20.08.2010 V.Ivanchenko added int Z and A and cleanup; added 34 // G4ParticleDefinition to constructor, 35 // moved constructor and destructor to source 29 36 30 37 #ifndef G4PreCompoundHe3_h … … 32 39 33 40 #include "G4PreCompoundIon.hh" 34 #include "G4ReactionProduct.hh"35 #include "G4He3.hh"36 41 #include "G4He3CoulombBarrier.hh" 37 #include "G4PreCompoundParameters.hh"38 42 39 43 class G4PreCompoundHe3 : public G4PreCompoundIon 40 44 { 41 45 public: 42 // default constructor43 G4PreCompoundHe3():G4PreCompoundIon(3,2,&theHe3CoulombBarrier,"He3") {}44 46 45 // copy constructor 46 G4PreCompoundHe3(const G4PreCompoundHe3 &right): G4PreCompoundIon(right) {} 47 G4PreCompoundHe3(); 47 48 48 // destructor 49 ~G4PreCompoundHe3() {} 49 virtual ~G4PreCompoundHe3(); 50 50 51 // operators 52 const G4PreCompoundHe3 & operator=(const G4PreCompoundHe3 &right) { 53 if (&right != this) this->G4PreCompoundIon::operator=(right); 54 return *this; 55 } 51 protected: 56 52 57 G4bool operator==(const G4PreCompoundHe3 &right) const 58 { return G4PreCompoundIon::operator==(right);} 53 virtual G4double GetRj(G4int NumberParticles, G4int NumberCharged); 59 54 55 virtual G4double CrossSection(G4double ekin) ; 56 57 virtual G4double FactorialFactor(G4int N, G4int P); 58 59 virtual G4double CoalescenceFactor(G4int A); 60 61 virtual G4double GetAlpha(); 60 62 61 G4bool operator!=(const G4PreCompoundHe3 &right) const 62 { return G4PreCompoundIon::operator!=(right);} 63 G4double GetOpt12(G4double K); 63 64 64 65 G4ReactionProduct * GetReactionProduct() const; 66 65 G4double GetOpt34(G4double K); 67 66 68 67 private: 69 68 70 virtual G4double GetRj(const G4int NumberParticles, const G4int NumberCharged); 69 // operators 70 G4PreCompoundHe3(const G4PreCompoundHe3 &right); 71 const G4PreCompoundHe3& 72 operator= (const G4PreCompoundHe3 &right); 73 G4int operator==(const G4PreCompoundHe3 &right) const; 74 G4int operator!=(const G4PreCompoundHe3 &right) const; 71 75 72 virtual G4double CrossSection(const G4double K) ; 76 G4He3CoulombBarrier theHe3CoulombBarrier; 77 G4double ResidualAthrd; 78 G4double FragmentAthrd; 79 G4int FragmentA; 80 G4int ResidualA; 81 G4int ResidualZ; 82 G4int theA; 83 G4int theZ; 84 }; 73 85 74 virtual G4double FactorialFactor(const G4double N, const G4double P);75 76 virtual G4double CoalescenceFactor(const G4double A);77 78 G4double GetOpt0(const G4double K);79 G4double GetOpt12(const G4double K);80 G4double GetOpt34(const G4double K);81 82 G4double GetAlpha();83 84 G4double GetBeta();85 86 //data members87 88 G4He3CoulombBarrier theHe3CoulombBarrier;89 G4double ResidualA;90 G4double ResidualZ;91 G4double theA;92 G4double theZ;93 G4double ResidualAthrd;94 G4double FragmentA;95 G4double FragmentAthrd;96 97 98 };99 86 #endif 100 87 -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundIon.hh
r962 r1340 24 24 // ******************************************************************** 25 25 // 26 // J. M. Quesada (August 2008).27 // Based on previous work by V. Lara26 // $Id: G4PreCompoundIon.hh,v 1.8 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 28 // 29 // J. M. Quesada (August 2008). 30 // Based on previous work by V. Lara 31 // 32 // Modified: 33 // 20.08.2010 V.Ivanchenko added int Z and A and cleanup; added 34 // G4ParticleDefinition to constructor, 35 // moved constructor and destructor to source, 36 // added inline methods 29 37 30 38 #ifndef G4PreCompoundIon_h … … 35 43 class G4PreCompoundIon : public G4PreCompoundFragment 36 44 { 37 protected:38 // default constructor39 G4PreCompoundIon() {}40 41 45 public: 42 46 43 // copy constructor 44 G4PreCompoundIon(const G4PreCompoundIon &right): 45 G4PreCompoundFragment(right) {} 46 47 // constructor 48 G4PreCompoundIon(const G4double anA, 49 const G4double aZ, 50 G4VCoulombBarrier* aCoulombBarrier, 51 const G4String & aName): 52 G4PreCompoundFragment(anA,aZ,aCoulombBarrier,aName) {} 53 54 virtual ~G4PreCompoundIon() {} 55 56 // operators 57 const G4PreCompoundIon & 58 operator=(const G4PreCompoundIon &right) 59 { 60 if (&right != this) this->G4PreCompoundFragment::operator=(right); 61 return *this; 62 } 63 64 G4bool operator==(const G4PreCompoundIon &right) const 65 { 66 return G4PreCompoundFragment::operator==(right); 67 } 68 69 G4bool operator!=(const G4PreCompoundIon &right) const 70 { 71 return G4PreCompoundFragment::operator!=(right); 72 } 73 74 virtual G4double ProbabilityDistributionFunction(const G4double eKin, 75 const G4Fragment& aFragment); 47 G4PreCompoundIon(const G4ParticleDefinition*, 48 G4VCoulombBarrier * aCoulombBarrier); 49 50 virtual ~G4PreCompoundIon(); 76 51 77 private: 52 protected: 53 54 virtual G4double 55 ProbabilityDistributionFunction(G4double eKin, 56 const G4Fragment& aFragment); 78 57 79 G4bool IsItPossible(const G4Fragment& aFragment) ; 80 81 protected: 58 virtual G4double CrossSection(G4double ekin) = 0; 82 59 83 virtual G4double CrossSection(const G4double ekin)=0; 60 virtual G4double 61 GetRj(G4int NumberParticles, G4int NumberCharged) = 0; 84 62 85 virtual G4double GetRj(const G4int NumberParticles, const G4int NumberCharged) = 0;63 virtual G4double FactorialFactor(G4int N, G4int P) = 0; 86 64 87 virtual G4double FactorialFactor(const G4double N, const G4double P) = 0;65 virtual G4double CoalescenceFactor(G4int A) = 0; 88 66 89 virtual G4double CoalescenceFactor(const G4double A) = 0;67 virtual G4double GetAlpha() = 0; 90 68 91 }; 69 inline G4double GetBeta(); 70 71 inline G4double GetOpt0(G4double ekin); 72 73 private: 74 75 // default constructor 76 G4PreCompoundIon(); 77 // operators 78 G4PreCompoundIon(const G4PreCompoundIon &right); 79 const G4PreCompoundIon& 80 operator= (const G4PreCompoundIon &right); 81 G4int operator==(const G4PreCompoundIon &right) const; 82 G4int operator!=(const G4PreCompoundIon &right) const; 83 84 G4double fact; 85 }; 86 87 inline G4double G4PreCompoundIon::GetBeta() 88 { 89 return -GetCoulombBarrier(); 90 } 91 92 // *********************** OPT=0 : Dostrovski's cross section *************** 93 inline G4double G4PreCompoundIon::GetOpt0(G4double K) 94 { 95 G4double r0 = theParameters->Getr0()*ResidualA13(); 96 // cross section is now given in mb (r0 is in mm) for the sake of consistency 97 //with the rest of the options 98 return 1.e+25*CLHEP::pi*r0*r0*ResidualA13()*GetAlpha()*(1.+GetBeta()/K); 99 } 92 100 93 101 #endif -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundModel.hh
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4PreCompoundModel.hh,v 1.7 2009/11/19 10:19:31 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 26 // $Id: G4PreCompoundModel.hh,v 1.9 2010/08/20 07:41:48 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 28 // 30 29 // by V. Lara 31 30 // 32 31 // Class Description 33 32 // Model implementation for pre-equilibrium decay models in geant4. … … 37 36 // Class Description - End 38 37 // 39 // Modif (03 September 2008) by J. M. Quesada for external choice of inverse 40 // cross section option.(default OPTxs=3) 41 // JMQ (06 September 2008) Also external choices have been added for: 38 // Modified: 39 // 03.09.2008 J.M.Quesada added external choice of inverse 40 // cross section option.(default OPTxs=3) 41 // 06.09.2008 J.M.Quesada external choices have been added for: 42 42 // - superimposed Coulomb barrier (if useSICB=true, default false) 43 43 // - "never go back" hipothesis (if useNGB=true, default false) 44 44 // - soft cutoff from preeq. to equlibrium (if useSCO=true, default false) 45 45 // - CEM transition probabilities (if useCEMtr=true) 46 // J. M. Quesada (30.10.09) : CEM transition probabilities are set as default 46 // 30.10.2009 J.M.Quesada CEM transition probabilities are set as default 47 // 20.08.2010 V.Ivanchenko Cleanup of the code - changed data members and inline methods 47 48 48 49 #ifndef G4PreCompoundModel_h … … 50 51 51 52 #include "G4VPreCompoundModel.hh" 52 #include "G4LorentzVector.hh"53 54 55 #include "G4NucleiProperties.hh"56 #include "G4PreCompoundParameters.hh"57 #include "G4ExcitationHandler.hh"58 53 #include "G4Fragment.hh" 59 #include "Randomize.hh"60 61 //#include "G4PreCompoundEmission.hh"62 63 #include "G4DynamicParticle.hh"64 54 #include "G4ReactionProductVector.hh" 65 55 #include "G4ReactionProduct.hh" 66 #include "G4ParticleTypes.hh" 67 #include "G4ParticleTable.hh" 56 #include "G4ExcitationHandler.hh" 68 57 69 //#define debug 70 //#define verbose 58 class G4PreCompoundParameters; 59 class G4PreCompoundEmission; 60 class G4VPreCompoundTransitions; 61 class G4ParticleDefinition; 71 62 72 63 class G4PreCompoundModel : public G4VPreCompoundModel 73 { 74 64 { 75 65 public: 76 66 … … 79 69 virtual ~G4PreCompoundModel(); 80 70 81 private: 71 virtual G4HadFinalState * ApplyYourself(const G4HadProjectile & thePrimary, 72 G4Nucleus & theNucleus); 82 73 83 G4PreCompoundModel();74 virtual G4ReactionProductVector* DeExcite(G4Fragment& aFragment); 84 75 85 G4PreCompoundModel(const G4PreCompoundModel &); 76 void UseHETCEmission(); 77 void UseDefaultEmission(); 78 void UseGNASHTransition(); 79 void UseDefaultTransition(); 86 80 87 const G4PreCompoundModel& operator=(const G4PreCompoundModel &right); 88 G4bool operator==(const G4PreCompoundModel &right) const; 89 G4bool operator!=(const G4PreCompoundModel &right) const; 81 //for cross section selection 82 void SetOPTxs(G4int opt); 90 83 91 public: 92 93 G4HadFinalState * ApplyYourself(const G4HadProjectile & thePrimary, G4Nucleus & theNucleus);94 95 G4ReactionProductVector* DeExcite(const G4Fragment& aFragment) const;84 //for the rest of external choices 85 void UseSICB(); 86 void UseNGB(); 87 void UseSCO(); 88 void UseCEMtr(); 96 89 97 90 #ifdef PRECOMPOUND_TEST … … 102 95 #endif 103 96 104 inline void UseHETCEmission() { useHETCEmission = true; }105 inline void UseDefaultEmission() { useHETCEmission = false; }106 inline void UseGNASHTransition() { useGNASHTransition = true; }107 inline void UseDefaultTransition() { useGNASHTransition = false; }108 109 //for cross section selection110 inline void SetOPTxs(G4int opt) { OPTxs = opt; }111 //for the rest of external choices112 inline void UseSICB() { useSICB = true; }113 inline void UseNGB() { useNGB = true; }114 inline void UseSCO() { useSCO = true; }115 inline void UseCEMtr() { useCEMtr = true; }116 97 private: 117 98 99 inline 118 100 void PerformEquilibriumEmission(const G4Fragment & aFragment, 119 101 G4ReactionProductVector * theResult) const; 120 102 121 private: 103 G4PreCompoundModel(); 104 G4PreCompoundModel(const G4PreCompoundModel &); 105 const G4PreCompoundModel& operator=(const G4PreCompoundModel &right); 106 G4bool operator==(const G4PreCompoundModel &right) const; 107 G4bool operator!=(const G4PreCompoundModel &right) const; 122 108 123 109 #ifdef debug … … 131 117 //============== 132 118 119 G4PreCompoundParameters* theParameters; 120 G4PreCompoundEmission* theEmission; 121 G4VPreCompoundTransitions* theTransition; 133 122 123 const G4ParticleDefinition* proton; 124 const G4ParticleDefinition* neutron; 134 125 135 G4bool useHETCEmission;136 G4bool useGNASHTransition;126 G4bool useHETCEmission; 127 G4bool useGNASHTransition; 137 128 138 //for cross section options129 //for cross section options 139 130 G4int OPTxs; 140 //for the rest of external choices 131 132 //for the rest of external choices 141 133 G4bool useSICB; 142 134 G4bool useNGB; … … 144 136 G4bool useCEMtr; 145 137 146 147 G4HadFinalState theResult; 138 G4HadFinalState theResult; 148 139 149 140 #ifdef PRECOMPOUND_TEST … … 151 142 static std::vector<G4String*> theCreatorModels; 152 143 #endif 144 }; 153 145 154 }; 146 inline void 147 G4PreCompoundModel::PerformEquilibriumEmission(const G4Fragment & aFragment, 148 G4ReactionProductVector * Result) const 149 { 150 G4ReactionProductVector* theEquilibriumResult = 151 GetExcitationHandler()->BreakItUp(aFragment); 152 Result->insert(Result->end(),theEquilibriumResult->begin(), theEquilibriumResult->end()); 153 delete theEquilibriumResult; 154 } 155 155 156 #endif 156 157 -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundNeutron.hh
r962 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PreCompoundNeutron.hh,v 1.13 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 26 28 // 27 //J. M. Quesada (July 08) 28 29 // by V. Lara 30 // 31 // Modified: 32 // J. M. Quesada (July 08) cleanup 33 // 20.08.2010 V.Ivanchenko added int Z and A and cleanup; added 34 // G4ParticleDefinition to constructor, 35 // moved constructor and destructor to source 29 36 30 37 #ifndef G4PreCompoundNeutron_h … … 32 39 33 40 #include "G4PreCompoundNucleon.hh" 34 #include "G4ReactionProduct.hh"35 #include "G4Neutron.hh"36 #include "G4PreCompoundParameters.hh"37 #include "Randomize.hh"38 41 #include "G4NeutronCoulombBarrier.hh" 39 40 42 41 43 class G4PreCompoundNeutron : public G4PreCompoundNucleon 42 44 { 43 45 public: 44 // default constructor45 G4PreCompoundNeutron() : G4PreCompoundNucleon(1,0,&theNeutronCoulombBarrier,"Neutron") {}46 46 47 // copy constructor 48 G4PreCompoundNeutron(const G4PreCompoundNeutron &right): G4PreCompoundNucleon(right) {} 47 G4PreCompoundNeutron(); 49 48 50 // destructor 51 ~G4PreCompoundNeutron() {} 49 virtual ~G4PreCompoundNeutron(); 52 50 53 // operators 54 const G4PreCompoundNeutron & operator=(const G4PreCompoundNeutron &right) { 55 if (&right != this) this->G4PreCompoundNucleon::operator=(right); 56 return *this; 57 } 51 protected: 58 52 59 G4bool operator==(const G4PreCompoundNeutron &right) const 60 { return G4PreCompoundNucleon::operator==(right);} 61 62 G4bool operator!=(const G4PreCompoundNeutron &right) const 63 { return G4PreCompoundNucleon::operator!=(right);} 53 virtual G4double GetRj(G4int NumberParticles, G4int NumberCharged); 64 54 55 virtual G4double CrossSection(G4double ekin); 65 56 66 G4ReactionProduct * GetReactionProduct() const; 67 57 virtual G4double GetAlpha(); 58 59 virtual G4double GetBeta(); 60 61 G4double GetOpt12(G4double K); 62 63 G4double GetOpt34(G4double K); 64 68 65 private: 69 66 70 virtual G4double GetRj(const G4int NumberParticles, const G4int NumberCharged); 67 // operators 68 G4PreCompoundNeutron(const G4PreCompoundNeutron &right); 69 const G4PreCompoundNeutron& 70 operator= (const G4PreCompoundNeutron &right); 71 G4int operator==(const G4PreCompoundNeutron &right) const; 72 G4int operator!=(const G4PreCompoundNeutron &right) const; 71 73 72 virtual G4double CrossSection(const G4double K); 73 74 75 G4double GetOpt0(const G4double K); 76 G4double GetOpt12(const G4double K); 77 G4double GetOpt34(const G4double K); 78 79 80 G4double GetAlpha(); 81 82 G4double GetBeta(); 83 84 //data members 85 86 G4NeutronCoulombBarrier theNeutronCoulombBarrier; 87 G4double ResidualA; 88 G4double ResidualZ; 89 G4double theA; 90 G4double theZ; 91 G4double ResidualAthrd; 92 G4double FragmentA; 93 G4double FragmentAthrd; 94 95 74 G4NeutronCoulombBarrier theNeutronCoulombBarrier; 75 G4double ResidualAthrd; 76 G4double FragmentAthrd; 77 G4int FragmentA; 78 G4int ResidualA; 79 G4int ResidualZ; 80 G4int theA; 81 G4int theZ; 96 82 }; 97 98 83 99 84 #endif -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundNucleon.hh
r962 r1340 24 24 // ******************************************************************** 25 25 // 26 // J. M. Quesada (August 2008).27 // Based on previous work by V. Lara26 // $Id: G4PreCompoundNucleon.hh,v 1.7 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 28 // 29 // J. M. Quesada (August 2008). 30 // Based on previous work by V. Lara 31 // 32 // Modified: 33 // 20.08.2010 V.Ivanchenko added int Z and A and cleanup; added 34 // G4ParticleDefinition to constructor 29 35 30 36 … … 36 42 class G4PreCompoundNucleon : public G4PreCompoundFragment 37 43 { 44 public: 45 46 G4PreCompoundNucleon(const G4ParticleDefinition*, 47 G4VCoulombBarrier * aCoulombBarrier); 48 49 virtual ~G4PreCompoundNucleon(); 50 51 protected: 52 53 virtual G4double 54 ProbabilityDistributionFunction(G4double eKin, 55 const G4Fragment& aFragment); 56 57 virtual G4double CrossSection(G4double ekin) = 0; 58 59 virtual G4double 60 GetRj(G4int NumberParticles, G4int NumberCharged) = 0; 61 62 virtual G4double GetAlpha() = 0; 63 64 virtual G4double GetBeta() = 0; 65 66 inline G4double GetOpt0(G4double ekin); 67 38 68 private: 69 39 70 // default constructor 40 G4PreCompoundNucleon() {}; 71 G4PreCompoundNucleon(); 72 // operators 73 G4PreCompoundNucleon(const G4PreCompoundNucleon &right); 74 const G4PreCompoundNucleon& 75 operator= (const G4PreCompoundNucleon &right); 76 G4int operator==(const G4PreCompoundNucleon &right) const; 77 G4int operator!=(const G4PreCompoundNucleon &right) const; 41 78 42 public: 43 44 // copy constructor 45 G4PreCompoundNucleon(const G4PreCompoundNucleon &right): 46 G4PreCompoundFragment(right) {} 79 G4double fact; 80 }; 47 81 48 // constructor 49 G4PreCompoundNucleon(const G4double anA, 50 const G4double aZ, 51 G4VCoulombBarrier* aCoulombBarrier, 52 const G4String & aName) : 53 G4PreCompoundFragment(anA,aZ,aCoulombBarrier,aName) {} 54 55 56 virtual ~G4PreCompoundNucleon() {} 57 58 // operators 59 const G4PreCompoundNucleon & 60 operator=(const G4PreCompoundNucleon &right) 61 { 62 if (&right != this) this->G4PreCompoundFragment::operator=(right); 63 return *this; 64 } 65 66 G4bool operator==(const G4PreCompoundNucleon &right) const 67 { 68 return G4PreCompoundFragment::operator==(right); 69 } 70 71 G4bool operator!=(const G4PreCompoundNucleon &right) const 72 { 73 return G4PreCompoundFragment::operator!=(right); 74 } 75 76 virtual G4double ProbabilityDistributionFunction(const G4double eKin, 77 const G4Fragment& aFragment); 78 79 private: 80 81 G4bool IsItPossible(const G4Fragment&) ; 82 83 protected: 84 85 virtual G4double CrossSection(const G4double ekin)=0; 86 87 virtual G4double GetRj(const G4int NumberParticles, const G4int NumberCharged) = 0; 88 89 }; 82 // *********************** OPT=0 : Dostrovski's cross section *************** 83 inline G4double G4PreCompoundNucleon::GetOpt0(G4double K) 84 { 85 G4double r0 = theParameters->Getr0()*ResidualA13(); 86 // cross section is now given in mb (r0 is in mm) for the sake of consistency 87 //with the rest of the options 88 return 1.e+25*CLHEP::pi*r0*r0*ResidualA13()*GetAlpha()*(1.+GetBeta()/K); 89 } 90 90 91 91 #endif -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundParameters.hh
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4PreCompoundParameters.hh,v 1.5 2008/05/08 10:34:25 quesada Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 26 // $Id: G4PreCompoundParameters.hh,v 1.6 2010/08/18 14:07:24 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 28 // 30 29 // by V. Lara 31 30 // 32 //J. M. Quesada (Apr. 2008) Level density set to A/10 at preequilibrium 33 31 // 01.04.2008 J. M. Quesada Level density set to A/10 at preequilibrium 32 // 18.08.2010 V.Ivanchenko make this class as a standard singleton 33 // 34 34 35 35 #ifndef G4PreCompoundParameters_h … … 40 40 class G4PreCompoundParameters 41 41 { 42 private:43 static G4PreCompoundParameters thePreCompoundParameters;44 45 // default constructor46 // G4PreCompoundParameters() : theLevelDensity(0.125/MeV),47 //JMQ level density parameter set to A/10 at preequilibrium48 G4PreCompoundParameters() : theLevelDensity(0.10/MeV),49 r0(1.5*fermi),Transitions_r0(0.6*fermi),FermiEnergy(35.0*MeV)50 {}51 52 42 public: 53 43 54 ~G4PreCompoundParameters() {}; 44 static G4PreCompoundParameters * GetAddress(); 45 46 ~G4PreCompoundParameters(); 55 47 56 static G4PreCompoundParameters * GetAddress();48 inline G4double GetLevelDensity(); 57 49 58 G4double GetLevelDensity() 59 { return theLevelDensity; } 60 50 inline G4double Getr0(); 61 51 62 G4double Getr0() 63 { return r0; } 52 inline G4double GetTransitionsr0(); 64 53 65 G4double GetTransitionsr0() 66 { return Transitions_r0; } 67 68 69 G4double GetFermiEnergy() 70 { return FermiEnergy; } 54 inline G4double GetFermiEnergy(); 71 55 72 56 private: 73 // Level density parameter74 const G4double theLevelDensity;75 57 76 // Nuclear radius r0 77 const G4double r0; 58 G4PreCompoundParameters(); 59 60 static G4PreCompoundParameters* theParameters; 61 62 // Level density parameter 63 G4double fLevelDensity; 64 65 // Nuclear radius r0 66 G4double fR0; 78 67 79 // Nuclear radius r0 for transitions80 const G4doubleTransitions_r0;68 // Nuclear radius r0 for transitions 69 G4double fTransitions_r0; 81 70 82 // Fermi energy level 83 const G4double FermiEnergy; 84 71 // Fermi energy level 72 G4double fFermiEnergy; 85 73 }; 86 74 75 inline G4double G4PreCompoundParameters::GetLevelDensity() 76 { 77 return fLevelDensity; 78 } 79 80 inline G4double G4PreCompoundParameters::Getr0() 81 { 82 return fR0; 83 } 84 85 inline G4double G4PreCompoundParameters::GetTransitionsr0() 86 { 87 return fTransitions_r0; 88 } 89 90 inline G4double G4PreCompoundParameters::GetFermiEnergy() 91 { 92 return fFermiEnergy; 93 } 94 87 95 #endif -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundProton.hh
r962 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PreCompoundProton.hh,v 1.13 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 26 28 // 27 //J. M. Quesada (July 08) 29 // by V. Lara 30 // 31 // Modified: 32 // J. M. Quesada (July 08) cleanup 33 // 20.08.2010 V.Ivanchenko added int Z and A and cleanup; added 34 // G4ParticleDefinition to constructor, 35 // moved constructor and destructor to source 28 36 29 37 #ifndef G4PreCompoundProton_h … … 31 39 32 40 #include "G4PreCompoundNucleon.hh" 33 #include "G4ReactionProduct.hh"34 #include "G4Proton.hh"35 #include "G4PreCompoundParameters.hh"36 #include "Randomize.hh"37 41 #include "G4ProtonCoulombBarrier.hh" 38 42 … … 40 44 { 41 45 public: 42 // default constructor43 G4PreCompoundProton():G4PreCompoundNucleon(1,1,&theProtonCoulombBarrier,"Proton") {}44 46 45 // copy constructor 46 G4PreCompoundProton(const G4PreCompoundProton &right): G4PreCompoundNucleon(right) {} 47 G4PreCompoundProton(); 47 48 48 // destructor 49 ~G4PreCompoundProton() {}; 49 virtual ~G4PreCompoundProton(); 50 50 51 // operators 52 const G4PreCompoundProton & operator=(const G4PreCompoundProton &right) { 53 if (&right != this) this->G4PreCompoundNucleon::operator=(right); 54 return *this; 55 }; 51 protected: 56 52 57 G4bool operator==(const G4PreCompoundProton &right) const 58 { return G4PreCompoundNucleon::operator==(right);} 53 virtual G4double GetRj(G4int NumberParticles, G4int NumberCharged); 59 54 60 61 G4bool operator!=(const G4PreCompoundProton &right) const 62 { return G4PreCompoundNucleon::operator!=(right);} 55 virtual G4double CrossSection(G4double ekin) ; 63 56 57 virtual G4double GetAlpha(); 64 58 65 G4ReactionProduct * GetReactionProduct() const; 66 67 59 virtual G4double GetBeta(); 60 61 G4double GetOpt1(G4double K); 62 63 G4double GetOpt2(G4double K); 64 65 G4double GetOpt3(G4double K); 66 68 67 private: 69 68 70 //JMQ (Sep. 07) combinatorial factor Rj 71 virtual G4double GetRj(const G4int NumberParticles, const G4int NumberCharged); 69 // operators 70 G4PreCompoundProton(const G4PreCompoundProton &right); 71 const G4PreCompoundProton& 72 operator= (const G4PreCompoundProton &right); 73 G4int operator==(const G4PreCompoundProton &right) const; 74 G4int operator!=(const G4PreCompoundProton &right) const; 72 75 73 virtual G4double CrossSection(const G4double K) ; 74 75 76 G4double GetOpt0(const G4double K); 77 G4double GetOpt1(const G4double K); 78 G4double GetOpt2(const G4double K); 79 G4double GetOpt3(const G4double K); 80 81 G4double GetAlpha(); 82 83 G4double GetBeta(); 84 85 //data members 86 87 G4ProtonCoulombBarrier theProtonCoulombBarrier; 88 G4double ResidualA; 89 G4double ResidualZ; 90 G4double theA; 91 G4double theZ; 92 G4double ResidualAthrd; 93 G4double FragmentA; 94 G4double FragmentAthrd; 95 96 97 76 G4ProtonCoulombBarrier theProtonCoulombBarrier; 77 G4double ResidualAthrd; 78 G4double FragmentAthrd; 79 G4int FragmentA; 80 G4int ResidualA; 81 G4int ResidualZ; 82 G4int theA; 83 G4int theZ; 98 84 }; 99 85 #endif -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundTransitions.hh
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4PreCompoundTransitions.hh,v 1.6 2008/09/22 10:18:36 ahoward Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 26 // $Id: G4PreCompoundTransitions.hh,v 1.8 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 28 // 30 29 // by V. Lara 31 // J. M. Quesada . New methods for accessing to individual transition probabilities (landa+, landa-, landa0) from32 // G4PreCompoundModel.cc33 30 // 01.05.2008 J. M. Quesada . New methods for accessing to individual transition 31 // probabilities (landa+, landa-, landa0) from G4PreCompoundModel 32 // 20.08.2010 V.Ivanchenko move constructor and destructor to the source 34 33 35 34 #ifndef G4PreCompoundTransitions_h … … 48 47 #include "globals.hh" 49 48 #include "G4Fragment.hh" 50 #include "G4PreCompoundParameters.hh" 51 #include "G4Proton.hh" 52 #include "Randomize.hh" 49 50 class G4ParticleDefinition; 51 class G4Pow; 53 52 54 53 class G4PreCompoundTransitions : public G4VPreCompoundTransitions 55 56 54 { 57 55 public: 58 56 59 // Calculates transition probabilities with Delta N = +2 (Trans1) -2 (Trans2) and 0 (Trans3)57 G4PreCompoundTransitions(); 60 58 61 G4PreCompoundTransitions() : TransitionProb1(0.0), TransitionProb2(0.0), TransitionProb3(0.0){}59 virtual ~G4PreCompoundTransitions(); 62 60 63 virtual ~G4PreCompoundTransitions() {} 61 virtual G4double CalculateProbability(const G4Fragment & aFragment); 62 63 virtual void PerformTransition(G4Fragment & aFragment); 64 64 65 65 private: 66 66 67 G4PreCompoundTransitions(const G4PreCompoundTransitions &) : G4VPreCompoundTransitions() {}; 68 67 G4PreCompoundTransitions(const G4PreCompoundTransitions &); 69 68 const G4PreCompoundTransitions& operator=(const G4PreCompoundTransitions &right); 70 71 69 G4bool operator==(const G4PreCompoundTransitions &right) const; 72 73 70 G4bool operator!=(const G4PreCompoundTransitions &right) const; 74 71 75 public: 76 77 virtual G4double CalculateProbability(const G4Fragment & aFragment); 78 79 virtual G4Fragment PerformTransition(const G4Fragment & aFragment); 80 81 private: 82 83 G4double TransitionProb1; 84 G4double TransitionProb2; 85 G4double TransitionProb3; 72 G4Pow* g4pow; 73 const G4ParticleDefinition* proton; 86 74 87 88 //J. M.Quesada (May. 08) 89 public: 90 // inline G4double GetTransitionProb1() const 91 G4double GetTransitionProb1() 92 { 93 return TransitionProb1; 94 } 95 // inline G4double GetTransitionProb2() const 96 G4double GetTransitionProb2() 97 { 98 return TransitionProb2; 99 } 100 // inline G4double GetTransitionProb3() const 101 G4double GetTransitionProb3() 102 { 103 return TransitionProb3; 104 } 105 75 G4double FermiEnergy; 76 G4double r0; // Nuclear radius 77 G4double aLDP;// Level density parameter 106 78 }; 107 79 -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4PreCompoundTriton.hh
r962 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PreCompoundTriton.hh,v 1.12 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 26 28 // 27 29 // by V. Lara 28 30 // 29 //J. M. Quesada (July 08) 31 // Modified: 32 // J. M. Quesada (July 08) cleanup 33 // 20.08.2010 V.Ivanchenko added int Z and A and cleanup; added 34 // G4ParticleDefinition to constructor, 35 // moved constructor and destructor to source 30 36 31 37 #ifndef G4PreCompoundTriton_h … … 33 39 34 40 #include "G4PreCompoundIon.hh" 35 #include "G4ReactionProduct.hh"36 #include "G4Triton.hh"37 41 #include "G4TritonCoulombBarrier.hh" 38 #include "G4PreCompoundParameters.hh"39 40 42 41 43 class G4PreCompoundTriton : public G4PreCompoundIon 42 44 { 43 45 public: 44 // default constructor45 G4PreCompoundTriton():G4PreCompoundIon(3,1,&theTritonCoulombBarrier,"Triton") {}46 46 47 // copy constructor 48 G4PreCompoundTriton(const G4PreCompoundTriton &right): G4PreCompoundIon(right) {} 47 G4PreCompoundTriton(); 49 48 50 // destructor 51 ~G4PreCompoundTriton() {} 49 virtual ~G4PreCompoundTriton(); 52 50 53 // operators 54 // const G4PreCompoundTriton & operator=(const G4PreCompoundTriton &right) { 55 // if (&right != this) this->G4PreCompoundIon::operator=(right); 56 // return *this; 57 // } 51 protected: 58 52 59 // G4bool operator==(const G4PreCompoundTriton &right) const 60 // { return G4PreCompoundIon::operator==(right);} 53 virtual G4double GetRj(G4int NumberParticles, G4int NumberCharged); 61 54 55 virtual G4double CrossSection(G4double ekin) ; 56 57 virtual G4double FactorialFactor(G4int N, G4int P); 58 59 virtual G4double CoalescenceFactor(G4int A); 60 61 virtual G4double GetAlpha(); 62 62 63 // G4bool operator!=(const G4PreCompoundTriton &right) const 64 // { return G4PreCompoundIon::operator!=(right);} 63 G4double GetOpt12(G4double K); 65 64 66 67 G4ReactionProduct * GetReactionProduct() const; 68 65 G4double GetOpt34(G4double K); 69 66 70 67 private: 71 68 72 virtual G4double GetRj(const G4int NumberParticles, const G4int NumberCharged); 69 // operators 70 G4PreCompoundTriton(const G4PreCompoundTriton &right); 71 const G4PreCompoundTriton& 72 operator= (const G4PreCompoundTriton &right); 73 G4int operator==(const G4PreCompoundTriton &right) const; 74 G4int operator!=(const G4PreCompoundTriton &right) const; 73 75 74 virtual G4double CrossSection(const G4double K) ; 75 76 virtual G4double FactorialFactor(const G4double N, const G4double P); 77 78 virtual G4double CoalescenceFactor(const G4double A); 79 80 G4double GetOpt0(const G4double K); 81 G4double GetOpt12(const G4double K); 82 G4double GetOpt34(const G4double K); 83 84 G4double GetAlpha(); 85 86 G4double GetBeta(); 87 88 //data members 89 90 G4TritonCoulombBarrier theTritonCoulombBarrier; 91 G4double ResidualA; 92 G4double ResidualZ; 93 G4double theA; 94 G4double theZ; 95 G4double ResidualAthrd; 96 G4double FragmentA; 97 G4double FragmentAthrd; 76 G4TritonCoulombBarrier theTritonCoulombBarrier; 77 G4double ResidualAthrd; 78 G4double FragmentAthrd; 79 G4int FragmentA; 80 G4int ResidualA; 81 G4int ResidualZ; 82 G4int theA; 83 G4int theZ; 98 84 }; 99 85 -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4VPreCompoundEmissionFactory.hh
r819 r1340 24 24 // ******************************************************************** 25 25 // 26 26 // $Id: G4VPreCompoundEmissionFactory.hh,v 1.3 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 27 29 // by V. Lara 28 30 // 29 31 30 32 #ifndef G4VPreCompoundEmissionFactory_hh 31 33 #define G4VPreCompoundEmissionFactory_hh 32 33 34 34 35 #include "G4VPreCompoundFragment.hh" … … 38 39 { 39 40 public: 40 G4VPreCompoundEmissionFactory() : _fragvector(0) {}; 41 42 G4VPreCompoundEmissionFactory(); 43 41 44 virtual ~G4VPreCompoundEmissionFactory(); 42 45 43 private: 44 G4VPreCompoundEmissionFactory(const G4VPreCompoundEmissionFactory & ) {}; 45 const G4VPreCompoundEmissionFactory & operator=(const G4VPreCompoundEmissionFactory & val); 46 G4bool operator==(const G4VPreCompoundEmissionFactory & val) const; 47 G4bool operator!=(const G4VPreCompoundEmissionFactory & val) const; 48 49 public: 50 51 std::vector<G4VPreCompoundFragment*> * GetFragmentVector(); 46 inline std::vector<G4VPreCompoundFragment*> * GetFragmentVector(); 52 47 53 48 protected: … … 56 51 57 52 private: 58 std::vector<G4VPreCompoundFragment*> * _fragvector; 53 54 G4VPreCompoundEmissionFactory(const G4VPreCompoundEmissionFactory & ); 55 const G4VPreCompoundEmissionFactory & operator= 56 (const G4VPreCompoundEmissionFactory & val); 57 G4bool operator==(const G4VPreCompoundEmissionFactory & val) const; 58 G4bool operator!=(const G4VPreCompoundEmissionFactory & val) const; 59 60 std::vector<G4VPreCompoundFragment*> * fragvector; 59 61 60 62 struct DeleteFragment … … 68 70 69 71 }; 72 73 inline std::vector<G4VPreCompoundFragment*> * 74 G4VPreCompoundEmissionFactory::GetFragmentVector() 75 { 76 if (fragvector == 0) { fragvector = CreateFragmentVector(); } 77 return fragvector; 78 } 79 70 80 #endif -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4VPreCompoundFragment.hh
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4VPreCompoundFragment.hh,v 1.10 2009/02/10 16:01:37 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 26 // $Id: G4VPreCompoundFragment.hh,v 1.11 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 28 // 30 29 // J. M. Quesada (August 2008). … … 35 34 // JMQ (06 September 2008) Also external choice has been added for: 36 35 // - superimposed Coulomb barrier (if useSICB=true) 36 // 20.08.2010 V.Ivanchenko added int Z and A and cleanup; added 37 // G4ParticleDefinition to constructor, 38 // inline method to build G4ReactionProduct; 39 // remove string name 40 // 37 41 38 42 #ifndef G4VPreCompoundFragment_h … … 41 45 #include "G4ios.hh" 42 46 #include <iomanip> 43 #include "G4Particle Table.hh"47 #include "G4ParticleDefinition.hh" 44 48 #include "G4IonTable.hh" 45 49 #include "G4Fragment.hh" 46 50 #include "G4VCoulombBarrier.hh" 47 48 class G4ReactionProduct; 51 #include "G4ReactionProduct.hh" 52 #include "G4PreCompoundParameters.hh" 53 #include "G4Pow.hh" 49 54 50 55 class G4VPreCompoundFragment 51 56 { 57 public: 58 52 59 // ============================ 53 60 // Constructors and destructor 54 61 // ============================ 55 56 protected:57 // default constructor58 G4VPreCompoundFragment() {};59 62 60 public: 61 // copy constructor 62 G4VPreCompoundFragment(const G4VPreCompoundFragment &right); 63 64 // constructor 65 G4VPreCompoundFragment(const G4double anA, const G4double aZ, 66 G4VCoulombBarrier * aCoulombBarrier, 67 const G4String & aName); 68 63 G4VPreCompoundFragment(const G4ParticleDefinition*, 64 G4VCoulombBarrier * aCoulombBarrier); 69 65 70 66 virtual ~G4VPreCompoundFragment(); … … 73 69 // operators 74 70 // ========== 75 76 const G4VPreCompoundFragment&77 operator= (const G4VPreCompoundFragment &right);78 79 G4int operator==(const G4VPreCompoundFragment &right) const;80 81 G4int operator!=(const G4VPreCompoundFragment &right) const;82 71 83 72 friend std::ostream& … … 89 78 // Pure Virtual methods 90 79 // ===================== 91 virtual G4ReactionProduct * GetReactionProduct() const = 0;92 80 93 81 // Initialization method … … 103 91 virtual G4double GetKineticEnergy(const G4Fragment & aFragment) = 0; 104 92 105 public: 106 inline G4double GetA() const; 93 inline G4ReactionProduct * GetReactionProduct() const; 94 95 inline G4int GetA() const; 107 96 108 inline G4 doubleGetZ() const;97 inline G4int GetZ() const; 109 98 110 inline G4 doubleGetRestA() const;99 inline G4int GetRestA() const; 111 100 112 inline G4double GetRestZ() const; 101 inline G4int GetRestZ() const; 102 103 inline G4double ResidualA13() const; 113 104 114 105 inline G4double GetCoulombBarrier() const; … … 128 119 inline G4double GetReducedMass() const; 129 120 130 inline const G4LorentzVector GetMomentum() const;121 inline const G4LorentzVector& GetMomentum() const; 131 122 132 123 inline void SetMomentum(const G4LorentzVector & value); 133 124 134 inline void SetFragmentName(const G4String& aName);135 136 125 inline const G4String GetName() const; 137 138 inline void ResetStage();139 140 inline G4int GetStage() const;141 142 inline void IncrementStage();143 126 144 127 //for inverse cross section choice … … 147 130 inline void UseSICB(G4bool); 148 131 132 protected: 149 133 134 inline G4bool IsItPossible(const G4Fragment & aFragment) const; 135 136 private: 137 138 // default constructor 139 G4VPreCompoundFragment(); 140 // copy constructor 141 G4VPreCompoundFragment(const G4VPreCompoundFragment &right); 142 const G4VPreCompoundFragment& 143 operator= (const G4VPreCompoundFragment &right); 144 G4int operator==(const G4VPreCompoundFragment &right) const; 145 G4int operator!=(const G4VPreCompoundFragment &right) const; 150 146 151 147 // ============= … … 153 149 // ============= 154 150 155 156 private: 157 158 G4double theA; 159 160 G4double theZ; 161 private: 162 163 G4double theRestNucleusA; 164 165 G4double theRestNucleusZ; 166 protected: 167 G4double theCoulombBarrier; 168 private: 151 const G4ParticleDefinition* particle; 169 152 G4VCoulombBarrier * theCoulombBarrierPtr; 170 153 154 G4int theA; 155 G4int theZ; 156 G4int theRestNucleusA; 157 G4int theRestNucleusZ; 158 159 G4double theRestNucleusA13; 171 160 G4double theBindingEnergy; 161 G4double theMaximalKineticEnergy; 162 G4double theRestNucleusMass; 163 G4double theReducedMass; 164 G4double theMass; 172 165 173 G4 double theMaximalKineticEnergy;166 G4LorentzVector theMomentum; 174 167 175 168 protected: 169 170 G4PreCompoundParameters* theParameters; 171 G4Pow* g4pow; 172 176 173 G4double theEmissionProbability; 177 private: 178 G4LorentzVector theMomentum; 179 180 G4String theFragmentName; 174 G4double theCoulombBarrier; 181 175 182 G4int theStage; 183 184 protected: 185 //for inverse cross section choice 176 //for inverse cross section choice 186 177 G4int OPTxs; 187 //for superimposed Coulomb Barrier for inverse cross sections178 //for superimposed Coulomb Barrier for inverse cross sections 188 179 G4bool useSICB; 189 180 }; -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4VPreCompoundFragment.icc
r1337 r1340 25 25 // 26 26 // 27 // $Id: G4VPreCompoundFragment.icc,v 1. 7 2008/09/22 10:18:36 ahowardExp $28 // GEANT4 tag $Name: geant4-09-0 4-beta-01$27 // $Id: G4VPreCompoundFragment.icc,v 1.8 2010/08/28 15:16:55 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 29 // 30 30 // by V. Lara … … 34 34 // JMQ (06 September 2008) Also external choice has been added for: 35 35 // - superimposed Coulomb barrier (if useSICB=true) 36 // 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor 37 // the source, make GetReactionProduct() and IsItPossible inlined 36 38 37 inline G4double G4VPreCompoundFragment::GetA() const 39 inline G4bool G4VPreCompoundFragment:: 40 IsItPossible(const G4Fragment & aFragment) const 41 { 42 G4int pplus = aFragment.GetNumberOfCharged(); 43 G4int pneut = aFragment.GetNumberOfParticles()-pplus; 44 return ((pneut >= theA - theZ) && (pplus >= theZ) 45 && (theMaximalKineticEnergy > 0)); 46 } 47 48 49 inline 50 G4ReactionProduct * G4VPreCompoundFragment::GetReactionProduct() const 51 { 52 G4ReactionProduct * theReactionProduct = 53 new G4ReactionProduct(const_cast<G4ParticleDefinition*>(particle)); 54 theReactionProduct->SetMomentum(GetMomentum().vect()); 55 theReactionProduct->SetTotalEnergy(GetMomentum().e()); 56 return theReactionProduct; 57 } 58 59 inline G4int G4VPreCompoundFragment::GetA() const 38 60 { 39 61 return theA; 40 62 } 41 63 42 inline G4 doubleG4VPreCompoundFragment::GetZ() const64 inline G4int G4VPreCompoundFragment::GetZ() const 43 65 { 44 66 return theZ; 45 67 } 46 68 47 inline G4 doubleG4VPreCompoundFragment::GetRestA() const69 inline G4int G4VPreCompoundFragment::GetRestA() const 48 70 { 49 71 return theRestNucleusA; 50 72 } 51 73 52 inline G4 doubleG4VPreCompoundFragment::GetRestZ() const74 inline G4int G4VPreCompoundFragment::GetRestZ() const 53 75 { 54 76 return theRestNucleusZ; 77 } 78 79 inline G4double G4VPreCompoundFragment::ResidualA13() const 80 { 81 return theRestNucleusA13; 55 82 } 56 83 … … 82 109 inline G4double G4VPreCompoundFragment::GetNuclearMass(void) const 83 110 { 84 return G4ParticleTable::GetParticleTable()-> 85 GetIonTable()->GetIonMass(static_cast<G4int>(theZ),static_cast<G4int>(theA)); 111 return theMass; 86 112 } 87 88 113 89 114 inline G4double G4VPreCompoundFragment::GetRestNuclearMass() const 90 115 { 91 return G4ParticleTable::GetParticleTable()->GetIonTable()-> 92 GetIonMass(static_cast<G4int>(theRestNucleusZ),static_cast<G4int>(theRestNucleusA)); 116 return theRestNucleusMass; 93 117 } 94 95 118 96 119 inline G4double G4VPreCompoundFragment::GetReducedMass() const 97 120 { 98 return GetRestNuclearMass()*GetNuclearMass()/ 99 (GetNuclearMass()+GetRestNuclearMass()); 121 return theReducedMass; 100 122 } 101 123 102 103 inline const G4LorentzVector G4VPreCompoundFragment:: 104 GetMomentum() const 124 inline 125 const G4LorentzVector& G4VPreCompoundFragment::GetMomentum() const 105 126 { 106 127 return theMomentum; 107 128 } 108 109 129 110 inline void G4VPreCompoundFragment::111 SetMomentum(const G4LorentzVector & value)130 inline 131 void G4VPreCompoundFragment::SetMomentum(const G4LorentzVector & value) 112 132 { 113 133 theMomentum = value; 114 }115 116 inline void G4VPreCompoundFragment::117 SetFragmentName(const G4String& aName)118 {119 theFragmentName = aName;120 134 } 121 135 … … 123 137 GetName() const 124 138 { 125 return theFragmentName; 126 } 127 128 inline void G4VPreCompoundFragment::ResetStage() 129 { 130 theStage = 1; 131 } 132 133 inline G4int G4VPreCompoundFragment::GetStage() const 134 { 135 return theStage; 136 } 137 138 inline void G4VPreCompoundFragment::IncrementStage() 139 { 140 theStage++; 139 return particle->GetParticleName(); 141 140 } 142 141 … … 145 144 { 146 145 OPTxs=opt; 147 return;148 146 } 149 147 … … 152 150 { 153 151 useSICB=use; 154 return;155 152 } -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/include/G4VPreCompoundTransitions.hh
r962 r1340 24 24 // ******************************************************************** 25 25 // 26 //J. M. Quesada (May 08). New virtual classes have been added 26 // $Id: G4VPreCompoundTransitions.hh,v 1.6 2010/08/20 07:42:19 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 29 // J. M. Quesada (May 08). New virtual classes have been added Prob1,2,3 27 30 // JMQ (06 September 2008) Also external choices have been added for: 28 31 // - "never go back" hipothesis (useNGB=true) 29 32 // - CEM transition probabilities (useCEMtr=true) 33 // 20.08.2010 V.Ivanchenko move constructor and destructor to the source 30 34 31 35 #ifndef G4VPreCompoundTransitions_hh … … 38 42 public: 39 43 40 G4VPreCompoundTransitions() :useNGB(false),useCEMtr(false) {}41 virtual ~G4VPreCompoundTransitions() {}44 G4VPreCompoundTransitions(); 45 virtual ~G4VPreCompoundTransitions(); 42 46 43 47 virtual G4double CalculateProbability(const G4Fragment& aFragment) = 0; 44 virtual G4Fragment PerformTransition(const G4Fragment& aFragment) = 0; 45 //J. M. Quesada (May.08) New virtual classes 46 virtual G4double GetTransitionProb1()=0; 47 virtual G4double GetTransitionProb2()=0; 48 virtual G4double GetTransitionProb3()=0; 48 virtual void PerformTransition(G4Fragment& aFragment) = 0; 49 50 inline G4double GetTransitionProb1() const; 51 52 inline G4double GetTransitionProb2() const; 53 54 inline G4double GetTransitionProb3() const; 49 55 50 56 // for never go back hypothesis (if useNGB=true, default=false) … … 53 59 inline void UseCEMtr(G4bool use){useCEMtr=use;} 54 60 61 private: 62 63 G4VPreCompoundTransitions(const G4VPreCompoundTransitions &); 64 const G4VPreCompoundTransitions& operator=(const G4VPreCompoundTransitions &right); 65 G4bool operator==(const G4VPreCompoundTransitions &right) const; 66 G4bool operator!=(const G4VPreCompoundTransitions &right) const; 67 55 68 protected: 69 56 70 G4bool useNGB; 57 71 G4bool useCEMtr; 72 73 G4double TransitionProb1; 74 G4double TransitionProb2; 75 G4double TransitionProb3; 58 76 }; 59 77 78 //J. M.Quesada (May. 08) 79 inline G4double G4VPreCompoundTransitions::GetTransitionProb1() const 80 { 81 return TransitionProb1; 82 } 83 inline G4double G4VPreCompoundTransitions::GetTransitionProb2() const 84 { 85 return TransitionProb2; 86 } 87 inline G4double G4VPreCompoundTransitions::GetTransitionProb3() const 88 { 89 return TransitionProb3; 90 } 91 92 60 93 #endif -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4GNASHTransitions.cc
r819 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4GNASHTransitions.cc,v 1.6 2010/08/20 07:42:19 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 29 // 20.08.2010 V.Ivanchenko move constructor and destructor to the source 30 26 31 #include "G4GNASHTransitions.hh" 27 32 #include "G4PreCompoundParameters.hh" 28 33 #include "G4HadronicException.hh" 29 34 30 const G4GNASHTransitions & G4GNASHTransitions:: 31 operator=(const G4GNASHTransitions & ) 32 { 33 throw G4HadronicException(__FILE__, __LINE__, "G4GNASHTransitions::operator= meant to not be accesable"); 34 return *this; 35 } 35 G4GNASHTransitions::G4GNASHTransitions() 36 {} 36 37 37 G4bool G4GNASHTransitions::operator==(const G4GNASHTransitions & ) const 38 { 39 return false; 40 } 41 42 G4bool G4GNASHTransitions::operator!=(const G4GNASHTransitions & ) const 43 { 44 return true; 45 } 46 38 G4GNASHTransitions::~G4GNASHTransitions() 39 {} 47 40 48 41 G4double G4GNASHTransitions:: … … 72 65 Probability *= theMatrixElement; 73 66 74 75 67 return Probability; 76 68 } 77 69 78 G4Fragment G4GNASHTransitions:: 79 PerformTransition(const G4Fragment & aFragment) 70 void G4GNASHTransitions::PerformTransition(G4Fragment & result) 80 71 { 81 G4Fragment result(aFragment);82 72 result.SetNumberOfParticles(result.GetNumberOfParticles()+1); 83 73 result.SetNumberOfHoles(result.GetNumberOfHoles()+1); … … 91 81 result.SetNumberOfCharged(result.GetNumberOfParticles()); 92 82 } 93 94 return result;95 83 } -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4HETCAlpha.cc
r819 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HETCAlpha.cc,v 1.4 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 29 // by V. Lara 30 // 31 // Modified: 32 // 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor 33 // the source, use G4Pow 34 26 35 #include "G4HETCAlpha.hh" 36 #include "G4Alpha.hh" 37 38 G4HETCAlpha::G4HETCAlpha() 39 : G4HETCChargedFragment(G4Alpha::Alpha(), &theAlphaCoulombBarrier) 40 {} 41 42 G4HETCAlpha::~G4HETCAlpha() 43 {} 44 45 G4double G4HETCAlpha::GetAlpha() 46 { 47 G4double C = 0.0; 48 G4int aZ = GetZ() + GetRestZ(); 49 if (aZ <= 30) 50 { 51 C = 0.10; 52 } 53 else if (aZ <= 50) 54 { 55 C = 0.1 + -((aZ-50.)/20.)*0.02; 56 } 57 else if (aZ < 70) 58 { 59 C = 0.08 + -((aZ-70.)/20.)*0.02; 60 } 61 else 62 { 63 C = 0.06; 64 } 65 return 1.0+C; 66 } 67 68 G4double G4HETCAlpha::GetBeta() 69 { 70 return -GetCoulombBarrier(); 71 } 72 73 G4double G4HETCAlpha::GetSpinFactor() 74 { 75 return 1.0; 76 } 27 77 28 78 G4double G4HETCAlpha::K(const G4Fragment & aFragment) 29 79 { 30 if (GetStage() != 1) return 1.0; 31 // Number of protons in projectile 32 G4double Pa = static_cast<G4int>(aFragment.GetParticleDefinition()->GetPDGCharge()); 33 // Number of neutrons in projectile 34 G4double Na = aFragment.GetParticleDefinition()->GetBaryonNumber(); 35 G4double TargetA = aFragment.GetA() - Na; 36 G4double TargetZ = aFragment.GetZ() - Pa; 37 Na -= Pa; 38 G4double r = TargetZ/TargetA; 80 // Number of protons in emitted fragment 81 G4int Pa = GetZ(); 82 // Number of neutrons in emitted fragment 83 G4int Na = GetA() - Pa; 39 84 40 41 G4double P = aFragment.GetNumberOfParticles(); 42 G4double H = aFragment.GetNumberOfHoles(); 85 G4int TargetZ = GetRestZ(); 86 G4int TargetA = GetRestA(); 87 G4double r = G4double(TargetZ)/G4double(TargetA); 88 89 G4int P = aFragment.GetNumberOfParticles(); 90 G4int H = aFragment.GetNumberOfHoles(); 43 91 44 92 G4double result = 0.0; … … 52 100 Pa*(Pa-1.0)*Na*(Na-1.0)); 53 101 54 result /= 6.0* std::pow((TargetZ/TargetA)*((TargetA-TargetZ)/TargetA),2.0);102 result /= 6.0*r*r*(1. - r) *(1. - r); 55 103 } 56 57 104 return std::max(0.0,result); 58 59 105 } -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4HETCChargedFragment.cc
r819 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HETCChargedFragment.cc,v 1.3 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 26 29 // by V. Lara 30 // 31 // Modified: 32 // 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor 33 // the source, use G4Pow 34 // 27 35 28 36 #include "G4HETCChargedFragment.hh" 37 #include "G4VCoulombBarrier.hh" 29 38 #include "G4PreCompoundParameters.hh" 30 39 40 G4HETCChargedFragment::G4HETCChargedFragment( 41 const G4ParticleDefinition* pd, G4VCoulombBarrier * aCoulombBarrier) 42 : G4HETCFragment(pd, aCoulombBarrier) 43 {} 44 45 G4HETCChargedFragment::~G4HETCChargedFragment() 46 {} 31 47 32 48 G4double G4HETCChargedFragment:: 33 49 GetKineticEnergy(const G4Fragment & aFragment) 34 50 { 35 // Number of protons in projectile 36 G4double Pa = aFragment.GetParticleDefinition()->GetPDGCharge(); 37 // Number of neutrons in projectile 38 G4double Na = aFragment.GetParticleDefinition()->GetBaryonNumber(); 39 Na -= Pa; 40 41 G4double Pb = aFragment.GetNumberOfParticles(); 42 G4double H = aFragment.GetNumberOfHoles(); 51 G4int Pb = aFragment.GetNumberOfParticles(); 52 G4int H = aFragment.GetNumberOfHoles(); 43 53 44 G4double Ab = std::max(0.0,(Pb*Pb+H*H+Pb-3*H)/4.0); 54 G4double g0 = (6.0/pi2)*aFragment.GetA_asInt()*theParameters->GetLevelDensity(); 55 56 G4double Ab = std::max(0.0,G4double(Pb*Pb+H*H+Pb-3*H)/(4.0*g0)); 45 57 G4double Emax = GetMaximalKineticEnergy() - Ab; 46 58 47 G4double x = BetaRand( static_cast<G4int>(Pb+H),2);59 G4double x = BetaRand(Pb + H, 2); 48 60 49 61 return Emax - (Emax-GetCoulombBarrier())*x; -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4HETCDeuteron.cc
r819 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HETCDeuteron.cc,v 1.3 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 29 // by V. Lara 30 // 31 // Modified: 32 // 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor 33 // the source, use G4Pow 34 26 35 #include "G4HETCDeuteron.hh" 36 #include "G4Deuteron.hh" 37 38 G4HETCDeuteron::G4HETCDeuteron() 39 : G4HETCChargedFragment(G4Deuteron::Deuteron(), &theDeuteronCoulombBarrier) 40 {} 41 42 G4HETCDeuteron::~G4HETCDeuteron() 43 {} 44 45 G4double G4HETCDeuteron::GetAlpha() 46 { 47 G4double C = 0.0; 48 G4int aZ = GetZ() + GetRestZ(); 49 if (aZ >= 70) 50 { 51 C = 0.10; 52 } 53 else 54 { 55 C = ((((0.15417e-06*aZ) - 0.29875e-04)*aZ + 0.21071e-02)*aZ - 0.66612e-01)*aZ + 0.98375; 56 } 57 return 1.0 + C/2.0; 58 } 59 60 G4double G4HETCDeuteron::GetBeta() 61 { 62 return -GetCoulombBarrier(); 63 } 64 65 G4double G4HETCDeuteron::GetSpinFactor() 66 { 67 // 2s+1 68 return 3.0; 69 } 27 70 28 71 G4double G4HETCDeuteron::K(const G4Fragment & aFragment) 29 72 { 30 if (GetStage() != 1) return 1.0; 31 // Number of protons in projectile 32 G4double Pa = static_cast<G4int>(aFragment.GetParticleDefinition()->GetPDGCharge()); 33 // Number of neutrons in projectile 34 G4double Na = aFragment.GetParticleDefinition()->GetBaryonNumber(); 35 G4double TargetA = aFragment.GetA() - Na; 36 G4double TargetZ = aFragment.GetZ() - Pa; 37 Na -= Pa; 38 G4double r = TargetZ/TargetA; 73 // Number of protons in emitted fragment 74 G4int Pa = GetZ(); 75 // Number of neutrons in emitted fragment 76 G4int Na = GetA() - Pa; 39 77 78 G4int TargetZ = GetRestZ(); 79 G4int TargetA = GetRestA(); 80 G4double r = G4double(TargetZ)/G4double(TargetA); 40 81 41 G4 doubleP = aFragment.GetNumberOfParticles();42 G4 doubleH = aFragment.GetNumberOfHoles();82 G4int P = aFragment.GetNumberOfParticles(); 83 G4int H = aFragment.GetNumberOfHoles(); 43 84 44 85 G4double result = 0.0; … … 47 88 result = 2.0* (H*(H-1.0)*r*(r-1.0)+H*(Na*r+Pa*(1.0-r)) + Pa*Na)/(P*(P-1.0)); 48 89 49 result /= (TargetZ/TargetA)*((TargetA-TargetZ)/TargetA);90 result /= r*(1.0 - r); 50 91 } 51 52 92 return std::max(0.0,result); 53 54 93 } -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4HETCEmissionFactory.cc
r819 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HETCEmissionFactory.cc,v 1.5 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 29 // by V. Lara 30 // 31 // Modified: 32 // 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor 33 // the source 34 // 35 26 36 #include "G4HETCEmissionFactory.hh" 27 37 … … 33 43 #include "G4HETCAlpha.hh" 34 44 45 G4HETCEmissionFactory::G4HETCEmissionFactory() 46 {} 35 47 36 const G4HETCEmissionFactory & G4HETCEmissionFactory:: 37 operator=(const G4HETCEmissionFactory & ) 38 { 39 throw G4HadronicException(__FILE__, __LINE__, "G4HETCEmissionFactory::operator= meant to not be accessable."); 40 return *this; 41 } 42 43 G4bool G4HETCEmissionFactory:: 44 operator==(const G4HETCEmissionFactory & ) const 45 { 46 throw G4HadronicException(__FILE__, __LINE__, "G4HETCEmissionFactory::operator== meant to not be accessable."); 47 return false; 48 } 49 50 G4bool G4HETCEmissionFactory:: 51 operator!=(const G4HETCEmissionFactory & ) const 52 { 53 throw G4HadronicException(__FILE__, __LINE__, "G4HETCEmissionFactory::operator!= meant to not be accessable."); 54 return true; 55 } 56 48 G4HETCEmissionFactory::~G4HETCEmissionFactory() 49 {} 57 50 58 51 std::vector<G4VPreCompoundFragment*> * G4HETCEmissionFactory:: -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4HETCFragment.cc
r819 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HETCFragment.cc,v 1.4 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 26 29 // by V. Lara 30 // 31 // Modified: 32 // 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor 33 // the source, use G4Pow 27 34 28 35 #include "G4HETCFragment.hh" … … 30 37 31 38 G4HETCFragment:: 32 G4HETCFragment(const G4HETCFragment & right) : 33 G4VPreCompoundFragment(right) 39 G4HETCFragment(const G4ParticleDefinition* part, 40 G4VCoulombBarrier* aCoulombBarrier) 41 : G4VPreCompoundFragment(part, aCoulombBarrier) 34 42 { 43 G4double r0 = theParameters->Getr0(); 44 r2norm = r0*r0/(CLHEP::pi*CLHEP::hbarc*CLHEP::hbarc*CLHEP::hbarc); 35 45 } 36 46 37 G4HETCFragment:: 38 G4HETCFragment(const G4double anA, 39 const G4double aZ, 40 G4VCoulombBarrier* aCoulombBarrier, 41 const G4String & aName) : 42 G4VPreCompoundFragment(anA,aZ,aCoulombBarrier,aName) 47 G4HETCFragment::~G4HETCFragment() 43 48 {} 44 45 G4HETCFragment::~G4HETCFragment()46 {47 }48 49 const G4HETCFragment & G4HETCFragment::50 operator= (const G4HETCFragment & right)51 {52 if (&right != this) this->G4VPreCompoundFragment::operator=(right);53 return *this;54 }55 56 G4int G4HETCFragment::operator==(const G4HETCFragment & right) const57 {58 return G4VPreCompoundFragment::operator==(right);59 }60 61 G4int G4HETCFragment::operator!=(const G4HETCFragment & right) const62 {63 return G4VPreCompoundFragment::operator!=(right);64 }65 66 67 49 68 50 G4double G4HETCFragment:: … … 70 52 { 71 53 if (GetEnergyThreshold() <= 0.0) 72 {54 { 73 55 theEmissionProbability = 0.0; 74 56 return 0.0; 75 }57 } 76 58 // Coulomb barrier is the lower limit 77 59 // of integration over kinetic energy … … 80 62 // Excitation energy of nucleus after fragment emission is the upper limit 81 63 // of integration over kinetic energy 82 G4double UpperLimit = this->GetMaximalKineticEnergy();64 G4double UpperLimit = GetMaximalKineticEnergy(); 83 65 84 theEmissionProbability = IntegrateEmissionProbability(LowerLimit,UpperLimit,aFragment); 66 theEmissionProbability = 67 IntegrateEmissionProbability(LowerLimit,UpperLimit,aFragment); 85 68 86 69 return theEmissionProbability; … … 92 75 { 93 76 94 if ( !IsItPossible(aFragment) ) return 0.0; 95 96 const G4double r0 = G4PreCompoundParameters::GetAddress()->Getr0(); 77 if ( !IsItPossible(aFragment) ) { return 0.0; } 97 78 98 79 G4double U = aFragment.GetExcitationEnergy(); 99 G4double P = aFragment.GetNumberOfParticles(); 100 G4double H = aFragment.GetNumberOfHoles(); 101 G4double N = P + H; 102 G4double Pb = P - GetA(); 103 G4double Nb = Pb + H; 104 if (Nb <= 0.0) return 0.0; 105 106 G4double A = (P*P+H*H+P-3*H)/4.0; 107 G4double Ab = (Pb*Pb+H*H+Pb-3*H)/4.0; 80 81 G4int P = aFragment.GetNumberOfParticles(); 82 G4int H = aFragment.GetNumberOfHoles(); 83 G4int N = P + H; 84 G4int Pb = P - GetA(); 85 G4int Nb = Pb + H; 86 if (Nb <= 0.0) { return 0.0; } 87 G4double g = (6.0/pi2)*aFragment.GetA()*theParameters->GetLevelDensity(); 88 G4double gb = (6.0/pi2)*GetRestA()*theParameters->GetLevelDensity(); 89 90 G4double A = G4double(P*P+H*H+P-3*H)/(4.0*g); 91 G4double Ab = G4double(Pb*Pb+H*H+Pb-3*H)/(4.0*gb); 108 92 U = std::max(U-A,0.0); 109 if (U <= 0.0) return 0.0;93 if (U <= 0.0) { return 0.0; } 110 94 111 G4double g = (6.0/pi2)*aFragment.GetA()*G4PreCompoundParameters::GetAddress()->GetLevelDensity(); 112 G4double gb = (6.0/pi2)*GetRestA()*G4PreCompoundParameters::GetAddress()->GetLevelDensity(); 113 114 G4double Pf = P; 115 G4double Hf = H; 116 G4double Nf = N-1.0; 117 for (G4int i = 1; i < GetA(); i++) 95 G4int Pf = P; 96 G4int Hf = H; 97 G4int Nf = N-1; 98 for (G4int i = 1; i < GetA(); ++i) 118 99 { 119 100 Pf *= (P-i); … … 125 106 G4double Y = std::max(Up - Ab - Low, 0.0); 126 107 127 G4double Probability = GetSpinFactor()/(pi*hbarc*hbarc*hbarc) * GetReducedMass() * GetAlpha() * 128 r0 * r0 * std::pow(GetRestA(),2.0/3.0)/std::pow(U,N-1) * (std::pow(gb,Nb)/std::pow(g,N)) * Pf * Hf * Nf * K(aFragment) * 129 std::pow(Y,Nb) * (X/Nb - Y/(Nb+1)); 108 G4double Probability = r2norm*GetSpinFactor()*GetReducedMass()*GetAlpha() 109 *g4pow->Z23(GetRestA())*Pf*Hf*Nf*K(aFragment)*(X/Nb - Y/(Nb+1)) 110 *U*g4pow->powN(g*gb,Nb)/g4pow->powN(g*U,N); 111 112 // G4double Probability = GetSpinFactor()/(pi*hbarc*hbarc*hbarc) 113 // * GetReducedMass() * GetAlpha() * 114 // r0 * r0 * std::pow->Z23(GetRestA())/std::pow->pow(U,G4double(N-1)) * 115 // (std::pow->(gb,Nb)/std::pow(g,N)) * Pf * Hf * Nf * K(aFragment) * 116 // std::pow(Y,Nb) * (X/Nb - Y/(Nb+1)); 130 117 131 118 return Probability; -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4HETCHe3.cc
r819 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HETCHe3.cc,v 1.4 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 29 // by V. Lara 30 // 31 // Modified: 32 // 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor 33 // the source, use G4Pow 34 26 35 #include "G4HETCHe3.hh" 36 #include "G4He3.hh" 37 38 G4HETCHe3::G4HETCHe3() 39 : G4HETCChargedFragment(G4He3::He3(), &theHe3CoulombBarrier) 40 {} 41 42 G4HETCHe3::~G4HETCHe3() 43 {} 44 45 G4double G4HETCHe3::GetAlpha() 46 { 47 G4double C = 0.0; 48 G4int aZ = GetZ() + GetRestZ(); 49 if (aZ <= 30) 50 { 51 C = 0.10; 52 } 53 else if (aZ <= 50) 54 { 55 C = 0.1 + -((aZ-50.)/20.)*0.02; 56 } 57 else if (aZ < 70) 58 { 59 C = 0.08 + -((aZ-70.)/20.)*0.02; 60 } 61 else 62 { 63 C = 0.06; 64 } 65 return 1.0 + C*(4.0/3.0); 66 } 67 68 G4double G4HETCHe3::GetBeta() 69 { 70 return -GetCoulombBarrier(); 71 } 72 73 G4double G4HETCHe3::GetSpinFactor() 74 { 75 // 2s+1 76 return 2.0; 77 } 27 78 28 79 G4double G4HETCHe3::K(const G4Fragment & aFragment) 29 80 { 30 if (GetStage() != 1) return 1.0; 31 // Number of protons in projectile 32 G4double Pa = static_cast<G4int>(aFragment.GetParticleDefinition()->GetPDGCharge()); 33 // Number of neutrons in projectile 34 G4double Na = aFragment.GetParticleDefinition()->GetBaryonNumber(); 35 G4double TargetA = aFragment.GetA() - Na; 36 G4double TargetZ = aFragment.GetZ() - Pa; 37 Na -= Pa; 38 G4double r = TargetZ/TargetA; 81 // Number of protons in emitted fragment 82 G4int Pa = GetZ(); 83 // Number of neutrons in emitted fragment 84 G4int Na = GetA() - Pa; 39 85 86 G4int TargetZ = GetRestZ(); 87 G4int TargetA = GetRestA(); 88 G4double r = G4double(TargetZ)/G4double(TargetA); 40 89 41 42 G4double P = aFragment.GetNumberOfParticles(); 43 G4double H = aFragment.GetNumberOfHoles(); 90 G4int P = aFragment.GetNumberOfParticles(); 91 G4int H = aFragment.GetNumberOfHoles(); 44 92 45 93 G4double result = 0.0; … … 52 100 Pa*Na*(Pa-1.0)); 53 101 54 result /= 3.0* std::pow(TargetZ/TargetA, 2.0) * ((TargetA-TargetZ)/TargetA);102 result /= 3.0*r*r*(1.0 - r); 55 103 } 56 57 104 return std::max(0.0,result); 58 59 105 } -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4HETCNeutron.cc
r819 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HETCNeutron.cc,v 1.3 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 29 // by V. Lara 30 // 31 // Modified: 32 // 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor 33 // the source, use G4Pow 34 26 35 #include "G4HETCNeutron.hh" 36 #include "G4Neutron.hh" 27 37 38 G4HETCNeutron::G4HETCNeutron() 39 : G4HETCFragment(G4Neutron::Neutron(), &theNeutronCoulombBarrier) 40 {} 41 42 G4HETCNeutron::~G4HETCNeutron() 43 {} 44 45 G4double G4HETCNeutron::GetAlpha() 46 { 47 return 0.76+2.2/g4pow->Z13(GetRestA()); 48 } 49 50 G4double G4HETCNeutron::GetBeta() 51 { 52 return (2.12/g4pow->Z23(GetRestA())-0.05)*MeV/GetAlpha(); 53 } 54 55 G4double G4HETCNeutron::GetSpinFactor() 56 { 57 // (2s+1) 58 return 2.0; 59 } 60 28 61 G4double G4HETCNeutron::K(const G4Fragment & aFragment) 29 62 { 30 if (GetStage() != 1) return 1.0; 31 // Number of protons in projectile 32 G4double Pa = static_cast<G4int>(aFragment.GetParticleDefinition()->GetPDGCharge()); 33 // Number of neutrons in projectile 34 G4double Na = aFragment.GetParticleDefinition()->GetBaryonNumber(); 35 G4double TargetA = aFragment.GetA() - Na; 36 G4double TargetZ = aFragment.GetZ() - Pa; 37 Na -= Pa; 38 G4double r = TargetZ/TargetA; 63 // Number of protons in emitted fragment 64 G4int Pa = GetZ(); 65 // Number of neutrons in emitted fragment 66 G4int Na = GetA() - Pa; 67 68 G4int TargetZ = GetRestZ(); 69 G4int TargetA = GetRestA(); 70 G4double r = G4double(TargetZ)/G4double(TargetA); 39 71 40 G4 doubleP = aFragment.GetNumberOfParticles();41 G4 doubleH = aFragment.GetNumberOfHoles();72 G4int P = aFragment.GetNumberOfParticles(); 73 G4int H = aFragment.GetNumberOfHoles(); 42 74 43 75 G4double result = 0.0; 44 76 if (P > 0) 45 77 { 46 result = (H*(1.0-r)+Na)/P; 47 48 result /= (TargetA-TargetZ)/TargetA; 78 result = (H + Na/(1.0-r))/P; 49 79 } 50 80 … … 52 82 } 53 83 54 55 84 G4double G4HETCNeutron::GetKineticEnergy(const G4Fragment & aFragment) 56 85 { 57 G4double H = aFragment.GetNumberOfHoles(); 58 G4double Pb = aFragment.GetNumberOfParticles() - GetA(); 59 G4double Nb = Pb + H; 86 G4int H = aFragment.GetNumberOfHoles(); 87 G4int Pb = aFragment.GetNumberOfParticles(); 88 G4int Nb = Pb + H; 89 G4double g0 = (6.0/pi2)*aFragment.GetA_asInt()*theParameters->GetLevelDensity(); 60 90 61 G4double Ab = std::max(0.0, (Pb*Pb+H*H+Pb-3*H)/4.0);91 G4double Ab = std::max(0.0,G4double(Pb*Pb+H*H+Pb-3*H)/(4.0*g0)); 62 92 G4double Emax = GetMaximalKineticEnergy() - Ab; 63 93 64 G4double cut = GetBeta() / (GetBeta()+Emax/ (Nb+1));94 G4double cut = GetBeta() / (GetBeta()+Emax/G4double(Nb+1)); 65 95 G4double x(0.0); 66 96 if (G4UniformRand() <= cut) 67 97 { 68 x = BetaRand( static_cast<G4int>(Nb),1);98 x = BetaRand(Nb,1); 69 99 } 70 100 else 71 101 { 72 x = BetaRand( static_cast<G4int>(Nb),2);102 x = BetaRand(Nb,2); 73 103 } 74 104 -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4HETCProton.cc
r819 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HETCProton.cc,v 1.3 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 29 // by V. Lara 30 // 31 // Modified: 32 // 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor 33 // the source, use G4Pow 34 26 35 #include "G4HETCProton.hh" 36 #include "G4Proton.hh" 37 38 G4HETCProton::G4HETCProton() 39 : G4HETCChargedFragment(G4Proton::Proton(), &theProtonCoulombBarrier) 40 {} 41 42 G4HETCProton::~G4HETCProton() 43 {} 44 45 G4double G4HETCProton::GetAlpha() 46 { 47 G4int aZ = GetRestZ(); 48 G4double C = 0.0; 49 if (aZ >= 70) 50 { 51 C = 0.10; 52 } 53 else 54 { 55 C = ((((0.15417e-06*aZ) - 0.29875e-04)*aZ + 0.21071e-02)*aZ - 0.66612e-01)*aZ + 0.98375; 56 } 57 return 1.0 + C; 58 } 59 60 G4double G4HETCProton::GetBeta() 61 { 62 return -GetCoulombBarrier(); 63 } 64 65 G4double G4HETCProton::GetSpinFactor() 66 { 67 // 2s+1 68 return 2.0; 69 } 27 70 28 71 G4double G4HETCProton::K(const G4Fragment & aFragment) 29 72 { 30 if (GetStage() != 1) return 1.0; 31 // Number of protons in projectile 32 G4double Pa = static_cast<G4int>(aFragment.GetParticleDefinition()->GetPDGCharge()); 33 // Number of neutrons in projectile 34 G4double Na = aFragment.GetParticleDefinition()->GetBaryonNumber(); 35 G4double TargetA = aFragment.GetA() - Na; 36 G4double TargetZ = aFragment.GetZ() - Pa; 37 Na -= Pa; 38 G4double r = TargetZ/TargetA; 73 // Number of protons in emitted fragment 74 G4int Pa = GetZ(); 39 75 76 G4int TargetZ = GetRestZ(); 77 G4int TargetA = GetRestA(); 78 G4double r = G4double(TargetZ)/G4double(TargetA); 40 79 41 G4 doubleP = aFragment.GetNumberOfParticles();42 G4 doubleH = aFragment.GetNumberOfHoles();80 G4int P = aFragment.GetNumberOfParticles(); 81 G4int H = aFragment.GetNumberOfHoles(); 43 82 44 83 G4double result = 0.0; 45 84 if (P > 0) 46 85 { 47 result = (H*r + Pa)/P; 48 49 result /= TargetZ/TargetA; 86 result = (H*r + Pa)/P/r; 50 87 } 51 88 -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4HETCTriton.cc
r819 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HETCTriton.cc,v 1.4 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 29 // by V. Lara 30 // 31 // Modified: 32 // 23.08.2010 V.Ivanchenko general cleanup, move constructor and destructor 33 // the source, use G4Pow 34 26 35 #include "G4HETCTriton.hh" 36 #include "G4Triton.hh" 37 38 G4HETCTriton::G4HETCTriton() 39 : G4HETCChargedFragment(G4Triton::Triton(), &theTritonCoulombBarrier) 40 {} 41 42 G4HETCTriton::~G4HETCTriton() 43 {} 44 45 G4double G4HETCTriton::GetAlpha() 46 { 47 G4double C = 0.0; 48 G4int aZ = GetZ() + GetRestZ(); 49 if (aZ >= 70) 50 { 51 C = 0.10; 52 } 53 else 54 { 55 C = ((((0.15417e-06*aZ) - 0.29875e-04)*aZ + 0.21071e-02)*aZ - 0.66612e-01)*aZ + 0.98375; 56 } 57 58 return 1.0 + C/3.0; 59 } 60 61 G4double G4HETCTriton::GetBeta() 62 { 63 return -GetCoulombBarrier(); 64 } 65 66 G4double G4HETCTriton::GetSpinFactor() 67 { 68 // 2s+1 69 return 2.0; 70 } 27 71 28 72 G4double G4HETCTriton::K(const G4Fragment & aFragment) 29 73 { 30 if (GetStage() != 1) return 1.0; 31 // Number of protons in projectile 32 G4double Pa = static_cast<G4int>(aFragment.GetParticleDefinition()->GetPDGCharge()); 33 // Number of neutrons in projectile 34 G4double Na = aFragment.GetParticleDefinition()->GetBaryonNumber(); 35 G4double TargetA = aFragment.GetA() - Na; 36 G4double TargetZ = aFragment.GetZ() - Pa; 37 Na -= Pa; 38 G4double r = TargetZ/TargetA; 74 // Number of protons in emitted fragment 75 G4int Pa = GetZ(); 76 // Number of neutrons in emitted fragment 77 G4int Na = GetA() - Pa; 39 78 40 41 G4double P = aFragment.GetNumberOfParticles(); 42 G4double H = aFragment.GetNumberOfHoles(); 79 G4int TargetZ = GetRestZ(); 80 G4int TargetA = GetRestA(); 81 G4double r = G4double(TargetZ)/G4double(TargetA); 82 83 G4int P = aFragment.GetNumberOfParticles(); 84 G4int H = aFragment.GetNumberOfHoles(); 43 85 44 86 G4double result = 0.0; … … 51 93 Pa*Na*(Na-1.0)); 52 94 53 result /= 3.0* (TargetZ/TargetA)*std::pow((TargetA-TargetZ)/TargetA,2.0);95 result /= 3.0*r*(1.0 - r)*(1.0 - r); 54 96 } 55 56 97 return std::max(0.0,result); 57 58 98 } -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4LowEIonFragmentation.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4LowEIonFragmentation.cc,v 1.5 2010/06/01 16:51:11 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 26 // $Id: G4LowEIonFragmentation.cc,v 1.7 2010/09/08 16:38:09 gunter Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 28 // 30 29 //--------------------------------------------------------------------------- … … 72 71 73 72 // Get Target A, Z 74 G4 double aTargetA = theNucleus.GetN();75 G4 double aTargetZ = theNucleus.GetZ();73 G4int aTargetA = theNucleus.GetA_asInt(); 74 G4int aTargetZ = theNucleus.GetZ_asInt(); 76 75 77 76 // Get Projectile A, Z 78 G4 doubleaProjectileA = thePrimary.GetDefinition()->GetBaryonNumber();79 G4 double aProjectileZ = thePrimary.GetDefinition()->GetPDGCharge();77 G4int aProjectileA = thePrimary.GetDefinition()->GetBaryonNumber(); 78 G4int aProjectileZ = G4lrint(thePrimary.GetDefinition()->GetPDGCharge()); 80 79 81 80 // Get Maximum radius of both … … 131 130 } 132 131 } 133 hits ++;132 hits++; 134 133 135 134 // From target: … … 157 156 G4double compoundEnergy = thePrimary.GetTotalEnergy()*particlesFromProjectile/aProjectileA; 158 157 G4double targetMass = G4ParticleTable::GetParticleTable() 159 ->GetIonTable()->GetIonMass( static_cast<G4int>(aTargetZ) ,static_cast<G4int>(aTargetA));158 ->GetIonTable()->GetIonMass(aTargetZ, aTargetA); 160 159 compoundEnergy += targetMass; 161 160 G4LorentzVector fragment4Momentum(exciton3Momentum, compoundEnergy); … … 163 162 // take the nucleons and fill the Fragments 164 163 G4Fragment anInitialState; 165 anInitialState.Set A(aTargetA+particlesFromProjectile);166 anInitialState.SetZ(aTargetZ+chargedFromProjectile);164 anInitialState.SetZandA_asInt(aTargetZ+chargedFromProjectile, 165 aTargetA+particlesFromProjectile); 167 166 // M.A. Cortes fix 168 167 //anInitialState.SetNumberOfParticles(particlesFromProjectile); … … 187 186 188 187 G4Fragment initialState2; 189 initialState2.Set A(aProjectileA-particlesFromProjectile);190 initialState2.SetZ(aProjectileZ-chargedFromProjectile);188 initialState2.SetZandA_asInt(aProjectileZ-chargedFromProjectile, 189 aProjectileA-particlesFromProjectile); 191 190 initialState2.SetNumberOfHoles(static_cast<G4int>((aProjectileA-particlesFromProjectile)/2.0)); 192 191 initialState2.SetNumberOfParticles(static_cast<G4int>((aProjectileZ-chargedFromProjectile)/2.0)); -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundAlpha.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4PreCompoundAlpha.cc,v 1.6 2010/04/09 14:06:17 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 26 // $Id: G4PreCompoundAlpha.cc,v 1.7 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 28 // 30 29 // ------------------------------------------------------------------- … … 39 38 // Modified: 40 39 // 21.08.2008 J. M. Quesada add choice of options 40 // 20.08.2010 V.Ivanchenko added G4Pow and G4PreCompoundParameters pointers 41 // use int Z and A and cleanup 41 42 // 42 43 43 44 #include "G4PreCompoundAlpha.hh" 44 45 G4ReactionProduct * G4PreCompoundAlpha::GetReactionProduct() const 46 { 47 G4ReactionProduct * theReactionProduct = 48 new G4ReactionProduct(G4Alpha::AlphaDefinition()); 49 theReactionProduct->SetMomentum(GetMomentum().vect()); 50 theReactionProduct->SetTotalEnergy(GetMomentum().e()); 51 #ifdef PRECOMPOUND_TEST 52 theReactionProduct->SetCreatorModel("G4PrecompoundModel"); 53 #endif 54 return theReactionProduct; 55 } 56 57 G4double G4PreCompoundAlpha::FactorialFactor(const G4double N, const G4double P) 58 { 59 return 60 (N-4.0)*(P-3.0)*( 61 (((N-3.0)*(P-2.0))/2.0) *( 62 (((N-2.0)*(P-1.0))/3.0) *( 63 (((N-1.0)*P)/2.0) 64 ) 65 ) 66 ); 67 } 68 69 G4double G4PreCompoundAlpha::CoalescenceFactor(const G4double A) 70 { 71 return 4096.0/(A*A*A); 45 #include "G4Alpha.hh" 46 47 G4PreCompoundAlpha::G4PreCompoundAlpha() 48 : G4PreCompoundIon(G4Alpha::Alpha(), &theAlphaCoulombBarrier) 49 {} 50 51 G4PreCompoundAlpha::~G4PreCompoundAlpha() 52 {} 53 54 G4double G4PreCompoundAlpha::FactorialFactor(G4int N, G4int P) 55 { 56 return G4double((N-4)*(P-3)*(N-3)*(P-2)*(N-2)*(P-1)*(N-1)*P)/12.0; 57 } 58 59 G4double G4PreCompoundAlpha::CoalescenceFactor(G4int A) 60 { 61 return 4096.0/G4double(A*A*A); 72 62 } 73 63 74 G4double G4PreCompoundAlpha::GetRj( const G4int NumberParticles, const G4int NumberCharged)64 G4double G4PreCompoundAlpha::GetRj(G4int nParticles, G4int nCharged) 75 65 { 76 66 G4double rj = 0.0; 77 G4double denominator = NumberParticles*(NumberParticles-1)*(NumberParticles-2)*(NumberParticles-3); 78 if(NumberCharged >=2 && (NumberParticles-NumberCharged) >=2 ) { 79 rj = 6.0*static_cast<G4double>(NumberCharged*(NumberCharged-1)*(NumberParticles-NumberCharged)* 80 (NumberParticles-NumberCharged-1))/static_cast<G4double>(denominator); 67 if(nCharged >=2 && (nParticles-nCharged) >=2 ) { 68 G4double denominator = 69 G4double(nParticles*(nParticles-1)*(nParticles-2)*(nParticles-3)); 70 rj = 6.0*nCharged*(nCharged-1)*(nParticles-nCharged)*(nParticles-nCharged-1) 71 /denominator; 81 72 } 82 73 return rj; 83 74 } 84 75 85 ///////////////////////////////////////////////////////////////////////////////// ///76 ///////////////////////////////////////////////////////////////////////////////// 86 77 //J. M. Quesada (Dec 2007-June 2008): New inverse reaction cross sections 87 78 //OPT=0 Dostrovski's parameterization … … 89 80 //OPT=3,4 Kalbach's parameterization 90 81 // 91 G4double G4PreCompoundAlpha::CrossSection(const G4double K) 92 { 93 94 ResidualA=GetRestA(); 95 ResidualZ=GetRestZ(); 96 theA=GetA(); 97 theZ=GetZ(); 98 ResidualAthrd=std::pow(ResidualA,0.33333); 99 FragmentA=GetA()+GetRestA(); 100 FragmentAthrd=std::pow(FragmentA,0.33333); 101 102 103 if (OPTxs==0) return GetOpt0( K); 104 else if( OPTxs==1 || OPTxs==2) return GetOpt12( K); 105 else if (OPTxs==3 || OPTxs==4) return GetOpt34( K); 82 G4double G4PreCompoundAlpha::CrossSection(G4double K) 83 { 84 ResidualA = GetRestA(); 85 ResidualZ = GetRestZ(); 86 theA = GetA(); 87 theZ = GetZ(); 88 ResidualAthrd = ResidualA13(); 89 FragmentA = theA + ResidualA; 90 FragmentAthrd = g4pow->Z13(FragmentA); 91 92 if (OPTxs==0) { return GetOpt0( K); } 93 else if( OPTxs==1 || OPTxs==2) { return GetOpt12( K); } 94 else if (OPTxs==3 || OPTxs==4) { return GetOpt34( K); } 106 95 else{ 107 96 std::ostringstream errOs; … … 112 101 } 113 102 114 // *********************** OPT=0 : Dostrovski's cross section *****************************115 116 G4double G4PreCompoundAlpha::GetOpt0(const G4double K)117 {118 const G4double r0 = G4PreCompoundParameters::GetAddress()->Getr0();119 // cross section is now given in mb (r0 is in mm) for the sake of consistency120 //with the rest of the options121 return 1.e+25*pi*(r0*ResidualAthrd)*(r0*ResidualAthrd)*GetAlpha()*(1.+GetBeta()/K);122 }123 //124 //----------------125 //126 103 G4double G4PreCompoundAlpha::GetAlpha() 127 104 { 128 105 G4double C = 0.0; 129 G4 double aZ = GetZ() + GetRestZ();106 G4int aZ = theZ + ResidualZ; 130 107 if (aZ <= 30) 131 108 { … … 134 111 else if (aZ <= 50) 135 112 { 136 C = 0.1 + -((aZ-50.)/20.)*0.02;113 C = 0.1 - (aZ-30)*0.001; 137 114 } 138 115 else if (aZ < 70) 139 116 { 140 C = 0.08 + -((aZ-70.)/20.)*0.02;117 C = 0.08 - (aZ-50)*0.001; 141 118 } 142 119 else … … 146 123 return 1.0+C; 147 124 } 148 // 149 //-------------------- 150 // 151 G4double G4PreCompoundAlpha::GetBeta() 152 { 153 return -GetCoulombBarrier(); 154 } 155 // 156 //********************* OPT=1,2 : Chatterjee's cross section ************************ 125 126 // 127 //********************* OPT=1,2 : Chatterjee's cross section ******************** 157 128 //(fitting to cross section from Bechetti & Greenles OM potential) 158 129 159 G4double G4PreCompoundAlpha::GetOpt12(const G4double K) 160 { 161 130 G4double G4PreCompoundAlpha::GetOpt12(G4double K) 131 { 162 132 G4double Kc=K; 163 133 164 134 // JMQ xsec is set constant above limit of validity 165 if (K >50) Kc=50;135 if (K > 50*MeV) { Kc = 50*MeV; } 166 136 167 137 G4double landa ,mu ,nu ,p , Ec,q,r,ji,xs; … … 182 152 p = p0 + p1/Ec + p2/(Ec*Ec); 183 153 landa = landa0*ResidualA + landa1; 184 mu = mu0*std::pow(ResidualA,mu1); 185 nu = std::pow(ResidualA,mu1)*(nu0 + nu1*Ec + nu2*(Ec*Ec)); 154 G4double resmu1 = g4pow->powZ(ResidualA,mu1); 155 mu = mu0*resmu1; 156 nu = resmu1*(nu0 + nu1*Ec + nu2*(Ec*Ec)); 186 157 q = landa - nu/(Ec*Ec) - 2*p*Ec; 187 158 r = mu + 2*nu/Ec + p*(Ec*Ec); … … 194 165 195 166 return xs; 196 197 167 } 198 168 199 169 // *********** OPT=3,4 : Kalbach's cross sections (from PRECO code)************* 200 G4double G4PreCompoundAlpha::GetOpt34( constG4double K)170 G4double G4PreCompoundAlpha::GetOpt34(G4double K) 201 171 // c ** alpha from huizenga and igo 202 172 { 203 204 173 G4double landa, mu, nu, p , signor(1.),sig; 205 174 G4double ec,ecsq,xnulam,etest(0.),a; … … 209 178 G4double spill= 1.e+18; 210 179 211 G4double p0 = 10.95;180 G4double p0 = 10.95; 212 181 G4double p1 = -85.2; 213 182 G4double p2 = 1146.; … … 228 197 p = p0 + p1/ec + p2/ecsq; 229 198 landa = landa0*ResidualA + landa1; 230 a = std::pow(ResidualA,mu1);199 a = g4pow->powZ(ResidualA,mu1); 231 200 mu = mu0 * a; 232 201 nu = a* (nu0+nu1*ec+nu2*ecsq); 233 202 xnulam = nu / landa; 234 if (xnulam > spill) xnulam=0.;235 if (xnulam >= flow) etest = 1.2 *std::sqrt(xnulam);203 if (xnulam > spill) { xnulam=0.; } 204 if (xnulam >= flow) { etest = 1.2 *std::sqrt(xnulam); } 236 205 237 206 a = -2.*p*ec + landa - nu/ecsq; … … 239 208 ecut = 0.; 240 209 cut = a*a - 4.*p*b; 241 if (cut > 0.) ecut = std::sqrt(cut);210 if (cut > 0.) { ecut = std::sqrt(cut); } 242 211 ecut = (ecut-a) / (p+p); 243 212 ecut2 = ecut; 244 //JMQ 290310 for avoiding unphysical increase below minimum (at ecut) 245 //ecut<0 means that there is no cut with energy axis, i.e. xs is set to 0 bellow minimum 246 // if (cut < 0.) ecut2 = ecut - 2.; 247 if (cut < 0.) ecut2 = ecut; 248 elab = K * FragmentA / ResidualA; 213 //JMQ 290310 for avoiding unphysical increase below minimum (at ecut) 214 // ecut<0 means that there is no cut with energy axis, i.e. xs is set 215 // to 0 bellow minimum 216 // if (cut < 0.) ecut2 = ecut - 2.; 217 if (cut < 0.) { ecut2 = ecut; } 218 elab = K * FragmentA / G4double(ResidualA); 249 219 sig = 0.; 250 220 251 221 if (elab <= ec) { //start for E<Ec 252 if (elab > ecut2) sig = (p*elab*elab+a*elab+b) * signor;222 if (elab > ecut2) { sig = (p*elab*elab+a*elab+b) * signor; } 253 223 } //end for E<Ec 254 224 else { //start for E>Ec 255 225 sig = (landa*elab+mu+nu/elab) * signor; 256 226 geom = 0.; 257 if (xnulam < flow || elab < etest) return sig;227 if (xnulam < flow || elab < etest) { return sig; } 258 228 geom = std::sqrt(theA*K); 259 229 geom = 1.23*ResidualAthrd + ra + 4.573/geom; … … 262 232 } //end for E>Ec 263 233 return sig; 264 265 } 266 267 // ************************** end of cross sections ******************************* 234 } -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundDeuteron.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PreCompoundDeuteron.cc,v 1. 6 2010/04/09 14:06:17vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 4-beta-01$26 // $Id: G4PreCompoundDeuteron.cc,v 1.7 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 38 38 // Modified: 39 39 // 21.08.2008 J. M. Quesada add choice of options 40 // 20.08.2010 V.Ivanchenko added G4Pow and G4PreCompoundParameters pointers 41 // use int Z and A and cleanup 40 42 // 41 43 42 44 #include "G4PreCompoundDeuteron.hh" 43 44 G4ReactionProduct * G4PreCompoundDeuteron::GetReactionProduct() const 45 { 46 G4ReactionProduct * theReactionProduct = 47 new G4ReactionProduct(G4Deuteron::DeuteronDefinition()); 48 theReactionProduct->SetMomentum(GetMomentum().vect()); 49 theReactionProduct->SetTotalEnergy(GetMomentum().e()); 50 #ifdef PRECOMPOUND_TEST 51 theReactionProduct->SetCreatorModel("G4PrecompoundModel"); 52 #endif 53 return theReactionProduct; 54 } 55 45 #include "G4Deuteron.hh" 46 47 G4PreCompoundDeuteron::G4PreCompoundDeuteron() 48 : G4PreCompoundIon(G4Deuteron::Deuteron(), &theDeuteronCoulombBarrier) 49 {} 50 51 G4PreCompoundDeuteron::~G4PreCompoundDeuteron() 52 {} 56 53 57 G4double G4PreCompoundDeuteron::FactorialFactor( const G4double N, const G4doubleP)58 { 59 return (N-1.0)*(N-2.0)*(P-1.0)*P/2.0;54 G4double G4PreCompoundDeuteron::FactorialFactor(G4int N, G4int P) 55 { 56 return G4double((N-1)*(N-2)*(P-1)*P)/2.0; 60 57 } 61 58 62 G4double G4PreCompoundDeuteron::CoalescenceFactor( const G4doubleA)63 { 64 return 16.0/ A;59 G4double G4PreCompoundDeuteron::CoalescenceFactor(G4int A) 60 { 61 return 16.0/G4double(A); 65 62 } 66 63 67 G4double G4PreCompoundDeuteron::GetRj( const G4int NumberParticles, const G4int NumberCharged)64 G4double G4PreCompoundDeuteron::GetRj(G4int nParticles, const G4int nCharged) 68 65 { 69 66 G4double rj = 0.0; 70 G4double denominator = NumberParticles*(NumberParticles-1); 71 if(NumberCharged >=1 && (NumberParticles-NumberCharged) >=1) { 72 rj = 2.0*static_cast<G4double>(NumberCharged*(NumberParticles-NumberCharged)) 73 / static_cast<G4double>(denominator); 67 if(nCharged >=1 && (nParticles-nCharged) >=1) { 68 G4double denominator = G4double(nParticles*(nParticles-1)); 69 rj = 2*nCharged*(nParticles-nCharged)/denominator; 74 70 } 75 71 return rj; 76 72 } 77 73 78 //////////////////////////////////////////////////////////////////////////////// ////74 //////////////////////////////////////////////////////////////////////////////// 79 75 //J. M. Quesada (Dec 2007-June 2008): New inverse reaction cross sections 80 76 //OPT=0 Dostrovski's parameterization … … 82 78 //OPT=3,4 Kalbach's parameterization 83 79 // 84 G4double G4PreCompoundDeuteron::CrossSection(const G4double K) 85 { 86 87 ResidualA=GetRestA(); 88 ResidualZ=GetRestZ(); 89 theA=GetA(); 90 theZ=GetZ(); 91 ResidualAthrd=std::pow(ResidualA,0.33333); 92 FragmentA=GetA()+GetRestA(); 93 FragmentAthrd=std::pow(FragmentA,0.33333); 94 95 96 if (OPTxs==0) return GetOpt0( K); 97 else if( OPTxs==1 || OPTxs==2) return GetOpt12( K); 98 else if (OPTxs==3 || OPTxs==4) return GetOpt34( K); 80 G4double G4PreCompoundDeuteron::CrossSection(G4double K) 81 { 82 ResidualA = GetRestA(); 83 ResidualZ = GetRestZ(); 84 theA = GetA(); 85 theZ = GetZ(); 86 ResidualAthrd = ResidualA13(); 87 FragmentA = theA + ResidualA; 88 FragmentAthrd = g4pow->Z13(FragmentA); 89 90 if (OPTxs==0) { return GetOpt0( K); } 91 else if( OPTxs==1 || OPTxs==2) { return GetOpt12( K); } 92 else if (OPTxs==3 || OPTxs==4) { return GetOpt34( K); } 99 93 else{ 100 94 std::ostringstream errOs; … … 105 99 } 106 100 107 // *********************** OPT=0 : Dostrovski's cross section *****************************108 109 G4double G4PreCompoundDeuteron::GetOpt0(const G4double K)110 {111 const G4double r0 = G4PreCompoundParameters::GetAddress()->Getr0();112 // cross section is now given in mb (r0 is in mm) for the sake of consistency113 //with the rest of the options114 return 1.e+25*pi*(r0*ResidualAthrd)*(r0*ResidualAthrd)*GetAlpha()*(1.+GetBeta()/K);115 }116 //117 //---------118 //119 101 G4double G4PreCompoundDeuteron::GetAlpha() 120 102 { 121 103 G4double C = 0.0; 122 G4 double aZ = GetZ() + GetRestZ();104 G4int aZ = theZ + ResidualZ; 123 105 if (aZ >= 70) 124 106 { … … 132 114 } 133 115 // 134 //--------- 135 // 136 G4double G4PreCompoundDeuteron::GetBeta() 137 { 138 return -GetCoulombBarrier(); 139 } 140 // 141 //********************* OPT=1,2 : Chatterjee's cross section ************************ 116 //********************* OPT=1,2 : Chatterjee's cross section ******************** 142 117 //(fitting to cross section from Bechetti & Greenles OM potential) 143 118 144 G4double G4PreCompoundDeuteron::GetOpt12(const G4double K) 145 { 146 147 G4double Kc=K; 148 149 // JMQ xsec is set constat above limit of validity 150 if (K>50) Kc=50; 119 G4double G4PreCompoundDeuteron::GetOpt12(G4double K) 120 { 121 G4double Kc = K; 122 123 // JMQ xsec is set constat above limit of validity 124 if (K > 50*MeV) { Kc = 50*MeV; } 151 125 152 126 G4double landa ,mu ,nu ,p , Ec,q,r,ji,xs; 153 //G4double Eo(0),epsilon1(0),epsilon2(0),discri(0);154 155 127 156 128 G4double p0 = -38.21; … … 165 137 G4double nu2 = -5.924; 166 138 G4double delta=1.2; 167 168 139 169 140 Ec = 1.44*theZ*ResidualZ/(1.5*ResidualAthrd+delta); 170 141 p = p0 + p1/Ec + p2/(Ec*Ec); 171 142 landa = landa0*ResidualA + landa1; 172 mu = mu0*std::pow(ResidualA,mu1); 173 nu = std::pow(ResidualA,mu1)*(nu0 + nu1*Ec + nu2*(Ec*Ec)); 143 G4double resmu1 = g4pow->powZ(ResidualA,mu1); 144 mu = mu0*resmu1; 145 nu = resmu1*(nu0 + nu1*Ec + nu2*(Ec*Ec)); 174 146 q = landa - nu/(Ec*Ec) - 2*p*Ec; 175 147 r = mu + 2*nu/Ec + p*(Ec*Ec); … … 182 154 183 155 return xs; 184 185 156 } 186 157 187 158 // *********** OPT=3,4 : Kalbach's cross sections (from PRECO code)************* 188 G4double G4PreCompoundDeuteron::GetOpt34( constG4double K)159 G4double G4PreCompoundDeuteron::GetOpt34(G4double K) 189 160 // ** d from o.m. of perey and perey 190 161 { … … 196 167 G4double flow = 1.e-18; 197 168 G4double spill= 1.e+18; 198 199 200 169 201 170 G4double p0 = 0.798; … … 210 179 G4double nu2 = -3.592; 211 180 212 213 181 G4double ra=0.80; 214 182 … … 219 187 p = p0 + p1/ec + p2/ecsq; 220 188 landa = landa0*ResidualA + landa1; 221 a = std::pow(ResidualA,mu1);189 a = g4pow->powZ(ResidualA,mu1); 222 190 mu = mu0 * a; 223 191 nu = a* (nu0+nu1*ec+nu2*ecsq); 224 192 xnulam = nu / landa; 225 if (xnulam > spill) xnulam=0.;226 if (xnulam >= flow) etest = 1.2 *std::sqrt(xnulam);193 if (xnulam > spill) { xnulam=0.; } 194 if (xnulam >= flow) { etest = 1.2 *std::sqrt(xnulam); } 227 195 228 196 a = -2.*p*ec + landa - nu/ecsq; … … 230 198 ecut = 0.; 231 199 cut = a*a - 4.*p*b; 232 if (cut > 0.) ecut = std::sqrt(cut);200 if (cut > 0.) { ecut = std::sqrt(cut); } 233 201 ecut = (ecut-a) / (p+p); 234 202 ecut2 = ecut; 235 //JMQ 290310 for avoiding unphysical increase below minimum (at ecut) 236 //ecut<0 means that there is no cut with energy axis, i.e. xs is set to 0 bellow minimum 237 // if (cut < 0.) ecut2 = ecut - 2.; 238 if (cut < 0.) ecut2 = ecut; 239 elab = K * FragmentA / ResidualA; 203 //JMQ 290310 for avoiding unphysical increase below minimum (at ecut) 204 //ecut<0 means that there is no cut with energy axis, i.e. xs is set 205 //to 0 bellow minimum 206 // if (cut < 0.) ecut2 = ecut - 2.; 207 if (cut < 0.) { ecut2 = ecut; } 208 elab = K * FragmentA / G4double(ResidualA); 240 209 sig = 0.; 241 210 242 211 if (elab <= ec) { //start for E<Ec 243 if (elab > ecut2) sig = (p*elab*elab+a*elab+b) * signor;212 if (elab > ecut2) { sig = (p*elab*elab+a*elab+b) * signor; } 244 213 } //end for E<Ec 245 214 else { //start for E>Ec 246 215 sig = (landa*elab+mu+nu/elab) * signor; 247 216 geom = 0.; 248 if (xnulam < flow || elab < etest) return sig;217 if (xnulam < flow || elab < etest) { return sig; } 249 218 geom = std::sqrt(theA*K); 250 219 geom = 1.23*ResidualAthrd + ra + 4.573/geom; … … 253 222 } //end for E>Ec 254 223 return sig; 255 256 } 257 258 // ************************** end of cross sections ******************************* 259 260 261 262 224 } -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundEmission.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4PreCompoundEmission.cc,v 1.28 2010/02/25 10:27:36 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 26 // $Id: G4PreCompoundEmission.cc,v 1.32 2010/09/01 15:11:10 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 28 // 30 29 // ------------------------------------------------------------------- … … 41 40 // 19.01.2010 V.Ivanchenko simplified computation of parameter an, sample cosTheta 42 41 // instead of theta; protect all calls to sqrt 42 // 20.08.2010 V.Ivanchenko added G4Pow and G4PreCompoundParameters pointers 43 // use int Z and A and cleanup 43 44 // 44 45 45 46 #include "G4PreCompoundEmission.hh" 46 47 #include "G4PreCompoundParameters.hh" 47 48 48 #include "G4PreCompoundEmissionFactory.hh" 49 49 #include "G4HETCEmissionFactory.hh" 50 51 const G4PreCompoundEmission & 52 G4PreCompoundEmission::operator=(const G4PreCompoundEmission &) 53 { 54 throw G4HadronicException(__FILE__, __LINE__, 55 "G4PreCompoundEmission::operator= meant to not be accessable"); 56 return *this; 57 } 58 59 60 G4bool G4PreCompoundEmission::operator==(const G4PreCompoundEmission &) const 61 { 62 return false; 63 } 64 65 G4bool G4PreCompoundEmission::operator!=(const G4PreCompoundEmission &) const 66 { 67 return true; 68 } 50 #include "G4HadronicException.hh" 51 #include "G4Pow.hh" 52 #include "Randomize.hh" 69 53 70 54 G4PreCompoundEmission::G4PreCompoundEmission() 71 55 { 72 56 theFragmentsFactory = new G4PreCompoundEmissionFactory(); 73 theFragmentsVector = new G4PreCompoundFragmentVector(theFragmentsFactory->GetFragmentVector()); 57 theFragmentsVector = 58 new G4PreCompoundFragmentVector(theFragmentsFactory->GetFragmentVector()); 59 g4pow = G4Pow::GetInstance(); 60 theParameters = G4PreCompoundParameters::GetAddress(); 74 61 } 75 62 76 63 G4PreCompoundEmission::~G4PreCompoundEmission() 77 64 { 78 if (theFragmentsFactory) delete theFragmentsFactory;79 if (theFragmentsVector) delete theFragmentsVector;65 if (theFragmentsFactory) { delete theFragmentsFactory; } 66 if (theFragmentsVector) { delete theFragmentsVector; } 80 67 } 81 68 82 69 void G4PreCompoundEmission::SetDefaultModel() 83 70 { 84 if (theFragmentsFactory) delete theFragmentsFactory;71 if (theFragmentsFactory) { delete theFragmentsFactory; } 85 72 theFragmentsFactory = new G4PreCompoundEmissionFactory(); 86 73 if (theFragmentsVector) … … 90 77 else 91 78 { 92 theFragmentsVector = new G4PreCompoundFragmentVector(theFragmentsFactory->GetFragmentVector());93 } 94 theFragmentsVector->ResetStage();79 theFragmentsVector = 80 new G4PreCompoundFragmentVector(theFragmentsFactory->GetFragmentVector()); 81 } 95 82 return; 96 83 } … … 106 93 else 107 94 { 108 theFragmentsVector = new G4PreCompoundFragmentVector(theFragmentsFactory->GetFragmentVector());109 } 110 theFragmentsVector->ResetStage();95 theFragmentsVector = 96 new G4PreCompoundFragmentVector(theFragmentsFactory->GetFragmentVector()); 97 } 111 98 return; 112 99 } … … 114 101 G4ReactionProduct * G4PreCompoundEmission::PerformEmission(G4Fragment & aFragment) 115 102 { 116 #ifdef debug117 G4Fragment InitialState(aFragment);118 #endif119 103 // Choose a Fragment for emission 120 G4VPreCompoundFragment * the Fragment = theFragmentsVector->ChooseFragment();121 if (the Fragment == 0)122 { 123 G4c err<< "G4PreCompoundEmission::PerformEmission : I couldn't choose a fragment\n"104 G4VPreCompoundFragment * thePreFragment = theFragmentsVector->ChooseFragment(); 105 if (thePreFragment == 0) 106 { 107 G4cout << "G4PreCompoundEmission::PerformEmission : I couldn't choose a fragment\n" 124 108 << "while trying to de-excite\n" 125 << aFragment << '\n';109 << aFragment << G4endl; 126 110 throw G4HadronicException(__FILE__, __LINE__, ""); 127 111 } 128 112 // Kinetic Energy of emitted fragment 129 G4double KineticEnergyOfEmittedFragment = theFragment->GetKineticEnergy(aFragment); 113 G4double kinEnergyOfEmittedFragment = thePreFragment->GetKineticEnergy(aFragment); 114 if(kinEnergyOfEmittedFragment < 0.0) { kinEnergyOfEmittedFragment = 0.0; } 130 115 131 116 // Calculate the fragment momentum (three vector) 132 G4ThreeVector momentum = AngularDistribution(theFragment,aFragment,KineticEnergyOfEmittedFragment);117 AngularDistribution(thePreFragment,aFragment,kinEnergyOfEmittedFragment); 133 118 134 119 // Mass of emittef fragment 135 G4double EmittedMass = the Fragment->GetNuclearMass();120 G4double EmittedMass = thePreFragment->GetNuclearMass(); 136 121 137 122 // Now we can calculate the four momentum 138 123 // both options are valid and give the same result but 2nd one is faster 139 // G4LorentzVector EmittedMomentum(momentum,std::sqrt(momentum.mag2()+EmittedMass*EmittedMass));140 G4LorentzVector EmittedMomentum(momentum,EmittedMass+KineticEnergyOfEmittedFragment);124 G4LorentzVector Emitted4Momentum(theFinalMomentum, 125 EmittedMass + kinEnergyOfEmittedFragment); 141 126 142 127 // Perform Lorentz boost 143 EmittedMomentum.boost(aFragment.GetMomentum().boostVector()); 128 G4LorentzVector Rest4Momentum = aFragment.GetMomentum(); 129 Emitted4Momentum.boost(Rest4Momentum.boostVector()); 144 130 145 131 // Set emitted fragment momentum 146 theFragment->SetMomentum(EmittedMomentum); 147 132 thePreFragment->SetMomentum(Emitted4Momentum); 148 133 149 134 // NOW THE RESIDUAL NUCLEUS 150 135 // ------------------------ 151 152 // Now the residual nucleus. 153 // The energy conservation says that 154 G4double ResidualEcm = 155 // aFragment.GetGroundStateMass() + aFragment.GetExcitationEnergy() // initial energy in cm 156 aFragment.GetMomentum().m() 157 - (EmittedMass+KineticEnergyOfEmittedFragment); 158 159 // Then the four momentum for residual is 160 G4LorentzVector RestMomentum(-momentum,ResidualEcm); 161 // This could save a Lorentz boost 162 // G4LorentzVector RestMomentum2(aFragment.GetMomentum()-EmittedMomentum); 163 164 // Just for test 165 // Excitation energy 166 // G4double anU = ResidualEcm - theFragment->GetRestNuclearMass(); 167 // This is equivalent 168 // G4double anU = theFragment->GetMaximalKineticEnergy() - KineticEnergyOfEmittedFragment + 169 // theFragment->GetCoulombBarrier(); 170 171 // check that Excitation energy is >= 0 172 G4double anU = RestMomentum.m()-theFragment->GetRestNuclearMass(); 173 if (anU < 0.0) { 174 throw G4HadronicException(__FILE__, __LINE__, 175 "G4PreCompoundModel::DeExcite: Excitation energy less than 0!"); 176 } 177 136 137 Rest4Momentum -= Emitted4Momentum; 138 178 139 // Update nucleus parameters: 179 140 // -------------------------- … … 181 142 // Number of excitons 182 143 aFragment.SetNumberOfParticles(aFragment.GetNumberOfParticles()- 183 static_cast<G4int>(theFragment->GetA()));144 thePreFragment->GetA()); 184 145 // Number of charges 185 146 aFragment.SetNumberOfCharged(aFragment.GetNumberOfCharged()- 186 static_cast<G4int>(theFragment->GetZ())); 187 188 // Atomic number 189 aFragment.SetA(theFragment->GetRestA()); 190 191 // Charge 192 aFragment.SetZ(theFragment->GetRestZ()); 193 194 195 // Perform Lorentz boosts 196 RestMomentum.boost(aFragment.GetMomentum().boostVector()); 197 198 // Update nucleus momentum 199 aFragment.SetMomentum(RestMomentum); 147 thePreFragment->GetZ()); 148 149 // Z and A 150 aFragment.SetZandA_asInt(thePreFragment->GetRestZ(), 151 thePreFragment->GetRestA()); 152 153 // Update nucleus momentum 154 // A check on consistence of Z, A, and mass will be performed 155 aFragment.SetMomentum(Rest4Momentum); 200 156 201 157 // Create a G4ReactionProduct 202 G4ReactionProduct * MyRP = theFragment->GetReactionProduct(); 203 #ifdef PRECOMPOUND_TEST 204 MyRP->SetCreatorModel("G4PreCompoundModel"); 205 #endif 206 #ifdef debug 207 CheckConservation(InitialState,aFragment,MyRP); 208 #endif 158 G4ReactionProduct * MyRP = thePreFragment->GetReactionProduct(); 159 160 //G4cout << "G4PreCompoundEmission::Fragment emitted" << G4endl; 161 //G4cout << thePreFragment << G4endl; 162 209 163 return MyRP; 210 164 } 211 165 212 G4ThreeVector 213 G4PreCompoundEmission::AngularDistribution(G4VPreCompoundFragment * theFragment,166 void 167 G4PreCompoundEmission::AngularDistribution(G4VPreCompoundFragment* thePreFragment, 214 168 const G4Fragment& aFragment, 215 const G4double kinEnergyOfEmittedFrag) const216 { 217 G4 doublep = aFragment.GetNumberOfParticles();218 G4 doubleh = aFragment.GetNumberOfHoles();169 G4double ekin) 170 { 171 G4int p = aFragment.GetNumberOfParticles(); 172 G4int h = aFragment.GetNumberOfHoles(); 219 173 G4double U = aFragment.GetExcitationEnergy(); 220 174 221 G4double ekin = std::max(0.0, kinEnergyOfEmittedFrag);222 223 175 // Emission particle separation energy 224 G4double Bemission = the Fragment->GetBindingEnergy();176 G4double Bemission = thePreFragment->GetBindingEnergy(); 225 177 226 178 // Fermi energy 227 G4double Ef = G4PreCompoundParameters::GetAddress()->GetFermiEnergy();179 G4double Ef = theParameters->GetFermiEnergy(); 228 180 229 181 // … … 231 183 // G4double g = (6.0/pi2)*aFragment.GetA()* 232 184 233 G4double g = (6.0/pi2)*aFragment.GetA() 234 *G4PreCompoundParameters::GetAddress()->GetLevelDensity(); 185 G4double g = (6.0/pi2)*aFragment.GetA_asInt()*theParameters->GetLevelDensity(); 235 186 236 187 // Average exciton energy relative to bottom of nuclear well 237 G4double Eav = 2 .0*p*(p+1.0)/((p+h)*g);188 G4double Eav = 2*p*(p+1)/((p+h)*g); 238 189 239 190 // Excitation energy relative to the Fermi Level … … 241 192 // G4double Uf = U - KineticEnergyOfEmittedFragment - Bemission; 242 193 243 G4double w_num = rho(p+1, h,g,Uf,Ef);244 G4double w_den = rho(p, h,g,Uf,Ef);194 G4double w_num = rho(p+1, h, g, Uf, Ef); 195 G4double w_den = rho(p, h, g, Uf, Ef); 245 196 if (w_num > 0.0 && w_den > 0.0) 246 197 { … … 253 204 } 254 205 255 256 206 // VI + JMQ 19/01/2010 update computation of the parameter an 257 207 // … … 262 212 G4double zeta = std::max(1.0,9.3/std::sqrt(ekin/MeV)); 263 213 264 an = 3.0*std::sqrt((ProjEnergy+Ef)*Eeff)/(zeta*Eav); 214 // This should be the projectile energy. If I would know which is 215 // the projectile (proton, neutron) I could remove the binding energy. 216 // But, what happens if INC precedes precompound? This approximation 217 // seems to work well enough 218 G4double ProjEnergy = aFragment.GetExcitationEnergy(); 219 220 an = 3*std::sqrt((ProjEnergy+Ef)*Eeff)/(zeta*Eav); 265 221 266 222 G4int ne = aFragment.GetNumberOfExcitons() - 1; … … 283 239 } 284 240 285 G4double phi = twopi*G4UniformRand();241 G4double phi = CLHEP::twopi*G4UniformRand(); 286 242 287 243 // Calculate the momentum magnitude of emitted fragment 288 G4double pmag = std::sqrt(ekin*(ekin + 2.0*the Fragment->GetNuclearMass()));244 G4double pmag = std::sqrt(ekin*(ekin + 2.0*thePreFragment->GetNuclearMass())); 289 245 290 246 G4double sint = std::sqrt((1.0-cost)*(1.0+cost)); 291 247 292 G4ThreeVector momentum(pmag*std::cos(phi)*sint,pmag*std::sin(phi)*sint,pmag*cost); 248 theFinalMomentum.set(pmag*std::cos(phi)*sint,pmag*std::sin(phi)*sint,pmag*cost); 249 293 250 // theta is the angle wrt the incident direction 294 momentum.rotateUz(theIncidentDirection); 295 296 return momentum; 297 } 298 299 G4double G4PreCompoundEmission::rho(const G4double p, const G4double h, const G4double g, 300 const G4double E, const G4double Ef) const 251 G4ThreeVector theIncidentDirection = aFragment.GetMomentum().vect().unit(); 252 theFinalMomentum.rotateUz(theIncidentDirection); 253 } 254 255 G4double G4PreCompoundEmission::rho(G4int p, G4int h, G4double g, 256 G4double E, G4double Ef) const 301 257 { 302 258 // 25.02.2010 V.Ivanchenko added more protections … … 306 262 if ( E - Aph < 0.0) { return 0.0; } 307 263 308 G4double logConst = (p+h)*std::log(g) - logfactorial(p+h-1) - logfactorial(p) - logfactorial(h); 264 G4double logConst = (p+h)*std::log(g) 265 - g4pow->logfactorial(p+h-1) - g4pow->logfactorial(p) - g4pow->logfactorial(h); 309 266 310 267 // initialise values using j=0 … … 312 269 G4double t1=1; 313 270 G4double t2=1; 314 G4double logt3 =(p+h-1) * std::log(E-Aph) + logConst;271 G4double logt3 = (p+h-1) * std::log(E-Aph) + logConst; 315 272 const G4double logmax = 200.; 316 273 if(logt3 > logmax) { logt3 = logmax; } … … 333 290 return tot; 334 291 } 335 336 G4double G4PreCompoundEmission::factorial(G4double a) const337 {338 // Values of factorial function from 0 to 60339 const G4int factablesize = 61;340 static const G4double fact[factablesize] =341 {342 1.0, // 0!343 1.0, // 1!344 2.0, // 2!345 6.0, // 3!346 24.0, // 4!347 120.0, // 5!348 720.0, // 6!349 5040.0, // 7!350 40320.0, // 8!351 362880.0, // 9!352 3628800.0, // 10!353 39916800.0, // 11!354 479001600.0, // 12!355 6227020800.0, // 13!356 87178291200.0, // 14!357 1307674368000.0, // 15!358 20922789888000.0, // 16!359 355687428096000.0, // 17!360 6402373705728000.0, // 18!361 121645100408832000.0, // 19!362 2432902008176640000.0, // 20!363 51090942171709440000.0, // 21!364 1124000727777607680000.0, // 22!365 25852016738884976640000.0, // 23!366 620448401733239439360000.0, // 24!367 15511210043330985984000000.0, // 25!368 403291461126605635584000000.0, // 26!369 10888869450418352160768000000.0, // 27!370 304888344611713860501504000000.0, // 28!371 8841761993739701954543616000000.0, // 29!372 265252859812191058636308480000000.0, // 30!373 8222838654177922817725562880000000.0, // 31!374 263130836933693530167218012160000000.0, // 32!375 8683317618811886495518194401280000000.0, // 33!376 295232799039604140847618609643520000000.0, // 34!377 10333147966386144929666651337523200000000.0, // 35!378 371993326789901217467999448150835200000000.0, // 36!379 13763753091226345046315979581580902400000000.0, // 37!380 523022617466601111760007224100074291200000000.0, // 38!381 20397882081197443358640281739902897356800000000.0, // 39!382 815915283247897734345611269596115894272000000000.0, // 40!383 33452526613163807108170062053440751665152000000000.0, // 41!384 1405006117752879898543142606244511569936384000000000.0, // 42!385 60415263063373835637355132068513997507264512000000000.0, // 43!386 2658271574788448768043625811014615890319638528000000000.0, // 44!387 119622220865480194561963161495657715064383733760000000000.0, // 45!388 5502622159812088949850305428800254892961651752960000000000.0, // 46!389 258623241511168180642964355153611979969197632389120000000000.0, // 47!390 12413915592536072670862289047373375038521486354677760000000000.0, // 48!391 608281864034267560872252163321295376887552831379210240000000000.0, // 49!392 30414093201713378043612608166064768844377641568960512000000000000.0, // 50!393 1551118753287382280224243016469303211063259720016986112000000000000.0, // 51!394 80658175170943878571660636856403766975289505440883277824000000000000.0, // 52!395 4274883284060025564298013753389399649690343788366813724672000000000000.0, // 53!396 230843697339241380472092742683027581083278564571807941132288000000000000.0, // 54!397 12696403353658275925965100847566516959580321051449436762275840000000000000.0, // 55!398 710998587804863451854045647463724949736497978881168458687447040000000000000.0, // 56!399 40526919504877216755680601905432322134980384796226602145184481280000000000000.0, // 57!400 2350561331282878571829474910515074683828862318181142924420699914240000000000000.0, // 58!401 138683118545689835737939019720389406345902876772687432540821294940160000000000000.0, // 59!402 8320987112741390144276341183223364380754172606361245952449277696409600000000000000.0 // 60!403 };404 // fact[0] = 1;405 // for (G4int n = 1; n < 21; n++) {406 // fact[n] = fact[n-1]*static_cast<G4double>(n);407 // }408 G4double result(0.0);409 G4int ia = static_cast<G4int>(a);410 if (ia < factablesize)411 {412 result = fact[ia];413 }414 else415 {416 result = fact[factablesize-1];417 for (G4int n = factablesize; n < ia+1; ++n)418 {419 result *= static_cast<G4double>(n);420 }421 }422 423 return result;424 }425 G4double G4PreCompoundEmission::logfactorial(G4double a) const426 {427 // Values of logs of factorial function from 0 to 60428 429 G4double result(0.0);430 const G4int factablesize = 61;431 const G4double halfLn2pi = 0.918938533; // 0.5 log(2* pi)432 static G4double logfact[factablesize];433 static bool needinit=true;434 435 if (needinit)436 {437 needinit=false;438 for ( G4int n=0; n < factablesize; ++n)439 {440 logfact[n]=std::log(factorial(n));441 }442 }443 444 G4int ia = static_cast<G4int>(a);445 if (ia < factablesize)446 {447 result = logfact[ia];448 } else {449 result = (ia+0.5)*std::log(G4double(ia)) - ia + halfLn2pi;450 }451 452 return result;453 }454 455 #ifdef debug456 void G4PreCompoundEmission::CheckConservation(const G4Fragment & theInitialState,457 const G4Fragment & theResidual,458 G4ReactionProduct * theEmitted) const459 {460 G4double ProductsEnergy = theEmitted->GetTotalEnergy() + theResidual.GetMomentum().e();461 G4ThreeVector ProductsMomentum(theEmitted->GetMomentum()+theResidual.GetMomentum().vect());462 G4int ProductsA = theEmitted->GetDefinition()->GetBaryonNumber() + theResidual.GetA();463 G4int ProductsZ = theEmitted->GetDefinition()->GetPDGCharge() + theResidual.GetZ();464 465 if (ProductsA != theInitialState.GetA()) {466 G4cout << "!!!!!!!!!! Baryonic Number Conservation Violation !!!!!!!!!!" << G4endl;467 G4cout << "G4PreCompoundEmission.cc: Barionic Number Conservation"468 << G4endl;469 G4cout << "Initial A = " << theInitialState.GetA()470 << " Fragments A = " << ProductsA << " Diference --> "471 << theInitialState.GetA() - ProductsA << G4endl;472 }473 if (ProductsZ != theInitialState.GetZ()) {474 G4cout << "!!!!!!!!!! Charge Conservation Violation !!!!!!!!!!" << G4endl;475 G4cout << "G4PreCompoundEmission.cc: Charge Conservation test"476 << G4endl;477 G4cout << "Initial Z = " << theInitialState.GetZ()478 << " Fragments Z = " << ProductsZ << " Diference --> "479 << theInitialState.GetZ() - ProductsZ << G4endl;480 }481 if (std::abs(ProductsEnergy-theInitialState.GetMomentum().e()) > 10.0*eV) {482 G4cout << "!!!!!!!!!! Energy Conservation Violation !!!!!!!!!!" << G4endl;483 G4cout << "G4PreCompoundEmission.cc: Energy Conservation test"484 << G4endl;485 G4cout << "Initial E = " << theInitialState.GetMomentum().e()/MeV << " MeV"486 << " Fragments E = " << ProductsEnergy/MeV << " MeV Diference --> "487 << (theInitialState.GetMomentum().e() - ProductsEnergy)/MeV << " MeV" << G4endl;488 }489 if (std::abs(ProductsMomentum.x()-theInitialState.GetMomentum().x()) > 10.0*eV ||490 std::abs(ProductsMomentum.y()-theInitialState.GetMomentum().y()) > 10.0*eV ||491 std::abs(ProductsMomentum.z()-theInitialState.GetMomentum().z()) > 10.0*eV) {492 G4cout << "!!!!!!!!!! Momentum Conservation Violation !!!!!!!!!!" << G4endl;493 G4cout << "G4PreCompoundEmission.cc: Momentum Conservation test"494 << G4endl;495 G4cout << "Initial P = " << theInitialState.GetMomentum().vect() << " MeV"496 << " Fragments P = " << ProductsMomentum << " MeV Diference --> "497 << theInitialState.GetMomentum().vect() - ProductsMomentum << " MeV" << G4endl;498 }499 return;500 }501 502 #endif -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundEmissionFactory.cc
r819 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PreCompoundEmissionFactory.cc,v 1.5 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 29 26 30 #include "G4PreCompoundEmissionFactory.hh" 27 31 … … 33 37 #include "G4PreCompoundAlpha.hh" 34 38 39 G4PreCompoundEmissionFactory::G4PreCompoundEmissionFactory() 40 {} 35 41 36 const G4PreCompoundEmissionFactory & G4PreCompoundEmissionFactory:: 37 operator=(const G4PreCompoundEmissionFactory & ) 38 { 39 throw G4HadronicException(__FILE__, __LINE__, "G4PreCompoundEmissionFactory::operator= meant to not be accessable."); 40 return *this; 41 } 42 43 G4bool G4PreCompoundEmissionFactory:: 44 operator==(const G4PreCompoundEmissionFactory & ) const 45 { 46 throw G4HadronicException(__FILE__, __LINE__, "G4PreCompoundEmissionFactory::operator== meant to not be accessable."); 47 return false; 48 } 49 50 G4bool G4PreCompoundEmissionFactory:: 51 operator!=(const G4PreCompoundEmissionFactory & ) const 52 { 53 throw G4HadronicException(__FILE__, __LINE__, "G4PreCompoundEmissionFactory::operator!= meant to not be accessable."); 54 return true; 55 } 56 42 G4PreCompoundEmissionFactory::~G4PreCompoundEmissionFactory() 43 {} 57 44 58 45 std::vector<G4VPreCompoundFragment*> * G4PreCompoundEmissionFactory:: -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundFragment.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PreCompoundFragment.cc,v 1. 8 2009/02/10 16:01:37vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 4-beta-01$26 // $Id: G4PreCompoundFragment.cc,v 1.9 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 28 // 29 29 // J. M. Quesada (August 2008). 30 30 // Based on previous work by V. Lara 31 // JMQ (06 September 2008) Also external choice has been added for:32 // - superimposed Coulomb barrier (if useSICB=true)33 31 // 32 // Modified: 33 // 06.09.2008 JMQ Also external choice has been added for: 34 // - superimposed Coulomb barrier (if useSICB=true) 35 // 20.08.2010 V.Ivanchenko cleanup 36 // 37 34 38 #include "G4PreCompoundFragment.hh" 35 39 36 40 G4PreCompoundFragment:: 37 G4PreCompoundFragment(const G4PreCompoundFragment &right) : 38 G4VPreCompoundFragment(right) 41 G4PreCompoundFragment(const G4ParticleDefinition* part, 42 G4VCoulombBarrier* aCoulombBarrier) 43 : G4VPreCompoundFragment(part,aCoulombBarrier) 39 44 {} 40 45 41 42 G4PreCompoundFragment::43 G4PreCompoundFragment(const G4double anA,44 const G4double aZ,45 G4VCoulombBarrier* aCoulombBarrier,46 const G4String & aName):47 G4VPreCompoundFragment(anA,aZ,aCoulombBarrier,aName)48 {49 }50 51 52 53 46 G4PreCompoundFragment::~G4PreCompoundFragment() 54 { 55 } 56 57 58 const G4PreCompoundFragment & G4PreCompoundFragment:: 59 operator= (const G4PreCompoundFragment & right) 60 { 61 if (&right != this) this->G4VPreCompoundFragment::operator=(right); 62 return *this; 63 } 64 65 G4int G4PreCompoundFragment::operator==(const G4PreCompoundFragment & right) const 66 { 67 return G4VPreCompoundFragment::operator==(right); 68 } 69 70 G4int G4PreCompoundFragment::operator!=(const G4PreCompoundFragment & right) const 71 { 72 return G4VPreCompoundFragment::operator!=(right); 73 } 74 47 {} 75 48 76 49 G4double G4PreCompoundFragment:: 77 50 CalcEmissionProbability(const G4Fragment & aFragment) 78 51 { 79 // If theCoulombBarrier effect is included in the emission probabilities 80 //if (GetMaximalKineticEnergy() <= 0.0) 81 G4double limit;82 if(OPTxs==0 || useSICB) limit= theCoulombBarrier;83 else limit=0.;52 //G4cout << theCoulombBarrier << " " << GetMaximalKineticEnergy() << G4endl; 53 // If theCoulombBarrier effect is included in the emission probabilities 54 //if (GetMaximalKineticEnergy() <= 0.0) 55 G4double limit = 0.0; 56 if(OPTxs==0 || useSICB) { limit = theCoulombBarrier; } 84 57 if (GetMaximalKineticEnergy() <= limit) 85 58 { 86 59 theEmissionProbability = 0.0; 87 60 return 0.0; 88 }89 // If theCoulombBarrier effect is included in the emission probabilities90 // G4double LowerLimit = 0.;91 // Coulomb barrier is the lower limit92 // of integration over kinetic energy61 } 62 // If theCoulombBarrier effect is included in the emission probabilities 63 // G4double LowerLimit = 0.; 64 // Coulomb barrier is the lower limit 65 // of integration over kinetic energy 93 66 G4double LowerLimit = limit; 94 67 95 // Excitation energy of nucleus after fragment emission is the upper limit of integration over kinetic energy 68 // Excitation energy of nucleus after fragment emission is the upper 69 //limit of integration over kinetic energy 96 70 G4double UpperLimit = GetMaximalKineticEnergy(); 97 71 98 72 theEmissionProbability = 99 73 IntegrateEmissionProbability(LowerLimit,UpperLimit,aFragment); 74 /* 75 G4cout << "## G4PreCompoundFragment::CalcEmisProb " 76 << "Z= " << aFragment.GetZ_asInt() 77 << " A= " << aFragment.GetA_asInt() 78 << " Elow= " << LowerLimit/MeV 79 << " Eup= " << UpperLimit/MeV 80 << " prob= " << theEmissionProbability 81 << G4endl; 82 */ 100 83 return theEmissionProbability; 101 84 } 102 85 103 86 G4double G4PreCompoundFragment:: 104 IntegrateEmissionProbability( const G4double & Low, const G4double &Up,87 IntegrateEmissionProbability(G4double Low, G4double Up, 105 88 const G4Fragment & aFragment) 106 89 { … … 134 117 G4double Total = 0.0; 135 118 136 137 for (G4int i = 0; i < N; i++) 119 for (G4int i = 0; i < N; ++i) 138 120 { 139 G4double KineticE = ((Up-Low)*x[i]+(Up+Low))/2.0;121 G4double KineticE = 0.5*((Up-Low)*x[i]+(Up+Low)); 140 122 Total += w[i]*ProbabilityDistributionFunction(KineticE, aFragment); 141 123 } 142 Total *= (Up-Low)/2.0;124 Total *= 0.5*(Up-Low); 143 125 return Total; 144 126 } 145 146 147 148 127 149 128 G4double G4PreCompoundFragment:: 150 129 GetKineticEnergy(const G4Fragment & aFragment) 151 130 { 131 //let's keep this way for consistency with CalcEmissionProbability method 132 G4double V = 0.0; 133 if(OPTxs==0 || useSICB) { V = theCoulombBarrier; } 152 134 153 // G4double V = this->GetCoulombBarrier();// alternative way for accessing the Coulomb barrier 154 // //should be equivalent (in fact it is) 155 G4double V; 156 if(OPTxs==0 || useSICB) V= theCoulombBarrier;//let's keep this way for consistency with CalcEmissionProbability method 157 else V=0.; 158 159 G4double Tmax = GetMaximalKineticEnergy() ; 135 G4double Tmax = GetMaximalKineticEnergy(); 136 if(Tmax < V) { return 0.0; } 160 137 G4double T(0.0); 161 G4double NormalizedProbability(1.0); 138 G4double Probability(1.0); 139 G4double maxProbability = GetEmissionProbability(); 162 140 do 163 141 { 164 T = V+ G4UniformRand()*(Tmax-V);165 NormalizedProbability = ProbabilityDistributionFunction(T,aFragment)/GetEmissionProbability();166 } while ( G4UniformRand() > NormalizedProbability);142 T = V + G4UniformRand()*(Tmax-V); 143 Probability = ProbabilityDistributionFunction(T,aFragment); 144 } while (maxProbability*G4UniformRand() > Probability); 167 145 return T; 168 146 } -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundFragmentVector.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PreCompoundFragmentVector.cc,v 1.1 1 2009/02/10 16:01:37vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 4-beta-01$26 // $Id: G4PreCompoundFragmentVector.cc,v 1.12 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 28 // 29 29 // Hadronic Process: Nuclear Preequilibrium 30 30 // by V. Lara 31 // 32 // Modified: 33 // 27.08.2010 V.Ivanchenko moved constructor and destructor to source, 34 // simplify run time computations making inlined 35 // 31 36 32 37 #include "G4PreCompoundFragmentVector.hh" 33 #include "G4HadronicException.hh"34 38 35 const G4PreCompoundFragmentVector & 36 G4PreCompoundFragmentVector:: 37 operator=(const G4PreCompoundFragmentVector &) 39 G4PreCompoundFragmentVector::G4PreCompoundFragmentVector(pcfvector * avector) 40 : theChannels(0), nChannels(0) 38 41 { 39 throw G4HadronicException(__FILE__, __LINE__, "G4PreCompoundFragmentVector::operator= meant to not be accessable"); 40 return *this; 42 SetVector(avector); 41 43 } 42 44 45 G4PreCompoundFragmentVector::~G4PreCompoundFragmentVector() 46 {} 43 47 44 G4bool G4PreCompoundFragmentVector:: 45 operator==(const G4PreCompoundFragmentVector &) const 48 void G4PreCompoundFragmentVector::SetVector(pcfvector * avector) 46 49 { 47 return false; 50 theChannels = avector; 51 if(theChannels) { 52 nChannels = theChannels->size(); 53 probabilities.resize(nChannels); 54 } 48 55 } 49 56 50 G4bool G4PreCompoundFragmentVector:: 51 operator!=(const G4PreCompoundFragmentVector &) const 52 { 53 return true; 57 //for inverse cross section choice 58 void G4PreCompoundFragmentVector::SetOPTxs(G4int opt) 59 { 60 for (G4int i=0; i< nChannels; ++i) { 61 (*theChannels)[i]->SetOPTxs(opt); 62 } 54 63 } 55 64 56 57 58 G4double G4PreCompoundFragmentVector:: 59 CalculateProbabilities(const G4Fragment & aFragment) 60 { 61 TotalEmissionProbability = 0.0; 62 pcfvector::iterator aChannel; 63 for (aChannel=theChannels->begin(); aChannel != theChannels->end(); 64 aChannel++) 65 { 66 // Calculate emission probailities 67 // Compute total (integrated over kinetic energy) emission 68 // probability of a fragment and 69 // Summing channel emission probabilities 70 TotalEmissionProbability += (*aChannel)->CalcEmissionProbability(aFragment); 71 } 72 return TotalEmissionProbability; 65 //for superimposed Coulomb Barrier for inverse cross sections 66 void G4PreCompoundFragmentVector::UseSICB(G4bool use) 67 { 68 for (G4int i=0; i< nChannels; ++i) { 69 (*theChannels)[i]->UseSICB(use); 70 } 73 71 } 74 72 75 76 G4VPreCompoundFragment * G4PreCompoundFragmentVector::77 ChooseFragment(void)78 {79 const G4int NumOfFrags = theChannels->size();80 std::vector<G4double> running;81 running.reserve(NumOfFrags);82 83 pcfvector::iterator i;84 G4double accumulation = 0.0;85 for (i = theChannels->begin(); i != theChannels->end(); ++i) {86 accumulation += (*i)->GetEmissionProbability();87 88 running.push_back(accumulation);89 }90 91 // Choose an emission channel92 G4double aChannel = G4UniformRand()*TotalEmissionProbability;93 G4int ChosenChannel = -1;94 std::vector<G4double>::iterator ich;95 for (ich = running.begin(); ich != running.end(); ++ich)96 {97 if (aChannel <= *ich)98 {99 #ifdef G4NO_ISO_VECDIST100 std::vector<G4double>::difference_type n = 0;101 std::distance(running.begin(),ich,n);102 ChosenChannel = n;103 #else104 ChosenChannel = std::distance(running.begin(),ich);105 #endif106 break;107 }108 }109 running.clear();110 if (ChosenChannel < 0)111 {112 G4cerr113 << "G4PreCompoundFragmentVector::ChooseFragment: I can't determine a channel\n"114 << "Probabilities: ";115 for (i = theChannels->begin(); i != theChannels->end(); ++i)116 {117 G4cout << (*i)->GetEmissionProbability() << " ";118 }119 G4cout << '\n';120 return 0;121 }122 else123 {124 for (i = theChannels->begin(); i != theChannels->end(); ++i)125 {126 (*i)->IncrementStage();127 }128 }129 130 return theChannels->operator[](ChosenChannel);131 } -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundHe3.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4PreCompoundHe3.cc,v 1.6 2010/04/09 14:06:17 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 26 // $Id: G4PreCompoundHe3.cc,v 1.7 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 28 // 30 29 // ------------------------------------------------------------------- … … 39 38 // Modified: 40 39 // 21.08.2008 J. M. Quesada add choice of options 40 // 20.08.2010 V.Ivanchenko added G4Pow and G4PreCompoundParameters pointers 41 // use int Z and A and cleanup 41 42 // 42 43 43 44 #include "G4PreCompoundHe3.hh" 44 45 G4ReactionProduct * G4PreCompoundHe3::GetReactionProduct() const 46 { 47 G4ReactionProduct * theReactionProduct = 48 new G4ReactionProduct(G4He3::He3Definition()); 49 theReactionProduct->SetMomentum(GetMomentum().vect()); 50 theReactionProduct->SetTotalEnergy(GetMomentum().e()); 51 #ifdef PRECOMPOUND_TEST 52 theReactionProduct->SetCreatorModel("G4PrecompoundModel"); 53 #endif 54 return theReactionProduct; 55 } 56 57 G4double G4PreCompoundHe3::FactorialFactor(const G4double N, const G4double P) 58 { 59 return 60 (N-3.0)*(P-2.0)*( 61 (((N-2.0)*(P-1.0))/2.0) *( 62 (((N-1.0)*P)/3.0) 63 ) 64 ); 65 } 66 67 G4double G4PreCompoundHe3::CoalescenceFactor(const G4double A) 68 { 69 return 243.0/(A*A); 45 #include "G4He3.hh" 46 47 G4PreCompoundHe3::G4PreCompoundHe3() 48 : G4PreCompoundIon(G4He3::He3(), &theHe3CoulombBarrier) 49 {} 50 51 G4PreCompoundHe3::~G4PreCompoundHe3() 52 {} 53 54 G4double G4PreCompoundHe3::FactorialFactor(G4int N, G4int P) 55 { 56 return G4double((N-3)*(P-2)*(N-2)*(P-1)*(N-1)*P)/6.0; 57 } 58 59 G4double G4PreCompoundHe3::CoalescenceFactor(G4int A) 60 { 61 return 243.0/G4double(A*A); 70 62 } 71 63 72 G4double G4PreCompoundHe3::GetRj( const G4int NumberParticles, const G4int NumberCharged)64 G4double G4PreCompoundHe3::GetRj(G4int nParticles, G4int nCharged) 73 65 { 74 66 G4double rj = 0.0; 75 G4double denominator = NumberParticles*(NumberParticles-1)*(NumberParticles-2); 76 if(NumberCharged >=2 && (NumberParticles-NumberCharged) >= 1) { 77 rj = 3.0*static_cast<G4double>(NumberCharged*(NumberCharged-1)*(NumberParticles-NumberCharged)) 78 / static_cast<G4double>(denominator); 67 if(nCharged >=2 && (nParticles-nCharged) >= 1) { 68 G4double denominator = G4double(nParticles*(nParticles-1)*(nParticles-2)); 69 rj = G4double(3*nCharged*(nCharged-1)*(nParticles-nCharged))/denominator; 79 70 } 80 71 return rj; 81 72 } 82 73 83 //////////////////////////////////////////////////////////////////////////////// ////74 //////////////////////////////////////////////////////////////////////////////// 84 75 //J. M. Quesada (Dec 2007-June 2008): New inverse reaction cross sections 85 76 //OPT=0 Dostrovski's parameterization … … 87 78 //OPT=3,4 Kalbach's parameterization 88 79 // 89 G4double G4PreCompoundHe3::CrossSection(const G4double K) 90 { 91 ResidualA=GetRestA(); 92 ResidualZ=GetRestZ(); 93 theA=GetA(); 94 theZ=GetZ(); 95 ResidualAthrd=std::pow(ResidualA,0.33333); 96 FragmentA=GetA()+GetRestA(); 97 FragmentAthrd=std::pow(FragmentA,0.33333); 98 80 G4double G4PreCompoundHe3::CrossSection(G4double K) 81 { 82 ResidualA = GetRestA(); 83 ResidualZ = GetRestZ(); 84 theA = GetA(); 85 theZ = GetZ(); 86 ResidualAthrd = ResidualA13(); 87 FragmentA = theA + ResidualA; 88 FragmentAthrd = g4pow->Z13(FragmentA); 99 89 100 90 if (OPTxs==0) return GetOpt0( K); … … 109 99 } 110 100 111 // *********************** OPT=0 : Dostrovski's cross section *****************************112 113 G4double G4PreCompoundHe3::GetOpt0(const G4double K)114 {115 const G4double r0 = G4PreCompoundParameters::GetAddress()->Getr0();116 // cross section is now given in mb (r0 is in mm) for the sake of consistency117 //with the rest of the options118 return 1.e+25*pi*(r0*ResidualAthrd)*(r0*ResidualAthrd)*GetAlpha()*(1.+GetBeta()/K);119 }120 //121 //----------------122 //123 101 G4double G4PreCompoundHe3::GetAlpha() 124 102 { 125 103 G4double C = 0.0; 126 G4 double aZ = GetZ() + GetRestZ();104 G4int aZ = theZ + ResidualZ; 127 105 if (aZ <= 30) 128 106 { … … 131 109 else if (aZ <= 50) 132 110 { 133 C = 0.1 + -((aZ-50.)/20.)*0.02;111 C = 0.1 - (aZ - 30)*0.001; 134 112 } 135 113 else if (aZ < 70) 136 114 { 137 C = 0.08 + -((aZ-70.)/20.)*0.02;115 C = 0.08 - (aZ - 50)*0.001; 138 116 } 139 117 else … … 143 121 return 1.0 + C*(4.0/3.0); 144 122 } 145 // 146 //-------------------- 147 // 148 G4double G4PreCompoundHe3::GetBeta() 149 { 150 return -GetCoulombBarrier(); 151 } 152 // 153 //********************* OPT=1,2 : Chatterjee's cross section ************************ 123 124 //********************* OPT=1,2 : Chatterjee's cross section ***************** 154 125 //(fitting to cross section from Bechetti & Greenles OM potential) 155 126 156 127 G4double G4PreCompoundHe3::GetOpt12(const G4double K) 157 128 { 158 159 G4double Kc=K; 129 G4double Kc = K; 160 130 161 131 // JMQ xsec is set constat above limit of validity 162 if (K >50) Kc=50;132 if (K > 50*MeV) { Kc = 50*MeV; } 163 133 164 134 G4double landa ,mu ,nu ,p , Ec,q,r,ji,xs; 165 135 166 G4double p0 = -3.06;136 G4double p0 = -3.06; 167 137 G4double p1 = 278.5; 168 138 G4double p2 = -1389.; … … 179 149 p = p0 + p1/Ec + p2/(Ec*Ec); 180 150 landa = landa0*ResidualA + landa1; 181 mu = mu0*std::pow(ResidualA,mu1); 182 nu = std::pow(ResidualA,mu1)*(nu0 + nu1*Ec + nu2*(Ec*Ec)); 151 152 G4double resmu1 = g4pow->powZ(ResidualA,mu1); 153 mu = mu0*resmu1; 154 nu = resmu1*(nu0 + nu1*Ec + nu2*(Ec*Ec)); 183 155 q = landa - nu/(Ec*Ec) - 2*p*Ec; 184 156 r = mu + 2*nu/Ec + p*(Ec*Ec); … … 198 170 //c ** 3he from o.m. of gibson et al 199 171 { 200 201 172 G4double landa, mu, nu, p , signor(1.),sig; 202 173 G4double ec,ecsq,xnulam,etest(0.),a; 203 174 G4double b,ecut,cut,ecut2,geom,elab; 204 175 205 206 176 G4double flow = 1.e-18; 207 177 G4double spill= 1.e+18; 208 209 178 210 179 G4double p0 = -2.88; … … 227 196 p = p0 + p1/ec + p2/ecsq; 228 197 landa = landa0*ResidualA + landa1; 229 a = std::pow(ResidualA,mu1);198 a = g4pow->powZ(ResidualA,mu1); 230 199 mu = mu0 * a; 231 200 nu = a* (nu0+nu1*ec+nu2*ecsq); 232 201 xnulam = nu / landa; 233 if (xnulam > spill) xnulam=0.;234 if (xnulam >= flow) etest = 1.2 *std::sqrt(xnulam);202 if (xnulam > spill) { xnulam=0.; } 203 if (xnulam >= flow) { etest = 1.2 *std::sqrt(xnulam); } 235 204 236 205 a = -2.*p*ec + landa - nu/ecsq; … … 241 210 ecut = (ecut-a) / (p+p); 242 211 ecut2 = ecut; 243 //JMQ 290310 for avoiding unphysical increase below minimum (at ecut) 244 //ecut<0 means that there is no cut with energy axis, i.e. xs is set to 0 bellow minimum 245 // if (cut < 0.) ecut2 = ecut - 2.; 246 if (cut < 0.) ecut2 = ecut; 212 //JMQ 290310 for avoiding unphysical increase below minimum (at ecut) 213 // ecut<0 means that there is no cut with energy axis, i.e. xs is set 214 // to 0 bellow minimum 215 // if (cut < 0.) ecut2 = ecut - 2.; 216 if (cut < 0.) { ecut2 = ecut; } 247 217 elab = K * FragmentA / ResidualA; 248 218 sig = 0.; 249 219 250 220 if (elab <= ec) { //start for E<Ec 251 if (elab > ecut2) sig = (p*elab*elab+a*elab+b) * signor;221 if (elab > ecut2) { sig = (p*elab*elab+a*elab+b) * signor; } 252 222 } //end for E<Ec 253 223 else { //start for E>Ec 254 224 sig = (landa*elab+mu+nu/elab) * signor; 255 225 geom = 0.; 256 if (xnulam < flow || elab < etest) return sig;226 if (xnulam < flow || elab < etest) { return sig; } 257 227 geom = std::sqrt(theA*K); 258 228 geom = 1.23*ResidualAthrd + ra + 4.573/geom; … … 263 233 264 234 } 265 266 // ************************** end of cross sections *******************************267 268 269 270 -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundIon.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PreCompoundIon.cc,v 1.1 6 2009/02/10 16:01:37vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 4-beta-01$26 // $Id: G4PreCompoundIon.cc,v 1.17 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 38 38 // Modified: 39 39 // 10.02.2009 J. M. Quesada fixed bug in density level of light fragments 40 // 20.08.2010 V.Ivanchenko added G4Pow and G4PreCompoundParameters pointers 41 // use int Z and A and cleanup 40 42 // 41 43 42 44 #include "G4PreCompoundIon.hh" 43 #include "G4PreCompoundParameters.hh"44 45 45 G4bool G4PreCompoundIon::IsItPossible(const G4Fragment& aFragment) 46 G4PreCompoundIon:: 47 G4PreCompoundIon(const G4ParticleDefinition* part, 48 G4VCoulombBarrier* aCoulombBarrier) 49 : G4PreCompoundFragment(part,aCoulombBarrier) 46 50 { 47 G4int pplus = aFragment.GetNumberOfCharged(); 48 G4int pneut = aFragment.GetNumberOfParticles()-pplus; 49 return (pneut >= (GetA()-GetZ()) && pplus >= GetZ()); 51 G4double r0 = theParameters->Getr0(); 52 fact = 0.75*CLHEP::millibarn/(CLHEP::pi*r0*r0*r0); 50 53 } 51 54 55 G4PreCompoundIon::~G4PreCompoundIon() 56 {} 57 52 58 G4double G4PreCompoundIon:: 53 ProbabilityDistributionFunction( constG4double eKin,59 ProbabilityDistributionFunction(G4double eKin, 54 60 const G4Fragment& aFragment) 55 61 { 56 if ( !IsItPossible(aFragment) ) return 0.0; 57 58 const G4double r0 = G4PreCompoundParameters::GetAddress()->Getr0(); 62 if ( !IsItPossible(aFragment) ) { return 0.0; } 63 G4double efinal = eKin + GetBindingEnergy(); 64 //G4cout << "Efinal= " << efinal << " Ekin= " << eKin << G4endl; 65 if(efinal <= 0.0 ) { return 0.0; } 59 66 60 67 G4double U = aFragment.GetExcitationEnergy(); 61 G4double P = aFragment.GetNumberOfParticles(); 62 G4double H = aFragment.GetNumberOfHoles(); 63 G4double N = P + H; 68 G4int P = aFragment.GetNumberOfParticles(); 69 G4int H = aFragment.GetNumberOfHoles(); 70 G4int A = GetA(); 71 G4int N = P + H; 64 72 65 G4double g0 = (6.0/pi2)*aFragment.GetA() * 66 G4PreCompoundParameters::GetAddress()->GetLevelDensity(); 67 68 G4double g1 = (6.0/pi2)*GetRestA() * 69 G4PreCompoundParameters::GetAddress()->GetLevelDensity(); 73 G4double g0 = (6.0/pi2)*aFragment.GetA_asInt()*theParameters->GetLevelDensity(); 74 G4double g1 = (6.0/pi2)*GetRestA()*theParameters->GetLevelDensity(); 70 75 71 76 //JMQ 06/02/209 This is THE BUG that was killing cluster emission … … 75 80 G4double gj = g1; 76 81 77 G4double A0 = ((P*P+H*H+P-H)/4.0 - H/2.0)/g0; 82 G4double A0 = G4double(P*P+H*H+P-3*H)/(4.0*g0); 83 G4double A1 = std::max(0.0,(A0*g0 + A*(A-2*P-1)*0.25)/g1); 78 84 79 G4double A1 = std::max(0.0,(A0*g0 + GetA()*(GetA()-2.0*P-1.0)/4.0)/g1); 80 81 G4double Aj = GetA()*(GetA()+1.0)/4.0/gj; 82 83 84 G4double E0 = std::max(0.0,U - A0); 85 if (E0 == 0.0) return 0.0; 85 G4double E0 = U - A0; 86 //G4cout << "E0= " << E0 << G4endl; 87 if (E0 <= 0.0) { return 0.0; } 86 88 87 89 G4double E1 = (std::max(0.0,GetMaximalKineticEnergy() - eKin - A1)); 88 90 89 G4double Ej = std::max(0.0,eKin + GetBindingEnergy() -Aj); 91 G4double Aj = A*(A+1)/(4.0*gj); 92 G4double Ej = std::max(0.0,efinal - Aj); 93 94 G4double rj = GetRj(P, aFragment.GetNumberOfCharged()); 95 G4double xs = CrossSection(eKin); 96 97 //G4cout << "rj= " << rj << " xs= " << xs << G4endl; 90 98 91 99 // JMQ 10/02/09 reshaping of the formula (unnecessary std::pow elimitated) 100 /* 101 G4double r0 = theParameters->Getr0(); 92 102 G4double pA = (3.0/4.0) * std::sqrt(std::max(0.0, 2.0/(GetReducedMass()* 93 (eKin+GetBindingEnergy()))))/(pi * r0 * r0 *r0* GetRestA())*103 (eKin+GetBindingEnergy()))))/(pi * r0 * r0 *r0* GetRestA())* 94 104 eKin*CrossSection(eKin)*millibarn* 95 CoalescenceFactor(aFragment.GetA ()) * FactorialFactor(N,P)*96 GetRj(aFragment.GetNumberOfParticles(), aFragment.GetNumberOfCharged());105 CoalescenceFactor(aFragment.GetA_asInt()) * FactorialFactor(N,P)* 106 GetRj(aFragment.GetNumberOfParticles(), aFragment.GetNumberOfCharged()); 97 107 98 108 G4double pB = std::pow((g1*E1)/(g0*E0),N-GetA()-1.0)*(g1/g0); 99 100 109 G4double pC = std::pow((gj*Ej)/(g0*E0),GetA()-1.0)*(gj/g0)/E0; 101 102 G4double Probability = pA * pB * pC; 103 104 return Probability; 110 pA *= pB * pC; 111 */ 112 113 G4double pA = fact*eKin*xs*rj 114 * CoalescenceFactor(aFragment.GetA_asInt()) * FactorialFactor(N,P) 115 * std::sqrt(2.0/(GetReducedMass()*efinal)) 116 * g4pow->powN(g1*E1/(g0*E0), N-A-1) 117 * g4pow->powN(gj*Ej/(g0*E0), A-1)*gj*g1/(g0*g0*E0*GetRestA()); 118 119 return pA; 105 120 } -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundModel.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4PreCompoundModel.cc,v 1.20 2010/06/11 17:26:43 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 26 // $Id: G4PreCompoundModel.cc,v 1.25 2010/10/11 13:54:59 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 28 // 30 29 // by V. Lara 31 30 // 32 //J. M. Quesada (Apr.08). Several changes. Soft cut-off switched off. 33 //(May. 08). Protection against non-physical preeq. transitional regime has 34 // been set 35 // 36 // Modif (03 September 2008) by J. M. Quesada for external choice of inverse 37 // cross section option 38 // JMQ (06 September 2008) Also external choices have been added for: 31 // Modified: 32 // 01.04.2008 J.M.Quesada Several changes. Soft cut-off switched off. 33 // 01.05.2008 J.M.Quesada Protection against non-physical preeq. 34 // transitional regime has been set 35 // 03.09.2008 J.M.Quesada for external choice of inverse cross section option 36 // 06.09.2008 J.M.Quesada Also external choices have been added for: 39 37 // - superimposed Coulomb barrier (useSICB=true) 40 38 // - "never go back" hipothesis (useNGB=true) 41 39 // - soft cutoff from preeq. to equlibrium (useSCO=true) 42 40 // - CEM transition probabilities (useCEMtr=true) 43 41 // 20.08.2010 V.Ivanchenko Cleanup of the code: 42 // - integer Z and A; 43 // - emission and transition classes created at initialisation 44 // - options are set at initialisation 45 // - do not use copy-constructors for G4Fragment 44 46 45 47 #include "G4PreCompoundModel.hh" … … 48 50 #include "G4GNASHTransitions.hh" 49 51 #include "G4ParticleDefinition.hh" 50 52 #include "G4Proton.hh" 53 #include "G4Neutron.hh" 54 55 #include "G4NucleiProperties.hh" 56 #include "G4PreCompoundParameters.hh" 57 #include "Randomize.hh" 58 #include "G4DynamicParticle.hh" 59 #include "G4ParticleTypes.hh" 60 #include "G4ParticleTable.hh" 61 #include "G4LorentzVector.hh" 51 62 52 63 #ifdef PRECOMPOUND_TEST … … 58 69 : G4VPreCompoundModel(value), useHETCEmission(false), useGNASHTransition(false), 59 70 OPTxs(3), useSICB(false), useNGB(false), useSCO(false), useCEMtr(true) 60 {} 71 { 72 theParameters = G4PreCompoundParameters::GetAddress(); 73 74 theEmission = new G4PreCompoundEmission(); 75 if(useHETCEmission) { theEmission->SetHETCModel(); } 76 else { theEmission->SetDefaultModel(); } 77 theEmission->SetOPTxs(OPTxs); 78 theEmission->UseSICB(useSICB); 79 80 if(useGNASHTransition) { theTransition = new G4GNASHTransitions; } 81 else { theTransition = new G4PreCompoundTransitions(); } 82 theTransition->UseNGB(useNGB); 83 theTransition->UseCEMtr(useCEMtr); 84 85 proton = G4Proton::Proton(); 86 neutron = G4Neutron::Neutron(); 87 } 61 88 62 89 G4PreCompoundModel::~G4PreCompoundModel() 63 {}64 65 G4PreCompoundModel::G4PreCompoundModel()66 : G4VPreCompoundModel(0), useHETCEmission(false), useGNASHTransition(false),67 OPTxs(3), useSICB(false), useNGB(false), useSCO(false), useCEMtr(true)68 {}69 70 G4PreCompoundModel::G4PreCompoundModel(const G4PreCompoundModel &)71 : G4VPreCompoundModel()72 {}73 74 const G4PreCompoundModel & G4PreCompoundModel::operator=(const G4PreCompoundModel &)75 90 { 76 throw G4HadronicException(__FILE__, __LINE__, "G4PreCompoundModel::operator= meant to not be accessable"); 77 return *this; 78 } 79 80 81 G4bool G4PreCompoundModel::operator==(const G4PreCompoundModel &) const 82 { 83 return false; 84 } 85 86 G4bool G4PreCompoundModel::operator!=(const G4PreCompoundModel &) const 87 { 88 return true; 89 } 90 91 92 93 // Additional Declarations 94 95 G4HadFinalState * G4PreCompoundModel::ApplyYourself(const G4HadProjectile & thePrimary, 96 G4Nucleus & theNucleus) 91 delete theEmission; 92 delete theTransition; 93 } 94 95 ///////////////////////////////////////////////////////////////////////////////////////// 96 97 G4HadFinalState* G4PreCompoundModel::ApplyYourself(const G4HadProjectile & thePrimary, 98 G4Nucleus & theNucleus) 97 99 { 100 const G4ParticleDefinition* primary = thePrimary.GetDefinition(); 101 if(primary != neutron && primary != proton) { 102 std::ostringstream errOs; 103 errOs << "BAD primary type in G4PreCompoundModel: " 104 << primary->GetParticleName() <<G4endl; 105 throw G4HadronicException(__FILE__, __LINE__, errOs.str()); 106 } 107 G4int Zp = 0; 108 G4int Ap = 1; 109 if(primary == proton) { Zp = 1; } 110 111 G4int A = theNucleus.GetA_asInt(); 112 G4int Z = theNucleus.GetZ_asInt(); 113 114 // 4-Momentum 115 G4LorentzVector p = thePrimary.Get4Momentum(); 116 G4double mass = G4NucleiProperties::GetNuclearMass(A, Z); 117 p += G4LorentzVector(0.0,0.0,0.0,mass); 118 98 119 // prepare fragment 99 G4Fragment anInitialState; 100 // This si for GNASH transitions 101 anInitialState.SetParticleDefinition(const_cast<G4ParticleDefinition *>(thePrimary.GetDefinition())); 102 103 G4int anA=static_cast<G4int>(theNucleus.GetN()); 104 anA += thePrimary.GetDefinition()->GetBaryonNumber(); 105 106 anInitialState.SetA(anA); 107 108 G4int aZ=static_cast<G4int>(theNucleus.GetZ()); 109 aZ += static_cast<G4int>(thePrimary.GetDefinition()->GetPDGCharge()); 110 111 anInitialState.SetZ(aZ); 112 113 // Assume the projectile is a nucleon 114 120 G4Fragment anInitialState(A + Ap, Z + Zp, p); 121 anInitialState.SetNumberOfParticles(2); 122 anInitialState.SetNumberOfHoles(1); 123 anInitialState.SetNumberOfCharged(1); 124 anInitialState.SetCreationTime(thePrimary.GetGlobalTime()); 125 /* 115 126 // Number of Excited Particles 116 127 anInitialState.SetNumberOfParticles(1+thePrimary.GetDefinition()->GetBaryonNumber()); … … 129 140 // Number of Holes 130 141 anInitialState.SetNumberOfHoles(1); 131 132 // pre-compound nucleus energy. 133 G4double anEnergy = 0; 134 G4double nucleusMass = G4ParticleTable::GetParticleTable()->GetIonTable()->GetIonMass(static_cast<G4int>(theNucleus.GetZ()), 135 static_cast<G4int>(theNucleus.GetN())); 136 anEnergy = nucleusMass + thePrimary.GetTotalEnergy(); 137 138 // Momentum 139 G4ThreeVector p = thePrimary.Get4Momentum().vect(); 140 141 // 4-momentum 142 G4LorentzVector momentum(p, anEnergy); 143 anInitialState.SetMomentum(momentum); 144 145 #ifdef PRECOMPOUND_TEST 146 G4PreCompoundModel::theInitialFragmentForTest = anInitialState; 147 #endif 142 */ 148 143 149 144 // call excitation handler 150 const G4Fragment aFragment(anInitialState);151 G4ReactionProductVector * result = DeExcite(a Fragment);145 // const G4Fragment aFragment(anInitialState); 146 G4ReactionProductVector * result = DeExcite(anInitialState); 152 147 153 148 #ifdef PRECOMPOUND_TEST … … 180 175 } 181 176 182 183 177 ///////////////////////////////////////////////////////////////////////////////////////// 184 ///////////////////////////////////////////////////////////////////////////////////////// 185 186 G4ReactionProductVector* G4PreCompoundModel::DeExcite(const G4Fragment & theInitialState) const 178 179 G4ReactionProductVector* G4PreCompoundModel::DeExcite(G4Fragment& aFragment) 187 180 { 188 189 181 G4ReactionProductVector * Result = new G4ReactionProductVector; 190 191 // Copy of the initial state 192 G4Fragment aFragment(theInitialState); 193 194 if (aFragment.GetExcitationEnergy() < 10*eV) 195 { 196 // Perform Equilibrium Emission 197 PerformEquilibriumEmission(aFragment,Result); 198 return Result; 199 } 200 201 if (aFragment.GetA() < 5) { 202 G4ReactionProduct * theRP = new G4ReactionProduct(G4ParticleTable::GetParticleTable()-> 203 GetIon(static_cast<G4int>(aFragment.GetZ()), 204 static_cast<G4int>(aFragment.GetA()), 205 aFragment.GetExcitationEnergy())); 206 theRP->SetMomentum(aFragment.GetMomentum().vect()); 207 theRP->SetTotalEnergy(aFragment.GetMomentum().e()); 208 Result->push_back(theRP); 182 G4double Eex = aFragment.GetExcitationEnergy(); 183 G4int A = aFragment.GetA_asInt(); 184 185 //G4cout << "### G4PreCompoundModel::DeExcite" << G4endl; 186 //G4cout << aFragment << G4endl; 187 188 // Perform Equilibrium Emission 189 if (A < 5 || Eex < keV /*|| Eex > 3.*MeV*A*/) { 190 PerformEquilibriumEmission(aFragment, Result); 209 191 return Result; 210 192 } 211 193 212 G4PreCompoundEmission aEmission; 213 if (useHETCEmission) aEmission.SetHETCModel(); 214 aEmission.SetUp(theInitialState); 215 216 //for cross section options 217 218 if (OPTxs!= 0 && OPTxs!=1 && OPTxs !=2 && OPTxs !=3 && OPTxs !=4 ) { 219 std::ostringstream errOs; 220 errOs << "BAD CROSS SECTION OPTION in G4PreCompoundModel.cc !!" <<G4endl; 221 throw G4HadronicException(__FILE__, __LINE__, errOs.str());} 222 else aEmission.SetOPTxs(OPTxs); 223 224 //for the choice of superimposed Coulomb Barrier for inverse cross sections 225 226 aEmission.UseSICB(useSICB); 227 228 229 //---------- 230 231 G4VPreCompoundTransitions * aTransition = 0; 232 if (useGNASHTransition) 233 { 234 aTransition = new G4GNASHTransitions; 235 } 236 else 237 { 238 aTransition = new G4PreCompoundTransitions; 239 // for the choice of "never go back" hypothesis and CEM transition probabilities 240 if (useNGB) aTransition->UseNGB(useNGB); 241 if (useCEMtr) aTransition->UseCEMtr(useCEMtr); 242 } 243 244 // Main loop. It is performed until equilibrium deexcitation. 245 //G4int fragment=0; 246 194 // main loop 247 195 for (;;) { 248 196 … … 252 200 253 201 // Initialize fragment according with the nucleus parameters 254 aEmission.Initialize(aFragment); 255 256 257 258 G4double g = (6.0/pi2)*aFragment.GetA()* 259 G4PreCompoundParameters::GetAddress()->GetLevelDensity(); 260 261 262 263 264 G4int EquilibriumExcitonNumber = static_cast<G4int>(std::sqrt(2.0*g*aFragment.GetExcitationEnergy())+ 0.5); 265 // 266 // G4cout<<"Neq="<<EquilibriumExcitonNumber<<G4endl; 267 // 268 // J. M. Quesada (Jan. 08) equilibrium hole number could be used as preeq.- evap. delimiter (IAEA report) 269 // G4int EquilibriumHoleNumber = static_cast<G4int>(0.2*std::sqrt(g*aFragment.GetExcitationEnergy())+ 0.5); 270 271 // Loop for transitions, it is performed while there are preequilibrium transitions. 202 theEmission->Initialize(aFragment); 203 204 G4double g = (6.0/pi2)*aFragment.GetA_asInt()*theParameters->GetLevelDensity(); 205 206 G4int EquilibriumExcitonNumber = 207 static_cast<G4int>(std::sqrt(2.0*g*aFragment.GetExcitationEnergy())+ 0.5); 208 // 209 // G4cout<<"Neq="<<EquilibriumExcitonNumber<<G4endl; 210 // 211 // J. M. Quesada (Jan. 08) equilibrium hole number could be used as preeq. 212 // evap. delimiter (IAEA report) 213 214 // Loop for transitions, it is performed while there are preequilibrium transitions. 272 215 G4bool ThereIsTransition = false; 273 216 … … 278 221 // G4cout<<" Ex. Energy="<<aFragment.GetExcitationEnergy()<<G4endl; 279 222 // G4cout<<"N. excitons="<<NE<<" N. Part="<<NP<<"N. Holes ="<<NH<<G4endl; 280 281 282 223 //G4int transition=0; 283 do 284 { 285 //transition++; 286 //G4cout<<"transition number .."<<transition<<G4endl; 287 //G4cout<<" n ="<<aFragment.GetNumberOfExcitons()<<G4endl; 288 G4bool go_ahead = false; 289 // soft cutoff criterium as an "ad-hoc" solution to force increase in evaporation 290 // G4double test = static_cast<G4double>(aFragment.GetNumberOfHoles()); 291 G4double test = static_cast<G4double>(aFragment.GetNumberOfExcitons()); 292 293 294 if (test < EquilibriumExcitonNumber) go_ahead=true; 295 //J. M. Quesada (Apr. 08): soft-cutoff switched off by default 296 if (useSCO) { 297 if (test < EquilibriumExcitonNumber) 298 // if (test < EquilibriumHoleNumber) 299 { 300 test /= static_cast<G4double>(EquilibriumExcitonNumber); 301 // test /= static_cast<G4double>(EquilibriumHoleNumber); 302 test -= 1.0; 224 do { 225 //transition++; 226 //G4cout<<"transition number .."<<transition<<G4endl; 227 //G4cout<<" n ="<<aFragment.GetNumberOfExcitons()<<G4endl; 228 G4bool go_ahead = false; 229 // soft cutoff criterium as an "ad-hoc" solution to force increase in evaporation 230 // G4double test = static_cast<G4double>(aFragment.GetNumberOfHoles()); 231 G4int test = aFragment.GetNumberOfExcitons(); 232 if (test < EquilibriumExcitonNumber) { go_ahead=true; } 233 234 //J. M. Quesada (Apr. 08): soft-cutoff switched off by default 235 if (useSCO) { 236 if (test < EquilibriumExcitonNumber) 237 { 238 G4double x = G4double(test)/G4double(EquilibriumExcitonNumber) - 1; 239 if( G4UniformRand() < 1.0 - std::exp(-x*x/0.32) ) { go_ahead = true; } 240 /* 303 241 test = test*test; 304 242 test /= 0.32; 305 243 test = 1.0 - std::exp(-test); 306 244 go_ahead = (G4UniformRand() < test); 307 308 }309 }245 */ 246 } 247 } 310 248 311 //JMQ: WARNING: CalculateProbability MUST be called prior to Get methods !! (O values would be returned otherwise) 312 G4double TotalTransitionProbability = aTransition->CalculateProbability(aFragment); 313 G4double P1=aTransition->GetTransitionProb1(); 314 G4double P2=aTransition->GetTransitionProb2(); 315 G4double P3=aTransition->GetTransitionProb3(); 316 // G4cout<<"P1="<<P1<<" P2="<<P2<<" P3="<<P3<<G4endl; 249 // JMQ: WARNING: CalculateProbability MUST be called prior to Get methods !! 250 // (O values would be returned otherwise) 251 G4double TotalTransitionProbability = 252 theTransition->CalculateProbability(aFragment); 253 G4double P1 = theTransition->GetTransitionProb1(); 254 G4double P2 = theTransition->GetTransitionProb2(); 255 G4double P3 = theTransition->GetTransitionProb3(); 256 //G4cout<<"P1="<<P1<<" P2="<<P2<<" P3="<<P3<<G4endl; 257 258 //J.M. Quesada (May. 08). Physical criterium (lamdas) PREVAILS over 259 // approximation (critical exciton number) 260 if(P1 <= P2+P3) { go_ahead = false; } 317 261 318 319 //J.M. Quesada (May. 08). Physical criterium (lamdas) PREVAILS over approximation (critical exciton number) 320 if(P1<=(P2+P3)) go_ahead=false; 321 322 if (go_ahead && aFragment.GetA() > 4) 323 { 324 G4double TotalEmissionProbability = aEmission.GetTotalProbability(aFragment); 325 // 326 // G4cout<<"TotalEmissionProbability="<<TotalEmissionProbability<<G4endl; 327 // 328 // Check if number of excitons is greater than 0 329 // else perform equilibrium emission 330 if (aFragment.GetNumberOfExcitons() <= 0) 331 { 332 // Perform Equilibrium Emission 333 #ifdef debug // ------------- debug ----------------------------------------- 334 CheckConservation(theInitialState,aFragment,Result); 335 #endif // ------------------- debug ----------------------------------------- 336 PerformEquilibriumEmission(aFragment,Result); 337 delete aTransition; 338 return Result; 339 } 262 if (go_ahead && aFragment.GetA_asInt() > 4) 263 { 264 265 G4double TotalEmissionProbability = 266 theEmission->GetTotalProbability(aFragment); 267 // 268 // G4cout<<"TotalEmissionProbability="<<TotalEmissionProbability<<G4endl; 269 // 270 // Check if number of excitons is greater than 0 271 // else perform equilibrium emission 272 if (aFragment.GetNumberOfExcitons() <= 0) 273 { 274 PerformEquilibriumEmission(aFragment,Result); 275 return Result; 276 } 340 277 341 // G4PreCompoundTransitions aTransition(aFragment); 278 //J.M.Quesada (May 08) this has already been done in order to decide 279 // what to do (preeq-eq) 280 // Sum of all probabilities 281 G4double TotalProbability = TotalEmissionProbability 282 + TotalTransitionProbability; 342 283 343 //J.M.Quesada (May 08) this has already been done in order to decide what to do (preeq-eq) 344 // Sum of transition probabilities 345 // G4double TotalTransitionProbability = aTransition->CalculateProbability(aFragment); 346 347 // Sum of all probabilities 348 G4double TotalProbability = TotalEmissionProbability + TotalTransitionProbability; 349 350 // Select subprocess 351 if (G4UniformRand() > TotalEmissionProbability/TotalProbability) 352 { 353 // It will be transition to state with a new number of excitons 354 ThereIsTransition = true; 355 // Perform the transition 356 aFragment = aTransition->PerformTransition(aFragment); 357 } 358 else 359 { 360 // It will be fragment emission 361 ThereIsTransition = false; 362 Result->push_back(aEmission.PerformEmission(aFragment)); 363 } 364 } 365 else 366 { 367 // Perform Equilibrium Emission 368 #ifdef debug 369 CheckConservation(theInitialState,aFragment,Result); 370 #endif 371 PerformEquilibriumEmission(aFragment,Result); 372 delete aTransition; 373 return Result; 374 } 375 } while (ThereIsTransition); // end of do loop 284 // Select subprocess 285 if (TotalProbability*G4UniformRand() > TotalEmissionProbability) 286 { 287 // It will be transition to state with a new number of excitons 288 ThereIsTransition = true; 289 // Perform the transition 290 theTransition->PerformTransition(aFragment); 291 } 292 else 293 { 294 // It will be fragment emission 295 ThereIsTransition = false; 296 Result->push_back(theEmission->PerformEmission(aFragment)); 297 } 298 } 299 else 300 { 301 PerformEquilibriumEmission(aFragment,Result); 302 return Result; 303 } 304 } while (ThereIsTransition); // end of do loop 376 305 } // end of for (;;) loop 377 } 378 379 380 381 382 void G4PreCompoundModel::PerformEquilibriumEmission(const G4Fragment & aFragment, 383 G4ReactionProductVector * Result) const 384 { 385 G4ReactionProductVector * theEquilibriumResult; 386 387 theEquilibriumResult = GetExcitationHandler()->BreakItUp(aFragment); 388 389 Result->insert(Result->end(),theEquilibriumResult->begin(), theEquilibriumResult->end()); 390 391 delete theEquilibriumResult; 392 return; 393 } 394 306 return Result; 307 } 308 309 ///////////////////////////////////////////////////////////////////////////////////////// 310 // Initialisation 311 ///////////////////////////////////////////////////////////////////////////////////////// 312 313 void G4PreCompoundModel::UseHETCEmission() 314 { 315 useHETCEmission = true; 316 theEmission->SetHETCModel(); 317 } 318 319 void G4PreCompoundModel::UseDefaultEmission() 320 { 321 useHETCEmission = false; 322 theEmission->SetDefaultModel(); 323 } 324 325 void G4PreCompoundModel::UseGNASHTransition() { 326 useGNASHTransition = true; 327 delete theTransition; 328 theTransition = new G4GNASHTransitions; 329 theTransition->UseNGB(useNGB); 330 theTransition->UseCEMtr(useCEMtr); 331 } 332 333 void G4PreCompoundModel::UseDefaultTransition() { 334 useGNASHTransition = false; 335 delete theTransition; 336 theTransition = new G4PreCompoundTransitions(); 337 theTransition->UseNGB(useNGB); 338 theTransition->UseCEMtr(useCEMtr); 339 } 340 341 void G4PreCompoundModel::SetOPTxs(G4int opt) 342 { 343 OPTxs = opt; 344 theEmission->SetOPTxs(OPTxs); 345 } 346 347 void G4PreCompoundModel::UseSICB() 348 { 349 useSICB = true; 350 theEmission->UseSICB(useSICB); 351 } 352 353 void G4PreCompoundModel::UseNGB() 354 { 355 useNGB = true; 356 } 357 358 void G4PreCompoundModel::UseSCO() 359 { 360 useSCO = true; 361 } 362 363 void G4PreCompoundModel::UseCEMtr() 364 { 365 useCEMtr = true; 366 } 367 368 ///////////////////////////////////////////////////////////////////////////////////////// 395 369 396 370 #ifdef debug -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundNeutron.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4PreCompoundNeutron.cc,v 1.4 2009/02/11 18:06:00 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 26 // $Id: G4PreCompoundNeutron.cc,v 1.5 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 28 // 30 29 // ------------------------------------------------------------------- … … 40 39 // 21.08.2008 J. M. Quesada add choice of options 41 40 // 10.02.2009 J. M. Quesada set default opt3 41 // 20.08.2010 V.Ivanchenko added G4Pow and G4PreCompoundParameters pointers 42 // use int Z and A and cleanup 42 43 // 43 44 44 45 #include "G4PreCompoundNeutron.hh" 45 46 G4ReactionProduct * G4PreCompoundNeutron::GetReactionProduct() const 47 { 48 G4ReactionProduct * theReactionProduct = 49 new G4ReactionProduct(G4Neutron::NeutronDefinition()); 50 theReactionProduct->SetMomentum(GetMomentum().vect()); 51 theReactionProduct->SetTotalEnergy(GetMomentum().e()); 52 #ifdef PRECOMPOUND_TEST 53 theReactionProduct->SetCreatorModel("G4PrecompoundModel"); 54 #endif 55 return theReactionProduct; 56 } 57 58 G4double G4PreCompoundNeutron::GetRj(const G4int NumberParticles, const G4int NumberCharged) 46 #include "G4Neutron.hh" 47 48 G4PreCompoundNeutron::G4PreCompoundNeutron() 49 : G4PreCompoundNucleon(G4Neutron::Neutron(), &theNeutronCoulombBarrier) 50 {} 51 52 G4PreCompoundNeutron::~G4PreCompoundNeutron() 53 {} 54 55 G4double G4PreCompoundNeutron::GetRj(G4int nParticles, G4int nCharged) 59 56 { 60 57 G4double rj = 0.0; 61 if(NumberParticles > 0) rj = static_cast<G4double>(NumberParticles - NumberCharged)/ 62 static_cast<G4double>(NumberParticles); 58 if(nParticles > 0) { 59 rj = static_cast<G4double>(nParticles - nCharged)/ 60 static_cast<G4double>(nParticles); 61 } 63 62 return rj; 64 63 } … … 72 71 G4double G4PreCompoundNeutron::CrossSection(const G4double K) 73 72 { 74 ResidualA =GetRestA();75 ResidualZ =GetRestZ();76 theA =GetA();77 theZ =GetZ();78 ResidualAthrd =std::pow(ResidualA,0.33333);79 FragmentA =GetA()+GetRestA();80 FragmentAthrd =std::pow(FragmentA,0.33333);81 82 if (OPTxs==0) return GetOpt0( K);83 else if( OPTxs==1 || OPTxs==2) return GetOpt12( K);84 else if (OPTxs==3 || OPTxs==4) return GetOpt34( K);73 ResidualA = GetRestA(); 74 ResidualZ = GetRestZ(); 75 theA = GetA(); 76 theZ = GetZ(); 77 ResidualAthrd = ResidualA13(); 78 FragmentA = theA + ResidualA; 79 FragmentAthrd = g4pow->Z13(FragmentA); 80 81 if (OPTxs==0) { return GetOpt0( K); } 82 else if( OPTxs==1 || OPTxs==2) { return GetOpt12( K); } 83 else if (OPTxs==3 || OPTxs==4) { return GetOpt34( K); } 85 84 else{ 86 85 std::ostringstream errOs; … … 91 90 } 92 91 93 // *********************** OPT=0 : Dostrovski's cross section *****************************94 95 G4double G4PreCompoundNeutron::GetOpt0(const G4double K)96 {97 98 const G4double r0 = G4PreCompoundParameters::GetAddress()->Getr0();99 // cross section is now given in mb (r0 is in mm) for the sake of consistency100 //with the rest of the options101 return 1.e+25*pi*(r0*ResidualAthrd)*(r0*ResidualAthrd)*GetAlpha()*(1.+GetBeta()/K);102 }103 //104 //-------105 //106 92 G4double G4PreCompoundNeutron::GetAlpha() 107 93 { 108 // return 0.76+2.2/std::pow(GetRestA(),1.0/3.0);109 94 return 0.76+2.2/ResidualAthrd; 110 95 } 111 // 112 //------------ 113 // 96 114 97 G4double G4PreCompoundNeutron::GetBeta() 115 98 { … … 117 100 return (2.12/(ResidualAthrd*ResidualAthrd)-0.05)*MeV/GetAlpha(); 118 101 } 119 // 120 121 //********************* OPT=1,2 : Chatterjee's cross section ************************ 102 103 //********************* OPT=1,2 : Chatterjee's cross section ******************* 122 104 //(fitting to cross section from Bechetti & Greenles OM potential) 123 105 124 G4double G4PreCompoundNeutron::GetOpt12(const G4double K) 125 { 126 106 G4double G4PreCompoundNeutron::GetOpt12(G4double K) 107 { 127 108 G4double Kc=K; 128 109 129 // Pramana (Bechetti & Greenles) for neutrons is chosen130 131 // JMQ xsec is set constat above limit of validity132 if (K>50) Kc=50;110 // Pramana (Bechetti & Greenles) for neutrons is chosen 111 112 // JMQ xsec is set constat above limit of validity 113 if (K > 50*MeV) { Kc = 50*MeV; } 133 114 134 115 G4double landa, landa0, landa1, mu, mu0, mu1,nu, nu0, nu1, nu2,xs; … … 155 136 } 156 137 157 158 138 // *********** OPT=3,4 : Kalbach's cross sections (from PRECO code)************* 159 G4double G4PreCompoundNeutron::GetOpt34(const G4double K) 160 { 161 139 G4double G4PreCompoundNeutron::GetOpt34(G4double K) 140 { 162 141 G4double landa, landa0, landa1, mu, mu0, mu1,nu, nu0, nu1, nu2; 163 142 G4double p, p0, p1, p2; … … 177 156 p2=0.; 178 157 179 180 158 flow = 1.e-18; 181 159 spill= 1.0e+18; 182 160 183 161 // PRECO xs for neutrons is choosen 184 185 162 p0 = -312.; 186 163 p1= 0.; … … 194 171 nu2 = 1280.8; 195 172 196 if (ResidualA < 40 .) signor=0.7+ResidualA*0.0075;197 if (ResidualA > 210 .) signor = 1. + (ResidualA-210.)/250.;173 if (ResidualA < 40) { signor =0.7 + ResidualA*0.0075; } 174 if (ResidualA > 210) { signor = 1. + (ResidualA-210)/250.; } 198 175 landa = landa0/ResidualAthrd + landa1; 199 176 mu = mu0*ResidualAthrd + mu1*ResidualAthrd*ResidualAthrd; … … 201 178 202 179 // JMQ very low energy behaviour corrected (problem for A (apprx.)>60) 203 if (nu < 0.) nu=-nu;180 if (nu < 0.) { nu=-nu; } 204 181 205 182 ec = 0.5; … … 216 193 ecut = 0.; 217 194 cut = a*a - 4.*p*b; 218 if (cut > 0.) ecut = std::sqrt(cut);195 if (cut > 0.) { ecut = std::sqrt(cut); } 219 196 ecut = (ecut-a) / (p+p); 220 197 ecut2 = ecut; 221 if (cut < 0.) ecut2 = ecut - 2.;222 elab = K * FragmentA / ResidualA;198 if (cut < 0.) { ecut2 = ecut - 2.; } 199 elab = K * FragmentA / G4double(ResidualA); 223 200 sig = 0.; 224 201 if (elab <= ec) { //start for E<Ec 225 if (elab > ecut2) sig = (p*elab*elab+a*elab+b) * signor;202 if (elab > ecut2) { sig = (p*elab*elab+a*elab+b) * signor; } 226 203 } //end for E<Ec 227 204 else { //start for E>Ec 228 205 sig = (landa*elab+mu+nu/elab) * signor; 229 206 geom = 0.; 230 if (xnulam < flow || elab < etest) return sig;207 if (xnulam < flow || elab < etest) { return sig; } 231 208 geom = std::sqrt(theA*K); 232 209 geom = 1.23*ResidualAthrd + ra + 4.573/geom; … … 235 212 236 213 } 237 return sig;} 238 239 // ************************** end of cross sections ******************************* 240 241 214 return sig; 215 } -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundNucleon.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4PreCompoundNucleon.cc,v 1.13 2009/02/11 18:06:00 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 26 // $Id: G4PreCompoundNucleon.cc,v 1.14 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 28 // 30 29 // ------------------------------------------------------------------- … … 39 38 // Modified: 40 39 // 10.02.2009 J. M. Quesada cleanup 40 // 20.08.2010 V.Ivanchenko added G4Pow and G4PreCompoundParameters pointers 41 // use int Z and A and cleanup 41 42 // 42 43 43 44 #include "G4PreCompoundNucleon.hh" 44 #include "G4PreCompoundParameters.hh"45 45 46 G4bool G4PreCompoundNucleon::IsItPossible(const G4Fragment& aFragment) 46 G4PreCompoundNucleon:: 47 G4PreCompoundNucleon(const G4ParticleDefinition* part, 48 G4VCoulombBarrier* aCoulombBarrier) 49 : G4PreCompoundFragment(part,aCoulombBarrier) 47 50 { 48 G4int pplus = aFragment.GetNumberOfCharged(); 49 G4int pneut = aFragment.GetNumberOfParticles()-pplus; 50 return (pneut >= (GetA()-GetZ()) && pplus >= GetZ()); 51 fact = 2*CLHEP::millibarn/(CLHEP::pi2*CLHEP::hbarc*CLHEP::hbarc*CLHEP::hbarc); 51 52 } 52 53 54 G4PreCompoundNucleon::~G4PreCompoundNucleon() 55 {} 56 53 57 G4double G4PreCompoundNucleon:: 54 ProbabilityDistributionFunction( constG4double eKin,58 ProbabilityDistributionFunction(G4double eKin, 55 59 const G4Fragment& aFragment) 56 60 { 57 if ( !IsItPossible(aFragment) ) return 0.0;61 if ( !IsItPossible(aFragment) ) { return 0.0; } 58 62 59 63 G4double U = aFragment.GetExcitationEnergy(); 60 G4double P = aFragment.GetNumberOfParticles(); 61 G4double H = aFragment.GetNumberOfHoles(); 62 G4double N = P + H; 64 G4int P = aFragment.GetNumberOfParticles(); 65 G4int H = aFragment.GetNumberOfHoles(); 66 G4int N = P + H; 67 68 G4double g0 = (6.0/pi2)*aFragment.GetA_asInt()*theParameters->GetLevelDensity(); 69 G4double g1 = (6.0/pi2)*GetRestA()*theParameters->GetLevelDensity(); 63 70 64 G4double g0 = (6.0/pi2)*aFragment.GetA() * 65 G4PreCompoundParameters::GetAddress()->GetLevelDensity(); 66 67 G4double g1 = (6.0/pi2)*GetRestA() * 68 G4PreCompoundParameters::GetAddress()->GetLevelDensity(); 71 G4double A0 = G4double(P*P+H*H+P-3*H)/(4.0*g0); 72 G4double A1 = (A0 - 0.5*P)/g1; 69 73 70 G4double A0 = ((P*P+H*H+P-H)/4.0 - H/2.0)/g0; 74 G4double E0 = U - A0; 75 if (E0 <= 0.0) { return 0.0; } 71 76 72 G4double A1 = (A0 - P/2.0)/g1; 77 G4double E1 = U - eKin - GetBindingEnergy() - A1; 78 if (E1 <= 0.0) { return 0.0; } 79 80 G4double rj = GetRj(P, aFragment.GetNumberOfCharged()); 81 G4double xs = CrossSection(eKin); 82 83 if (rj <0.0 || xs < 0.0) { 84 std::ostringstream errOs; 85 G4cout<<"WARNING: NEGATIVE VALUES "<<G4endl; 86 errOs << "Rj=" << rj <<" xsec(" 87 <<eKin/MeV<<" MeV)= "<< xs <<" A= "<<GetA()<<" Z= "<<GetZ() 88 <<G4endl; 89 throw G4HadronicException(__FILE__, __LINE__, errOs.str()); 90 } 91 92 G4double Probability = fact * GetReducedMass() * rj * xs * eKin * P * (N-1) 93 * g4pow->powN(g1*E1/(g0*E0),N-2) * g1 / (E0*g0*g0); 73 94 74 G4double E0 = std::max(0.0,U - A0); 75 if (E0 == 0.0) return 0.0; 76 G4double E1 = std::max(0.0,U - eKin - GetBindingEnergy() - A1); 77 if (E1 == 0.0) return 0.0; 78 79 95 /* 80 96 G4double Probability = 1.0/pi2*2.0/(hbarc*hbarc*hbarc) * GetReducedMass() 81 97 * GetRj(aFragment.GetNumberOfParticles(), aFragment.GetNumberOfCharged()) 82 * eKin*CrossSection(eKin)*millibarn * P*(N-1.0) * std::pow(g1*E1/(g0*E0),N-2.0)/E0 * g1/(g0*g0); 83 84 if (GetRj(aFragment.GetNumberOfParticles(), aFragment.GetNumberOfCharged())<0.0 85 || CrossSection(eKin) <0) { 86 std::ostringstream errOs; 87 G4cout<<"WARNING: NEGATIVE VALUES "<<G4endl; 88 errOs << "Rj=" << GetRj(aFragment.GetNumberOfParticles(), aFragment.GetNumberOfCharged()) 89 <<G4endl; 90 errOs <<" xsec("<<eKin<<" MeV) ="<<CrossSection(eKin)<<G4endl; 91 errOs <<" A="<<GetA()<<" Z="<<GetZ()<<G4endl; 92 throw G4HadronicException(__FILE__, __LINE__, errOs.str()); 93 } 98 * eKin*CrossSection(eKin)*millibarn * P*(N-1.0) * 99 std::pow(g1*E1/(g0*E0),N-2.0)/E0 * g1/(g0*g0); 100 */ 94 101 95 102 return Probability; -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundParameters.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4PreCompoundParameters.cc,v 1.3 2006/06/29 20:59:29 gunter Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 26 // $Id: G4PreCompoundParameters.cc,v 1.4 2010/08/18 14:07:24 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 28 // 30 29 // by V. Lara 30 // 31 // 18.08.2010 V.Ivanchenko make this class as a standard singleton 32 // 31 33 32 34 #include "G4PreCompoundParameters.hh" 33 35 34 35 G4PreCompoundParameters G4PreCompoundParameters::thePreCompoundParameters; 36 G4PreCompoundParameters* G4PreCompoundParameters::theParameters = 0; 36 37 37 38 G4PreCompoundParameters * G4PreCompoundParameters::GetAddress() 38 { return &thePreCompoundParameters; } 39 { 40 if(0 == theParameters) { 41 static G4PreCompoundParameters par; 42 theParameters = ∥ 43 } 44 return theParameters; 45 } 39 46 47 G4PreCompoundParameters::G4PreCompoundParameters() 48 : fLevelDensity(0.10/MeV), 49 fR0(1.5*fermi), 50 fTransitions_r0(0.6*fermi), 51 fFermiEnergy(35.0*MeV) 52 {} 53 54 G4PreCompoundParameters::~G4PreCompoundParameters() 55 {} 56 57 -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundProton.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4PreCompoundProton.cc,v 1.5 2010/04/09 14:06:17 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 26 // $Id: G4PreCompoundProton.cc,v 1.6 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 28 // 30 29 // ------------------------------------------------------------------- … … 39 38 // Modified: 40 39 // 21.08.2008 J. M. Quesada added external choice of inverse cross section option 41 // 21.08.2008 J. M. Quesada added external choice for superimposed Coulomb barrier 42 // (if useSICB=true) 40 // 21.08.2008 J. M. Quesada added external choice for superimposed Coulomb 41 // barrier (if useSICB=true) 42 // 20.08.2010 V.Ivanchenko added G4Pow and G4PreCompoundParameters pointers 43 // use int Z and A and cleanup 43 44 // 44 45 45 46 #include "G4PreCompoundProton.hh" 46 47 G4ReactionProduct * G4PreCompoundProton::GetReactionProduct() const 48 { 49 G4ReactionProduct * theReactionProduct = 50 new G4ReactionProduct(G4Proton::ProtonDefinition()); 51 theReactionProduct->SetMomentum(GetMomentum().vect()); 52 theReactionProduct->SetTotalEnergy(GetMomentum().e()); 53 #ifdef PRECOMPOUND_TEST 54 theReactionProduct->SetCreatorModel("G4PrecompoundModel"); 55 #endif 56 return theReactionProduct; 57 } 58 59 G4double G4PreCompoundProton::GetRj(const G4int NumberParticles, const G4int NumberCharged) 47 #include "G4Proton.hh" 48 49 G4PreCompoundProton::G4PreCompoundProton() 50 : G4PreCompoundNucleon(G4Proton::Proton(), &theProtonCoulombBarrier) 51 {} 52 53 G4PreCompoundProton::~G4PreCompoundProton() 54 {} 55 56 G4double G4PreCompoundProton::GetRj(G4int nParticles, G4int nCharged) 60 57 { 61 58 G4double rj = 0.0; 62 if(NumberParticles > 0) rj = static_cast<G4double>(NumberCharged)/static_cast<G4double>(NumberParticles); 59 if(nParticles > 0) { 60 rj = static_cast<G4double>(nCharged)/static_cast<G4double>(nParticles); 61 } 63 62 return rj; 64 63 } … … 71 70 //OPT=3 Kalbach's parameterization 72 71 // 73 G4double G4PreCompoundProton::CrossSection(const G4double K) 74 { 75 //G4cout<<" In G4PreCompoundProton OPTxs="<<OPTxs<<G4endl; 76 //G4cout<<" In G4PreCompoundProton useSICB="<<useSICB<<G4endl; 77 78 ResidualA=GetRestA(); 79 ResidualZ=GetRestZ(); 80 theA=GetA(); 81 theZ=GetZ(); 82 ResidualAthrd=std::pow(ResidualA,0.33333); 83 FragmentA=GetA()+GetRestA(); 84 FragmentAthrd=std::pow(FragmentA,0.33333); 85 86 if (OPTxs==0) return GetOpt0(K); 87 else if( OPTxs==1) return GetOpt1(K); 88 else if( OPTxs==2|| OPTxs==4) return GetOpt2(K); 89 else if (OPTxs==3) return GetOpt3(K); 72 G4double G4PreCompoundProton::CrossSection(G4double K) 73 { 74 ResidualA = GetRestA(); 75 ResidualZ = GetRestZ(); 76 theA = GetA(); 77 theZ = GetZ(); 78 ResidualAthrd = ResidualA13(); 79 FragmentA = theA + ResidualA; 80 FragmentAthrd = g4pow->Z13(FragmentA); 81 82 if (OPTxs==0) { return GetOpt0(K); } 83 else if( OPTxs==1) { return GetOpt1(K); } 84 else if( OPTxs==2|| OPTxs==4) { return GetOpt2(K); } 85 else if (OPTxs==3) { return GetOpt3(K); } 90 86 else{ 91 87 std::ostringstream errOs; … … 96 92 } 97 93 98 // *********************** OPT=0 : Dostrovski's cross section *****************************99 100 G4double G4PreCompoundProton::GetOpt0(const G4double K)101 {102 const G4double r0 = G4PreCompoundParameters::GetAddress()->Getr0();103 // cross section is now given in mb (r0 is in mm) for the sake of consistency104 //with the rest of the options105 return 1.e+25*pi*(r0*ResidualAthrd)*(r0*ResidualAthrd)*GetAlpha()*(1.+GetBeta()/K);106 }107 //108 //------------109 //110 94 G4double G4PreCompoundProton::GetAlpha() 111 95 { 112 G4 double aZ = static_cast<G4double>(GetRestZ());96 G4int aZ = ResidualZ; 113 97 G4double C = 0.0; 114 98 if (aZ >= 70) … … 122 106 return 1.0 + C; 123 107 } 124 // 125 //------------------- 126 // 108 127 109 G4double G4PreCompoundProton::GetBeta() 128 110 { 129 111 return -GetCoulombBarrier(); 130 112 } 131 // 132 133 //********************* OPT=1 : Chatterjee's cross section ************************ 113 114 //********************* OPT=1 : Chatterjee's cross section ********************* 134 115 //(fitting to cross section from Bechetti & Greenles OM potential) 135 116 136 G4double G4PreCompoundProton::GetOpt1( constG4double K)117 G4double G4PreCompoundProton::GetOpt1(G4double K) 137 118 { 138 119 G4double Kc=K; 139 120 140 121 // JMQ xsec is set constat above limit of validity 141 if (K >50) Kc=50;122 if (K > 50*MeV) { Kc = 50*MeV; } 142 123 143 124 G4double landa, landa0, landa1, mu, mu0, mu1,nu, nu0, nu1, nu2,xs; … … 159 140 p = p0 + p1/Ec + p2/(Ec*Ec); 160 141 landa = landa0*ResidualA + landa1; 161 mu = mu0*std::pow(ResidualA,mu1); 162 nu = std::pow(ResidualA,mu1)*(nu0 + nu1*Ec + nu2*(Ec*Ec)); 142 143 G4double resmu1 = g4pow->powZ(ResidualA,mu1); 144 mu = mu0*resmu1; 145 nu = resmu1*(nu0 + nu1*Ec + nu2*(Ec*Ec)); 163 146 q = landa - nu/(Ec*Ec) - 2*p*Ec; 164 147 r = mu + 2*nu/Ec + p*(Ec*Ec); … … 170 153 171 154 return xs; 172 173 } 174 175 //************* OPT=2 : Welisch's proton reaction cross section ************************ 176 177 G4double G4PreCompoundProton::GetOpt2(const G4double K) 178 { 179 180 G4double rnpro,rnneu,eekin,ekin,ff1,ff2,ff3,r0,fac,fac1,fac2,b0,xine_th(0); 155 } 156 157 //************* OPT=2 : Welisch's proton reaction cross section *************** 158 159 G4double G4PreCompoundProton::GetOpt2(G4double K) 160 { 161 162 G4double eekin,ekin,ff1,ff2,ff3,r0,fac,fac1,fac2,b0,xine_th(0); 181 163 182 //This is redundant when the Coulomb barrier is overimposed to all cross sections 183 //It should be kept when Coulomb barrier only imposed at OPTxs=2 184 185 if(!useSICB && K<=theCoulombBarrier) return xine_th=0.0; 164 // This is redundant when the Coulomb barrier is overimposed to all 165 // cross sections 166 // It should be kept when Coulomb barrier only imposed at OPTxs=2 167 168 if(!useSICB && K<=theCoulombBarrier) { return 0.0; } 186 169 187 170 eekin=K; 188 rnpro=ResidualZ; 189 rnneu=ResidualA-ResidualZ; 171 G4int rnneu=ResidualA-ResidualZ; 190 172 ekin=eekin/1000; 191 173 r0=1.36*1.e-15; … … 194 176 fac1=b0*(1.-1./ResidualAthrd); 195 177 fac2=1.; 196 if(rnneu > 1.5) fac2=std::log(rnneu);178 if(rnneu > 1.5) { fac2 = g4pow->logZ(rnneu); } 197 179 xine_th= 1.e+31*fac*fac2*(1.+ResidualAthrd-fac1); 198 180 xine_th=(1.-0.15*std::exp(-ekin))*xine_th/(1.00-0.0007*ResidualA); 199 ff1=0.70-0.0020*ResidualA ;181 ff1=0.70-0.0020*ResidualA; 200 182 ff2=1.00+1/ResidualA; 201 183 ff3=0.8+18/ResidualA-0.002*ResidualA; … … 215 197 } 216 198 return xine_th; 217 218 } 219 199 } 220 200 221 201 // *********** OPT=3 : Kalbach's cross sections (from PRECO code)************* … … 247 227 G4double ec,ecsq,xnulam,etest(0.),ra(0.),a,w,c,signor(1.),signor2,sig; 248 228 G4double b,ecut,cut,ecut2,geom,elab; 249 250 229 251 230 G4double flow = 1.e-18; 252 231 G4double spill= 1.e+18; 253 254 255 256 if (ResidualA <= 60.) signor = 0.92; 257 else if (ResidualA < 100.) signor = 0.8 + ResidualA*0.002; 258 232 233 if (ResidualA <= 60.) { signor = 0.92; } 234 else if (ResidualA < 100.) { signor = 0.8 + ResidualA*0.002; } 259 235 260 236 ec = 1.44 * theZ * ResidualZ / (1.5*ResidualAthrd+ra); … … 262 238 p = p0 + p1/ec + p2/ecsq; 263 239 landa = landa0*ResidualA + landa1; 264 a = std::pow(ResidualA,mu1);240 a = g4pow->powZ(ResidualA,mu1); 265 241 mu = mu0 * a; 266 242 nu = a* (nu0+nu1*ec+nu2*ecsq); … … 270 246 271 247 xnulam = nu / landa; 272 if (xnulam > spill) xnulam=0.;273 if (xnulam >= flow) etest =std::sqrt(xnulam) + 7.;248 if (xnulam > spill) { xnulam=0.; } 249 if (xnulam >= flow) { etest =std::sqrt(xnulam) + 7.; } 274 250 275 251 a = -2.*p*ec + landa - nu/ecsq; … … 277 253 ecut = 0.; 278 254 cut = a*a - 4.*p*b; 279 if (cut > 0.) ecut = std::sqrt(cut);255 if (cut > 0.) { ecut = std::sqrt(cut); } 280 256 ecut = (ecut-a) / (p+p); 281 257 ecut2 = ecut; 282 //JMQ 290310 for avoiding unphysical increase below minimum (at ecut) 283 //ecut<0 means that there is no cut with energy axis, i.e. xs is set to 0 bellow minimum 284 // if (cut < 0.) ecut2 = ecut - 2.; 285 if (cut < 0.) ecut2 = ecut; 258 //JMQ 290310 for avoiding unphysical increase below minimum (at ecut) 259 // ecut<0 means that there is no cut with energy axis, i.e. xs is set 260 // to 0 bellow minimum 261 // if (cut < 0.) ecut2 = ecut - 2.; 262 if (cut < 0.) { ecut2 = ecut; } 286 263 elab = K * FragmentA / ResidualA; 287 264 sig = 0.; 288 265 if (elab <= ec) { //start for E<Ec 289 if (elab > ecut2) sig = (p*elab*elab+a*elab+b) * signor;266 if (elab > ecut2) { sig = (p*elab*elab+a*elab+b) * signor; } 290 267 291 268 signor2 = (ec-elab-c) / w; … … 308 285 309 286 } //end for E>Ec 310 311 287 return sig; 312 288 } 313 314 // ************************** end of cross sections *******************************315 316 317 -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundTransitions.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4PreCompoundTransitions.cc,v 1.2 2 2009/11/21 18:03:13vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 4-beta-01$26 // $Id: G4PreCompoundTransitions.cc,v 1.27 2010/10/20 00:47:46 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 28 // 29 29 // ------------------------------------------------------------------- … … 37 37 // 38 38 // Modified: 39 // 16.02.2008 J. M.Quesada fixed bugs40 // 06.09.2008 J. M.Quesada added external choices for:39 // 16.02.2008 J.M.Quesada fixed bugs 40 // 06.09.2008 J.M.Quesada added external choices for: 41 41 // - "never go back" hipothesis (useNGB=true) 42 42 // - CEM transition probabilities (useCEMtr=true) 43 44 // 30.10.09 J.M.Quesada: CEM transition probabilities have been renormalized 43 // 30.10.2009 J.M.Quesada: CEM transition probabilities have been renormalized 45 44 // (IAEA benchmark) 46 // 45 // 20.08.2010 V.Ivanchenko move constructor and destructor to the source and 46 // optimise the code 47 // 48 47 49 #include "G4PreCompoundTransitions.hh" 48 50 #include "G4HadronicException.hh" 49 50 const G4PreCompoundTransitions & G4PreCompoundTransitions:: 51 operator=(const G4PreCompoundTransitions &) 51 #include "G4PreCompoundParameters.hh" 52 #include "G4Proton.hh" 53 #include "Randomize.hh" 54 #include "G4Pow.hh" 55 56 G4PreCompoundTransitions::G4PreCompoundTransitions() 52 57 { 53 throw G4HadronicException(__FILE__, __LINE__, "G4PreCompoundTransitions::operator= meant to not be accessable"); 54 return *this; 58 proton = G4Proton::Proton(); 59 FermiEnergy = G4PreCompoundParameters::GetAddress()->GetFermiEnergy(); 60 r0 = G4PreCompoundParameters::GetAddress()->GetTransitionsr0(); 61 aLDP = G4PreCompoundParameters::GetAddress()->GetLevelDensity(); 62 g4pow = G4Pow::GetInstance(); 55 63 } 56 64 57 58 G4bool G4PreCompoundTransitions::operator==(const G4PreCompoundTransitions &) const 59 { 60 return false; 61 } 62 63 G4bool G4PreCompoundTransitions::operator!=(const G4PreCompoundTransitions &) const 64 { 65 return true; 66 } 67 68 65 G4PreCompoundTransitions::~G4PreCompoundTransitions() 66 {} 67 68 // Calculates transition probabilities with 69 // DeltaN = +2 (Trans1) -2 (Trans2) and 0 (Trans3) 69 70 G4double G4PreCompoundTransitions:: 70 71 CalculateProbability(const G4Fragment & aFragment) 71 72 { 72 //G4cout<<"In G4PreCompoundTransitions.cc useNGB="<<useNGB<<G4endl; 73 //G4cout<<"In G4PreCompoundTransitions.cc useCEMtr="<<useCEMtr<<G4endl; 74 75 // Fermi energy 76 const G4double FermiEnergy = G4PreCompoundParameters::GetAddress()->GetFermiEnergy(); 73 // Number of holes 74 G4int H = aFragment.GetNumberOfHoles(); 75 // Number of Particles 76 G4int P = aFragment.GetNumberOfParticles(); 77 // Number of Excitons 78 G4int N = P+H; 79 // Nucleus 80 G4int A = aFragment.GetA_asInt(); 81 G4int Z = aFragment.GetZ_asInt(); 82 G4double U = aFragment.GetExcitationEnergy(); 83 84 //G4cout << aFragment << G4endl; 77 85 78 // Nuclear radius 79 const G4double r0 = G4PreCompoundParameters::GetAddress()->GetTransitionsr0(); 80 81 // In order to calculate the level density parameter 82 // G4EvaporationLevelDensityParameter theLDP; 83 84 // Number of holes 85 G4double H = aFragment.GetNumberOfHoles(); 86 // Number of Particles 87 G4double P = aFragment.GetNumberOfParticles(); 88 // Number of Excitons 89 G4double N = P+H; 90 // Nucleus 91 G4double A = aFragment.GetA(); 92 G4double Z = static_cast<G4double>(aFragment.GetZ()); 93 G4double U = aFragment.GetExcitationEnergy(); 94 95 if(U<10*eV) return 0.0; 86 if(U < 10*eV) { return 0.0; } 96 87 97 88 //J. M. Quesada (Feb. 08) new physics 98 // OPT=1 Transitions are calculated according to Gudima's paper (original in G4PreCompound from VL) 89 // OPT=1 Transitions are calculated according to Gudima's paper 90 // (original in G4PreCompound from VL) 99 91 // OPT=2 Transitions are calculated according to Gupta's formulae 100 92 // 101 102 103 104 93 if (useCEMtr){ 105 94 106 107 95 // Relative Energy (T_{rel}) 108 G4double RelativeEnergy = (8.0/5.0)*FermiEnergy + U/N;96 G4double RelativeEnergy = 1.6*FermiEnergy + U/G4double(N); 109 97 110 98 // Sample kind of nucleon-projectile 111 99 G4bool ChargedNucleon(false); 112 100 G4double chtest = 0.5; 113 if (P > 0) chtest = aFragment.GetNumberOfCharged()/P; 114 if (G4UniformRand() < chtest) ChargedNucleon = true; 101 if (P > 0) { 102 chtest = G4double(aFragment.GetNumberOfCharged())/G4double(P); 103 } 104 if (G4UniformRand() < chtest) { ChargedNucleon = true; } 115 105 116 106 // Relative Velocity: 117 107 // <V_{rel}>^2 118 108 G4double RelativeVelocitySqr(0.0); 119 if (ChargedNucleon) RelativeVelocitySqr = 2.0*RelativeEnergy/proton_mass_c2; 120 else RelativeVelocitySqr = 2.0*RelativeEnergy/neutron_mass_c2; 109 if (ChargedNucleon) { 110 RelativeVelocitySqr = 2.0*RelativeEnergy/CLHEP::proton_mass_c2; 111 } else { 112 RelativeVelocitySqr = 2.0*RelativeEnergy/CLHEP::neutron_mass_c2; 113 } 121 114 122 115 // <V_{rel}> … … 124 117 125 118 // Proton-Proton Cross Section 126 G4double ppXSection = (10.63/RelativeVelocitySqr - 29.92/RelativeVelocity + 42.9)*millibarn; 119 G4double ppXSection = 120 (10.63/RelativeVelocitySqr - 29.92/RelativeVelocity + 42.9) 121 * CLHEP::millibarn; 127 122 // Proton-Neutron Cross Section 128 G4double npXSection = (34.10/RelativeVelocitySqr - 82.20/RelativeVelocity + 82.2)*millibarn; 123 G4double npXSection = 124 (34.10/RelativeVelocitySqr - 82.20/RelativeVelocity + 82.2) 125 * CLHEP::millibarn; 129 126 130 127 // Averaged Cross Section: \sigma(V_{rel}) … … 134 131 { 135 132 //JMQ: small bug fixed 136 // AveragedXSection = ((Z-1.0) * ppXSection + (A-Z-1.0) * npXSection) /(A-1.0);137 AveragedXSection = ((Z-1 .0) * ppXSection + (A-Z) * npXSection) / (A-1.0);133 //AveragedXSection=((Z-1.0) * ppXSection + (A-Z-1.0) * npXSection)/(A-1.0); 134 AveragedXSection = ((Z-1)*ppXSection + (A-Z)*npXSection)/G4double(A-1); 138 135 } 139 136 else 140 137 { 141 AveragedXSection = ((A-Z-1.0) * ppXSection + Z * npXSection) / (A-1.0); 138 AveragedXSection = ((A-Z-1)*ppXSection + Z*npXSection)/G4double(A-1); 139 //AveragedXSection = ((A-Z-1)*npXSection + Z*ppXSection)/G4double(A-1); 142 140 } 143 141 … … 146 144 147 145 // This factor is introduced to take into account the Pauli principle 148 G4double PauliFactor = 1.0 - (7.0/5.0)*FermiRelRatio; 149 if (FermiRelRatio > 0.5) PauliFactor += (2.0/5.0)*FermiRelRatio*std::pow(2.0 - (1.0/FermiRelRatio), 5.0/2.0); 150 146 G4double PauliFactor = 1.0 - 1.4*FermiRelRatio; 147 if (FermiRelRatio > 0.5) { 148 G4double x = 2.0 - 1.0/FermiRelRatio; 149 PauliFactor += 0.4*FermiRelRatio*x*x*std::sqrt(x); 150 //PauliFactor += 151 //(2.0/5.0)*FermiRelRatio*std::pow(2.0 - (1.0/FermiRelRatio), 5.0/2.0); 152 } 151 153 // Interaction volume 152 // G4double Vint = (4.0/3.0)*pi*std::pow(2.0*r0 + hbarc/(proton_mass_c2*RelativeVelocity) , 3.0); 153 G4double xx=2.0*r0 + hbarc/(proton_mass_c2*RelativeVelocity); 154 G4double Vint = (4.0/3.0)*pi*xx*xx*xx; 154 // G4double Vint = (4.0/3.0) 155 //*pi*std::pow(2.0*r0 + hbarc/(proton_mass_c2*RelativeVelocity) , 3.0); 156 G4double xx = 2.0*r0 + hbarc/(CLHEP::proton_mass_c2*RelativeVelocity); 157 // G4double Vint = (4.0/3.0)*CLHEP::pi*xx*xx*xx; 158 G4double Vint = CLHEP::pi*xx*xx*xx/0.75; 155 159 156 160 // Transition probability for \Delta n = +2 157 161 158 TransitionProb1 = AveragedXSection*PauliFactor*std::sqrt(2.0*RelativeEnergy/proton_mass_c2)/Vint; 159 160 //JMQ 281009 phenomenological factor in order to increase equilibrium contribution 161 // G4double factor=5.0; 162 // TransitionProb1 *= factor; 163 // 164 if (TransitionProb1 < 0.0) TransitionProb1 = 0.0; 165 166 G4double a = G4PreCompoundParameters::GetAddress()->GetLevelDensity(); 162 TransitionProb1 = AveragedXSection*PauliFactor 163 *std::sqrt(2.0*RelativeEnergy/CLHEP::proton_mass_c2)/Vint; 164 165 //JMQ 281009 phenomenological factor in order to increase 166 // equilibrium contribution 167 // G4double factor=5.0; 168 // TransitionProb1 *= factor; 169 // 170 if (TransitionProb1 < 0.0) { TransitionProb1 = 0.0; } 171 167 172 // GE = g*E where E is Excitation Energy 168 G4double GE = (6.0/pi2)*a*A*U; 169 170 G4double Fph = ((P*P+H*H+P-H)/4.0 - H/2.0); 171 172 //G4bool NeverGoBack(false); 173 G4bool NeverGoBack; 174 if(useNGB) NeverGoBack=true; 175 else NeverGoBack=false; 176 173 G4double GE = (6.0/pi2)*aLDP*A*U; 174 175 //G4double Fph = ((P*P+H*H+P-H)/4.0 - H/2.0); 176 G4double Fph = G4double(P*P+H*H+P-3*H)/4.0; 177 178 G4bool NeverGoBack(false); 179 if(useNGB) { NeverGoBack=true; } 177 180 178 181 //JMQ/AH bug fixed: if (U-Fph < 0.0) NeverGoBack = true; 179 if (GE-Fph < 0.0) NeverGoBack = true;182 if (GE-Fph < 0.0) { NeverGoBack = true; } 180 183 181 184 // F(p+1,h+1) 182 185 G4double Fph1 = Fph + N/2.0; 183 186 184 G4double ProbFactor = std::pow((GE-Fph)/(GE-Fph1),N+1.0); 185 187 G4double ProbFactor = g4pow->powN((GE-Fph)/(GE-Fph1),N+1); 186 188 187 189 if (NeverGoBack) 188 190 { 189 TransitionProb2 = 0.0;190 TransitionProb3 = 0.0;191 TransitionProb2 = 0.0; 192 TransitionProb3 = 0.0; 191 193 } 192 194 else 193 195 { 194 196 // Transition probability for \Delta n = -2 (at F(p,h) = 0) 195 TransitionProb2 = TransitionProb1 * ProbFactor * (P*H*(N+1.0)*(N-2.0))/((GE-Fph)*(GE-Fph)); 196 if (TransitionProb2 < 0.0) TransitionProb2 = 0.0; 197 TransitionProb2 = 198 TransitionProb1 * ProbFactor * (P*H*(N+1)*(N-2))/((GE-Fph)*(GE-Fph)); 199 if (TransitionProb2 < 0.0) { TransitionProb2 = 0.0; } 197 200 198 201 // Transition probability for \Delta n = 0 (at F(p,h) = 0) 199 TransitionProb3 = TransitionProb1* ((N+1.0)/N) * ProbFactor * (P*(P-1.0) + 4.0*P*H + H*(H-1.0))/(GE-Fph); 200 if (TransitionProb3 < 0.0) TransitionProb3 = 0.0; 201 } 202 203 // G4cout<<"U = "<<U<<G4endl; 204 // G4cout<<"N="<<N<<" P="<<P<<" H="<<H<<G4endl; 205 // G4cout<<"l+ ="<<TransitionProb1<<" l- ="<< TransitionProb2<<" l0 ="<< TransitionProb3<<G4endl; 206 return TransitionProb1 + TransitionProb2 + TransitionProb3; 207 } 208 209 else { 210 //JMQ: Transition probabilities from Gupta's work 211 212 G4double a = G4PreCompoundParameters::GetAddress()->GetLevelDensity(); 202 TransitionProb3 = TransitionProb1*(N+1)* ProbFactor 203 * (P*(P-1) + 4.0*P*H + H*(H-1))/(N*(GE-Fph)); 204 if (TransitionProb3 < 0.0) { TransitionProb3 = 0.0; } 205 } 206 } else { 207 //JMQ: Transition probabilities from Gupta's work 213 208 // GE = g*E where E is Excitation Energy 214 G4double GE = (6.0/pi2)*a *A*U;209 G4double GE = (6.0/pi2)*aLDP*A*U; 215 210 216 211 G4double Kmfp=2.; 217 212 218 TransitionProb1=1./Kmfp*3./8.*1./c_light*1.0e-9*(1.4e+21*U-2./(N+1)*6.0e+18*U*U); 219 if (TransitionProb1 < 0.0) TransitionProb1 = 0.0; 220 221 if (useNGB){ 222 TransitionProb2=0.; 223 TransitionProb3=0.; 224 } 225 else{ 226 if (N<=1) TransitionProb2=0. ; 227 else TransitionProb2=1./Kmfp*3./8.*1./c_light*1.0e-9*(N-1.)*(N-2.)*P*H/(GE*GE)*(1.4e+21*U - 2./(N-1)*6.0e+18*U*U); 213 //TransitionProb1=1./Kmfp*3./8.*1./c_light*1.0e-9*(1.4e+21*U-2./(N+1)*6.0e+18*U*U); 214 TransitionProb1 = 3.0e-9*(1.4e+21*U - 1.2e+19*U*U/G4double(N+1)) 215 /(8*Kmfp*CLHEP::c_light); 216 if (TransitionProb1 < 0.0) { TransitionProb1 = 0.0; } 217 218 TransitionProb2=0.; 219 TransitionProb3=0.; 220 221 if (!useNGB && N > 1) { 222 // TransitionProb2=1./Kmfp*3./8.*1./c_light*1.0e-9*(N-1.)*(N-2.)*P*H/(GE*GE)*(1.4e+21*U - 2./(N-1)*6.0e+18*U*U); 223 TransitionProb2 = 224 3.0e-9*(N-2)*P*H*(1.4e+21*U*(N-1) - 1.2e+19*U*U)/(8*Kmfp*c_light*GE*GE); 228 225 if (TransitionProb2 < 0.0) TransitionProb2 = 0.0; 229 TransitionProb3=0.; 230 } 231 232 // G4cout<<"U = "<<U<<G4endl; 233 // G4cout<<"N="<<N<<" P="<<P<<" H="<<H<<G4endl; 234 // G4cout<<"l+ ="<<TransitionProb1<<" l- ="<< TransitionProb2<<" l0 ="<< TransitionProb3<<G4endl; 235 return TransitionProb1 + TransitionProb2 + TransitionProb3; 226 } 236 227 } 228 // G4cout<<"U = "<<U<<G4endl; 229 // G4cout<<"N="<<N<<" P="<<P<<" H="<<H<<G4endl; 230 // G4cout<<"l+ ="<<TransitionProb1<<" l- ="<< TransitionProb2 231 // <<" l0 ="<< TransitionProb3<<G4endl; 232 return TransitionProb1 + TransitionProb2 + TransitionProb3; 237 233 } 238 234 239 240 G4Fragment G4PreCompoundTransitions::PerformTransition(const G4Fragment & aFragment) 235 void G4PreCompoundTransitions::PerformTransition(G4Fragment & result) 241 236 { 242 G4 Fragment result(aFragment);243 G4double ChosenTransition =G4UniformRand()*(TransitionProb1 + TransitionProb2 + TransitionProb3);237 G4double ChosenTransition = 238 G4UniformRand()*(TransitionProb1 + TransitionProb2 + TransitionProb3); 244 239 G4int deltaN = 0; 245 G4int Nexcitons = result.GetNumberOfExcitons(); 240 // G4int Nexcitons = result.GetNumberOfExcitons(); 241 G4int Npart = result.GetNumberOfParticles(); 242 G4int Ncharged = result.GetNumberOfCharged(); 243 G4int Nholes = result.GetNumberOfHoles(); 246 244 if (ChosenTransition <= TransitionProb1) 247 245 { … … 255 253 } 256 254 257 // AH/JMQ: Randomly decrease the number of charges if deltaN is -2 and in proportion 258 // to the number charges w.r.t. number of particles, PROVIDED that there are charged particles 259 if(deltaN < 0 && G4UniformRand() <= 260 static_cast<G4double>(result.GetNumberOfCharged())/static_cast<G4double>(result.GetNumberOfParticles()) 261 && (result.GetNumberOfCharged() >= 1)) { 262 result.SetNumberOfCharged(result.GetNumberOfCharged()+deltaN/2); // deltaN is negative! 263 } 255 // AH/JMQ: Randomly decrease the number of charges if deltaN is -2 and 256 // in proportion to the number charges w.r.t. number of particles, 257 // PROVIDED that there are charged particles 258 deltaN /= 2; 259 260 //G4cout << "deltaN= " << deltaN << G4endl; 264 261 265 262 // JMQ the following lines have to be before SetNumberOfCharged, otherwise the check on 266 263 // number of charged vs. number of particles fails 267 result.SetNumberOfParticles(result.GetNumberOfParticles()+deltaN/2); 268 result.SetNumberOfHoles(result.GetNumberOfHoles()+deltaN/2); 269 270 // With weight Z/A, number of charged particles is increased with +1 271 if ( ( deltaN > 0 ) && 272 (G4UniformRand() <= static_cast<G4double>(result.GetZ()-result.GetNumberOfCharged())/ 273 std::max(static_cast<G4double>(result.GetA()-Nexcitons),1.))) 274 { 275 result.SetNumberOfCharged(result.GetNumberOfCharged()+deltaN/2); 276 } 264 result.SetNumberOfParticles(Npart+deltaN); 265 result.SetNumberOfHoles(Nholes+deltaN); 266 267 if(deltaN < 0) { 268 if( Ncharged >= 1 && G4int(Npart*G4UniformRand()) <= Ncharged) 269 { 270 result.SetNumberOfCharged(Ncharged+deltaN); // deltaN is negative! 271 } 272 273 } else if ( deltaN > 0 ) { 274 // With weight Z/A, number of charged particles is increased with +1 275 G4int A = result.GetA_asInt(); 276 G4int Z = result.GetZ_asInt(); 277 if( G4int(std::max(1, A - Npart)*G4UniformRand()) <= Z) 278 { 279 result.SetNumberOfCharged(Ncharged+deltaN); 280 } 281 } 277 282 278 283 // Number of charged can not be greater that number of particles 279 if ( result.GetNumberOfParticles() < result.GetNumberOfCharged())284 if ( Npart < Ncharged ) 280 285 { 281 result.SetNumberOfCharged( result.GetNumberOfParticles());282 } 283 284 return result;286 result.SetNumberOfCharged(Npart); 287 } 288 //G4cout << "### After transition" << G4endl; 289 //G4cout << result << G4endl; 285 290 } 286 291 -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4PreCompoundTriton.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // 27 // $Id: G4PreCompoundTriton.cc,v 1.6 2010/04/09 14:06:17 vnivanch Exp $ 28 // GEANT4 tag $Name: geant4-09-04-beta-01 $ 26 // $Id: G4PreCompoundTriton.cc,v 1.7 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 29 28 // 30 29 // ------------------------------------------------------------------- … … 39 38 // Modified: 40 39 // 21.08.2008 J. M. Quesada add choice of options 40 // 20.08.2010 V.Ivanchenko added G4Pow and G4PreCompoundParameters pointers 41 // use int Z and A and cleanup 41 42 // 42 43 43 44 #include "G4PreCompoundTriton.hh" 44 45 46 G4ReactionProduct * G4PreCompoundTriton::GetReactionProduct() const 47 { 48 G4ReactionProduct * theReactionProduct = 49 new G4ReactionProduct(G4Triton::TritonDefinition()); 50 theReactionProduct->SetMomentum(GetMomentum().vect()); 51 theReactionProduct->SetTotalEnergy(GetMomentum().e()); 52 #ifdef PRECOMPOUND_TEST 53 theReactionProduct->SetCreatorModel("G4PrecompoundModel"); 54 #endif 55 return theReactionProduct; 56 } 57 58 G4double G4PreCompoundTriton::FactorialFactor(const G4double N, const G4double P) 59 { 60 return 61 (N-3.0)*(P-2.0)*( 62 (((N-2.0)*(P-1.0))/2.0) *( 63 (((N-1.0)*P)/3.0) 64 ) 65 ); 45 #include "G4Triton.hh" 46 47 G4PreCompoundTriton::G4PreCompoundTriton() 48 : G4PreCompoundIon(G4Triton::Triton(), &theTritonCoulombBarrier) 49 {} 50 51 G4PreCompoundTriton::~G4PreCompoundTriton() 52 {} 53 54 G4double G4PreCompoundTriton::FactorialFactor(G4int N, const G4int P) 55 { 56 return G4double((N-3)*(P-2)*(N-2)*(P-1)*(N-1)*P)/6.0; 66 57 } 67 58 68 G4double G4PreCompoundTriton::CoalescenceFactor( const G4doubleA)69 { 70 return 243.0/ (A*A);59 G4double G4PreCompoundTriton::CoalescenceFactor(G4int A) 60 { 61 return 243.0/G4double(A*A); 71 62 } 72 63 73 G4double G4PreCompoundTriton::GetRj( const G4int NumberParticles, const G4int NumberCharged)64 G4double G4PreCompoundTriton::GetRj(G4int nParticles, G4int nCharged) 74 65 { 75 66 G4double rj = 0.0; 76 G4double denominator = NumberParticles*(NumberParticles-1)*(NumberParticles-2); 77 if(NumberCharged >= 1 && (NumberParticles-NumberCharged) >= 2) { 78 rj = 3.0*static_cast<G4double>(NumberCharged*(NumberParticles-NumberCharged)*(NumberParticles-NumberCharged-1)) 79 /static_cast<G4double>(denominator); 67 if(nCharged >= 1 && (nParticles-nCharged) >= 2) { 68 G4double denominator = 69 G4double(nParticles*(nParticles-1)*(nParticles-2)); 70 rj = G4double(3*nCharged*(nParticles-nCharged)*(nParticles-nCharged-1)) 71 /denominator; 80 72 } 81 73 return rj; 82 74 } 83 75 84 ////////////////////////////////////////////////////////////////////////////////// //76 ////////////////////////////////////////////////////////////////////////////////// 85 77 //J. M. Quesada (Dec 2007-June 2008): New inverse reaction cross sections 86 78 //OPT=0 Dostrovski's parameterization … … 88 80 //OPT=3,4 Kalbach's parameterization 89 81 // 90 G4double G4PreCompoundTriton::CrossSection( constG4double K)91 { 92 ResidualA =GetRestA();93 ResidualZ =GetRestZ();94 theA =GetA();95 theZ =GetZ();96 ResidualAthrd =std::pow(ResidualA,0.33333);97 FragmentA =GetA()+GetRestA();98 FragmentAthrd =std::pow(FragmentA,0.33333);99 100 if (OPTxs==0) return GetOpt0( K);101 else if( OPTxs==1 || OPTxs==2) return GetOpt12( K);102 else if (OPTxs==3 || OPTxs==4) return GetOpt34( K);82 G4double G4PreCompoundTriton::CrossSection(G4double K) 83 { 84 ResidualA = GetRestA(); 85 ResidualZ = GetRestZ(); 86 theA = GetA(); 87 theZ = GetZ(); 88 ResidualAthrd = ResidualA13(); 89 FragmentA = theA + ResidualA; 90 FragmentAthrd = g4pow->Z13(FragmentA); 91 92 if (OPTxs==0) { return GetOpt0( K); } 93 else if( OPTxs==1 || OPTxs==2) { return GetOpt12( K); } 94 else if (OPTxs==3 || OPTxs==4) { return GetOpt34( K); } 103 95 else{ 104 96 std::ostringstream errOs; … … 109 101 } 110 102 111 // *********************** OPT=0 : Dostrovski's cross section *****************************112 113 G4double G4PreCompoundTriton::GetOpt0(const G4double K)114 {115 const G4double r0 = G4PreCompoundParameters::GetAddress()->Getr0();116 // cross section is now given in mb (r0 is in mm) for the sake of consistency117 //with the rest of the options118 return 1.e+25*pi*(r0*ResidualAthrd)*(r0*ResidualAthrd)*GetAlpha()*(1.+GetBeta()/K);119 }120 //121 //---------122 //123 103 G4double G4PreCompoundTriton::GetAlpha() 124 104 { 125 105 G4double C = 0.0; 126 G4 double aZ = GetZ() + GetRestZ();106 G4int aZ = theZ + ResidualZ; 127 107 if (aZ >= 70) 128 108 { … … 136 116 return 1.0 + C/3.0; 137 117 } 138 // 139 //------------- 140 // 141 G4double G4PreCompoundTriton::GetBeta() 142 { 143 return -GetCoulombBarrier(); 144 } 145 // 146 //********************* OPT=1,2 : Chatterjee's cross section ************************ 118 119 // 120 //********************* OPT=1,2 : Chatterjee's cross section ***************** 147 121 //(fitting to cross section from Bechetti & Greenles OM potential) 148 122 149 G4double G4PreCompoundTriton::GetOpt12(const G4double K) 150 { 151 123 G4double G4PreCompoundTriton::GetOpt12(G4double K) 124 { 152 125 G4double Kc=K; 153 126 154 127 // JMQ xsec is set constat above limit of validity 155 if (K >50) Kc=50;128 if (K > 50*MeV) { Kc=50*MeV; } 156 129 157 130 G4double landa ,mu ,nu ,p , Ec,q,r,ji,xs; … … 172 145 p = p0 + p1/Ec + p2/(Ec*Ec); 173 146 landa = landa0*ResidualA + landa1; 174 mu = mu0*std::pow(ResidualA,mu1); 175 nu = std::pow(ResidualA,mu1)*(nu0 + nu1*Ec + nu2*(Ec*Ec)); 147 148 G4double resmu1 = g4pow->powZ(ResidualA,mu1); 149 mu = mu0*resmu1; 150 nu = resmu1*(nu0 + nu1*Ec + nu2*(Ec*Ec)); 176 151 q = landa - nu/(Ec*Ec) - 2*p*Ec; 177 152 r = mu + 2*nu/Ec + p*(Ec*Ec); … … 184 159 185 160 return xs; 186 187 161 } 188 162 189 163 // *********** OPT=3,4 : Kalbach's cross sections (from PRECO code)************* 190 G4double G4PreCompoundTriton::GetOpt34( constG4double K)164 G4double G4PreCompoundTriton::GetOpt34(G4double K) 191 165 // ** t from o.m. of hafele, flynn et al 192 166 { 193 194 167 G4double landa, mu, nu, p , signor(1.),sig; 195 168 G4double ec,ecsq,xnulam,etest(0.),a; 196 169 G4double b,ecut,cut,ecut2,geom,elab; 197 170 198 199 171 G4double flow = 1.e-18; 200 172 G4double spill= 1.e+18; 201 202 173 203 174 G4double p0 = -21.45; … … 220 191 p = p0 + p1/ec + p2/ecsq; 221 192 landa = landa0*ResidualA + landa1; 222 a = std::pow(ResidualA,mu1);193 a = g4pow->powZ(ResidualA,mu1); 223 194 mu = mu0 * a; 224 195 nu = a* (nu0+nu1*ec+nu2*ecsq); 225 196 xnulam = nu / landa; 226 if (xnulam > spill) xnulam=0.;227 if (xnulam >= flow) etest = 1.2 *std::sqrt(xnulam);197 if (xnulam > spill) { xnulam=0.; } 198 if (xnulam >= flow) { etest = 1.2 *std::sqrt(xnulam); } 228 199 229 200 a = -2.*p*ec + landa - nu/ecsq; … … 231 202 ecut = 0.; 232 203 cut = a*a - 4.*p*b; 233 if (cut > 0.) ecut = std::sqrt(cut);204 if (cut > 0.) { ecut = std::sqrt(cut); } 234 205 ecut = (ecut-a) / (p+p); 235 206 ecut2 = ecut; 236 //JMQ 290310 for avoiding unphysical increase below minimum (at ecut) 237 //ecut<0 means that there is no cut with energy axis, i.e. xs is set to 0 bellow minimum 238 // if (cut < 0.) ecut2 = ecut - 2.; 239 if (cut < 0.) ecut2 = ecut; 240 elab = K * FragmentA / ResidualA; 207 //JMQ 290310 for avoiding unphysical increase below minimum (at ecut) 208 // ecut<0 means that there is no cut with energy axis, i.e. xs is set 209 // to 0 bellow minimum 210 // if (cut < 0.) ecut2 = ecut - 2.; 211 if (cut < 0.) { ecut2 = ecut; } 212 elab = K * FragmentA / G4double(ResidualA); 241 213 sig = 0.; 242 214 243 215 if (elab <= ec) { //start for E<Ec 244 if (elab > ecut2) sig = (p*elab*elab+a*elab+b) * signor;216 if (elab > ecut2) { sig = (p*elab*elab+a*elab+b) * signor; } 245 217 } //end for E<Ec 246 218 else { //start for E>Ec 247 219 sig = (landa*elab+mu+nu/elab) * signor; 248 220 geom = 0.; 249 if (xnulam < flow || elab < etest) return sig;221 if (xnulam < flow || elab < etest) { return sig; } 250 222 geom = std::sqrt(theA*K); 251 223 geom = 1.23*ResidualAthrd + ra + 4.573/geom; … … 254 226 } //end for E>Ec 255 227 return sig; 256 257 } 258 259 // ************************** end of cross sections ******************************* 228 } -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4VPreCompoundEmissionFactory.cc
r819 r1340 24 24 // ******************************************************************** 25 25 // 26 26 // $Id: G4VPreCompoundEmissionFactory.cc,v 1.5 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 // 27 29 // by V. Lara 28 30 29 31 #include "G4VPreCompoundEmissionFactory.hh" 30 #include "G4HadronicException.hh"31 32 32 const G4VPreCompoundEmissionFactory & 33 G4VPreCompoundEmissionFactory::operator=(const G4VPreCompoundEmissionFactory & ) 33 G4VPreCompoundEmissionFactory::G4VPreCompoundEmissionFactory() 34 : fragvector(0) 35 {} 36 37 G4VPreCompoundEmissionFactory::~G4VPreCompoundEmissionFactory() 34 38 { 35 throw G4HadronicException(__FILE__, __LINE__, "G4VPreCompoundEmissionFactory::operator= meant to not be accessable."); 36 return *this; 37 } 38 39 G4bool 40 G4VPreCompoundEmissionFactory::operator==(const G4VPreCompoundEmissionFactory & ) const 41 { 42 throw G4HadronicException(__FILE__, __LINE__, "G4VPreCompoundEmissionFactory::operator== meant to not be accessable."); 43 return false; 44 } 45 46 G4bool 47 G4VPreCompoundEmissionFactory::operator!=(const G4VPreCompoundEmissionFactory & ) const 48 { 49 throw G4HadronicException(__FILE__, __LINE__, "G4VPreCompoundEmissionFactory::operator!= meant to not be accessable."); 50 return true; 39 if (fragvector != 0) 40 std::for_each(fragvector->begin(), fragvector->end(), 41 DeleteFragment()); 42 delete fragvector; 51 43 } 52 44 53 45 54 55 56 G4VPreCompoundEmissionFactory::~G4VPreCompoundEmissionFactory()57 {58 if (_fragvector != 0)59 std::for_each(_fragvector->begin(), _fragvector->end(),60 DeleteFragment());61 delete _fragvector;62 }63 64 65 std::vector<G4VPreCompoundFragment*> *66 G4VPreCompoundEmissionFactory::GetFragmentVector()67 {68 // Lazy initialization69 if (_fragvector == 0)70 _fragvector = CreateFragmentVector();71 return _fragvector;72 }73 -
trunk/source/processes/hadronic/models/pre_equilibrium/exciton_model/src/G4VPreCompoundFragment.cc
r1337 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VPreCompoundFragment.cc,v 1.1 2 2009/02/10 16:01:37vnivanch Exp $27 // GEANT4 tag $Name: geant4-09-0 4-beta-01$26 // $Id: G4VPreCompoundFragment.cc,v 1.13 2010/08/28 15:16:55 vnivanch Exp $ 27 // GEANT4 tag $Name: geant4-09-03-ref-09 $ 28 28 // 29 // J. M. Quesada (August 2008). 30 // Based on previous work by V. Lara 29 // J. M. Quesada (August 2008). Based on previous work by V. Lara 31 30 // 32 31 // Modified: 32 // 20.08.2010 V.Ivanchenko added G4Pow and G4PreCompoundParameters pointers 33 // use int Z and A and cleanup 34 33 35 #include "G4VPreCompoundFragment.hh" 34 36 #include "G4PreCompoundParameters.hh" 37 #include "G4NucleiProperties.hh" 35 38 36 G4VPreCompoundFragment:: 37 G4VPreCompoundFragment(const G4VPreCompoundFragment & right) 39 G4VPreCompoundFragment::G4VPreCompoundFragment( 40 const G4ParticleDefinition* part, G4VCoulombBarrier* aCoulombBarrier) 41 : particle(part), theCoulombBarrierPtr(aCoulombBarrier), 42 theRestNucleusA(0),theRestNucleusZ(0),theBindingEnergy(0.0), 43 theMaximalKineticEnergy(-MeV),theRestNucleusMass(0.0), 44 theReducedMass(0.0),theMomentum(0.,0.,0.,0.), 45 theEmissionProbability(0.0),theCoulombBarrier(0.0) 38 46 { 39 theA = right.theA; 40 theZ = right.theZ; 41 theRestNucleusA = right.theRestNucleusA; 42 theRestNucleusZ = right.theRestNucleusZ; 43 theCoulombBarrier = right.theCoulombBarrier; 44 theCoulombBarrierPtr = right.theCoulombBarrierPtr; 45 theMaximalKineticEnergy = right.theMaximalKineticEnergy; 46 theEmissionProbability = right.theEmissionProbability; 47 theMomentum = right.theMomentum; 48 theFragmentName = right.theFragmentName; 49 theStage = right.theStage; 47 theA = particle->GetBaryonNumber(); 48 theZ = G4int(particle->GetPDGCharge()/eplus + 0.1); 49 theMass = particle->GetPDGMass(); 50 theParameters = G4PreCompoundParameters::GetAddress(); 51 g4pow = G4Pow::GetInstance(); 50 52 } 51 53 52 G4VPreCompoundFragment:: 53 G4VPreCompoundFragment(const G4double anA, 54 const G4double aZ, 55 G4VCoulombBarrier* aCoulombBarrier, 56 const G4String & aName): 57 theA(anA),theZ(aZ), 58 theRestNucleusA(0.0),theRestNucleusZ(0.0),theCoulombBarrier(0.0), 59 theCoulombBarrierPtr(aCoulombBarrier), 60 theBindingEnergy(0.0), theMaximalKineticEnergy(-1.0), 61 theEmissionProbability(0.0), theMomentum(0.0,0.0,0.0,0.0), 62 theFragmentName(aName),theStage(0) 54 G4VPreCompoundFragment::~G4VPreCompoundFragment() 63 55 {} 64 65 66 67 G4VPreCompoundFragment::~G4VPreCompoundFragment()68 {69 }70 71 72 const G4VPreCompoundFragment & G4VPreCompoundFragment::73 operator= (const G4VPreCompoundFragment & right)74 {75 if (this != &right) {76 theA = right.theA;77 theZ = right.theZ;78 theRestNucleusA = right.theRestNucleusA;79 theRestNucleusZ = right.theRestNucleusZ;80 theCoulombBarrier = right.theCoulombBarrier;81 theCoulombBarrierPtr = right.theCoulombBarrierPtr;82 theMaximalKineticEnergy = right.theMaximalKineticEnergy;83 theEmissionProbability = right.theEmissionProbability;84 theMomentum = right.theMomentum;85 theFragmentName = right.theFragmentName;86 theStage = right.theStage;87 }88 return *this;89 }90 91 G4int G4VPreCompoundFragment::operator==(const G4VPreCompoundFragment & right) const92 {93 return (this == (G4VPreCompoundFragment *) &right);94 }95 96 G4int G4VPreCompoundFragment::operator!=(const G4VPreCompoundFragment & right) const97 {98 return (this != (G4VPreCompoundFragment *) &right);99 }100 101 56 102 57 std::ostream& … … 107 62 } 108 63 109 110 64 std::ostream& 111 65 operator << (std::ostream &out, const G4VPreCompoundFragment *theFragment) … … 115 69 116 70 out 117 << "PreCompound Model Emitted Fragment: A = "71 << "PreCompoundModel Emitted Fragment: A = " 118 72 << std::setprecision(3) << theFragment->theA 119 73 << ", Z = " << std::setprecision(3) << theFragment->theZ; … … 130 84 131 85 out.setf(old_floatfield,std::ios::floatfield); 132 133 86 return out; 134 87 } 135 136 88 137 89 void G4VPreCompoundFragment:: 138 90 Initialize(const G4Fragment & aFragment) 139 91 { 140 theRestNucleusA = aFragment.GetA() - theA; 141 theRestNucleusZ = aFragment.GetZ() - theZ; 92 theRestNucleusA = aFragment.GetA_asInt() - theA; 93 theRestNucleusZ = aFragment.GetZ_asInt() - theZ; 94 theRestNucleusA13 = g4pow->Z13(theRestNucleusA); 142 95 143 96 if ((theRestNucleusA < theRestNucleusZ) || … … 149 102 return; 150 103 } 151 152 104 153 105 // Calculate Coulomb barrier 154 106 theCoulombBarrier = theCoulombBarrierPtr-> 155 GetCoulombBarrier( static_cast<G4int>(theRestNucleusA),static_cast<G4int>(theRestNucleusZ),107 GetCoulombBarrier(theRestNucleusA,theRestNucleusZ, 156 108 aFragment.GetExcitationEnergy()); 157 109 110 // Calculate masses 111 theRestNucleusMass = 112 G4NucleiProperties::GetNuclearMass(theRestNucleusA, theRestNucleusZ); 113 theReducedMass = theRestNucleusMass*theMass/(theRestNucleusMass + theMass); 158 114 159 115 // Compute Binding Energies for fragments 160 116 // (needed to separate a fragment from the nucleus) 117 theBindingEnergy = theRestNucleusMass + theMass - aFragment.GetGroundStateMass(); 161 118 162 theBindingEnergy = G4NucleiProperties::GetMassExcess(static_cast<G4int>(theA),static_cast<G4int>(theZ)) +163 G4NucleiProperties::GetMassExcess(static_cast<G4int>(theRestNucleusA),static_cast<G4int>(theRestNucleusZ)) -164 G4NucleiProperties::GetMassExcess(static_cast<G4int>(aFragment.GetA()),static_cast<G4int>(aFragment.GetZ()));119 //theBindingEnergy = G4NucleiProperties::GetMassExcess(static_cast<G4int>(theA),static_cast<G4int>(theZ)) + 120 //G4NucleiProperties::GetMassExcess(static_cast<G4int>(theRestNucleusA),static_cast<G4int>(theRestNucleusZ)) - 121 //G4NucleiProperties::GetMassExcess(static_cast<G4int>(aFragment.GetA()),static_cast<G4int>(aFragment.GetZ())); 165 122 166 123 // Compute Maximal Kinetic Energy which can be carried by fragments after separation 167 124 // This is the true (assimptotic) maximal kinetic energy 168 G4double m = aFragment.GetMomentum().m();169 G4double rm = GetRestNuclearMass();170 G4double em = GetNuclearMass();125 G4double m = aFragment.GetMomentum().m(); 126 G4double rm = theRestNucleusMass; 127 G4double em = theMass; 171 128 theMaximalKineticEnergy = ((m - rm)*(m + rm) + em*em)/(2.0*m) - em; 172 129 173 174 130 return; 175 131 } 176 177 178 179
Note:
See TracChangeset
for help on using the changeset viewer.
