108{
109
110
112
113 system = new G4QMDSystem;
114
117 const G4ParticleDefinition* proj_pd = ( const G4ParticleDefinition* ) projectile.GetDefinition();
119 {
122 }
123 else
124 {
126 proj_A = 1;
127 }
128
129
130
131 G4int targ_Z = target.GetZ_asInt();
132 G4int targ_A = target.GetA_asInt();
134
135
136
137
138
139 const G4DynamicParticle* proj_dp = new G4DynamicParticle ( proj_pd , projectile.Get4Momentum() );
140
141
142
143
144
145
146 G4double xs_0 = theXS->GetElementCrossSection( proj_dp , targ_Z , projectile.GetMaterial() );
147
148
150 xs_0 = pipElNucXS->GetElementCrossSection(proj_dp, targ_Z, projectile.GetMaterial() ) +
151 pipInelNucXS->GetElementCrossSection(proj_dp, targ_Z, projectile.GetMaterial() );
153 xs_0 = pimElNucXS->GetElementCrossSection(proj_dp, targ_Z, projectile.GetMaterial() ) +
154 pimInelNucXS->GetElementCrossSection(proj_dp, targ_Z, projectile.GetMaterial() );
155 }
156
157
158
159
160
161 G4double bmax_0 = std::sqrt( xs_0 / pi );
162
163
164
165
167
168 std::vector< G4QMDNucleus* > nucleuses;
171
174
177 G4double e1 = std::sqrt( p1*p1 + m1*m1 );
180
182
183 G4double beta_nncm = ( - boostLABtoCM.
beta() + boostLABtoNN.beta() ) / ( 1 - boostLABtoCM.
beta() * boostLABtoNN.beta() ) ;
184
185
186
187
190
191 boostToReac = boostLABtoNN;
192 boostBackToLAB = -boostLABtoNN;
193
194 delete proj_dp;
195
197 G4int icounter_max = 1024;
198 while ( elastic )
199 {
200 icounter++;
201 if ( icounter > icounter_max ) {
202 G4cout <<
"Loop-counter exceeded the threshold value at " << __LINE__ <<
"th line of " << __FILE__ <<
"." <<
G4endl;
203 break;
204 }
205
206
207
208 G4double bmax = envelopF*(bmax_0/fermi);
210
211
212
213
214
215
216
217 G4double plab = projectile.GetTotalMomentum()/GeV;
219
220 calcOffSetOfCollision( b , proj_pd , targ_pd , plab , elab , bmax , boostCMtoNN );
221
222
224
225 G4QMDGroundStateNucleus* proj(NULL);
226 if ( projectile.GetDefinition()->GetParticleType() == "nucleus"
227 || projectile.GetDefinition()->GetParticleName() == "proton"
228 || projectile.GetDefinition()->GetParticleName() == "neutron" )
229 {
230
233
234 proj = new G4QMDGroundStateNucleus( proj_Z , proj_A );
235
236
237
238 meanField->SetSystem ( proj );
239 proj->SetTotalPotential( meanField->GetTotalPotential() );
240 proj->CalEnergyAndAngularMomentumInCM();
241
242 }
243
244
245
246
247
248 G4int iz = int ( target.GetZ_asInt() );
249 G4int ia = int ( target.GetA_asInt() );
250
251 G4QMDGroundStateNucleus* targ = new G4QMDGroundStateNucleus( iz , ia );
252
253 meanField->SetSystem (targ );
256
257
258
259
260
261
263 {
264
267
270 , p0.
z() * coulomb_collision_gamma_targ + coulomb_collision_pz_targ );
271
274 , r0.
z() / coulomb_collision_gamma_targ + coulomb_collision_rz_targ );
275
277 system->GetParticipant( i )->SetTarget();
278
279 }
280
283
284
285
286
287 if ( proj_A != 1 )
288 {
289
290
291
292 for (
G4int i = 0 ; i < proj->GetTotalNumberOfParticipant() ; i++ )
293 {
294
297
300 , p0.
z() * coulomb_collision_gamma_proj + coulomb_collision_pz_proj );
301
304 , r0.
z() / coulomb_collision_gamma_proj + coulomb_collision_rz_proj );
305
306 system->SetParticipant( new G4QMDParticipant( proj->GetParticipant( i )->GetDefinition() , p , r ) );
308 }
309
310 }
311 else
312 {
313
314
315
316
317
319 {
320
322
325
328 , p0.
z() * coulomb_collision_gamma_proj + coulomb_collision_pz_proj );
329
332 , r0.
z() / coulomb_collision_gamma_proj + coulomb_collision_rz_proj );
333
334 system->SetParticipant( new G4QMDParticipant( (G4ParticleDefinition*)projectile.GetDefinition() , p , r ) );
335
336 system->GetParticipant ( i )->SetProjectile();
337 }
338
339 }
340
341
342 delete targ;
343 delete proj;
344
346 collision->SetMeanField ( meanField );
347
348
349
350
351 for (
G4int i = 0 ; i < maxTime ; i++ )
352 {
353
354 meanField->DoPropagation( deltaT );
355
356 collision->CalKinematicsOfBinaryCollisions( deltaT );
357
358 if ( i / 10 * 10 == i )
359 {
360
361
362 }
363
364 }
365
366
367
368
369
370 nucleuses = meanField->DoClusterJudgment();
371
372
373
374 G4int numberOfSecondary = int ( nucleuses.size() ) + system->GetTotalNumberOfParticipant();
375
378 const G4ParticleDefinition* sec_a_pd = NULL;
381 const G4ParticleDefinition* sec_b_pd = NULL;
382
383 if ( numberOfSecondary == 2 )
384 {
385
386 G4bool elasticLike_system =
false;
387 if ( nucleuses.size() == 2 )
388 {
389
390 sec_a_Z = nucleuses[0]->GetAtomicNumber();
391 sec_a_A = nucleuses[0]->GetMassNumber();
392 sec_b_Z = nucleuses[1]->GetAtomicNumber();
393 sec_b_A = nucleuses[1]->GetMassNumber();
394
395 if ( ( sec_a_Z == proj_Z && sec_a_A == proj_A && sec_b_Z == targ_Z && sec_b_A == targ_A )
396 || ( sec_a_Z == targ_Z && sec_a_A == targ_A && sec_b_Z == proj_Z && sec_b_A == proj_A ) )
397 {
398 elasticLike_system = true;
399 }
400
401 }
402 else if ( nucleuses.size() == 1 )
403 {
404
405 sec_a_Z = nucleuses[0]->GetAtomicNumber();
406 sec_a_A = nucleuses[0]->GetMassNumber();
407 sec_b_pd = system->GetParticipant( 0 )->GetDefinition();
408
409 if ( ( sec_a_Z == proj_Z && sec_a_A == proj_A && sec_b_pd == targ_pd )
410 || ( sec_a_Z == targ_Z && sec_a_A == targ_A && sec_b_pd == proj_pd ) )
411 {
412 elasticLike_system = true;
413 }
414
415 }
416 else
417 {
418
419 sec_a_pd = system->GetParticipant( 0 )->GetDefinition();
420 sec_b_pd = system->GetParticipant( 1 )->GetDefinition();
421
422 if ( ( sec_a_pd == proj_pd && sec_b_pd == targ_pd )
423 || ( sec_a_pd == targ_pd && sec_b_pd == proj_pd ) )
424 {
425 elasticLike_system = true;
426 }
427
428 }
429
430 if ( elasticLike_system == true )
431 {
432
433 G4bool elasticLike_energy =
true;
434
435 for (
G4int i = 0 ; i < int ( nucleuses.size() ) ; i++ )
436 {
437
438
439 meanField->SetNucleus( nucleuses[i] );
440
441
442
443 if ( nucleuses[i]->GetExcitationEnergy()*GeV > 1.0*MeV ) elasticLike_energy = false;
444
445 }
446
447
448 G4bool withCollision =
true;
449 if ( system->GetNOCollision() == 0 ) withCollision = false;
450
451
452
453
454
455
456
457
458
459 if ( frag == true )
460 if ( elasticLike_energy ==
false )
elastic =
false;
461
462 if ( elasticLike_energy ==
false && withCollision ==
true )
elastic =
false;
463
464 }
465
466 }
467 else
468 {
469
470
472
473 }
474
475
476
477
478
479 if ( elastic == true )
480 {
481
482 for ( std::vector< G4QMDNucleus* >::iterator
483 it = nucleuses.begin() ; it != nucleuses.end() ; it++ )
484 {
485 delete *it;
486 }
487 nucleuses.clear();
488 }
489
490 }
491
492
495
496
497
498 for ( std::vector< G4QMDNucleus* >::iterator it
499 = nucleuses.begin() ; it != nucleuses.end() ; it++ )
500 {
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518 meanField->SetNucleus ( *it );
519
520 if ( (*it)->GetAtomicNumber() == 0
521 || (*it)->GetAtomicNumber() == (*it)->GetMassNumber() )
522 {
523
524 for (
G4int i = 0 ; i < (*it)->GetTotalNumberOfParticipant() ; i++ )
525 {
526 G4QMDParticipant* aP = new G4QMDParticipant( ( (*it)->GetParticipant( i ) )->GetDefinition() , ( (*it)->GetParticipant( i ) )->GetMomentum() , ( (*it)->GetParticipant( i ) )->GetPosition() );
527 system->SetParticipant ( aP );
528 }
529 continue;
530 }
531
533 G4LorentzVector nucleus_p4CM ( (*it)->Get4Momentum().vect() , nucleus_e );
534
535
536
537 G4int ia = (*it)->GetMassNumber();
538 G4int iz = (*it)->GetAtomicNumber();
539
541
542 G4Fragment* aFragment = new G4Fragment( ia , iz , lv );
543
545 rv = excitationHandler->BreakItUp( *aFragment );
547 for ( G4ReactionProductVector::iterator itt
548 = rv->begin() ; itt != rv->end() ; itt++ )
549 {
550
551 notBreak = false;
552
553 const G4ParticleDefinition* pd = (*itt)->GetDefinition();
554
555 G4LorentzVector p4 ( (*itt)->GetMomentum()/GeV , (*itt)->GetTotalEnergy()/GeV );
558 p4_LAB.
rotate(randAzimuthAngle, zAxis);
559
560
561
562
564 {
565
566 G4DynamicParticle* dp = new G4DynamicParticle( pd , p4_LAB*GeV );
568 }
569 else
570 {
571
573 randomized_direction = randomized_direction.unit();
577
581 p4_a1_LAB.
rotate(randAzimuthAngle, zAxis);
582
584
588 p4_a2_LAB.
rotate(randAzimuthAngle, zAxis);
589
590 G4DynamicParticle* dp1 =
new G4DynamicParticle(
G4Alpha::Alpha() , p4_a1_LAB*GeV );
591 G4DynamicParticle* dp2 =
new G4DynamicParticle(
G4Alpha::Alpha() , p4_a2_LAB*GeV );
594 }
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623 }
624 if ( notBreak == true )
625 {
626
627 const G4ParticleDefinition* pd =
G4IonTable::GetIonTable()->
GetIon( (*it)->GetAtomicNumber() , (*it)->GetMassNumber(), (*it)->GetExcitationEnergy()*GeV );
628
631 p4_LAB.
rotate(randAzimuthAngle, zAxis);
632 G4DynamicParticle* dp = new G4DynamicParticle( pd , p4_LAB*GeV );
634
635 }
636
637 for ( G4ReactionProductVector::iterator itt
638 = rv->begin() ; itt != rv->end() ; itt++ )
639 {
640 delete *itt;
641 }
642 delete rv;
643
644 delete aFragment;
645
646 }
647
648
649
650 for (
G4int i = 0 ; i < system->GetTotalNumberOfParticipant() ; i++ )
651 {
652
653
654 const G4ParticleDefinition* pd = system->GetParticipant( i )->GetDefinition();
657 p4_LAB.
rotate(randAzimuthAngle, zAxis);
658 G4DynamicParticle* dp = new G4DynamicParticle( pd , p4_LAB*GeV );
660
661
662
663
664
665
666
667
668
669 }
670
671 for ( std::vector< G4QMDNucleus* >::iterator it
672 = nucleuses.begin() ; it != nucleuses.end() ; it++ )
673 {
674 delete *it;
675 }
676 nucleuses.clear();
677
678 system->Clear();
679 delete system;
680
682
684 {
685
686
687
689 }
690
692
693}
CLHEP::HepLorentzVector G4LorentzVector
std::vector< G4ReactionProduct * > G4ReactionProductVector
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
HepLorentzVector & rotate(double, const Hep3Vector &)
G4ParticleDefinition * GetDefinition() const
G4LorentzVector Get4Momentum() const
G4ThreeVector GetMomentum() const
G4HadFinalState theParticleChange
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
static G4IonTable * GetIonTable()
G4double GetIonMass(G4int Z, G4int A, G4int nL=0, G4int lvl=0) const
G4int GetAtomicNumber() const
const G4String & GetParticleType() const
G4double GetPDGMass() const
G4int GetAtomicMass() const
G4double GetPDGCharge() const
static G4Pow * GetInstance()
G4double powN(G4double x, G4int n) const
void SetTotalPotential(G4double x)
void CalEnergyAndAngularMomentumInCM()
G4ThreeVector GetPosition()
const G4ParticleDefinition * GetDefinition()
G4ThreeVector GetMomentum()
G4QMDParticipant * GetParticipant(G4int i)
G4int GetTotalNumberOfParticipant()
void SetSystem(G4QMDSystem *, G4ThreeVector, G4ThreeVector)
HepLorentzVector boostOf(const HepLorentzVector &vec, const Hep3Vector &betaVector)
G4double elastic(Particle const *const p1, Particle const *const p2)