Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4QMDReaction.cc
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26// 080505 Fixed and changed sampling method of impact parameter by T. Koi
27// 080602 Fix memory leaks by T. Koi
28// 080612 Delete unnecessary dependency and unused functions
29// Change criterion of reaction by T. Koi
30// 081107 Add UnUseGEM (then use the default channel of G4Evaporation)
31// UseFrag (chage criterion of a inelastic reaction)
32// Fix bug in nucleon projectiles by T. Koi
33// 090122 Be8 -> Alpha + Alpha
34// 090331 Change member shenXS and genspaXS object to pointer
35// 091119 Fix for incidence of neutral particles
36//
37#include "G4QMDReaction.hh"
38#include "G4QMDNucleus.hh"
40#include "G4Pow.hh"
42#include "G4SystemOfUnits.hh"
43#include "G4NistManager.hh"
44
46#include "G4BGGPionElasticXS.hh"
48
50: G4HadronicInteraction("QMDModel")
51, system ( NULL )
52, deltaT ( 1 ) // in fsec (c=1)
53, maxTime ( 100 ) // will have maxTime-th time step
54, envelopF ( 1.05 ) // 10% for Peripheral reactions
55, gem ( true )
56, frag ( false )
57{
58
59 //090331
60 shenXS = new G4IonsShenCrossSection();
61 //genspaXS = new G4GeneralSpaceNNCrossSection();
62
63 pipElNucXS = new G4BGGPionElasticXS(G4PionPlus::PionPlus() );
64 pipElNucXS->BuildPhysicsTable(*(G4PionPlus::PionPlus() ) );
65
66 pimElNucXS = new G4BGGPionElasticXS(G4PionMinus::PionMinus() );
67 pimElNucXS->BuildPhysicsTable(*(G4PionMinus::PionMinus() ) );
68
69 pipInelNucXS = new G4BGGPionInelasticXS(G4PionPlus::PionPlus() );
70 pipInelNucXS->BuildPhysicsTable(*(G4PionPlus::PionPlus() ) );
71
72 pimInelNucXS = new G4BGGPionInelasticXS(G4PionMinus::PionMinus() );
73 pimInelNucXS->BuildPhysicsTable(*(G4PionMinus::PionMinus() ) );
74
75 meanField = new G4QMDMeanField();
76 collision = new G4QMDCollision();
77
78 excitationHandler = new G4ExcitationHandler;
79 excitationHandler->SetDeexChannelsType( fCombined );
80 //fEvaporation - 8 default channels
81 //fCombined - 8 default + 60 GEM
82 //fGEM - 2 default + 66 GEM
83 evaporation = new G4Evaporation;
84 excitationHandler->SetEvaporation( evaporation );
85 setEvaporationCh();
86
87 coulomb_collision_gamma_proj = 0.0;
88 coulomb_collision_rx_proj = 0.0;
89 coulomb_collision_rz_proj = 0.0;
90 coulomb_collision_px_proj = 0.0;
91 coulomb_collision_pz_proj = 0.0;
92
93 coulomb_collision_gamma_targ = 0.0;
94 coulomb_collision_rx_targ = 0.0;
95 coulomb_collision_rz_targ = 0.0;
96 coulomb_collision_px_targ = 0.0;
97 coulomb_collision_pz_targ = 0.0;
98}
99
100
102{
103 delete evaporation;
104 delete excitationHandler;
105 delete collision;
106 delete meanField;
107}
108
109
111{
112 //G4cout << "G4QMDReaction::ApplyYourself" << G4endl;
113
115
116 system = new G4QMDSystem;
117
118 G4int proj_Z = 0;
119 G4int proj_A = 0;
120 const G4ParticleDefinition* proj_pd = ( const G4ParticleDefinition* ) projectile.GetDefinition();
121 if ( proj_pd->GetParticleType() == "nucleus" )
122 {
123 proj_Z = proj_pd->GetAtomicNumber();
124 proj_A = proj_pd->GetAtomicMass();
125 }
126 else
127 {
128 proj_Z = (int)( proj_pd->GetPDGCharge()/eplus );
129 proj_A = 1;
130 }
131 //G4int targ_Z = int ( target.GetZ() + 0.5 );
132 //G4int targ_A = int ( target.GetN() + 0.5 );
133 //migrate to integer A and Z (GetN_asInt returns number of neutrons in the nucleus since this)
134 G4int targ_Z = target.GetZ_asInt();
135 G4int targ_A = target.GetA_asInt();
136 const G4ParticleDefinition* targ_pd = G4IonTable::GetIonTable()->GetIon( targ_Z , targ_A , 0.0 );
137
138
139 //G4NistManager* nistMan = G4NistManager::Instance();
140// G4Element* G4NistManager::FindOrBuildElement( targ_Z );
141
142 const G4DynamicParticle* proj_dp = new G4DynamicParticle ( proj_pd , projectile.Get4Momentum() );
143 //const G4Element* targ_ele = nistMan->FindOrBuildElement( targ_Z );
144 //G4double aTemp = projectile.GetMaterial()->GetTemperature();
145
146 //090331
147
148 G4VCrossSectionDataSet* theXS = shenXS;
149
150 G4double xs_0 = theXS->GetIsoCrossSection ( proj_dp , targ_Z , targ_A );
151
152 // When the projectile is a pion
153 if (proj_pd == G4PionPlus::PionPlus() ) {
154 xs_0 = pipElNucXS->GetElementCrossSection(proj_dp, targ_Z, projectile.GetMaterial() ) +
155 pipInelNucXS->GetElementCrossSection(proj_dp, targ_Z, projectile.GetMaterial() );
156 } else if (proj_pd == G4PionMinus::PionMinus() ) {
157 xs_0 = pimElNucXS->GetElementCrossSection(proj_dp, targ_Z, projectile.GetMaterial() ) +
158 pimInelNucXS->GetElementCrossSection(proj_dp, targ_Z, projectile.GetMaterial() );
159 }
160
161 //G4double xs_0 = genspaXS->GetCrossSection ( proj_dp , targ_ele , aTemp );
162 //G4double xs_0 = theXS->GetCrossSection ( proj_dp , targ_ele , aTemp );
163 //110822
164
165 G4double bmax_0 = std::sqrt( xs_0 / pi );
166 //std::cout << "bmax_0 in fm (fermi) " << bmax_0/fermi << std::endl;
167
168 //delete proj_dp;
169
170 G4bool elastic = true;
171
172 std::vector< G4QMDNucleus* > nucleuses; // Secondary nuceluses
173 G4ThreeVector boostToReac; // ReactionSystem (CM or NN);
174 G4ThreeVector boostBackToLAB; // Reaction System to LAB;
175
176 G4LorentzVector targ4p( G4ThreeVector( 0.0 ) , targ_pd->GetPDGMass()/GeV );
177 G4ThreeVector boostLABtoCM = targ4p.findBoostToCM( proj_dp->Get4Momentum()/GeV ); // CM of target and proj;
178
179 G4double p1 = proj_dp->GetMomentum().mag()/GeV/proj_A;
180 G4double m1 = proj_dp->GetDefinition()->GetPDGMass()/GeV/proj_A;
181 G4double e1 = std::sqrt( p1*p1 + m1*m1 );
182 G4double e2 = targ_pd->GetPDGMass()/GeV/targ_A;
183 G4double beta_nn = -p1 / ( e1+e2 );
184
185 G4ThreeVector boostLABtoNN ( 0. , 0. , beta_nn ); // CM of NN;
186
187 G4double beta_nncm = ( - boostLABtoCM.beta() + boostLABtoNN.beta() ) / ( 1 - boostLABtoCM.beta() * boostLABtoNN.beta() ) ;
188
189 //std::cout << targ4p << std::endl;
190 //std::cout << proj_dp->Get4Momentum()<< std::endl;
191 //std::cout << beta_nncm << std::endl;
192 G4ThreeVector boostNNtoCM( 0. , 0. , beta_nncm ); //
193 G4ThreeVector boostCMtoNN( 0. , 0. , -beta_nncm ); //
194
195 boostToReac = boostLABtoNN;
196 boostBackToLAB = -boostLABtoNN;
197
198 delete proj_dp;
199
200 G4int icounter = 0;
201 G4int icounter_max = 1024;
202 while ( elastic ) // Loop checking, 11.03.2015, T. Koi
203 {
204 icounter++;
205 if ( icounter > icounter_max ) {
206 G4cout << "Loop-counter exceeded the threshold value at " << __LINE__ << "th line of " << __FILE__ << "." << G4endl;
207 break;
208 }
209
210// impact parameter
211 //G4double bmax = 1.05*(bmax_0/fermi); // 10% for Peripheral reactions
212 G4double bmax = envelopF*(bmax_0/fermi);
213 G4double b = bmax * std::sqrt ( G4UniformRand() );
214//071112
215 //G4double b = 0;
216 //G4double b = bmax;
217 //G4double b = bmax/1.05 * 0.7 * G4UniformRand();
218
219 //G4cout << "G4QMDRESULT bmax_0 = " << bmax_0/fermi << " fm, bmax = " << bmax << " fm , b = " << b << " fm " << G4endl;
220
221 G4double plab = projectile.GetTotalMomentum()/GeV;
222 G4double elab = ( projectile.GetKineticEnergy() + proj_pd->GetPDGMass() + targ_pd->GetPDGMass() )/GeV;
223
224 calcOffSetOfCollision( b , proj_pd , targ_pd , plab , elab , bmax , boostCMtoNN );
225
226// Projectile
227 G4LorentzVector proj4pLAB = projectile.Get4Momentum()/GeV;
228
229 G4QMDGroundStateNucleus* proj(NULL);
230 if ( projectile.GetDefinition()->GetParticleType() == "nucleus"
231 || projectile.GetDefinition()->GetParticleName() == "proton"
232 || projectile.GetDefinition()->GetParticleName() == "neutron" )
233 {
234
235 proj_Z = proj_pd->GetAtomicNumber();
236 proj_A = proj_pd->GetAtomicMass();
237
238 proj = new G4QMDGroundStateNucleus( proj_Z , proj_A );
239 //proj->ShowParticipants();
240
241
242 meanField->SetSystem ( proj );
243 proj->SetTotalPotential( meanField->GetTotalPotential() );
245
246 }
247
248// Target
249 //G4int iz = int ( target.GetZ() );
250 //G4int ia = int ( target.GetN() );
251 //migrate to integer A and Z (GetN_asInt returns number of neutrons in the nucleus since this)
252 G4int iz = int ( target.GetZ_asInt() );
253 G4int ia = int ( target.GetA_asInt() );
254
256
257 meanField->SetSystem (targ );
258 targ->SetTotalPotential( meanField->GetTotalPotential() );
260
261 //G4LorentzVector targ4p( G4ThreeVector( 0.0 ) , targ->GetNuclearMass()/GeV );
262// Boost Vector to CM
263 //boostToCM = targ4p.findBoostToCM( proj4pLAB );
264
265// Target
266 for ( G4int i = 0 ; i < targ->GetTotalNumberOfParticipant() ; i++ )
267 {
268
269 G4ThreeVector p0 = targ->GetParticipant( i )->GetMomentum();
270 G4ThreeVector r0 = targ->GetParticipant( i )->GetPosition();
271
272 G4ThreeVector p ( p0.x() + coulomb_collision_px_targ
273 , p0.y()
274 , p0.z() * coulomb_collision_gamma_targ + coulomb_collision_pz_targ );
275
276 G4ThreeVector r ( r0.x() + coulomb_collision_rx_targ
277 , r0.y()
278 , r0.z() / coulomb_collision_gamma_targ + coulomb_collision_rz_targ );
279
280 system->SetParticipant( new G4QMDParticipant( targ->GetParticipant( i )->GetDefinition() , p , r ) );
281 system->GetParticipant( i )->SetTarget();
282
283 }
284
285 G4LorentzVector proj4pCM = CLHEP::boostOf ( proj4pLAB , boostToReac );
286 G4LorentzVector targ4pCM = CLHEP::boostOf ( targ4p , boostToReac );
287
288// Projectile
289 //G4cout << "proj : " << proj << G4endl;
290 //if ( proj != NULL )
291 if ( proj_A != 1 )
292 {
293
294// projectile is nucleus
295
296 for ( G4int i = 0 ; i < proj->GetTotalNumberOfParticipant() ; i++ )
297 {
298
299 G4ThreeVector p0 = proj->GetParticipant( i )->GetMomentum();
300 G4ThreeVector r0 = proj->GetParticipant( i )->GetPosition();
301
302 G4ThreeVector p ( p0.x() + coulomb_collision_px_proj
303 , p0.y()
304 , p0.z() * coulomb_collision_gamma_proj + coulomb_collision_pz_proj );
305
306 G4ThreeVector r ( r0.x() + coulomb_collision_rx_proj
307 , r0.y()
308 , r0.z() / coulomb_collision_gamma_proj + coulomb_collision_rz_proj );
309
310 system->SetParticipant( new G4QMDParticipant( proj->GetParticipant( i )->GetDefinition() , p , r ) );
312 }
313
314 }
315 else
316 {
317
318// projectile is particle
319
320 // avoid multiple set in "elastic" loop
321 //G4cout << "system Total Participants : " << system->GetTotalNumberOfParticipant() << ", target : " << targ->GetTotalNumberOfParticipant() << G4endl;
323 {
324
326
327 G4ThreeVector p0( 0 );
328 G4ThreeVector r0( 0 );
329
330 G4ThreeVector p ( p0.x() + coulomb_collision_px_proj
331 , p0.y()
332 , p0.z() * coulomb_collision_gamma_proj + coulomb_collision_pz_proj );
333
334 G4ThreeVector r ( r0.x() + coulomb_collision_rx_proj
335 , r0.y()
336 , r0.z() / coulomb_collision_gamma_proj + coulomb_collision_rz_proj );
337
338 system->SetParticipant( new G4QMDParticipant( (G4ParticleDefinition*)projectile.GetDefinition() , p , r ) );
339 // This is not important becase only 1 projectile particle.
340 system->GetParticipant ( i )->SetProjectile();
341 }
342
343 }
344 //system->ShowParticipants();
345
346 delete targ;
347 delete proj;
348
349 meanField->SetSystem ( system );
350 collision->SetMeanField ( meanField );
351
352// Time Evolution
353 //std::cout << "Start time evolution " << std::endl;
354 //system->ShowParticipants();
355 for ( G4int i = 0 ; i < maxTime ; i++ )
356 {
357 //G4cout << " do Paropagate " << i << " th time step. " << G4endl;
358 meanField->DoPropagation( deltaT );
359 //system->ShowParticipants();
360 collision->CalKinematicsOfBinaryCollisions( deltaT );
361
362 if ( i / 10 * 10 == i )
363 {
364 //G4cout << i << " th time step. " << G4endl;
365 //system->ShowParticipants();
366 }
367 //system->ShowParticipants();
368 }
369 //system->ShowParticipants();
370
371
372 //std::cout << "Doing Cluster Judgment " << std::endl;
373
374 nucleuses = meanField->DoClusterJudgment();
375
376// Elastic Judgment
377
378 G4int numberOfSecondary = int ( nucleuses.size() ) + system->GetTotalNumberOfParticipant();
379
380 G4int sec_a_Z = 0;
381 G4int sec_a_A = 0;
382 const G4ParticleDefinition* sec_a_pd = NULL;
383 G4int sec_b_Z = 0;
384 G4int sec_b_A = 0;
385 const G4ParticleDefinition* sec_b_pd = NULL;
386
387 if ( numberOfSecondary == 2 )
388 {
389
390 G4bool elasticLike_system = false;
391 if ( nucleuses.size() == 2 )
392 {
393
394 sec_a_Z = nucleuses[0]->GetAtomicNumber();
395 sec_a_A = nucleuses[0]->GetMassNumber();
396 sec_b_Z = nucleuses[1]->GetAtomicNumber();
397 sec_b_A = nucleuses[1]->GetMassNumber();
398
399 if ( ( sec_a_Z == proj_Z && sec_a_A == proj_A && sec_b_Z == targ_Z && sec_b_A == targ_A )
400 || ( sec_a_Z == targ_Z && sec_a_A == targ_A && sec_b_Z == proj_Z && sec_b_A == proj_A ) )
401 {
402 elasticLike_system = true;
403 }
404
405 }
406 else if ( nucleuses.size() == 1 )
407 {
408
409 sec_a_Z = nucleuses[0]->GetAtomicNumber();
410 sec_a_A = nucleuses[0]->GetMassNumber();
411 sec_b_pd = system->GetParticipant( 0 )->GetDefinition();
412
413 if ( ( sec_a_Z == proj_Z && sec_a_A == proj_A && sec_b_pd == targ_pd )
414 || ( sec_a_Z == targ_Z && sec_a_A == targ_A && sec_b_pd == proj_pd ) )
415 {
416 elasticLike_system = true;
417 }
418
419 }
420 else
421 {
422
423 sec_a_pd = system->GetParticipant( 0 )->GetDefinition();
424 sec_b_pd = system->GetParticipant( 1 )->GetDefinition();
425
426 if ( ( sec_a_pd == proj_pd && sec_b_pd == targ_pd )
427 || ( sec_a_pd == targ_pd && sec_b_pd == proj_pd ) )
428 {
429 elasticLike_system = true;
430 }
431
432 }
433
434 if ( elasticLike_system == true )
435 {
436
437 G4bool elasticLike_energy = true;
438// Cal ExcitationEnergy
439 for ( G4int i = 0 ; i < int ( nucleuses.size() ) ; i++ )
440 {
441
442 //meanField->SetSystem( nucleuses[i] );
443 meanField->SetNucleus( nucleuses[i] );
444 //nucleuses[i]->SetTotalPotential( meanField->GetTotalPotential() );
445 //nucleuses[i]->CalEnergyAndAngularMomentumInCM();
446
447 if ( nucleuses[i]->GetExcitationEnergy()*GeV > 1.0*MeV ) elasticLike_energy = false;
448
449 }
450
451// Check Collision
452 G4bool withCollision = true;
453 if ( system->GetNOCollision() == 0 ) withCollision = false;
454
455// Final judegement for Inelasitc or Elastic;
456//
457// ElasticLike without Collision
458 //if ( elasticLike_energy == true && withCollision == false ) elastic = true; // ielst = 0
459// ElasticLike with Collision
460 //if ( elasticLike_energy == true && withCollision == true ) elastic = true; // ielst = 1
461// InelasticLike without Collision
462 //if ( elasticLike_energy == false ) elastic = false; // ielst = 2
463 if ( frag == true )
464 if ( elasticLike_energy == false ) elastic = false;
465// InelasticLike with Collision
466 if ( elasticLike_energy == false && withCollision == true ) elastic = false; // ielst = 3
467
468 }
469
470 }
471 else
472 {
473
474// numberOfSecondary != 2
475 elastic = false;
476
477 }
478
479//071115
480 //G4cout << elastic << G4endl;
481 // if elastic is true try again from sampling of impact parameter
482
483 if ( elastic == true )
484 {
485 // delete this nucleues
486 for ( std::vector< G4QMDNucleus* >::iterator
487 it = nucleuses.begin() ; it != nucleuses.end() ; it++ )
488 {
489 delete *it;
490 }
491 nucleuses.clear();
492 }
493
494 }
495
496
497// Statical Decay Phase
498
499 for ( std::vector< G4QMDNucleus* >::iterator it
500 = nucleuses.begin() ; it != nucleuses.end() ; it++ )
501 {
502
503/*
504 G4cout << "G4QMDRESULT "
505 << (*it)->GetAtomicNumber()
506 << " "
507 << (*it)->GetMassNumber()
508 << " "
509 << (*it)->Get4Momentum()
510 << " "
511 << (*it)->Get4Momentum().vect()
512 << " "
513 << (*it)->Get4Momentum().restMass()
514 << " "
515 << (*it)->GetNuclearMass()/GeV
516 << G4endl;
517*/
518
519 meanField->SetNucleus ( *it );
520
521 if ( (*it)->GetAtomicNumber() == 0 // neutron cluster
522 || (*it)->GetAtomicNumber() == (*it)->GetMassNumber() ) // proton cluster
523 {
524 // push back system
525 for ( G4int i = 0 ; i < (*it)->GetTotalNumberOfParticipant() ; i++ )
526 {
527 G4QMDParticipant* aP = new G4QMDParticipant( ( (*it)->GetParticipant( i ) )->GetDefinition() , ( (*it)->GetParticipant( i ) )->GetMomentum() , ( (*it)->GetParticipant( i ) )->GetPosition() );
528 system->SetParticipant ( aP );
529 }
530 continue;
531 }
532
533 G4double nucleus_e = std::sqrt ( G4Pow::GetInstance()->powN ( (*it)->GetNuclearMass()/GeV , 2 ) + G4Pow::GetInstance()->powN ( (*it)->Get4Momentum().vect().mag() , 2 ) );
534 G4LorentzVector nucleus_p4CM ( (*it)->Get4Momentum().vect() , nucleus_e );
535
536// std::cout << "G4QMDRESULT nucleus deltaQ " << deltaQ << std::endl;
537
538 G4int ia = (*it)->GetMassNumber();
539 G4int iz = (*it)->GetAtomicNumber();
540
541 G4LorentzVector lv ( G4ThreeVector( 0.0 ) , (*it)->GetExcitationEnergy()*GeV + G4IonTable::GetIonTable()->GetIonMass( iz , ia ) );
542
543 G4Fragment* aFragment = new G4Fragment( ia , iz , lv );
544
546 rv = excitationHandler->BreakItUp( *aFragment );
547 G4bool notBreak = true;
548 for ( G4ReactionProductVector::iterator itt
549 = rv->begin() ; itt != rv->end() ; itt++ )
550 {
551
552 notBreak = false;
553 // Secondary from this nucleus (*it)
554 const G4ParticleDefinition* pd = (*itt)->GetDefinition();
555
556 G4LorentzVector p4 ( (*itt)->GetMomentum()/GeV , (*itt)->GetTotalEnergy()/GeV ); //in nucleus(*it) rest system
557 G4LorentzVector p4_CM = CLHEP::boostOf( p4 , -nucleus_p4CM.findBoostToCM() ); // Back to CM
558 G4LorentzVector p4_LAB = CLHEP::boostOf( p4_CM , boostBackToLAB ); // Back to LAB
559
560
561//090122
562 //theParticleChange.AddSecondary( dp );
563 if ( !( pd->GetAtomicNumber() == 4 && pd->GetAtomicMass() == 8 ) )
564 {
565 //G4cout << "pd out of notBreak loop : " << pd->GetParticleName() << G4endl;
566 G4DynamicParticle* dp = new G4DynamicParticle( pd , p4_LAB*GeV );
568 }
569 else
570 {
571 //Be8 -> Alpha + Alpha + Q
572 G4ThreeVector randomized_direction( G4UniformRand() , G4UniformRand() , G4UniformRand() );
573 randomized_direction = randomized_direction.unit();
574 G4double q_decay = (*itt)->GetMass() - 2*G4Alpha::Alpha()->GetPDGMass();
575 G4double p_decay = std::sqrt ( G4Pow::GetInstance()->powN(G4Alpha::Alpha()->GetPDGMass()+q_decay/2,2) - G4Pow::GetInstance()->powN(G4Alpha::Alpha()->GetPDGMass() , 2 ) );
576 G4LorentzVector p4_a1 ( p_decay*randomized_direction , G4Alpha::Alpha()->GetPDGMass()+q_decay/2 ); //in Be8 rest system
577
578 G4LorentzVector p4_a1_Be8 = CLHEP::boostOf ( p4_a1/GeV , -p4.findBoostToCM() );
579 G4LorentzVector p4_a1_CM = CLHEP::boostOf ( p4_a1_Be8 , -nucleus_p4CM.findBoostToCM() );
580 G4LorentzVector p4_a1_LAB = CLHEP::boostOf ( p4_a1_CM , boostBackToLAB );
581
582 G4LorentzVector p4_a2 ( -p_decay*randomized_direction , G4Alpha::Alpha()->GetPDGMass()+q_decay/2 ); //in Be8 rest system
583
584 G4LorentzVector p4_a2_Be8 = CLHEP::boostOf ( p4_a2/GeV , -p4.findBoostToCM() );
585 G4LorentzVector p4_a2_CM = CLHEP::boostOf ( p4_a2_Be8 , -nucleus_p4CM.findBoostToCM() );
586 G4LorentzVector p4_a2_LAB = CLHEP::boostOf ( p4_a2_CM , boostBackToLAB );
587
588 G4DynamicParticle* dp1 = new G4DynamicParticle( G4Alpha::Alpha() , p4_a1_LAB*GeV );
589 G4DynamicParticle* dp2 = new G4DynamicParticle( G4Alpha::Alpha() , p4_a2_LAB*GeV );
592 }
593//090122
594
595/*
596 G4cout
597 << "Regist Secondary "
598 << (*itt)->GetDefinition()->GetParticleName()
599 << " "
600 << (*itt)->GetMomentum()/GeV
601 << " "
602 << (*itt)->GetKineticEnergy()/GeV
603 << " "
604 << (*itt)->GetMass()/GeV
605 << " "
606 << (*itt)->GetTotalEnergy()/GeV
607 << " "
608 << (*itt)->GetTotalEnergy()/GeV * (*itt)->GetTotalEnergy()/GeV
609 - (*itt)->GetMomentum()/GeV * (*itt)->GetMomentum()/GeV
610 << " "
611 << nucleus_p4CM.findBoostToCM()
612 << " "
613 << p4
614 << " "
615 << p4_CM
616 << " "
617 << p4_LAB
618 << G4endl;
619*/
620
621 }
622 if ( notBreak == true )
623 {
624
625 const G4ParticleDefinition* pd = G4IonTable::GetIonTable()->GetIon( (*it)->GetAtomicNumber() , (*it)->GetMassNumber(), (*it)->GetExcitationEnergy()*GeV );
626 //G4cout << "pd in notBreak loop : " << pd->GetParticleName() << G4endl;
627 G4LorentzVector p4_CM = nucleus_p4CM;
628 G4LorentzVector p4_LAB = CLHEP::boostOf( p4_CM , boostBackToLAB ); // Back to LAB
629 G4DynamicParticle* dp = new G4DynamicParticle( pd , p4_LAB*GeV );
631
632 }
633
634 for ( G4ReactionProductVector::iterator itt
635 = rv->begin() ; itt != rv->end() ; itt++ )
636 {
637 delete *itt;
638 }
639 delete rv;
640
641 delete aFragment;
642
643 }
644
645
646
647 for ( G4int i = 0 ; i < system->GetTotalNumberOfParticipant() ; i++ )
648 {
649 // Secondary particles
650
651 const G4ParticleDefinition* pd = system->GetParticipant( i )->GetDefinition();
652 G4LorentzVector p4_CM = system->GetParticipant( i )->Get4Momentum();
653 G4LorentzVector p4_LAB = CLHEP::boostOf( p4_CM , boostBackToLAB );
654 G4DynamicParticle* dp = new G4DynamicParticle( pd , p4_LAB*GeV );
656 //G4cout << "In the last theParticleChange loop : " << pd->GetParticleName() << G4endl;
657
658/*
659 G4cout << "G4QMDRESULT "
660 << "r" << i << " " << system->GetParticipant ( i ) -> GetPosition() << " "
661 << "p" << i << " " << system->GetParticipant ( i ) -> Get4Momentum()
662 << G4endl;
663*/
664
665 }
666
667 for ( std::vector< G4QMDNucleus* >::iterator it
668 = nucleuses.begin() ; it != nucleuses.end() ; it++ )
669 {
670 delete *it; // delete nulceuse
671 }
672 nucleuses.clear();
673
674 system->Clear();
675 delete system;
676
678
679 for (G4int i = 0; i < G4int(theParticleChange.GetNumberOfSecondaries() ); i++)
680 {
681 //G4cout << "Particle : " << theParticleChange.GetSecondary(i)->GetParticle()->GetParticleDefinition()->GetParticleName() << G4endl;
682 //G4cout << "KEnergy : " << theParticleChange.GetSecondary(i)->GetParticle()->GetKineticEnergy() << G4endl;
683 //G4cout << "KEnergy : " << theParticleChange.GetSecondary(i)->GetCreatorModelType() << G4endl;
685 }
686
687 return &theParticleChange;
688
689}
690
691
692
693void G4QMDReaction::calcOffSetOfCollision( G4double b ,
694const G4ParticleDefinition* pd_proj ,
695const G4ParticleDefinition* pd_targ ,
696G4double ptot , G4double etot , G4double bmax , G4ThreeVector boostToCM )
697{
698
699 G4double mass_proj = pd_proj->GetPDGMass()/GeV;
700 G4double mass_targ = pd_targ->GetPDGMass()/GeV;
701
702 G4double stot = std::sqrt ( etot*etot - ptot*ptot );
703
704 G4double pstt = std::sqrt ( ( stot*stot - ( mass_proj + mass_targ ) * ( mass_proj + mass_targ )
705 ) * ( stot*stot - ( mass_proj - mass_targ ) * ( mass_proj - mass_targ ) ) )
706 / ( 2.0 * stot );
707
708 G4double pzcc = pstt;
709 G4double eccm = stot - ( mass_proj + mass_targ );
710
711 G4int zp = 1;
712 G4int ap = 1;
713 if ( pd_proj->GetParticleType() == "nucleus" )
714 {
715 zp = pd_proj->GetAtomicNumber();
716 ap = pd_proj->GetAtomicMass();
717 }
718 else
719 {
720 // proton, neutron, mesons
721 zp = int ( pd_proj->GetPDGCharge()/eplus + 0.5 );
722 // ap = 1;
723 }
724
725
726 G4int zt = pd_targ->GetAtomicNumber();
727 G4int at = pd_targ->GetAtomicMass();
728
729
730 // Check the ramx0 value
731 //G4double rmax0 = 8.0; // T.K dicide parameter value // for low energy
732 G4double rmax0 = bmax + 4.0;
733 G4double rmax = std::sqrt( rmax0*rmax0 + b*b );
734
735 G4double ccoul = 0.001439767;
736 G4double pcca = 1.0 - double ( zp * zt ) * ccoul / eccm / rmax - ( b / rmax )*( b / rmax );
737
738 G4double pccf = std::sqrt( pcca );
739
740 //Fix for neutral particles
741 G4double aas1 = 0.0;
742 G4double bbs = 0.0;
743
744 if ( zp != 0 )
745 {
746 G4double aas = 2.0 * eccm * b / double ( zp * zt ) / ccoul;
747 bbs = 1.0 / std::sqrt ( 1.0 + aas*aas );
748 aas1 = ( 1.0 + aas * b / rmax ) * bbs;
749 }
750
751 G4double cost = 0.0;
752 G4double sint = 0.0;
753 G4double thet1 = 0.0;
754 G4double thet2 = 0.0;
755 if ( 1.0 - aas1*aas1 <= 0 || 1.0 - bbs*bbs <= 0.0 )
756 {
757 cost = 1.0;
758 sint = 0.0;
759 }
760 else
761 {
762 G4double aat1 = aas1 / std::sqrt ( 1.0 - aas1*aas1 );
763 G4double aat2 = bbs / std::sqrt ( 1.0 - bbs*bbs );
764
765 thet1 = std::atan ( aat1 );
766 thet2 = std::atan ( aat2 );
767
768// TK enter to else block
769 G4double theta = thet1 - thet2;
770 cost = std::cos( theta );
771 sint = std::sin( theta );
772 }
773
774 G4double rzpr = -rmax * cost * ( mass_targ ) / ( mass_proj + mass_targ );
775 G4double rzta = rmax * cost * ( mass_proj ) / ( mass_proj + mass_targ );
776
777 G4double rxpr = rmax / 2.0 * sint;
778
779 G4double rxta = -rxpr;
780
781
782 G4double pzpc = pzcc * ( cost * pccf + sint * b / rmax );
783 G4double pxpr = pzcc * ( -sint * pccf + cost * b / rmax );
784
785 G4double pztc = - pzpc;
786 G4double pxta = - pxpr;
787
788 G4double epc = std::sqrt ( pzpc*pzpc + pxpr*pxpr + mass_proj*mass_proj );
789 G4double etc = std::sqrt ( pztc*pztc + pxta*pxta + mass_targ*mass_targ );
790
791 G4double pzpr = pzpc;
792 G4double pzta = pztc;
793 G4double epr = epc;
794 G4double eta = etc;
795
796// CM -> NN
797 G4double gammacm = boostToCM.gamma();
798 //G4double betacm = -boostToCM.beta();
799 G4double betacm = boostToCM.z();
800 pzpr = pzpc + betacm * gammacm * ( gammacm / ( 1. + gammacm ) * pzpc * betacm + epc );
801 pzta = pztc + betacm * gammacm * ( gammacm / ( 1. + gammacm ) * pztc * betacm + etc );
802 epr = gammacm * ( epc + betacm * pzpc );
803 eta = gammacm * ( etc + betacm * pztc );
804
805 //G4double betpr = pzpr / epr;
806 //G4double betta = pzta / eta;
807
808 G4double gammpr = epr / ( mass_proj );
809 G4double gammta = eta / ( mass_targ );
810
811 pzta = pzta / double ( at );
812 pxta = pxta / double ( at );
813
814 pzpr = pzpr / double ( ap );
815 pxpr = pxpr / double ( ap );
816
817 G4double zeroz = 0.0;
818
819 rzpr = rzpr -zeroz;
820 rzta = rzta -zeroz;
821
822 // Set results
823 coulomb_collision_gamma_proj = gammpr;
824 coulomb_collision_rx_proj = rxpr;
825 coulomb_collision_rz_proj = rzpr;
826 coulomb_collision_px_proj = pxpr;
827 coulomb_collision_pz_proj = pzpr;
828
829 coulomb_collision_gamma_targ = gammta;
830 coulomb_collision_rx_targ = rxta;
831 coulomb_collision_rz_targ = rzta;
832 coulomb_collision_px_targ = pxta;
833 coulomb_collision_pz_targ = pzta;
834
835}
836
837
838
839void G4QMDReaction::setEvaporationCh()
840{
841
842 if ( gem == true )
843 evaporation->SetGEMChannel();
844 else
845 evaporation->SetDefaultChannel();
846
847}
848
849void G4QMDReaction::ModelDescription(std::ostream& outFile) const
850{
851 outFile << "Lorentz covarianted Quantum Molecular Dynamics model for nucleus (particle) vs nucleus reactions\n";
852}
@ stopAndKill
std::vector< G4ReactionProduct * > G4ReactionProductVector
CLHEP::Hep3Vector G4ThreeVector
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
#define G4UniformRand()
Definition: Randomize.hh:52
double beta() const
Definition: SpaceVectorP.cc:26
double z() const
Hep3Vector unit() const
double x() const
double y() const
double mag() const
double gamma() const
Definition: SpaceVectorP.cc:35
Hep3Vector findBoostToCM() const
static G4Alpha * Alpha()
Definition: G4Alpha.cc:88
G4double GetElementCrossSection(const G4DynamicParticle *, G4int Z, const G4Material *mat) final
void BuildPhysicsTable(const G4ParticleDefinition &) final
void BuildPhysicsTable(const G4ParticleDefinition &) final
G4double GetElementCrossSection(const G4DynamicParticle *, G4int Z, const G4Material *mat) final
G4ParticleDefinition * GetDefinition() const
G4LorentzVector Get4Momentum() const
G4ThreeVector GetMomentum() const
void SetGEMChannel()
void SetDefaultChannel()
void SetEvaporation(G4VEvaporation *ptr, G4bool isLocal=false)
G4ReactionProductVector * BreakItUp(const G4Fragment &theInitialState)
void SetDeexChannelsType(G4DeexChannelType val)
void SetStatusChange(G4HadFinalStateStatus aS)
void AddSecondary(G4DynamicParticle *aP, G4int mod=-1)
std::size_t GetNumberOfSecondaries() const
G4HadSecondary * GetSecondary(size_t i)
const G4Material * GetMaterial() const
G4double GetTotalMomentum() const
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
void SetCreatorModelType(G4int idx)
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
Definition: G4IonTable.cc:522
G4double GetIonMass(G4int Z, G4int A, G4int L=0, G4int lvl=0) const
Definition: G4IonTable.cc:1517
static G4IonTable * GetIonTable()
Definition: G4IonTable.cc:170
G4int GetA_asInt() const
Definition: G4Nucleus.hh:109
G4int GetZ_asInt() const
Definition: G4Nucleus.hh:115
G4int GetAtomicNumber() const
const G4String & GetParticleType() const
G4int GetAtomicMass() const
G4double GetPDGCharge() const
const G4String & GetParticleName() const
static G4PionMinus * PionMinus()
Definition: G4PionMinus.cc:97
static G4PionPlus * PionPlus()
Definition: G4PionPlus.cc:97
static G4Pow * GetInstance()
Definition: G4Pow.cc:41
G4double powN(G4double x, G4int n) const
Definition: G4Pow.cc:166
void SetMeanField(G4QMDMeanField *meanfield)
void CalKinematicsOfBinaryCollisions(G4double)
G4double GetTotalPotential()
void SetNucleus(G4QMDNucleus *aSystem)
void DoPropagation(G4double)
std::vector< G4QMDNucleus * > DoClusterJudgment()
void SetSystem(G4QMDSystem *aSystem)
void SetTotalPotential(G4double x)
Definition: G4QMDNucleus.hh:62
void CalEnergyAndAngularMomentumInCM()
G4ThreeVector GetPosition()
const G4ParticleDefinition * GetDefinition()
G4LorentzVector Get4Momentum()
G4ThreeVector GetMomentum()
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)
virtual void ModelDescription(std::ostream &outFile) const
G4QMDParticipant * GetParticipant(G4int i)
Definition: G4QMDSystem.hh:62
G4int GetTotalNumberOfParticipant()
Definition: G4QMDSystem.hh:60
void Clear()
Definition: G4QMDSystem.cc:68
void SetParticipant(G4QMDParticipant *particle)
Definition: G4QMDSystem.hh:51
G4int GetNOCollision()
Definition: G4QMDSystem.hh:65
virtual G4double GetIsoCrossSection(const G4DynamicParticle *, G4int Z, G4int A, const G4Isotope *iso=nullptr, const G4Element *elm=nullptr, const G4Material *mat=nullptr)
HepLorentzVector boostOf(const HepLorentzVector &vec, const Hep3Vector &betaVector)