Geant4-11
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Static Private Attributes
G4FermiBreakUpVI Class Referencefinal

#include <G4FermiBreakUpVI.hh>

Inheritance diagram for G4FermiBreakUpVI:
G4VFermiBreakUp

Public Member Functions

void BreakFragment (G4FragmentVector *, G4Fragment *theNucleus) final
 
 G4FermiBreakUpVI ()
 
void Initialise () final
 
G4bool IsApplicable (G4int ZZ, G4int AA, G4double etot) const final
 
void SetVerbose (G4int val)
 
 ~G4FermiBreakUpVI () final
 

Protected Attributes

G4int verbose
 

Private Member Functions

 G4FermiBreakUpVI (const G4FermiBreakUpVI &right)=delete
 
void InitialisePool ()
 
G4bool operator!= (const G4FermiBreakUpVI &right) const =delete
 
const G4FermiBreakUpVIoperator= (const G4FermiBreakUpVI &right)=delete
 
G4bool operator== (const G4FermiBreakUpVI &right) const =delete
 
G4bool SampleDecay ()
 

Private Attributes

G4int A
 
G4ThreeVector boostVector
 
G4double elim
 
G4double excitation
 
std::vector< const G4FermiFragment * > frag
 
const G4FermiFragmentfrag1
 
const G4FermiFragmentfrag2
 
G4LorentzVector lv0
 
std::vector< G4LorentzVectorlvect
 
G4double mass
 
G4int maxA
 
G4int maxZ
 
std::vector< G4doubleprob
 
CLHEP::HepRandomEnginerndmEngine
 
G4int secID
 
G4int spin
 
const G4FermiDecayProbabilitytheDecay
 
G4double tolerance
 
G4int Z
 

Static Private Attributes

static G4FermiFragmentsPoolVIthePool = nullptr
 

Detailed Description

Definition at line 46 of file G4FermiBreakUpVI.hh.

Constructor & Destructor Documentation

◆ G4FermiBreakUpVI() [1/2]

G4FermiBreakUpVI::G4FermiBreakUpVI ( )
explicit

Definition at line 47 of file G4FermiBreakUpVI.cc.

48 : theDecay(nullptr), rndmEngine(nullptr), maxZ(9), maxA(17), secID(-1)
49{
50 frag.reserve(10);
51 lvect.reserve(10);
52 Z = A = spin = 0;
53 secID = G4PhysicsModelCatalog::GetModelID("model_G4FermiBreakUpVI");
54 mass = elim = excitation = 0.0;
56 frag1 = frag2 = nullptr;
57 prob.resize(12,0.0);
58 Initialise();
59}
CLHEP::HepRandomEngine * rndmEngine
std::vector< G4double > prob
const G4FermiFragment * frag2
void Initialise() final
std::vector< G4LorentzVector > lvect
const G4FermiFragment * frag1
std::vector< const G4FermiFragment * > frag
const G4FermiDecayProbability * theDecay
static G4int GetModelID(const G4int modelIndex)
static constexpr double MeV

References A, elim, excitation, frag, frag1, frag2, G4PhysicsModelCatalog::GetModelID(), Initialise(), lvect, mass, CLHEP::MeV, prob, secID, spin, tolerance, and Z.

◆ ~G4FermiBreakUpVI()

G4FermiBreakUpVI::~G4FermiBreakUpVI ( )
final

Definition at line 61 of file G4FermiBreakUpVI.cc.

62{
64 delete thePool;
65 thePool = nullptr;
66 }
67}
static G4FermiFragmentsPoolVI * thePool
G4bool IsMasterThread()
Definition: G4Threading.cc:124

References G4Threading::IsMasterThread(), and thePool.

◆ G4FermiBreakUpVI() [2/2]

G4FermiBreakUpVI::G4FermiBreakUpVI ( const G4FermiBreakUpVI right)
privatedelete

Member Function Documentation

◆ BreakFragment()

void G4FermiBreakUpVI::BreakFragment ( G4FragmentVector theResult,
G4Fragment theNucleus 
)
finalvirtual

Implements G4VFermiBreakUp.

