50 G4cout <<
"Info G4BertiniEvaporation: This is still very fresh code."<<
G4endl;
51 G4cout <<
" G4BertiniEvaporation: feed-back for improvement is very wellcome."<<
G4endl;
65 while ( !channelVector.empty() )
67 delete channelVector.back();
68 channelVector.pop_back();
75 verboseLevel = verbose;
78 std::vector< G4BertiniEvaporationChannel * >::iterator iChannel = channelVector.begin();
79 for ( ; iChannel != channelVector.end() ; *iChannel++ )
80 ( *iChannel )->setVerboseLevel( verboseLevel );
97 std::vector< G4DynamicParticle * > secondaryParticleVector;
108 * nucleusMomentumVector );
110 if ( verboseLevel >= 10 )
111 G4cout <<
" G4BertiniEvaporation : initial kinematics : boostToLab vector = " << boostToLab <<
G4endl
112 <<
" excitation energy : " << excE<<
G4endl;
114 if ( nucleusA == 8 && nucleusZ == 4 )
116 splitBe8( excE, boostToLab, secondaryParticleVector );
117 fillResult( secondaryParticleVector, result);
123 std::vector< G4BertiniEvaporationChannel * >::iterator iChannel = channelVector.begin();
124 totalProbability = 0;
125 for ( ; iChannel != channelVector.end() ; *iChannel++ )
127 ( *iChannel )->setNucleusA( nucleusA );
128 ( *iChannel )->setNucleusZ( nucleusZ );
129 ( *iChannel )->setExcitationEnergy( excE );
130 ( *iChannel )->setPairingCorrection( 1 );
131 ( *iChannel )->calculateProbability();
132 totalProbability += ( *iChannel )->getProbability();
136 if ( totalProbability == 0 )
138 if ( verboseLevel >= 4 )
139 G4cout <<
"G4BertiniEvaporation : no emission possible with pairing correction, trying without it" <<
G4endl;
140 for ( iChannel = channelVector.begin() ; iChannel != channelVector.end() ; *iChannel++ )
142 ( *iChannel )->setPairingCorrection(0);
143 ( *iChannel )->calculateProbability();
144 totalProbability += ( *iChannel )->getProbability();
146 if ( verboseLevel >= 4 )
147 G4cout <<
" probability without correction " << totalProbability <<
G4endl;
153 while ( totalProbability > 0 )
159 if ( verboseLevel >= 10 )
G4cout <<
" RandomProb : " << sampledProbability <<
G4endl;
160 for ( iChannel = channelVector.begin() ; iChannel != channelVector.end() ; *iChannel++ )
162 sampledProbability -= ( *iChannel )->getProbability();
163 if ( sampledProbability < 0 )
break;
165 pSelectedChannel = ( *iChannel );
166 if ( iChannel == channelVector.end() )
167 throw G4HadronicException(__FILE__, __LINE__,
"G4BertiniEvaporation : Error while sampling evaporation particle" );
169 if ( verboseLevel >= 4 )
170 G4cout <<
"G4BertiniEvaporation : particle " << pSelectedChannel->
getName() <<
" selected " <<
G4endl;
178 pEmittedParticle = pSelectedChannel->
emit();
194 nucleusKineticEnergy = std::pow( nucleusTotalMomentum, 2 ) / ( 2 * mRes );
195 newExcitation = excE - pEmittedParticle->
GetKineticEnergy() - nucleusKineticEnergy - pSelectedChannel->
getQ();
197 if ( verboseLevel >= 10)
198 G4cout <<
"G4BertiniEvaporation : Kinematics " <<
G4endl
199 <<
" part kinetic E in CMS = "
201 <<
" new excitation E = "
202 << newExcitation <<
G4endl;
205 if ( !( newExcitation > 0 ) && i < 10)
delete pEmittedParticle;
206 }
while ( !( newExcitation > 0 ) && i < 10 );
214 delete pEmittedParticle;
216 if ( verboseLevel >= 4 )
217 G4cout <<
"G4BertiniEvaporation : No appropriate energy for particle "
222 totalProbability = 0;
223 for ( ; iChannel != channelVector.end() ; *iChannel++ )
224 totalProbability += ( *iChannel )->getProbability();
233 nucleusKineticEnergy + mRes );
234 particleFourVector.
boost( boostToLab );
235 nucleusFourVector.
boost( boostToLab );
237 particleFourVector.
e(),
238 particleFourVector.
vect() );
239 secondaryParticleVector.push_back( pPartLab );
244 excE = newExcitation;
247 if ( verboseLevel >= 10 )
252 <<
" particle mass " << pEmittedParticle->
GetMass() <<
G4endl
253 <<
" boost vect " << boostToLab <<
G4endl
254 <<
" boosted 4v " << particleFourVector <<
G4endl
255 <<
" nucleus 4v " << nucleusFourVector <<
G4endl
256 <<
" nucl cm mom " << nucleusTotalMomentum <<
G4endl
258 <<
" new boost vector " << boostToLab <<
G4endl;
260 delete pEmittedParticle;
263 if ( nucleusA == 8 && nucleusZ == 4 )
265 splitBe8( excE, boostToLab, secondaryParticleVector );
266 fillResult( secondaryParticleVector, result);
272 totalProbability = 0;
273 for ( iChannel = channelVector.begin() ; iChannel != channelVector.end() ; *iChannel++ )
275 ( *iChannel )->setNucleusA( nucleusA );
276 ( *iChannel )->setNucleusZ( nucleusZ );
277 ( *iChannel )->setExcitationEnergy( excE );
278 ( *iChannel )->calculateProbability();
279 totalProbability += ( *iChannel )->getProbability();
299 pEmittedParticle = pGammaChannel->
emit();
302 if ( ( totalDeExcEnergy + gammaEnergy ) > excE )
305 gammaEnergy = excE - totalDeExcEnergy;
309 totalDeExcEnergy += gammaEnergy;
311 if ( verboseLevel >= 10 )
312 G4cout <<
" G4BertiniEvaporation : gamma de-excitation, g of " << gammaEnergy <<
" MeV " <<
G4endl;
316 gammaFourVector.
boost( boostToLab );
320 secondaryParticleVector.push_back( pEmittedParticle );
324 delete pGammaChannel;
328 fillResult( secondaryParticleVector, result);
334void G4BertiniEvaporation::splitBe8(
const G4double E,
336 std::vector< G4DynamicParticle * > & secondaryParticleVector )
342 const G4double Be8DecayEnergy = 0.093 * MeV;
344 if ( E <= 0 )
throw G4HadronicException(__FILE__, __LINE__,
"G4BertiniEvaporation : excitation energy < 0 " );
345 if ( verboseLevel >= 4 )
G4cout <<
" Be8 split to 2 x He4" <<
G4endl;
347 kineticEnergy = 0.5 * ( E + Be8DecayEnergy );
350 isotropicCosines( u , v , w );
354 momentumDirectionCMS,
357 -momentumDirectionCMS,
366 fourVector1.boost( boostToLab );
367 fourVector2.boost( boostToLab );
374 secondaryParticleVector.push_back( pP1Lab );
375 secondaryParticleVector.push_back( pP2Lab );
384void G4BertiniEvaporation::fillResult( std::vector<G4DynamicParticle *> secondaryParticleVector,
388 for (
size_t i = 0 ; i < secondaryParticleVector.size() ; i++ )
390 G4int aZ =
static_cast<G4int> (secondaryParticleVector[i]->GetDefinition()->GetPDGCharge() );
391 G4int aA =
static_cast<G4int> (secondaryParticleVector[i]->GetDefinition()->GetBaryonNumber());
392 G4LorentzVector aMomentum = secondaryParticleVector[i]->Get4Momentum();
395 aResult->push_back(
new G4Fragment(aA, aZ, aMomentum) );
399 aResult->push_back(
new G4Fragment(aMomentum, secondaryParticleVector[i]->GetDefinition()) );
410 G4double SinTheta = std::sqrt( 1.0 - CosTheta * CosTheta );
413 u = std::cos( Phi ) * SinTheta;
414 v = std::cos( Phi ) * CosTheta,
std::vector< G4Fragment * > G4FragmentVector
CLHEP::Hep3Vector G4ThreeVector
G4DLLIMPORT std::ostream G4cout
HepLorentzVector & boost(double, double, double)
G4DynamicParticle * emit()
void setNucleusZ(G4int inputZ)
void setNucleusA(G4int inputA)
void setExcitationEnergy(G4double inputE)
void setVerboseLevel(G4int verbose)
virtual void setProbability(G4double newProb)
virtual G4DynamicParticle * emit()=0
void setVerboseLevel(const G4int verbose)
virtual G4FragmentVector * BreakItUp(const G4Fragment &theNucleus)
void SetMomentumDirection(const G4ThreeVector &aDirection)
G4ParticleDefinition * GetDefinition() const
G4LorentzVector Get4Momentum() const
G4double GetKineticEnergy() const
G4double GetTotalEnergy() const
G4ThreeVector GetMomentum() const
G4double GetTotalMomentum() const
void SetKineticEnergy(G4double aEnergy)
G4ThreeVector GetMomentum()
static G4double GetNuclearMass(const G4double A, const G4double Z)
G4double GetEnergyDeposit()