Definition at line 98 of file G4FermiBreakUpVI.cc.

100{
101 if(verbose > 1) {
102 G4cout << "### G4FermiBreakUpVI::BreakFragment start new fragment "
103 << G4endl;
104 G4cout << *theNucleus << G4endl;
105 }
106
107 // initial fragment
108 Z = theNucleus->GetZ_asInt();
109 A = theNucleus->GetA_asInt();
110 excitation = theNucleus->GetExcitationEnergy();
111 mass = theNucleus->GetGroundStateMass() + excitation;
112 spin = -1;
113
114 lv0 = theNucleus->GetMomentum();
115 rndmEngine = G4Random::getTheEngine();
116
117 // sample first decay of an initial state
118 // if not possible to decay - exit
119 if(!SampleDecay()) {
120 return;
121 }
122
123 G4double time = theNucleus->GetCreationTime();
124 delete theNucleus;
125
126 static const G4int imax = 100;
127
128 // loop over vector of Fermi fragments
129 // vector may grow at each iteraction
130 for(size_t i=0; i<frag.size(); ++i) {
131 Z = frag[i]->GetZ();
132 A = frag[i]->GetA();
133 spin = frag[i]->GetSpin();
134 mass = frag[i]->GetTotalEnergy();
135 lv0 = lvect[i];
136 if(verbose > 1) {
137 G4cout << "# FermiFrag " << i << ". Z= " << Z << " A= " << A
138 << " mass= " << mass << " exc= "
139 << frag[i]->GetExcitationEnergy() << G4endl;
140 }
141 // stable fragment
142 if(!SampleDecay()) {
143 if(verbose > 1) { G4cout << " New G4Fragment" << G4endl; }
144 G4Fragment* f = new G4Fragment(A, Z, lv0);
145 f->SetSpin(0.5*spin);
146 f->SetCreationTime(time);
148 theResult->push_back(f);
149 }
150 // limit the loop
151 if(i == imax) {
152 break;
153 }
154 }
155 frag.clear();
156 lvect.clear();
157}
static const G4int imax
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
G4LorentzVector lv0
G4double GetGroundStateMass() const
Definition: G4Fragment.hh:304
G4double GetExcitationEnergy() const
Definition: G4Fragment.hh:299
const G4LorentzVector & GetMomentum() const
Definition: G4Fragment.hh:323
void SetCreatorModelID(G4int value)
Definition: G4Fragment.hh:428
G4double GetCreationTime() const
Definition: G4Fragment.hh:464
G4int GetZ_asInt() const
Definition: G4Fragment.hh:276
void SetCreationTime(G4double time)
Definition: G4Fragment.hh:469
void SetSpin(G4double value)
Definition: G4Fragment.hh:438
G4int GetA_asInt() const
Definition: G4Fragment.hh:271

References A, excitation, frag, G4cout, G4endl, G4Fragment::GetA_asInt(), G4Fragment::GetCreationTime(), G4Fragment::GetExcitationEnergy(), G4Fragment::GetGroundStateMass(), G4Fragment::GetMomentum(), G4Fragment::GetZ_asInt(), imax, lv0, lvect, mass, rndmEngine, SampleDecay(), secID, G4Fragment::SetCreationTime(), G4Fragment::SetCreatorModelID(), G4Fragment::SetSpin(), spin, G4VFermiBreakUp::verbose, and Z.

◆ Initialise()

void G4FermiBreakUpVI::Initialise ( )
finalvirtual

Implements G4VFermiBreakUp.

Definition at line 69 of file G4FermiBreakUpVI.cc.

70{
71 if(verbose > 1) {
72 G4cout << "### G4FermiBreakUpVI::Initialise(): " << thePool << G4endl;
73 }
74 if(thePool == nullptr) { InitialisePool(); }
77}
const G4FermiDecayProbability * FermiDecayProbability() const

References elim, G4FermiFragmentsPoolVI::FermiDecayProbability(), G4cout, G4endl, G4FermiFragmentsPoolVI::GetEnergyLimit(), InitialisePool(), theDecay, thePool, and G4VFermiBreakUp::verbose.

Referenced by G4FermiBreakUpVI().

◆ InitialisePool()

void G4FermiBreakUpVI::InitialisePool ( )
private

Definition at line 79 of file G4FermiBreakUpVI.cc.

80{
81#ifdef G4MULTITHREADED
82 G4MUTEXLOCK(&G4FermiBreakUpVI::FermiBreakUpVIMutex);
83#endif
84 if(thePool == nullptr) {
86 }
87#ifdef G4MULTITHREADED
88 G4MUTEXUNLOCK(&G4FermiBreakUpVI::FermiBreakUpVIMutex);
89#endif
90}
#define G4MUTEXLOCK(mutex)
Definition: G4Threading.hh:251
#define G4MUTEXUNLOCK(mutex)
Definition: G4Threading.hh:254

References G4MUTEXLOCK, G4MUTEXUNLOCK, and thePool.

Referenced by Initialise().

◆ IsApplicable()

G4bool G4FermiBreakUpVI::IsApplicable ( G4int  ZZ,
G4int  AA,
G4double  etot 
) const
finalvirtual

Implements G4VFermiBreakUp.

Definition at line 92 of file G4FermiBreakUpVI.cc.

93{
94 return (ZZ < maxZ && AA < maxA && AA > 0 && eexc <= elim
95 && thePool->HasChannels(ZZ, AA, eexc));
96}
G4bool HasChannels(G4int Z, G4int A, G4double exc) const
static const G4double AA[5]
Definition: paraMaker.cc:44

References anonymous_namespace{paraMaker.cc}::AA, elim, G4FermiFragmentsPoolVI::HasChannels(), maxZ, and thePool.

◆ operator!=()

G4bool G4FermiBreakUpVI::operator!= ( const G4FermiBreakUpVI right) const
privatedelete

◆ operator=()

const G4FermiBreakUpVI & G4FermiBreakUpVI::operator= ( const G4FermiBreakUpVI right)
privatedelete

◆ operator==()

G4bool G4FermiBreakUpVI::operator== ( const G4FermiBreakUpVI right) const
privatedelete

◆ SampleDecay()

G4bool G4FermiBreakUpVI::SampleDecay ( )
private

Definition at line 159 of file G4FermiBreakUpVI.cc.

160{
161 const G4FermiChannels* chan = thePool->ClosestChannels(Z, A, mass);
162 if(!chan) { return false; }
163 size_t nn = chan->GetNumberOfChannels();
164 if(verbose > 1) {
165 G4cout << "== SampleDecay " << nn << " channels Eex= "
166 << chan->GetExcitation() << G4endl;
167 }
168 if(0 == nn) { return false; }
169
170 const G4FermiPair* fpair = nullptr;
171
172 // one unstable fragment
173 if(1 == nn) {
174 fpair = chan->GetPair(0);
175
176 // more pairs
177 } else {
178
179 // in static probabilities may be used
180 if(std::abs(excitation - chan->GetExcitation()) < tolerance) {
181 fpair = chan->SamplePair(rndmEngine->flat());
182
183 } else {
184
185 // recompute probabilities
186 const std::vector<const G4FermiPair*>& pvect = chan->GetChannels();
187 if(nn > 12) { prob.resize(nn, 0.0); }
188 G4double ptot = 0.0;
189 if(verbose > 2) {
190 G4cout << "Start recompute probabilities" << G4endl;
191 }
192 for(size_t i=0; i<nn; ++i) {
193 ptot += theDecay->ComputeProbability(Z, A, -1, mass,
194 pvect[i]->GetFragment1(),
195 pvect[i]->GetFragment2());
196 prob[i] = ptot;
197 if(verbose > 2) {
198 G4cout << i << ". " << prob[i]
199 << " Z1= " << pvect[i]->GetFragment1()->GetZ()
200 << " A1= " << pvect[i]->GetFragment1()->GetA()
201 << " Z2= " << pvect[i]->GetFragment2()->GetZ()
202 << " A2= " << pvect[i]->GetFragment2()->GetA()
203 << G4endl;
204 }
205 }
206 ptot *= rndmEngine->flat();
207 for(size_t i=0; i<nn; ++i) {
208 if(ptot <= prob[i] || i+1 == nn) {
209 fpair = pvect[i];
210 break;
211 }
212 }
213 }
214 }
215 if(!fpair) { return false; }
216
217 frag1 = fpair->GetFragment1();
218 frag2 = fpair->GetFragment2();
219
220 G4double mass1 = frag1->GetTotalEnergy();
221 G4double mass2 = frag2->GetTotalEnergy();
222 if(verbose > 2) {
223 G4cout << " M= " << mass << " M1= " << mass1 << " M2= " << mass2
224 << " Exc1= " << frag1->GetExcitationEnergy()
225 << " Exc2= " << frag2->GetExcitationEnergy() << G4endl;
226 }
227 // sample fragment1
228 G4double e1 = 0.5*(mass*mass - mass2*mass2 + mass1*mass1)/mass;
229 //G4cout << "ekin1= " << e1 - mass1 << G4endl;
230 G4double p1(0.0);
231 if(e1 > mass1) {
232 p1 = std::sqrt((e1 - mass1)*(e1 + mass1));
233 } else {
234 e1 = mass1;
235 }
238
239 // compute kinematics
241 lv1.boost(boostVector);
242
243 lv0 -= lv1;
244
245 G4double e2 = lv0.e();
246 if(e2 < mass2) {
247 lv0.set(0.,0.,0.,mass2);
248 }
249
250 frag.push_back(frag1);
251 frag.push_back(frag2);
252 lvect.push_back(lv1);
253 lvect.push_back(lv0);
254
255 return true;
256}
static const G4double e1[44]
static const G4double e2[44]
CLHEP::HepLorentzVector G4LorentzVector
G4ThreeVector G4RandomDirection()
Hep3Vector boostVector() const
HepLorentzVector & boost(double, double, double)
void set(double x, double y, double z, double t)
virtual double flat()=0
G4ThreeVector boostVector
G4double GetExcitation() const
const G4FermiPair * SamplePair(G4double rand) const
const G4FermiPair * GetPair(size_t idx) const
size_t GetNumberOfChannels() const
const std::vector< const G4FermiPair * > & GetChannels() const
G4double ComputeProbability(G4int Z, G4int A, G4int spin, G4double TotalE, const G4FermiFragment *f1, const G4FermiFragment *f2) const
G4double GetExcitationEnergy(void) const
G4double GetTotalEnergy(void) const
const G4FermiChannels * ClosestChannels(G4int Z, G4int A, G4double mass) const
const G4FermiFragment * GetFragment2() const
Definition: G4FermiPair.hh:101
const G4FermiFragment * GetFragment1() const
Definition: G4FermiPair.hh:96

References A, CLHEP::HepLorentzVector::boost(), CLHEP::HepLorentzVector::boostVector(), boostVector, G4FermiFragmentsPoolVI::ClosestChannels(), G4FermiDecayProbability::ComputeProbability(), CLHEP::HepLorentzVector::e(), e1, e2, excitation, CLHEP::HepRandomEngine::flat(), frag, frag1, frag2, G4cout, G4endl, G4RandomDirection(), G4FermiChannels::GetChannels(), G4FermiChannels::GetExcitation(), G4FermiFragment::GetExcitationEnergy(), G4FermiPair::GetFragment1(), G4FermiPair::GetFragment2(), G4FermiChannels::GetNumberOfChannels(), G4FermiChannels::GetPair(), G4FermiFragment::GetTotalEnergy(), lv0, lvect, mass, G4InuclParticleNames::nn, prob, rndmEngine, G4FermiChannels::SamplePair(), CLHEP::HepLorentzVector::set(), theDecay, thePool, tolerance, G4VFermiBreakUp::verbose, and Z.

Referenced by BreakFragment().

◆ SetVerbose()

void G4VFermiBreakUp::SetVerbose ( G4int  val)
inlineinherited

Definition at line 59 of file G4VFermiBreakUp.hh.

59{ verbose = val; }

References G4VFermiBreakUp::verbose.

Referenced by G4ExcitationHandler::SetParameters().

Field Documentation

◆ A

G4int G4FermiBreakUpVI::A
private

◆ boostVector

G4ThreeVector G4FermiBreakUpVI::boostVector
private

Definition at line 98 of file G4FermiBreakUpVI.hh.

Referenced by SampleDecay().

◆ elim

G4double G4FermiBreakUpVI::elim
private

Definition at line 92 of file G4FermiBreakUpVI.hh.

Referenced by G4FermiBreakUpVI(), Initialise(), and IsApplicable().

◆ excitation

G4double G4FermiBreakUpVI::excitation
private

Definition at line 90 of file G4FermiBreakUpVI.hh.

Referenced by BreakFragment(), G4FermiBreakUpVI(), and SampleDecay().

◆ frag

std::vector<const G4FermiFragment*> G4FermiBreakUpVI::frag
private

Definition at line 101 of file G4FermiBreakUpVI.hh.

Referenced by BreakFragment(), G4FermiBreakUpVI(), and SampleDecay().

◆ frag1

const G4FermiFragment* G4FermiBreakUpVI::frag1
private

Definition at line 94 of file G4FermiBreakUpVI.hh.

Referenced by G4FermiBreakUpVI(), and SampleDecay().

◆ frag2

const G4FermiFragment* G4FermiBreakUpVI::frag2
private

Definition at line 95 of file G4FermiBreakUpVI.hh.

Referenced by G4FermiBreakUpVI(), and SampleDecay().

◆ lv0

G4LorentzVector G4FermiBreakUpVI::lv0
private

Definition at line 97 of file G4FermiBreakUpVI.hh.

Referenced by BreakFragment(), and SampleDecay().

◆ lvect

std::vector<G4LorentzVector> G4FermiBreakUpVI::lvect
private

Definition at line 102 of file G4FermiBreakUpVI.hh.

Referenced by BreakFragment(), G4FermiBreakUpVI(), and SampleDecay().

◆ mass

G4double G4FermiBreakUpVI::mass
private

Definition at line 89 of file G4FermiBreakUpVI.hh.

Referenced by BreakFragment(), G4FermiBreakUpVI(), and SampleDecay().

◆ maxA

G4int G4FermiBreakUpVI::maxA
private

Definition at line 81 of file G4FermiBreakUpVI.hh.

◆ maxZ

G4int G4FermiBreakUpVI::maxZ
private

Definition at line 80 of file G4FermiBreakUpVI.hh.

Referenced by IsApplicable().

◆ prob

std::vector<G4double> G4FermiBreakUpVI::prob
private

Definition at line 100 of file G4FermiBreakUpVI.hh.

Referenced by G4FermiBreakUpVI(), and SampleDecay().

◆ rndmEngine

CLHEP::HepRandomEngine* G4FermiBreakUpVI::rndmEngine
private

Definition at line 78 of file G4FermiBreakUpVI.hh.

Referenced by BreakFragment(), and SampleDecay().

◆ secID

G4int G4FermiBreakUpVI::secID
private

Definition at line 87 of file G4FermiBreakUpVI.hh.

Referenced by BreakFragment(), and G4FermiBreakUpVI().

◆ spin

G4int G4FermiBreakUpVI::spin
private

Definition at line 85 of file G4FermiBreakUpVI.hh.

Referenced by BreakFragment(), and G4FermiBreakUpVI().

◆ theDecay

const G4FermiDecayProbability* G4FermiBreakUpVI::theDecay
private

Definition at line 76 of file G4FermiBreakUpVI.hh.

Referenced by Initialise(), and SampleDecay().

◆ thePool

G4FermiFragmentsPoolVI * G4FermiBreakUpVI::thePool = nullptr
staticprivate

◆ tolerance

G4double G4FermiBreakUpVI::tolerance
private

Definition at line 91 of file G4FermiBreakUpVI.hh.

Referenced by G4FermiBreakUpVI(), and SampleDecay().

◆ verbose

G4int G4VFermiBreakUp::verbose
protectedinherited

◆ Z

G4int G4FermiBreakUpVI::Z
private

The documentation for this class was generated from the following files: