Geant4-11
G4FTFModel.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//
27//
28
29// ------------------------------------------------------------
30// GEANT 4 class implementation file
31//
32// ---------------- G4FTFModel ----------------
33// by Gunter Folger, May 1998.
34// class implementing the excitation in the FTF Parton String Model
35//
36// Vladimir Uzhinsky, November - December 2012
37// simulation of nucleus-nucleus interactions was implemented.
38// ------------------------------------------------------------
39
40#include <utility>
41
42#include "G4FTFModel.hh"
43#include "G4ios.hh"
45#include "G4SystemOfUnits.hh"
46#include "G4FTFParameters.hh"
47#include "G4FTFParticipants.hh"
50#include "G4LorentzRotation.hh"
52#include "G4ParticleTable.hh"
53#include "G4IonTable.hh"
54#include "G4KineticTrack.hh"
56#include "G4Exp.hh"
57#include "G4Log.hh"
58
59//============================================================================
60
61//#define debugFTFmodel
62//#define debugReggeonCascade
63//#define debugPutOnMassShell
64//#define debugAdjust
65//#define debugBuildString
66
67
68//============================================================================
69
70G4FTFModel::G4FTFModel( const G4String& modelName ) :
71 G4VPartonStringModel( modelName ),
72 theExcitation( new G4DiffractiveExcitation() ),
73 theElastic( new G4ElasticHNScattering() ),
74 theAnnihilation( new G4FTFAnnihilation() )
75{
76 // ---> JVY theParameters = 0;
78 //
81 for ( G4int i = 0; i < 250; ++i ) {
84 }
85
86 //LowEnergyLimit = 2000.0*MeV;
87 LowEnergyLimit = 1000.0*MeV;
88
89 HighEnergyInter = true;
90
91 G4LorentzVector tmp( 0.0, 0.0, 0.0, 0.0 );
97
102
103 Bimpact = -1.0;
104 BinInterval = false;
105 Bmin = 0.0;
106 Bmax = 0.0;
110
112}
113
114
115//============================================================================
116
117struct DeleteVSplitableHadron { void operator()( G4VSplitableHadron* aH ) { delete aH; } };
118
119
120//============================================================================
121
123 // Because FTF model can be called for various particles
124 //
125 // ---> NOTE (JVY): This statement below is no longer true !!!
126 // theParameters must be erased at the end of each call.
127 // Thus the delete is also in G4FTFModel::GetStrings() method.
128 // ---> JVY
129 //
130 if ( theParameters != 0 ) delete theParameters;
131 if ( theExcitation != 0 ) delete theExcitation;
132 if ( theElastic != 0 ) delete theElastic;
133 if ( theAnnihilation != 0 ) delete theAnnihilation;
134
135 // Erasing of strings created at annihilation.
136 if ( theAdditionalString.size() != 0 ) {
137 std::for_each( theAdditionalString.begin(), theAdditionalString.end(),
139 }
140 theAdditionalString.clear();
141
142 // Erasing of target involved nucleons.
144 for ( G4int i = 0; i < NumberOfInvolvedNucleonsOfTarget; ++i ) {
146 if ( aNucleon ) delete aNucleon;
147 }
148 }
149
150 // Erasing of projectile involved nucleons.
152 for ( G4int i = 0; i < NumberOfInvolvedNucleonsOfProjectile; ++i ) {
154 if ( aNucleon ) delete aNucleon;
155 }
156 }
157}
158
159
160//============================================================================
161
162void G4FTFModel::Init( const G4Nucleus& aNucleus, const G4DynamicParticle& aProjectile ) {
163
164 theProjectile = aProjectile;
165
166 G4double PlabPerParticle( 0.0 ); // Laboratory momentum Pz per particle/nucleon
167
168 #ifdef debugFTFmodel
169 G4cout << "FTF init Proj Name " << theProjectile.GetDefinition()->GetParticleName() << G4endl
170 << "FTF init Proj Mass " << theProjectile.GetMass()
171 << " " << theProjectile.GetMomentum() << G4endl
172 << "FTF init Proj B Q " << theProjectile.GetDefinition()->GetBaryonNumber()
174 << "FTF init Target A Z " << aNucleus.GetA_asInt()
175 << " " << aNucleus.GetZ_asInt() << G4endl;
176 #endif
177
179
181
182 G4LorentzVector tmp( 0.0, 0.0, 0.0, 0.0 );
188
190 TargetResidualCharge = aNucleus.GetZ_asInt();
195
196 TargetResidual4Momentum.setE( TargetResidualMass );
197
198 if ( std::abs( theProjectile.GetDefinition()->GetBaryonNumber() ) <= 1 ) {
199 // Projectile is a hadron : meson or baryon
202 PlabPerParticle = theProjectile.GetMomentum().z();
204 //G4double ProjectileResidualMass = theProjectile.GetMass();
207 if ( PlabPerParticle < LowEnergyLimit ) {
208 HighEnergyInter = false;
209 } else {
210 HighEnergyInter = true;
211 }
212 } else {
214 // Projectile is a nucleus
219 if ( PlabPerParticle < LowEnergyLimit ) {
220 HighEnergyInter = false;
221 } else {
222 HighEnergyInter = true;
223 }
226 } else if ( theProjectile.GetDefinition()->GetBaryonNumber() < -1 ) {
227 // Projectile is an anti-nucleus
232 if ( PlabPerParticle < LowEnergyLimit ) {
233 HighEnergyInter = false;
234 } else {
235 HighEnergyInter = true;
236 }
240 G4Nucleon* aNucleon;
241 while ( ( aNucleon = theParticipants.GetProjectileNucleus()->GetNextNucleon() ) ) { /* Loop checking, 10.08.2015, A.Ribon */
242 if ( aNucleon->GetDefinition() == G4Proton::Definition() ) {
244 } else if ( aNucleon->GetDefinition() == G4Neutron::Definition() ) {
246 } else if ( aNucleon->GetDefinition() == G4Lambda::Definition() ) {
248 }
249 }
250 }
251
256 //G4double ProjectileResidualMass = theProjectile.GetMass();
259 }
260
261 // Init target nucleus (assumed to be never a hypernucleus)
262 theParticipants.Init( aNucleus.GetA_asInt(), aNucleus.GetZ_asInt() );
263
267
268 // reset/recalculate everything for the new interaction
270 aNucleus.GetZ_asInt(), PlabPerParticle );
271
272 if ( theAdditionalString.size() != 0 ) {
273 std::for_each( theAdditionalString.begin(), theAdditionalString.end(),
275 }
276 theAdditionalString.clear();
277
278 #ifdef debugFTFmodel
279 G4cout << "FTF end of Init" << G4endl << G4endl;
280 #endif
281
282 // In the case of Hydrogen target, for non-ion hadron projectiles,
283 // do NOT simulate quasi-elastic (by forcing to 0 the probability of
284 // elastic scatering in theParameters - which is used only by FTF).
285 // This is necessary because in this case quasi-elastic on a target nucleus
286 // with only one nucleon would be identical to the hadron elastic scattering,
287 // and the latter is already included in the elastic process
288 // (i.e. G4HadronElasticProcess).
289 if ( std::abs( theProjectile.GetDefinition()->GetBaryonNumber() ) <= 1 &&
291
293}
294
295
296//============================================================================
297
299
300 #ifdef debugFTFmodel
301 G4cout << "G4FTFModel::GetStrings() " << G4endl;
302 #endif
303
306
308
310
311 G4bool Success( true );
312
313 if ( HighEnergyInter ) {
315
316 #ifdef debugFTFmodel
317 G4cout << "FTF PutOnMassShell " << G4endl;
318 #endif
319
320 Success = PutOnMassShell();
321
322 #ifdef debugFTFmodel
323 G4cout << "FTF PutOnMassShell Success? " << Success << G4endl;
324 #endif
325
326 }
327
328 #ifdef debugFTFmodel
329 G4cout << "FTF ExciteParticipants " << G4endl;
330 #endif
331
332 if ( Success ) Success = ExciteParticipants();
333
334 #ifdef debugFTFmodel
335 G4cout << "FTF ExciteParticipants Success? " << Success << G4endl;
336 #endif
337
338 if ( Success ) {
339
340 #ifdef debugFTFmodel
341 G4cout << "FTF BuildStrings ";
342 #endif
343
344 BuildStrings( theStrings );
345
346 #ifdef debugFTFmodel
347 G4cout << "FTF BuildStrings " << theStrings << " OK" << G4endl
348 << "FTF GetResiduals of Nuclei " << G4endl;
349 #endif
350
351 GetResiduals();
352
353 /*
354 if ( theParameters != 0 ) {
355 delete theParameters;
356 theParameters = 0;
357 }
358 */
359 } else if ( ! GetProjectileNucleus() ) {
360 // Erase the hadron projectile
361 std::vector< G4VSplitableHadron* > primaries;
363 while ( theParticipants.Next() ) { /* Loop checking, 10.08.2015, A.Ribon */
365 // Do not allow for duplicates
366 if ( primaries.end() ==
367 std::find( primaries.begin(), primaries.end(), interaction.GetProjectile() ) ) {
368 primaries.push_back( interaction.GetProjectile() );
369 }
370 }
371 std::for_each( primaries.begin(), primaries.end(), DeleteVSplitableHadron() );
372 primaries.clear();
373 }
374
375 // Cleaning of the memory
376 G4VSplitableHadron* aNucleon = 0;
377
378 // Erase the projectile nucleons
379 for ( G4int i = 0; i < NumberOfInvolvedNucleonsOfProjectile; ++i ) {
381 if ( aNucleon ) delete aNucleon;
382 }
384
385 // Erase the target nucleons
386 for ( G4int i = 0; i < NumberOfInvolvedNucleonsOfTarget; ++i ) {
388 if ( aNucleon ) delete aNucleon;
389 }
391
392 #ifdef debugFTFmodel
393 G4cout << "End of FTF. Go to fragmentation" << G4endl
394 << "To continue - enter 1, to stop - ^C" << G4endl;
395 #endif
396
398
399 return theStrings;
400}
401
402
403//============================================================================
404
406 //To store nucleons involved in the interaction
407
409
410 G4V3DNucleus* theTargetNucleus = GetTargetNucleus();
411 theTargetNucleus->StartLoop();
412
413 G4Nucleon* aNucleon;
414 while ( ( aNucleon = theTargetNucleus->GetNextNucleon() ) ) { /* Loop checking, 10.08.2015, A.Ribon */
415 if ( aNucleon->AreYouHit() ) {
418 }
419 }
420
421 #ifdef debugFTFmodel
422 G4cout << "G4FTFModel::StoreInvolvedNucleon -------------" << G4endl;
423 G4cout << "NumberOfInvolvedNucleonsOfTarget " << NumberOfInvolvedNucleonsOfTarget
424 << G4endl << G4endl;
425 #endif
426
427
428 if ( ! GetProjectileNucleus() ) return; // The projectile is a hadron
429
430 // The projectile is a nucleus or an anti-nucleus.
431
433
434 G4V3DNucleus* theProjectileNucleus = GetProjectileNucleus();
435 theProjectileNucleus->StartLoop();
436
437 G4Nucleon* aProjectileNucleon;
438 while ( ( aProjectileNucleon = theProjectileNucleus->GetNextNucleon() ) ) { /* Loop checking, 10.08.2015, A.Ribon */
439 if ( aProjectileNucleon->AreYouHit() ) {
440 // Projectile nucleon was involved in the interaction.
443 }
444 }
445
446 #ifdef debugFTFmodel
447 G4cout << "NumberOfInvolvedNucleonsOfProjectile " << NumberOfInvolvedNucleonsOfProjectile
448 << G4endl << G4endl;
449 #endif
450 return;
451}
452
453
454//============================================================================
455
457 // Implementation of the reggeon theory inspired model
458
459 #ifdef debugReggeonCascade
460 G4cout << "G4FTFModel::ReggeonCascade -----------" << G4endl
461 << "theProjectile.GetTotalMomentum() " << theProjectile.GetTotalMomentum() << G4endl
462 << "theProjectile.GetTotalEnergy() " << theProjectile.GetTotalEnergy() << G4endl
463 << "ExcitationE/WN " << theParameters->GetExcitationEnergyPerWoundedNucleon() << G4endl;
464 #endif
465
467
468 // Reggeon cascading in target nucleus
469 for ( G4int InvTN = 0; InvTN < InitNINt; InvTN++ ) {
470 G4Nucleon* aTargetNucleon = TheInvolvedNucleonsOfTarget[ InvTN ];
471
472 G4double CreationTime = aTargetNucleon->GetSplitableHadron()->GetTimeOfCreation();
473
474 G4double XofWoundedNucleon = aTargetNucleon->GetPosition().x();
475 G4double YofWoundedNucleon = aTargetNucleon->GetPosition().y();
476
477 G4V3DNucleus* theTargetNucleus = GetTargetNucleus();
478 theTargetNucleus->StartLoop();
479
480 G4Nucleon* Neighbour(0);
481 while ( ( Neighbour = theTargetNucleus->GetNextNucleon() ) ) { /* Loop checking, 10.08.2015, A.Ribon */
482 if ( ! Neighbour->AreYouHit() ) {
483 G4double impact2 = sqr( XofWoundedNucleon - Neighbour->GetPosition().x() ) +
484 sqr( YofWoundedNucleon - Neighbour->GetPosition().y() );
485
488 ) {
489 // The neighbour nucleon is involved in the reggeon cascade
492
493 G4VSplitableHadron* targetSplitable;
494 targetSplitable = new G4DiffractiveSplitableHadron( *Neighbour );
495
496 Neighbour->Hit( targetSplitable );
497 targetSplitable->SetTimeOfCreation( CreationTime );
498 targetSplitable->SetStatus( 3 ); // 2->3
499 }
500 }
501 }
502 }
503
504 #ifdef debugReggeonCascade
505 G4cout << "Final NumberOfInvolvedNucleonsOfTarget "
507 #endif
508
509 if ( ! GetProjectileNucleus() ) return;
510
511 // Nucleus-Nucleus Interaction : Destruction of Projectile
513
514 //for ( G4int InvPN = 0; InvPN < NumberOfInvolvedNucleonsOfProjectile; InvPN++ ) {
515 for ( G4int InvPN = 0; InvPN < InitNINp; InvPN++ ) {
516 G4Nucleon* aProjectileNucleon = TheInvolvedNucleonsOfProjectile[ InvPN ];
517
518 G4double CreationTime = aProjectileNucleon->GetSplitableHadron()->GetTimeOfCreation();
519
520 G4double XofWoundedNucleon = aProjectileNucleon->GetPosition().x();
521 G4double YofWoundedNucleon = aProjectileNucleon->GetPosition().y();
522
523 G4V3DNucleus* theProjectileNucleus = GetProjectileNucleus();
524 theProjectileNucleus->StartLoop();
525
526 G4Nucleon* Neighbour( 0 );
527 while ( ( Neighbour = theProjectileNucleus->GetNextNucleon() ) ) { /* Loop checking, 10.08.2015, A.Ribon */
528 if ( ! Neighbour->AreYouHit() ) {
529 G4double impact2= sqr( XofWoundedNucleon - Neighbour->GetPosition().x() ) +
530 sqr( YofWoundedNucleon - Neighbour->GetPosition().y() );
531
534 ) {
535 // The neighbour nucleon is involved in the reggeon cascade
538
539 G4VSplitableHadron* projectileSplitable;
540 projectileSplitable = new G4DiffractiveSplitableHadron( *Neighbour );
541
542 Neighbour->Hit( projectileSplitable );
543 projectileSplitable->SetTimeOfCreation( CreationTime );
544 projectileSplitable->SetStatus( 3 );
545 }
546 }
547 }
548 }
549
550 #ifdef debugReggeonCascade
551 G4cout << "NumberOfInvolvedNucleonsOfProjectile "
553 #endif
554}
555
556
557//============================================================================
558
560
561 G4bool isProjectileNucleus = false;
562 if ( GetProjectileNucleus() ) isProjectileNucleus = true;
563
564 #ifdef debugPutOnMassShell
565 G4cout << "PutOnMassShell start " << G4endl;
566 if ( isProjectileNucleus ) {
567 G4cout << "PutOnMassShell for Nucleus_Nucleus " << G4endl;
568 }
569 #endif
570
572 if ( Pprojectile.z() < 0.0 ) return false;
573
574 G4bool isOk = true;
575
576 G4LorentzVector Ptarget( 0.0, 0.0, 0.0, 0.0 );
577 G4LorentzVector PtargetResidual( 0.0, 0.0, 0.0, 0.0 );
578 G4double SumMasses = 0.0;
579 G4V3DNucleus* theTargetNucleus = GetTargetNucleus();
580 G4double TargetResidualMass = 0.0;
581
582 #ifdef debugPutOnMassShell
583 G4cout << "Target : ";
584 #endif
585 isOk = ComputeNucleusProperties( theTargetNucleus, Ptarget, PtargetResidual, SumMasses,
586 TargetResidualExcitationEnergy, TargetResidualMass,
588 if ( ! isOk ) return false;
589
590 G4double Mprojectile = 0.0;
591 G4double M2projectile = 0.0;
592 G4LorentzVector Pproj( 0.0, 0.0, 0.0, 0.0 );
593 G4LorentzVector PprojResidual( 0.0, 0.0, 0.0, 0.0 );
594 G4V3DNucleus* thePrNucleus = GetProjectileNucleus();
595 G4double PrResidualMass = 0.0;
596
597 if ( ! isProjectileNucleus ) { // hadron-nucleus collision
598 Mprojectile = Pprojectile.mag();
599 M2projectile = Pprojectile.mag2();
600 SumMasses += Mprojectile + 20.0*MeV;
601 } else { // nucleus-nucleus or antinucleus-nucleus collision
602 #ifdef debugPutOnMassShell
603 G4cout << "Projectile : ";
604 #endif
605 isOk = ComputeNucleusProperties( thePrNucleus, Pproj, PprojResidual, SumMasses,
608 if ( ! isOk ) return false;
609 }
610
611 G4LorentzVector Psum = Pprojectile + Ptarget;
612 G4double SqrtS = Psum.mag();
613 G4double S = Psum.mag2();
614
615 #ifdef debugPutOnMassShell
616 G4cout << "Psum " << Psum/GeV << " GeV" << G4endl << "SqrtS " << SqrtS/GeV << " GeV" << G4endl
617 << "SumMasses, PrResidualMass and TargetResidualMass " << SumMasses/GeV << " "
618 << PrResidualMass/GeV << " " << TargetResidualMass/GeV << " GeV" << G4endl;
619 #endif
620
621 if ( SqrtS < SumMasses ) return false; // It is impossible to simulate after putting nuclear nucleons on mass-shell
622
623 // Try to consider also the excitation energy of the residual nucleus, if this is
624 // possible, with the available energy; otherwise, set the excitation energy to zero.
625 G4double savedSumMasses = SumMasses;
626 if ( isProjectileNucleus ) {
627 SumMasses -= std::sqrt( sqr( PrResidualMass ) + PprojResidual.perp2() );
628 SumMasses += std::sqrt( sqr( PrResidualMass + ProjectileResidualExcitationEnergy )
629 + PprojResidual.perp2() );
630 }
631 SumMasses -= std::sqrt( sqr( TargetResidualMass ) + PtargetResidual.perp2() );
632 SumMasses += std::sqrt( sqr( TargetResidualMass + TargetResidualExcitationEnergy )
633 + PtargetResidual.perp2() );
634
635 if ( SqrtS < SumMasses ) {
636 SumMasses = savedSumMasses;
637 if ( isProjectileNucleus ) ProjectileResidualExcitationEnergy = 0.0;
639 }
640
641 TargetResidualMass += TargetResidualExcitationEnergy;
642 if ( isProjectileNucleus ) PrResidualMass += ProjectileResidualExcitationEnergy;
643
644 #ifdef debugPutOnMassShell
645 if ( isProjectileNucleus ) {
646 G4cout << "PrResidualMass ProjResidualExcitationEnergy " << PrResidualMass/GeV << " "
648 }
649 G4cout << "TargetResidualMass TargetResidualExcitationEnergy " << TargetResidualMass/GeV << " "
651 << "Sum masses " << SumMasses/GeV << G4endl;
652 #endif
653
654 // Sampling of nucleons what can transfer to delta-isobars
655 if ( isProjectileNucleus && thePrNucleus->GetMassNumber() != 1 ) {
658 }
659 if ( theTargetNucleus->GetMassNumber() != 1 ) {
661 TheInvolvedNucleonsOfTarget, SumMasses );
662 }
663 if ( ! isOk ) return false;
664
665 // Now we know that it is kinematically possible to produce a final state made
666 // of the involved nucleons (or corresponding delta-isobars) and a residual nucleus.
667 // We have to sample the kinematical variables which will allow to define the 4-momenta
668 // of the final state. The sampled kinematical variables refer to the center-of-mass frame.
669 // Notice that the sampling of the transverse momentum corresponds to take into account
670 // Fermi motion.
671
672 G4LorentzRotation toCms( -1*Psum.boostVector() );
673 G4LorentzVector Ptmp = toCms*Pprojectile;
674 if ( Ptmp.pz() <= 0.0 ) return false; // "String" moving backwards in c.m.s., abort collision!
675
676 G4LorentzRotation toLab( toCms.inverse() );
677
678 G4double YprojectileNucleus = 0.0;
679 if ( isProjectileNucleus ) {
680 Ptmp = toCms*Pproj;
681 YprojectileNucleus = Ptmp.rapidity();
682 }
683 Ptmp = toCms*Ptarget;
684 G4double YtargetNucleus = Ptmp.rapidity();
685
686 // Ascribing of the involved nucleons Pt and Xminus
687 G4double DcorP = 0.0;
688 if ( isProjectileNucleus ) DcorP = theParameters->GetDofNuclearDestruction() / thePrNucleus->GetMassNumber();
689 G4double DcorT = theParameters->GetDofNuclearDestruction() / theTargetNucleus->GetMassNumber();
692
693 #ifdef debugPutOnMassShell
694 if ( isProjectileNucleus ) {
695 G4cout << "Y projectileNucleus " << YprojectileNucleus << G4endl;
696 }
697 G4cout << "Y targetNucleus " << YtargetNucleus << G4endl
699 << " DcorP DcorT " << DcorP << " " << DcorT << " AveragePt2 " << AveragePt2 << G4endl;
700 #endif
701
702 G4double M2proj = M2projectile; // Initialization needed only for hadron-nucleus collisions
703 G4double WplusProjectile = 0.0;
704 G4double M2target = 0.0;
705 G4double WminusTarget = 0.0;
706 G4int NumberOfTries = 0;
707 G4double ScaleFactor = 1.0;
708 G4bool OuterSuccess = true;
709
710 const G4int maxNumberOfLoops = 1000;
711 G4int loopCounter = 0;
712 do { // while ( ! OuterSuccess )
713 OuterSuccess = true;
714 const G4int maxNumberOfInnerLoops = 10000;
715 do { // while ( SqrtS < Mprojectile + std::sqrt( M2target ) )
716 NumberOfTries++;
717 if ( NumberOfTries == 100*(NumberOfTries/100) ) {
718 // After many tries, it is convenient to reduce the values of DcorP, DcorT and
719 // AveragePt2, so that the sampled momenta (respectively, pz, and pt) of the
720 // involved nucleons (or corresponding delta-isomers) are smaller, and therefore
721 // it is more likely to satisfy the momentum conservation.
722 ScaleFactor /= 2.0;
723 DcorP *= ScaleFactor;
724 DcorT *= ScaleFactor;
725 AveragePt2 *= ScaleFactor;
726 }
727 if ( isProjectileNucleus ) {
728 // Sampling of kinematical properties of projectile nucleons
729 isOk = SamplingNucleonKinematics( AveragePt2, maxPtSquare, DcorP,
730 thePrNucleus, PprojResidual,
731 PrResidualMass, ProjectileResidualMassNumber,
734 }
735 // Sampling of kinematical properties of target nucleons
736 isOk = isOk && SamplingNucleonKinematics( AveragePt2, maxPtSquare, DcorT,
737 theTargetNucleus, PtargetResidual,
738 TargetResidualMass, TargetResidualMassNumber,
740 TheInvolvedNucleonsOfTarget, M2target );
741 #ifdef debugPutOnMassShell
742 G4cout << "SqrtS, Mp+Mt, Mp, Mt " << SqrtS/GeV << " "
743 << ( std::sqrt( M2proj ) + std::sqrt( M2target) )/GeV << " "
744 << std::sqrt( M2proj )/GeV << " " << std::sqrt( M2target )/GeV << G4endl;
745 #endif
746 if ( ! isOk ) return false;
747 } while ( ( SqrtS < std::sqrt( M2proj ) + std::sqrt( M2target ) ) &&
748 NumberOfTries < maxNumberOfInnerLoops ); /* Loop checking, 10.08.2015, A.Ribon */
749 if ( NumberOfTries >= maxNumberOfInnerLoops ) {
750 #ifdef debugPutOnMassShell
751 G4cout << "BAD situation: forced exit of the inner while loop!" << G4endl;
752 #endif
753 return false;
754 }
755 if ( isProjectileNucleus ) {
756 isOk = CheckKinematics( S, SqrtS, M2proj, M2target, YprojectileNucleus, true,
759 WminusTarget, WplusProjectile, OuterSuccess );
760 }
761 isOk = isOk && CheckKinematics( S, SqrtS, M2proj, M2target, YtargetNucleus, false,
763 WminusTarget, WplusProjectile, OuterSuccess );
764 if ( ! isOk ) return false;
765 } while ( ( ! OuterSuccess ) &&
766 ++loopCounter < maxNumberOfLoops ); /* Loop checking, 10.08.2015, A.Ribon */
767 if ( loopCounter >= maxNumberOfLoops ) {
768 #ifdef debugPutOnMassShell
769 G4cout << "BAD situation: forced exit of the while loop!" << G4endl;
770 #endif
771 return false;
772 }
773
774 // Now the sampling is completed, and we can determine the kinematics of the
775 // whole system. This is done first in the center-of-mass frame, and then it is boosted
776 // to the lab frame. The transverse momentum of the residual nucleus is determined as
777 // the recoil of each hadron (nucleon or delta) which is emitted, i.e. in such a way
778 // to conserve (by construction) the transverse momentum.
779
780 if ( ! isProjectileNucleus ) { // hadron-nucleus collision
781
782 G4double Pzprojectile = WplusProjectile/2.0 - M2projectile/2.0/WplusProjectile;
783 G4double Eprojectile = WplusProjectile/2.0 + M2projectile/2.0/WplusProjectile;
784 Pprojectile.setPz( Pzprojectile );
785 Pprojectile.setE( Eprojectile );
786
787 #ifdef debugPutOnMassShell
788 G4cout << "Proj after in CMS " << Pprojectile << G4endl;
789 #endif
790
791 Pprojectile.transform( toLab );
792 theProjectile.SetMomentum( Pprojectile.vect() );
793 theProjectile.SetTotalEnergy( Pprojectile.e() );
794
798 primary->Set4Momentum( Pprojectile );
799
800 #ifdef debugPutOnMassShell
801 G4cout << "Final proj. mom in Lab. " << primary->Get4Momentum() << G4endl;
802 #endif
803
804 } else { // nucleus-nucleus or antinucleus-nucleus collision
805
806 isOk = FinalizeKinematics( WplusProjectile, true, toLab, PrResidualMass,
809
810 #ifdef debugPutOnMassShell
811 G4cout << "Projectile Residual4Momentum in CMS " << ProjectileResidual4Momentum << G4endl;
812 #endif
813
814 if ( ! isOk ) return false;
815
817
818 #ifdef debugPutOnMassShell
819 G4cout << "Projectile Residual4Momentum in Lab " << ProjectileResidual4Momentum << G4endl;
820 #endif
821
822 }
823
824 isOk = FinalizeKinematics( WminusTarget, false, toLab, TargetResidualMass,
827
828 #ifdef debugPutOnMassShell
829 G4cout << "Target Residual4Momentum in CMS " << TargetResidual4Momentum << G4endl;
830 #endif
831
832 if ( ! isOk ) return false;
833
835
836 #ifdef debugPutOnMassShell
837 G4cout << "Target Residual4Momentum in Lab " << TargetResidual4Momentum << G4endl;
838 #endif
839
840 return true;
841
842}
843
844
845//============================================================================
846
848
849 #ifdef debugBuildString
850 G4cout << "G4FTFModel::ExciteParticipants() " << G4endl;
851 #endif
852
853 G4bool Success( false );
854 G4int MaxNumOfInelCollisions = G4int( theParameters->GetMaxNumberOfCollisions() );
855 if ( MaxNumOfInelCollisions > 0 ) { // Plab > Pbound, normal application of FTF is possible
856 G4double ProbMaxNumber = theParameters->GetMaxNumberOfCollisions() - MaxNumOfInelCollisions;
857 if ( G4UniformRand() < ProbMaxNumber ) MaxNumOfInelCollisions++;
858 } else {
859 // Plab < Pbound, normal application of FTF is impossible,low energy corrections applied
860 MaxNumOfInelCollisions = 1;
861 }
862
863 #ifdef debugBuildString
864 G4cout << "MaxNumOfInelCollisions per hadron/nucleon " << MaxNumOfInelCollisions << G4endl;
865 #endif
866
867 G4int CurrentInteraction( 0 );
869
870 G4bool InnerSuccess( true );
871 while ( theParticipants.Next() ) { /* Loop checking, 10.08.2015, A.Ribon */
872 CurrentInteraction++;
874 G4VSplitableHadron* projectile = collision.GetProjectile();
875 G4Nucleon* ProjectileNucleon = collision.GetProjectileNucleon();
876 G4VSplitableHadron* target = collision.GetTarget();
877 G4Nucleon* TargetNucleon = collision.GetTargetNucleon();
878
879 #ifdef debugBuildString
880 G4cout << G4endl << "Interaction # Status " << CurrentInteraction << " "
881 << collision.GetStatus() << G4endl << "Pr* Tr* " << projectile << " "
882 << target << G4endl << "projectile->GetStatus target->GetStatus "
883 << projectile->GetStatus() << " " << target->GetStatus() << G4endl
884 << "projectile->GetSoftC target->GetSoftC " << projectile->GetSoftCollisionCount()
885 << " " << target->GetSoftCollisionCount() << G4endl;
886 #endif
887
888 if ( collision.GetStatus() ) {
890 // Elastic scattering
891
892 #ifdef debugBuildString
893 G4cout << "Elastic scattering" << G4endl;
894 #endif
895
896 if ( ! HighEnergyInter ) {
897 G4bool Annihilation = false;
898 G4bool Result = AdjustNucleons( projectile, ProjectileNucleon, target,
899 TargetNucleon, Annihilation );
900 if ( ! Result ) continue;
901 }
902 InnerSuccess = theElastic->ElasticScattering( projectile, target, theParameters );
904 // Inelastic scattering
905
906 #ifdef debugBuildString
907 G4cout << "Inelastic interaction" << G4endl
908 << "MaxNumOfInelCollisions per hadron/nucleon " << MaxNumOfInelCollisions << G4endl;
909 #endif
910
911 if ( ! HighEnergyInter ) {
912 G4bool Annihilation = false;
913 G4bool Result = AdjustNucleons( projectile, ProjectileNucleon, target,
914 TargetNucleon, Annihilation );
915 if ( ! Result ) continue;
916 }
917 if ( G4UniformRand() <
918 ( 1.0 - target->GetSoftCollisionCount() / MaxNumOfInelCollisions ) *
919 ( 1.0 - projectile->GetSoftCollisionCount() / MaxNumOfInelCollisions ) ) {
920 //if ( ! HighEnergyInter ) {
921 // G4bool Annihilation = false;
922 // G4bool Result = AdjustNucleons( projectile, ProjectileNucleon, target,
923 // TargetNucleon, Annihilation );
924 // if ( ! Result ) continue;
925 //}
926 if ( theExcitation->ExciteParticipants( projectile, target, theParameters, theElastic ) ) {
927 InnerSuccess = true;
929 #ifdef debugBuildString
930 G4cout << "FTF excitation Successfull " << G4endl;
931 // G4cout << "After pro " << projectile->Get4Momentum() << " "
932 // << projectile->Get4Momentum().mag() << G4endl
933 // << "After tar " << target->Get4Momentum() << " "
934 // << target->Get4Momentum().mag() << G4endl;
935 #endif
936 } else {
937 InnerSuccess = theElastic->ElasticScattering( projectile, target, theParameters );
938 #ifdef debugBuildString
939 G4cout << "FTF excitation Non InnerSuccess of Elastic scattering "
940 << InnerSuccess << G4endl;
941 #endif
942 }
943 } else { // The inelastic interactition was rejected -> elastic scattering
944 #ifdef debugBuildString
945 G4cout << "Elastic scat. at rejection inelastic scattering" << G4endl;
946 #endif
947 //if ( ! HighEnergyInter ) {
948 // G4bool Annihilation = false;
949 // G4bool Result = AdjustNucleons( projectile, ProjectileNucleon, target,
950 // TargetNucleon, Annihilation );
951 // if ( ! Result) continue;
952 //}
953 InnerSuccess = theElastic->ElasticScattering( projectile, target, theParameters );
954 }
955 } else { // Annihilation
956
957 #ifdef debugBuildString
958 G4cout << "Annihilation" << G4endl;
959 #endif
960
962
963 // Skipping possible interactions of the annihilated nucleons
964 while ( theParticipants.Next() ) { /* Loop checking, 10.08.2015, A.Ribon */
966 G4VSplitableHadron* NextProjectileNucleon = acollision.GetProjectile();
967 G4VSplitableHadron* NextTargetNucleon = acollision.GetTarget();
968 if ( projectile == NextProjectileNucleon || target == NextTargetNucleon ) {
969 acollision.SetStatus( 0 );
970 }
971 }
972
973 // Return to the annihilation
975 for ( G4int I = 0; I < CurrentInteraction; ++I ) theParticipants.Next();
976
977 // At last, annihilation
978 if ( ! HighEnergyInter ) {
979 G4bool Annihilation = true;
980 G4bool Result = AdjustNucleons( projectile, ProjectileNucleon, target,
981 TargetNucleon, Annihilation );
982 if ( ! Result ) continue;
983 }
984 G4VSplitableHadron* AdditionalString = 0;
985 if ( theAnnihilation->Annihilate( projectile, target, AdditionalString, theParameters ) ) {
986 InnerSuccess = true;
987 #ifdef debugBuildString
988 G4cout << "Annihilation successfull. " << "*AdditionalString "
989 << AdditionalString << G4endl;
990 //G4cout << "After pro " << projectile->Get4Momentum() << G4endl;
991 //G4cout << "After tar " << target->Get4Momentum() << G4endl;
992 #endif
993
994 if ( AdditionalString != 0 ) theAdditionalString.push_back( AdditionalString );
995
996 /*
997 if ( target->GetStatus() == 4 ) {
998 // Skipping possible interactions of the annihilated nucleons
999 while ( theParticipants.Next() ) {
1000 G4InteractionContent& acollision = theParticipants.GetInteraction();
1001 G4VSplitableHadron* NextProjectileNucleon = acollision.GetProjectile();
1002 G4VSplitableHadron* NextTargetNucleon = acollision.GetTarget();
1003 if ( target == NextTargetNucleon ) { acollision.SetStatus( 0 ); }
1004 }
1005 }
1006 theParticipants.StartLoop();
1007 for ( G4int I = 0; I < CurrentInteraction; ++I ) theParticipants.Next();
1008 */
1009
1010 }
1011 }
1012 }
1013
1014 if( InnerSuccess ) Success = true;
1015
1016 #ifdef debugBuildString
1017 G4cout << "----------------------------- Final properties " << G4endl
1018 << "projectile->GetStatus target->GetStatus " << projectile->GetStatus()
1019 << " " << target->GetStatus() << G4endl << "projectile->GetSoftC target->GetSoftC "
1020 << projectile->GetSoftCollisionCount() << " " << target->GetSoftCollisionCount()
1021 << G4endl << "ExciteParticipants() Success? " << Success << G4endl;
1022 #endif
1023
1024 } // end of while ( theParticipants.Next() )
1025
1026 return Success;
1027}
1028
1029
1030//============================================================================
1031
1033 G4Nucleon* ProjectileNucleon,
1034 G4VSplitableHadron* SelectedTargetNucleon,
1035 G4Nucleon* TargetNucleon,
1036 G4bool Annihilation ) {
1037
1038 #ifdef debugAdjust
1039 G4cout << "AdjustNucleons ---------------------------------------" << G4endl
1040 << "Proj is nucleus? " << GetProjectileNucleus() << G4endl
1041 << "Proj 4mom " << SelectedAntiBaryon->Get4Momentum() << G4endl
1042 << "Targ 4mom " << SelectedTargetNucleon->Get4Momentum() << G4endl
1043 << "Pr ResidualMassNumber Pr ResidualCharge Pr ResidualExcitationEnergy "
1046 << "Tr ResidualMassNumber Tr ResidualCharge Tr ResidualExcitationEnergy "
1049 << "Collis. pr tr " << SelectedAntiBaryon->GetSoftCollisionCount()
1050 << SelectedTargetNucleon->GetSoftCollisionCount() << G4endl;
1051 #endif
1052
1053 if ( SelectedAntiBaryon->GetSoftCollisionCount() != 0 &&
1054 SelectedTargetNucleon->GetSoftCollisionCount() != 0 ) {
1055 return true; // Selected hadrons were adjusted before.
1056 }
1057
1058 G4int interactionCase = 0;
1059 if ( ( ! GetProjectileNucleus() &&
1060 SelectedAntiBaryon->GetSoftCollisionCount() == 0 &&
1061 SelectedTargetNucleon->GetSoftCollisionCount() == 0 )
1062 ||
1063 ( SelectedAntiBaryon->GetSoftCollisionCount() != 0 &&
1064 SelectedTargetNucleon->GetSoftCollisionCount() == 0 ) ) {
1065 // The case of hadron-nucleus interactions, or
1066 // the case when projectile nuclear nucleon participated in
1067 // a collision, but target nucleon did not participate.
1068 interactionCase = 1;
1069 #ifdef debugAdjust
1070 G4cout << "case 1, hA prcol=0 trcol=0, AA prcol#0 trcol=0" << G4endl;
1071 #endif
1072 if ( TargetResidualMassNumber < 1 ) {
1073 return false;
1074 }
1075 if ( SelectedAntiBaryon->Get4Momentum().rapidity() < TargetResidual4Momentum.rapidity() ) {
1076 return false;
1077 }
1078 if ( TargetResidualMassNumber == 1 ) {
1082 SelectedTargetNucleon->Set4Momentum( TargetResidual4Momentum );
1083 TargetResidual4Momentum = G4LorentzVector( 0.0, 0.0, 0.0, 0.0 );
1084 return true;
1085 }
1086 } else if ( SelectedAntiBaryon->GetSoftCollisionCount() == 0 &&
1087 SelectedTargetNucleon->GetSoftCollisionCount() != 0 ) {
1088 // It is assumed that in the case there is ProjectileResidualNucleus
1089 interactionCase = 2;
1090 #ifdef debugAdjust
1091 G4cout << "case 2, prcol=0 trcol#0" << G4endl;
1092 #endif
1093 if ( ProjectileResidualMassNumber < 1 ) {
1094 return false;
1095 }
1097 SelectedTargetNucleon->Get4Momentum().rapidity() ) {
1098 return false;
1099 }
1100 if ( ProjectileResidualMassNumber == 1 ) {
1104 SelectedAntiBaryon->Set4Momentum( ProjectileResidual4Momentum );
1105 ProjectileResidual4Momentum = G4LorentzVector( 0.0, 0.0, 0.0, 0.0 );
1106 return true;
1107 }
1108 } else { // It has to be a nucleus-nucleus interaction
1109 interactionCase = 3;
1110 #ifdef debugAdjust
1111 G4cout << "case 3, prcol=0 trcol=0" << G4endl;
1112 #endif
1113 if ( ! GetProjectileNucleus() ) {
1114 return false;
1115 }
1116 #ifdef debugAdjust
1117 G4cout << "Proj res Init " << ProjectileResidual4Momentum << G4endl
1118 << "Targ res Init " << TargetResidual4Momentum << G4endl
1119 << "ProjectileResidualMassNumber ProjectileResidualCharge (ProjectileResidualLambdaNumber)"
1121 << " (" << ProjectileResidualLambdaNumber << ") " << G4endl
1122 << "TargetResidualMassNumber TargetResidualCharge " << TargetResidualMassNumber
1123 << " " << TargetResidualCharge << G4endl;
1124 #endif
1125 }
1126
1128 G4int returnCode = AdjustNucleonsAlgorithm_beforeSampling( interactionCase, SelectedAntiBaryon,
1129 ProjectileNucleon, SelectedTargetNucleon,
1130 TargetNucleon, Annihilation, common );
1131 G4bool returnResult = false;
1132 if ( returnCode == 0 ) {
1133 returnResult = true; // Successfully ended: no need of extra work
1134 } else if ( returnCode == 1 ) {
1135 // The part before sampling has been successfully completed: now try the sampling
1136 returnResult = AdjustNucleonsAlgorithm_Sampling( interactionCase, common );
1137 if ( returnResult ) { // The sampling has completed successfully: do the last part
1138 AdjustNucleonsAlgorithm_afterSampling( interactionCase, SelectedAntiBaryon,
1139 SelectedTargetNucleon, common );
1140 }
1141 }
1142
1143 return returnResult;
1144}
1145
1146//-------------------------------------------------------------------
1147
1149 G4VSplitableHadron* SelectedAntiBaryon,
1150 G4Nucleon* ProjectileNucleon,
1151 G4VSplitableHadron* SelectedTargetNucleon,
1152 G4Nucleon* TargetNucleon,
1153 G4bool Annihilation,
1155 // First of the three utility methods used only by AdjustNucleons: prepare for sampling.
1156 // This method returns an integer code - instead of a boolean, with the following meaning:
1157 // "0" : successfully ended and nothing else needs to be done (i.e. no sampling);
1158 // "1" : successfully completed, but the work needs to be continued, i.e. try to sample;
1159 // "99" : unsuccessfully ended, nothing else can be done.
1160 G4int returnCode = 99;
1161
1162 G4double ExcitationEnergyPerWoundedNucleon = theParameters->GetExcitationEnergyPerWoundedNucleon();
1163
1164 // some checks and initializations
1165 if ( interactionCase == 1 ) {
1166 common.Psum = SelectedAntiBaryon->Get4Momentum() + TargetResidual4Momentum;
1167 #ifdef debugAdjust
1168 G4cout << "Targ res Init " << TargetResidual4Momentum << G4endl;
1169 #endif
1170 common.Pprojectile = SelectedAntiBaryon->Get4Momentum();
1171 } else if ( interactionCase == 2 ) {
1172 common.Psum = ProjectileResidual4Momentum + SelectedTargetNucleon->Get4Momentum();
1173 common.Pprojectile = ProjectileResidual4Momentum;
1174 } else if ( interactionCase == 3 ) {
1176 common.Pprojectile = ProjectileResidual4Momentum;
1177 }
1178
1179 // transform momenta to cms and then rotate parallel to z axis
1180 common.toCms = G4LorentzRotation( -1*common.Psum.boostVector() );
1181 common.Ptmp = common.toCms * common.Pprojectile;
1182 common.toCms.rotateZ( -1*common.Ptmp.phi() );
1183 common.toCms.rotateY( -1*common.Ptmp.theta() );
1184 common.Pprojectile.transform( common.toCms );
1185 common.toLab = common.toCms.inverse();
1186 common.SqrtS = common.Psum.mag();
1187 common.S = sqr( common.SqrtS );
1188
1189 // get properties of the target residual and/or projectile residual
1190 G4bool Stopping = false;
1191 if ( interactionCase == 1 ) {
1192 common.TResidualMassNumber = TargetResidualMassNumber - 1;
1193 common.TResidualCharge = TargetResidualCharge
1194 - G4int( TargetNucleon->GetDefinition()->GetPDGCharge() );
1195 common.TResidualExcitationEnergy = TargetResidualExcitationEnergy
1196 - ExcitationEnergyPerWoundedNucleon*G4Log( G4UniformRand() );
1197 if ( common.TResidualMassNumber <= 1 ) {
1198 common.TResidualExcitationEnergy = 0.0;
1199 }
1200 if ( common.TResidualMassNumber != 0 ) {
1202 ->GetIonMass( common.TResidualCharge, common.TResidualMassNumber );
1203 }
1204 common.TNucleonMass = TargetNucleon->GetDefinition()->GetPDGMass();
1205 common.SumMasses = SelectedAntiBaryon->Get4Momentum().mag() + common.TNucleonMass
1206 + common.TResidualMass;
1207 #ifdef debugAdjust
1208 G4cout << "Annihilation " << Annihilation << G4endl;
1209 #endif
1210 } else if ( interactionCase == 2 ) {
1211 common.Ptarget = common.toCms * SelectedTargetNucleon->Get4Momentum();
1212 common.TResidualMassNumber = ProjectileResidualMassNumber - 1;
1213 common.TResidualCharge = ProjectileResidualCharge
1214 - std::abs( G4int(ProjectileNucleon->GetDefinition()->GetPDGCharge()) );
1215 common.TResidualExcitationEnergy = ProjectileResidualExcitationEnergy
1216 - ExcitationEnergyPerWoundedNucleon*G4Log( G4UniformRand() );
1217 if ( common.TResidualMassNumber <= 1 ) {
1218 common.TResidualExcitationEnergy = 0.0;
1219 }
1220 if ( common.TResidualMassNumber != 0 ) {
1222 ->GetIonMass( common.TResidualCharge, common.TResidualMassNumber );
1223 }
1224 common.TNucleonMass = ProjectileNucleon->GetDefinition()->GetPDGMass();
1225 common.SumMasses = SelectedTargetNucleon->Get4Momentum().mag() + common.TNucleonMass
1226 + common.TResidualMass;
1227 #ifdef debugAdjust
1228 G4cout << "SelectedTN.mag() PNMass + PResidualMass "
1229 << SelectedTargetNucleon->Get4Momentum().mag() << " "
1230 << common.TNucleonMass << " " << common.TResidualMass << G4endl;
1231 #endif
1232 } else if ( interactionCase == 3 ) {
1233 common.Ptarget = common.toCms * TargetResidual4Momentum;
1234 common.PResidualMassNumber = ProjectileResidualMassNumber - 1;
1235 common.PResidualCharge = ProjectileResidualCharge
1236 - std::abs( G4int(ProjectileNucleon->GetDefinition()->GetPDGCharge()) );
1237 common.PResidualLambdaNumber = ProjectileResidualLambdaNumber;
1238 if ( ProjectileNucleon->GetDefinition() == G4Lambda::Definition() ||
1239 ProjectileNucleon->GetDefinition() == G4AntiLambda::Definition() ) {
1240 --common.PResidualLambdaNumber;
1241 }
1242 common.PResidualExcitationEnergy = ProjectileResidualExcitationEnergy
1243 - ExcitationEnergyPerWoundedNucleon*G4Log( G4UniformRand() );
1244 if ( common.PResidualMassNumber <= 1 ) {
1245 common.PResidualExcitationEnergy = 0.0;
1246 }
1247 if ( common.PResidualMassNumber != 0 ) {
1248 if ( common.PResidualLambdaNumber > 0 ) {
1249 common.PResidualMass = G4HyperNucleiProperties::GetNuclearMass( common.PResidualMassNumber,
1250 common.PResidualCharge,
1251 common.PResidualLambdaNumber );
1252 } else {
1254 ->GetIonMass( common.PResidualCharge, common.PResidualMassNumber );
1255 }
1256 }
1257 common.PNucleonMass = ProjectileNucleon->GetDefinition()->GetPDGMass(); // On-shell (anti-)nucleon mass
1258 common.TResidualMassNumber = TargetResidualMassNumber - 1;
1259 common.TResidualCharge = TargetResidualCharge
1260 - G4int( TargetNucleon->GetDefinition()->GetPDGCharge() );
1261 common.TResidualExcitationEnergy = TargetResidualExcitationEnergy
1262 - ExcitationEnergyPerWoundedNucleon*G4Log( G4UniformRand() );
1263 if ( common.TResidualMassNumber <= 1 ) {
1264 common.TResidualExcitationEnergy = 0.0;
1265 }
1266 if ( common.TResidualMassNumber != 0 ) {
1268 ->GetIonMass( common.TResidualCharge, common.TResidualMassNumber );
1269 }
1270 common.TNucleonMass = TargetNucleon->GetDefinition()->GetPDGMass(); // On-shell nucleon mass
1271 common.SumMasses = common.PNucleonMass + common.PResidualMass + common.TNucleonMass
1272 + common.TResidualMass;
1273 #ifdef debugAdjust
1274 G4cout << "PNucleonMass PResidualMass TNucleonMass TResidualMass " << common.PNucleonMass
1275 << " " << common.PResidualMass << " " << common.TNucleonMass << " "
1276 << common.TResidualMass << G4endl
1277 << "PResidualExcitationEnergy " << common.PResidualExcitationEnergy << G4endl
1278 << "TResidualExcitationEnergy " << common.TResidualExcitationEnergy << G4endl;
1279 #endif
1280 } // End-if on interactionCase
1281
1282 if ( ! Annihilation ) {
1283 if ( common.SqrtS < common.SumMasses ) {
1284 #ifdef debugAdjust
1285 G4cout << "SqrtS < SumMasses " << common.SqrtS << " " << common.SumMasses << G4endl;
1286 #endif
1287 return returnCode; // Unsuccessfully ended, nothing else can be done
1288 }
1289 if ( interactionCase == 1 || interactionCase == 2 ) {
1290 if ( common.SqrtS < common.SumMasses + common.TResidualExcitationEnergy ) {
1291 #ifdef debugAdjust
1292 G4cout << "TResidualExcitationEnergy : before " << common.TResidualExcitationEnergy << G4endl;
1293 #endif
1294 common.TResidualExcitationEnergy = common.SqrtS - common.SumMasses;
1295 #ifdef debugAdjust
1296 G4cout << "TResidualExcitationEnergy : after " << common.TResidualExcitationEnergy << G4endl;
1297 #endif
1298 Stopping = true;
1299 return returnCode; // unsuccessfully ended, nothing else can be done
1300 }
1301 } else if ( interactionCase == 3 ) {
1302 #ifdef debugAdjust
1303 G4cout << "SqrtS < SumMasses + PResidualExcitationEnergy + TResidualExcitationEnergy "
1304 << common.SqrtS << " " << common.SumMasses + common.PResidualExcitationEnergy + common.TResidualExcitationEnergy
1305 << G4endl;
1306 #endif
1307 if ( common.SqrtS < common.SumMasses + common.PResidualExcitationEnergy
1308 + common.TResidualExcitationEnergy ) {
1309 Stopping = true;
1310 if ( common.PResidualExcitationEnergy <= 0.0 ) {
1311 common.TResidualExcitationEnergy = common.SqrtS - common.SumMasses;
1312 } else if ( common.TResidualExcitationEnergy <= 0.0 ) {
1313 common.PResidualExcitationEnergy = common.SqrtS - common.SumMasses;
1314 } else {
1315 G4double Fraction = ( common.SqrtS - common.SumMasses )
1316 / ( common.PResidualExcitationEnergy + common.TResidualExcitationEnergy );
1317 common.PResidualExcitationEnergy *= Fraction;
1318 common.TResidualExcitationEnergy *= Fraction;
1319 }
1320 }
1321 }
1322 } // End-if on ! Annihilation
1323
1324 if ( Annihilation ) {
1325 #ifdef debugAdjust
1326 G4cout << "SqrtS < SumMasses - TNucleonMass " << common.SqrtS << " "
1327 << common.SumMasses - common.TNucleonMass << G4endl;
1328 #endif
1329 if ( common.SqrtS < common.SumMasses - common.TNucleonMass ) {
1330 return returnCode; // unsuccessfully ended, nothing else can be done
1331 }
1332 #ifdef debugAdjust
1333 G4cout << "SqrtS < SumMasses " << common.SqrtS << " " << common.SumMasses << G4endl;
1334 #endif
1335 if ( common.SqrtS < common.SumMasses ) {
1336 if ( interactionCase == 2 || interactionCase == 3 ) {
1337 common.TResidualExcitationEnergy = 0.0;
1338 }
1339 common.TNucleonMass = common.SqrtS - ( common.SumMasses - common.TNucleonMass )
1340 - common.TResidualExcitationEnergy; // Off-shell nucleon mass
1341 #ifdef debugAdjust
1342 G4cout << "TNucleonMass " << common.TNucleonMass << G4endl;
1343 #endif
1344 common.SumMasses = common.SqrtS - common.TResidualExcitationEnergy;
1345 Stopping = true;
1346 #ifdef debugAdjust
1347 G4cout << "SqrtS < SumMasses " << common.SqrtS << " " << common.SumMasses << G4endl;
1348 #endif
1349 }
1350 if ( interactionCase == 1 || interactionCase == 2 ) {
1351 if ( common.SqrtS < common.SumMasses + common.TResidualExcitationEnergy ) {
1352 common.TResidualExcitationEnergy = common.SqrtS - common.SumMasses;
1353 Stopping = true;
1354 }
1355 } else if ( interactionCase == 3 ) {
1356 if ( common.SqrtS < common.SumMasses + common.PResidualExcitationEnergy
1357 + common.TResidualExcitationEnergy ) {
1358 Stopping = true;
1359 if ( common.PResidualExcitationEnergy <= 0.0 ) {
1360 common.TResidualExcitationEnergy = common.SqrtS - common.SumMasses;
1361 } else if ( common.TResidualExcitationEnergy <= 0.0 ) {
1362 common.PResidualExcitationEnergy = common.SqrtS - common.SumMasses;
1363 } else {
1364 G4double Fraction = ( common.SqrtS - common.SumMasses ) /
1365 ( common.PResidualExcitationEnergy + common.TResidualExcitationEnergy );
1366 common.PResidualExcitationEnergy *= Fraction;
1367 common.TResidualExcitationEnergy *= Fraction;
1368 }
1369 }
1370 }
1371 } // End-if on Annihilation
1372
1373 #ifdef debugAdjust
1374 G4cout << "Stopping " << Stopping << G4endl;
1375 #endif
1376
1377 if ( Stopping ) {
1378 // All 3-momenta of particles = 0
1379 common.Ptmp.setPx( 0.0 ); common.Ptmp.setPy( 0.0 ); common.Ptmp.setPz( 0.0 );
1380 // New projectile
1381 if ( interactionCase == 1 ) {
1382 common.Ptmp.setE( SelectedAntiBaryon->Get4Momentum().mag() );
1383 } else if ( interactionCase == 2 ) {
1384 common.Ptmp.setE( common.TNucleonMass );
1385 } else if ( interactionCase == 3 ) {
1386 common.Ptmp.setE( common.PNucleonMass );
1387 }
1388 #ifdef debugAdjust
1389 G4cout << "Proj stop " << common.Ptmp << G4endl;
1390 #endif
1391 common.Pprojectile = common.Ptmp;
1392 common.Pprojectile.transform( common.toLab ); // From center-of-mass to Lab frame
1393 //---AR-Jul2019 : To avoid unphysical projectile (anti-)fragments at rest, save the
1394 // original momentum of the anti-baryon in the center-of-mass frame.
1395 G4LorentzVector saveSelectedAntiBaryon4Momentum = SelectedAntiBaryon->Get4Momentum();
1396 saveSelectedAntiBaryon4Momentum.transform( common.toCms ); // From Lab to center-of-mass frame
1397 //---
1398 SelectedAntiBaryon->Set4Momentum( common.Pprojectile );
1399 // New target nucleon
1400 if ( interactionCase == 1 || interactionCase == 3 ) {
1401 common.Ptmp.setE( common.TNucleonMass );
1402 } else if ( interactionCase == 2 ) {
1403 common.Ptmp.setE( SelectedTargetNucleon->Get4Momentum().mag() );
1404 }
1405 #ifdef debugAdjust
1406 G4cout << "Targ stop " << common.Ptmp << G4endl;
1407 #endif
1408 common.Ptarget = common.Ptmp;
1409 common.Ptarget.transform( common.toLab ); // From center-of-mass to Lab frame
1410 //---AR-Jul2019 : To avoid unphysical target fragments at rest, save the original
1411 // momentum of the target nucleon in the center-of-mass frame.
1412 G4LorentzVector saveSelectedTargetNucleon4Momentum = SelectedTargetNucleon->Get4Momentum();
1413 saveSelectedTargetNucleon4Momentum.transform( common.toCms ); // From Lab to center-of-mass frame
1414 //---
1415 SelectedTargetNucleon->Set4Momentum( common.Ptarget );
1416 // New target residual
1417 if ( interactionCase == 1 || interactionCase == 3 ) {
1418 common.Ptmp.setPx( 0.0 ); common.Ptmp.setPy( 0.0 ); common.Ptmp.setPz( 0.0 );
1419 TargetResidualMassNumber = common.TResidualMassNumber;
1420 TargetResidualCharge = common.TResidualCharge;
1421 TargetResidualExcitationEnergy = common.TResidualExcitationEnergy;
1422 //---AR-Jul2019 : To avoid unphysical target fragments at rest, use the saved
1423 // original momentum of the target nucleon (instead of setting 0).
1424 // This is a rough and simple approach!
1425 //common.Ptmp.setE( common.TResidualMass + TargetResidualExcitationEnergy );
1426 common.Ptmp.setPx( -saveSelectedTargetNucleon4Momentum.x() );
1427 common.Ptmp.setPy( -saveSelectedTargetNucleon4Momentum.y() );
1428 common.Ptmp.setPz( -saveSelectedTargetNucleon4Momentum.z() );
1429 common.Ptmp.setE( std::sqrt( sqr( common.TResidualMass + TargetResidualExcitationEnergy ) + common.Ptmp.vect().mag2() ) );
1430 //---
1431 #ifdef debugAdjust
1432 G4cout << "Targ Resi stop " << common.Ptmp << G4endl;
1433 #endif
1434 common.Ptmp.transform( common.toLab ); // From center-of-mass to Lab frame
1436 }
1437 // New projectile residual
1438 if ( interactionCase == 2 || interactionCase == 3 ) {
1439 common.Ptmp.setPx( 0.0 ); common.Ptmp.setPy( 0.0 ); common.Ptmp.setPz( 0.0 );
1440 if ( interactionCase == 2 ) {
1441 ProjectileResidualMassNumber = common.TResidualMassNumber;
1442 ProjectileResidualCharge = common.TResidualCharge;
1443 ProjectileResidualLambdaNumber = 0; // The target nucleus and its residual are never hypernuclei
1444 ProjectileResidualExcitationEnergy = common.TResidualExcitationEnergy;
1445 common.Ptmp.setE( common.TResidualMass + ProjectileResidualExcitationEnergy );
1446 } else {
1447 ProjectileResidualMassNumber = common.PResidualMassNumber;
1448 ProjectileResidualCharge = common.PResidualCharge;
1449 ProjectileResidualLambdaNumber = common.PResidualLambdaNumber;
1450 ProjectileResidualExcitationEnergy = common.PResidualExcitationEnergy;
1451 //---AR-Jul2019 : To avoid unphysical projectile (anti-)fragments at rest, use the
1452 // saved original momentum of the anti-baryon (instead of setting 0).
1453 // This is a rough and simple approach!
1454 //common.Ptmp.setE( common.PResidualMass + ProjectileResidualExcitationEnergy );
1455 common.Ptmp.setPx( -saveSelectedAntiBaryon4Momentum.x() );
1456 common.Ptmp.setPy( -saveSelectedAntiBaryon4Momentum.y() );
1457 common.Ptmp.setPz( -saveSelectedAntiBaryon4Momentum.z() );
1458 common.Ptmp.setE( std::sqrt( sqr( common.PResidualMass + ProjectileResidualExcitationEnergy ) + common.Ptmp.vect().mag2() ) );
1459 //---
1460 }
1461 #ifdef debugAdjust
1462 G4cout << "Proj Resi stop " << common.Ptmp << G4endl;
1463 #endif
1464 common.Ptmp.transform( common.toLab ); // From center-of-mass to Lab frame
1466 }
1467 return returnCode = 0; // successfully ended and nothing else needs to be done (i.e. no sampling)
1468 } // End-if on Stopping
1469
1470 // Initializations before sampling
1471 if ( interactionCase == 1 ) {
1472 common.Mprojectile = common.Pprojectile.mag();
1473 common.M2projectile = common.Pprojectile.mag2();
1474 common.TResidual4Momentum = common.toCms * TargetResidual4Momentum;
1475 common.YtargetNucleus = common.TResidual4Momentum.rapidity();
1476 common.TResidualMass += common.TResidualExcitationEnergy;
1477 } else if ( interactionCase == 2 ) {
1478 common.Mtarget = common.Ptarget.mag();
1479 common.M2target = common.Ptarget.mag2();
1480 common.TResidual4Momentum = common.toCms * ProjectileResidual4Momentum;
1481 common.YprojectileNucleus = common.TResidual4Momentum.rapidity();
1482 common.TResidualMass += common.TResidualExcitationEnergy;
1483 } else if ( interactionCase == 3 ) {
1484 common.PResidual4Momentum = common.toCms * ProjectileResidual4Momentum;
1485 common.YprojectileNucleus = common.PResidual4Momentum.rapidity();
1486 common.TResidual4Momentum = common.toCms*TargetResidual4Momentum;
1487 common.YtargetNucleus = common.TResidual4Momentum.rapidity();
1488 common.PResidualMass += common.PResidualExcitationEnergy;
1489 common.TResidualMass += common.TResidualExcitationEnergy;
1490 }
1491 #ifdef debugAdjust
1492 G4cout << "YprojectileNucleus " << common.YprojectileNucleus << G4endl;
1493 #endif
1494
1495 return returnCode = 1; // successfully completed, but the work needs to be continued, i.e. try to sample
1496}
1497
1498
1499//-------------------------------------------------------------------
1500
1503 // Second of the three utility methods used only by AdjustNucleons: do the sampling.
1504 // This method returns "false" if it fails to sample properly, else it returns "true".
1505
1506 // Ascribing of the involved nucleons Pt and X
1508 G4double DcorP = 0.0, DcorT = 0.0;
1513
1514 G4double ScaleFactor = 1.0;
1515 G4bool OuterSuccess = true;
1516 const G4int maxNumberOfLoops = 1000;
1517 const G4int maxNumberOfTries = 10000;
1518 G4int loopCounter = 0;
1519 G4int NumberOfTries = 0;
1520 do { // Outmost do while loop
1521 OuterSuccess = true;
1522 G4bool loopCondition = false;
1523 do { // Intermediate do while loop
1524 if ( NumberOfTries == 100*(NumberOfTries/100) ) {
1525 // At large number of tries it would be better to reduce the values
1526 ScaleFactor /= 2.0;
1527 DcorP *= ScaleFactor;
1528 DcorT *= ScaleFactor;
1529 AveragePt2 *= ScaleFactor;
1530 #ifdef debugAdjust
1531 //G4cout << "NumberOfTries ScaleFactor " << NumberOfTries << " " << ScaleFactor << G4endl;
1532 #endif
1533 }
1534
1535 // Some kinematics
1536 if ( interactionCase == 1 ) {
1537 } else if ( interactionCase == 2 ) {
1538 #ifdef debugAdjust
1539 G4cout << "ProjectileResidualMassNumber " << ProjectileResidualMassNumber << G4endl;
1540 #endif
1541 if ( ProjectileResidualMassNumber > 1 ) {
1542 common.PtNucleon = GaussianPt( AveragePt2, maxPtSquare );
1543 } else {
1544 common.PtNucleon = G4ThreeVector( 0.0, 0.0, 0.0 );
1545 }
1546 common.PtResidual = - common.PtNucleon;
1547 common.Mprojectile = std::sqrt( sqr( common.TNucleonMass ) + common.PtNucleon.mag2() )
1548 + std::sqrt( sqr( common.TResidualMass ) + common.PtResidual.mag2() );
1549 #ifdef debugAdjust
1550 G4cout << "SqrtS < Mtarget + Mprojectile " << common.SqrtS << " " << common.Mtarget
1551 << " " << common.Mprojectile << " " << common.Mtarget + common.Mprojectile << G4endl;
1552 #endif
1553 common.M2projectile = sqr( common.Mprojectile );
1554 if ( common.SqrtS < common.Mtarget + common.Mprojectile ) {
1555 OuterSuccess = false;
1556 loopCondition = true;
1557 continue;
1558 }
1559 } else if ( interactionCase == 3 ) {
1560 if ( ProjectileResidualMassNumber > 1 ) {
1561 common.PtNucleonP = GaussianPt( AveragePt2, maxPtSquare );
1562 } else {
1563 common.PtNucleonP = G4ThreeVector( 0.0, 0.0, 0.0 );
1564 }
1565 common.PtResidualP = - common.PtNucleonP;
1566 if ( TargetResidualMassNumber > 1 ) {
1567 common.PtNucleonT = GaussianPt( AveragePt2, maxPtSquare );
1568 } else {
1569 common.PtNucleonT = G4ThreeVector( 0.0, 0.0, 0.0 );
1570 }
1571 common.PtResidualT = - common.PtNucleonT;
1572 common.Mprojectile = std::sqrt( sqr( common.PNucleonMass ) + common.PtNucleonP.mag2() )
1573 + std::sqrt( sqr( common.PResidualMass ) + common.PtResidualP.mag2() );
1574 common.M2projectile = sqr( common.Mprojectile );
1575 common.Mtarget = std::sqrt( sqr( common.TNucleonMass ) + common.PtNucleonT.mag2() )
1576 + std::sqrt( sqr( common.TResidualMass ) + common.PtResidualT.mag2() );
1577 common.M2target = sqr( common.Mtarget );
1578 if ( common.SqrtS < common.Mprojectile + common.Mtarget ) {
1579 OuterSuccess = false;
1580 loopCondition = true;
1581 continue;
1582 }
1583 } // End-if on interactionCase
1584
1585 G4int numberOfTimesExecuteInnerLoop = 1;
1586 if ( interactionCase == 3 ) numberOfTimesExecuteInnerLoop = 2;
1587 for ( G4int iExecute = 0; iExecute < numberOfTimesExecuteInnerLoop; iExecute++ ) {
1588
1589 G4bool InnerSuccess = true;
1590 G4bool isTargetToBeHandled = ( interactionCase == 1 ||
1591 ( interactionCase == 3 && iExecute == 1 ) );
1592 G4bool condition = false;
1593 if ( isTargetToBeHandled ) {
1595 } else { // Projectile to be handled
1597 }
1598 if ( condition ) {
1599 const G4int maxNumberOfInnerLoops = 1000;
1600 G4int innerLoopCounter = 0;
1601 do { // Inner do while loop
1602 InnerSuccess = true;
1603 if ( isTargetToBeHandled ) {
1604 G4double Xcenter = 0.0;
1605 if ( interactionCase == 1 ) {
1606 common.PtNucleon = GaussianPt( AveragePt2, maxPtSquare );
1607 common.PtResidual = - common.PtNucleon;
1608 common.Mtarget = std::sqrt( sqr( common.TNucleonMass ) + common.PtNucleon.mag2() )
1609 + std::sqrt( sqr( common.TResidualMass ) + common.PtResidual.mag2() );
1610 if ( common.SqrtS < common.Mprojectile + common.Mtarget ) {
1611 InnerSuccess = false;
1612 continue;
1613 }
1614 Xcenter = std::sqrt( sqr( common.TNucleonMass ) + common.PtNucleon.mag2() )
1615 / common.Mtarget;
1616 } else {
1617 Xcenter = std::sqrt( sqr( common.TNucleonMass ) + common.PtNucleonT.mag2() )
1618 / common.Mtarget;
1619 }
1620 G4ThreeVector tmpX = GaussianPt( DcorT*DcorT, 1.0 );
1621 common.XminusNucleon = Xcenter + tmpX.x();
1622 if ( common.XminusNucleon <= 0.0 || common.XminusNucleon >= 1.0 ) {
1623 InnerSuccess = false;
1624 continue;
1625 }
1626 common.XminusResidual = 1.0 - common.XminusNucleon;
1627 } else { // Projectile to be handled
1628 G4ThreeVector tmpX = GaussianPt( DcorP*DcorP, 1.0 );
1629 G4double Xcenter = 0.0;
1630 if ( interactionCase == 2 ) {
1631 Xcenter = std::sqrt( sqr( common.TNucleonMass ) + common.PtNucleon.mag2() )
1632 / common.Mprojectile;
1633 } else {
1634 Xcenter = std::sqrt( sqr( common.PNucleonMass ) + common.PtNucleonP.mag2() )
1635 / common.Mprojectile;
1636 }
1637 common.XplusNucleon = Xcenter + tmpX.x();
1638 if ( common.XplusNucleon <= 0.0 || common.XplusNucleon >= 1.0 ) {
1639 InnerSuccess = false;
1640 continue;
1641 }
1642 common.XplusResidual = 1.0 - common.XplusNucleon;
1643 } // End-if on isTargetToBeHandled
1644 } while ( ( ! InnerSuccess ) && // Inner do while loop
1645 ++innerLoopCounter < maxNumberOfInnerLoops ); /* Loop checking, 10.08.2015, A.Ribon */
1646 if ( innerLoopCounter >= maxNumberOfInnerLoops ) {
1647 #ifdef debugAdjust
1648 G4cout << "BAD situation: forced exit of the inner while loop!" << G4endl;
1649 #endif
1650 return false;
1651 }
1652 } else { // condition is false
1653 if ( isTargetToBeHandled ) {
1654 common.XminusNucleon = 1.0;
1655 common.XminusResidual = 1.0; // It must be 0, but in the calculation of Pz, E is problematic
1656 } else { // Projectile to be handled
1657 common.XplusNucleon = 1.0;
1658 common.XplusResidual = 1.0; // It must be 0, but in the calculation of Pz, E is problematic
1659 }
1660 } // End-if on condition
1661
1662 } // End of for loop on iExecute
1663
1664 if ( interactionCase == 1 ) {
1665 common.M2target = ( sqr( common.TNucleonMass ) + common.PtNucleon.mag2() )
1666 / common.XminusNucleon
1667 + ( sqr( common.TResidualMass ) + common.PtResidual.mag2() )
1668 / common.XminusResidual;
1669 loopCondition = ( common.SqrtS < common.Mprojectile + std::sqrt( common.M2target ) );
1670 } else if ( interactionCase == 2 ) {
1671 #ifdef debugAdjust
1672 G4cout << "TNucleonMass PtNucleon XplusNucleon " << common.TNucleonMass << " "
1673 << common.PtNucleon << " " << common.XplusNucleon << G4endl
1674 << "TResidualMass PtResidual XplusResidual " << common.TResidualMass << " "
1675 << common.PtResidual << " " << common.XplusResidual << G4endl;
1676 #endif
1677 common.M2projectile = ( sqr( common.TNucleonMass ) + common.PtNucleon.mag2() )
1678 / common.XplusNucleon
1679 + ( sqr( common.TResidualMass ) + common.PtResidual.mag2() )
1680 / common.XplusResidual;
1681 #ifdef debugAdjust
1682 G4cout << "SqrtS < Mtarget + std::sqrt(M2projectile) " << common.SqrtS << " "
1683 << common.Mtarget << " " << std::sqrt( common.M2projectile ) << " "
1684 << common.Mtarget + std::sqrt( common.M2projectile ) << G4endl;
1685 #endif
1686 loopCondition = ( common.SqrtS < common.Mtarget + std::sqrt( common.M2projectile ) );
1687 } else if ( interactionCase == 3 ) {
1688 #ifdef debugAdjust
1689 G4cout << "PtNucleonP " << common.PtNucleonP << " " << common.PtResidualP << G4endl
1690 << "XplusNucleon XplusResidual " << common.XplusNucleon
1691 << " " << common.XplusResidual << G4endl
1692 << "PtNucleonT " << common.PtNucleonT << " " << common.PtResidualT << G4endl
1693 << "XminusNucleon XminusResidual " << common.XminusNucleon
1694 << " " << common.XminusResidual << G4endl;
1695 #endif
1696 common.M2projectile = ( sqr( common.PNucleonMass ) + common.PtNucleonP.mag2() )
1697 / common.XplusNucleon
1698 + ( sqr( common.PResidualMass) + common.PtResidualP.mag2() )
1699 / common.XplusResidual;
1700 common.M2target = ( sqr( common.TNucleonMass ) + common.PtNucleonT.mag2() )
1701 / common.XminusNucleon
1702 + ( sqr( common.TResidualMass ) + common.PtResidualT.mag2() )
1703 / common.XminusResidual;
1704 loopCondition = ( common.SqrtS < ( std::sqrt( common.M2projectile )
1705 + std::sqrt( common.M2target ) ) );
1706 } // End-if on interactionCase
1707
1708 } while ( loopCondition && // Intermediate do while loop
1709 ++NumberOfTries < maxNumberOfTries ); /* Loop checking, 10.08.2015, A.Ribon */
1710 if ( NumberOfTries >= maxNumberOfTries ) {
1711 #ifdef debugAdjust
1712 G4cout << "BAD situation: forced exit of the intermediate while loop!" << G4endl;
1713 #endif
1714 return false;
1715 }
1716
1717 // kinematics
1718 G4double Yprojectile = 0.0, YprojectileNucleon = 0.0, Ytarget = 0.0, YtargetNucleon = 0.0;
1719 G4double DecayMomentum2 = sqr( common.S ) + sqr( common.M2projectile ) + sqr( common.M2target )
1720 - 2.0 * ( common.S * ( common.M2projectile + common.M2target )
1721 + common.M2projectile * common.M2target );
1722 if ( interactionCase == 1 ) {
1723 common.WminusTarget = ( common.S - common.M2projectile + common.M2target
1724 + std::sqrt( DecayMomentum2 ) ) / 2.0 / common.SqrtS;
1725 common.WplusProjectile = common.SqrtS - common.M2target / common.WminusTarget;
1726 common.Pzprojectile = common.WplusProjectile / 2.0
1727 - common.M2projectile / 2.0 / common.WplusProjectile;
1728 common.Eprojectile = common.WplusProjectile / 2.0
1729 + common.M2projectile / 2.0 / common.WplusProjectile;
1730 Yprojectile = 0.5 * G4Log( ( common.Eprojectile + common.Pzprojectile )
1731 / ( common.Eprojectile - common.Pzprojectile ) );
1732 #ifdef debugAdjust
1733 G4cout << "DecayMomentum2 " << DecayMomentum2 << G4endl
1734 << "WminusTarget WplusProjectile " << common.WminusTarget
1735 << " " << common.WplusProjectile << G4endl
1736 << "Yprojectile " << Yprojectile << G4endl;
1737 #endif
1738 common.Mt2targetNucleon = sqr( common.TNucleonMass ) + common.PtNucleon.mag2();
1739 common.PztargetNucleon = - common.WminusTarget * common.XminusNucleon / 2.0
1740 + common.Mt2targetNucleon
1741 / ( 2.0 * common.WminusTarget * common.XminusNucleon );
1742 common.EtargetNucleon = common.WminusTarget * common.XminusNucleon / 2.0
1743 + common.Mt2targetNucleon
1744 / ( 2.0 * common.WminusTarget * common.XminusNucleon );
1745 YtargetNucleon = 0.5 * G4Log( ( common.EtargetNucleon + common.PztargetNucleon )
1746 / ( common.EtargetNucleon - common.PztargetNucleon ) );
1747 #ifdef debugAdjust
1748 G4cout << "YtN Ytr YtN-Ytr " << " " << YtargetNucleon << " " << common.YtargetNucleus
1749 << " " << YtargetNucleon - common.YtargetNucleus << G4endl
1750 << "YtN Ypr YtN-Ypr " << " " << YtargetNucleon << " " << Yprojectile
1751 << " " << YtargetNucleon - Yprojectile << G4endl;
1752 #endif
1753 if ( std::abs( YtargetNucleon - common.YtargetNucleus ) > 2 ||
1754 Yprojectile < YtargetNucleon ) {
1755 OuterSuccess = false;
1756 continue;
1757 }
1758 } else if ( interactionCase == 2 ) {
1759 common.WplusProjectile = ( common.S + common.M2projectile - common.M2target
1760 + std::sqrt( DecayMomentum2 ) ) / 2.0 / common.SqrtS;
1761 common.WminusTarget = common.SqrtS - common.M2projectile / common.WplusProjectile;
1762 common.Pztarget = - common.WminusTarget / 2.0 + common.M2target / 2.0 / common.WminusTarget;
1763 common.Etarget = common.WminusTarget / 2.0 + common.M2target / 2.0 / common.WminusTarget;
1764 Ytarget = 0.5 * G4Log( ( common.Etarget + common.Pztarget )
1765 / ( common.Etarget - common.Pztarget ) );
1766 #ifdef debugAdjust
1767 G4cout << "DecayMomentum2 " << DecayMomentum2 << G4endl
1768 << "WminusTarget WplusProjectile " << common.WminusTarget
1769 << " " << common.WplusProjectile << G4endl
1770 << "Ytarget " << Ytarget << G4endl;
1771 #endif
1772 common.Mt2projectileNucleon = sqr( common.TNucleonMass ) + common.PtNucleon.mag2();
1773 common.PzprojectileNucleon = common.WplusProjectile * common.XplusNucleon / 2.0
1774 - common.Mt2projectileNucleon
1775 / ( 2.0 * common.WplusProjectile * common.XplusNucleon );
1776 common.EprojectileNucleon = common.WplusProjectile * common.XplusNucleon / 2.0
1777 + common.Mt2projectileNucleon
1778 / ( 2.0 * common.WplusProjectile * common.XplusNucleon );
1779 YprojectileNucleon = 0.5 * G4Log( ( common.EprojectileNucleon + common.PzprojectileNucleon )
1780 / ( common.EprojectileNucleon - common.PzprojectileNucleon) );
1781 #ifdef debugAdjust
1782 G4cout << "YpN Ypr YpN-Ypr " << " " << YprojectileNucleon << " " << common.YprojectileNucleus
1783 << " " << YprojectileNucleon - common.YprojectileNucleus << G4endl
1784 << "YpN Ytr YpN-Ytr " << " " << YprojectileNucleon << " " << Ytarget
1785 << " " << YprojectileNucleon - Ytarget << G4endl;
1786 #endif
1787 if ( std::abs( YprojectileNucleon - common.YprojectileNucleus ) > 2 ||
1788 Ytarget > YprojectileNucleon ) {
1789 OuterSuccess = false;
1790 continue;
1791 }
1792 } else if ( interactionCase == 3 ) {
1793 common.WplusProjectile = ( common.S + common.M2projectile - common.M2target
1794 + std::sqrt( DecayMomentum2 ) ) / 2.0 / common.SqrtS;
1795 common.WminusTarget = common.SqrtS - common.M2projectile / common.WplusProjectile;
1796 common.Mt2projectileNucleon = sqr( common.PNucleonMass ) + common.PtNucleonP.mag2();
1797 common.PzprojectileNucleon = common.WplusProjectile * common.XplusNucleon / 2.0
1798 - common.Mt2projectileNucleon
1799 / ( 2.0 * common.WplusProjectile * common.XplusNucleon );
1800 common.EprojectileNucleon = common.WplusProjectile * common.XplusNucleon / 2.0
1801 + common.Mt2projectileNucleon
1802 / ( 2.0 * common.WplusProjectile * common.XplusNucleon );
1803 YprojectileNucleon = 0.5 * G4Log( ( common.EprojectileNucleon + common.PzprojectileNucleon )
1804 / ( common.EprojectileNucleon - common.PzprojectileNucleon ) );
1805 common.Mt2targetNucleon = sqr( common.TNucleonMass ) + common.PtNucleonT.mag2();
1806 common.PztargetNucleon = - common.WminusTarget * common.XminusNucleon / 2.0
1807 + common.Mt2targetNucleon
1808 / ( 2.0 * common.WminusTarget * common.XminusNucleon );
1809 common.EtargetNucleon = common.WminusTarget * common.XminusNucleon / 2.0
1810 + common.Mt2targetNucleon
1811 / ( 2.0 * common.WminusTarget * common.XminusNucleon );
1812 YtargetNucleon = 0.5 * G4Log( ( common.EtargetNucleon + common.PztargetNucleon )
1813 / ( common.EtargetNucleon - common.PztargetNucleon ) );
1814 if ( std::abs( YtargetNucleon - common.YtargetNucleus ) > 2 ||
1815 std::abs( YprojectileNucleon - common.YprojectileNucleus ) > 2 ||
1816 YprojectileNucleon < YtargetNucleon ) {
1817 OuterSuccess = false;
1818 continue;
1819 }
1820 } // End-if on interactionCase
1821
1822 } while ( ( ! OuterSuccess ) && // Outmost do while loop
1823 ++loopCounter < maxNumberOfLoops ); /* Loop checking, 10.08.2015, A.Ribon */
1824 if ( loopCounter >= maxNumberOfLoops ) {
1825 #ifdef debugAdjust
1826 G4cout << "BAD situation: forced exit of the while loop!" << G4endl;
1827 #endif
1828 return false;
1829 }
1830
1831 return true;
1832}
1833
1834//-------------------------------------------------------------------
1835
1837 G4VSplitableHadron* SelectedAntiBaryon,
1838 G4VSplitableHadron* SelectedTargetNucleon,
1840 // Third of the three utility methods used only by AdjustNucleons: do the final kinematics
1841 // and transform back.
1842
1843 // New projectile
1844 if ( interactionCase == 1 ) {
1845 common.Pprojectile.setPz( common.Pzprojectile );
1846 common.Pprojectile.setE( common.Eprojectile );
1847 } else if ( interactionCase == 2 ) {
1848 common.Pprojectile.setPx( common.PtNucleon.x() );
1849 common.Pprojectile.setPy( common.PtNucleon.y() );
1850 common.Pprojectile.setPz( common.PzprojectileNucleon );
1851 common.Pprojectile.setE( common.EprojectileNucleon );
1852 } else if ( interactionCase == 3 ) {
1853 common.Pprojectile.setPx( common.PtNucleonP.x() );
1854 common.Pprojectile.setPy( common.PtNucleonP.y() );
1855 common.Pprojectile.setPz( common.PzprojectileNucleon );
1856 common.Pprojectile.setE( common.EprojectileNucleon );
1857 }
1858 #ifdef debugAdjust
1859 G4cout << "Proj after in CMS " << common.Pprojectile << G4endl;
1860 #endif
1861 common.Pprojectile.transform( common.toLab );
1862 SelectedAntiBaryon->Set4Momentum( common.Pprojectile );
1863 #ifdef debugAdjust
1864 G4cout << "Proj after in Lab " << common.Pprojectile << G4endl;
1865 #endif
1866
1867 // New target nucleon
1868 if ( interactionCase == 1 ) {
1869 common.Ptarget.setPx( common.PtNucleon.x() );
1870 common.Ptarget.setPy( common.PtNucleon.y() );
1871 common.Ptarget.setPz( common.PztargetNucleon );
1872 common.Ptarget.setE( common.EtargetNucleon );
1873 } else if ( interactionCase == 2 ) {
1874 common.Ptarget.setPz( common.Pztarget );
1875 common.Ptarget.setE( common.Etarget );
1876 } else if ( interactionCase == 3 ) {
1877 common.Ptarget.setPx( common.PtNucleonT.x() );
1878 common.Ptarget.setPy( common.PtNucleonT.y() );
1879 common.Ptarget.setPz( common.PztargetNucleon );
1880 common.Ptarget.setE( common.EtargetNucleon );
1881 }
1882 #ifdef debugAdjust
1883 G4cout << "Targ after in CMS " << common.Ptarget << G4endl;
1884 #endif
1885 common.Ptarget.transform( common.toLab );
1886 SelectedTargetNucleon->Set4Momentum( common.Ptarget );
1887 #ifdef debugAdjust
1888 G4cout << "Targ after in Lab " << common.Ptarget << G4endl;
1889 #endif
1890
1891 // New target residual
1892 if ( interactionCase == 1 || interactionCase == 3 ) {
1893 TargetResidualMassNumber = common.TResidualMassNumber;
1894 TargetResidualCharge = common.TResidualCharge;
1895 TargetResidualExcitationEnergy = common.TResidualExcitationEnergy;
1896 #ifdef debugAdjust
1897 G4cout << "TargetResidualMassNumber TargetResidualCharge TargetResidualExcitationEnergy "
1900 #endif
1901 if ( TargetResidualMassNumber != 0 ) {
1902 G4double Mt2 = 0.0;
1903 if ( interactionCase == 1 ) {
1904 Mt2 = sqr( common.TResidualMass ) + common.PtResidual.mag2();
1905 TargetResidual4Momentum.setPx( common.PtResidual.x() );
1906 TargetResidual4Momentum.setPy( common.PtResidual.y() );
1907 } else { // interactionCase == 3
1908 Mt2 = sqr( common.TResidualMass ) + common.PtResidualT.mag2();
1909 TargetResidual4Momentum.setPx( common.PtResidualT.x() );
1910 TargetResidual4Momentum.setPy( common.PtResidualT.y() );
1911 }
1912 G4double Pz = - common.WminusTarget * common.XminusResidual / 2.0
1913 + Mt2 / ( 2.0 * common.WminusTarget * common.XminusResidual );
1914 G4double E = common.WminusTarget * common.XminusResidual / 2.0
1915 + Mt2 / ( 2.0 * common.WminusTarget * common.XminusResidual );
1919 } else {
1920 TargetResidual4Momentum = G4LorentzVector( 0.0, 0.0, 0.0, 0.0 );
1921 }
1922 #ifdef debugAdjust
1923 G4cout << "Tr N R " << common.Ptarget << G4endl << " " << TargetResidual4Momentum << G4endl;
1924 #endif
1925 }
1926
1927 // New projectile residual
1928 if ( interactionCase == 2 || interactionCase == 3 ) {
1929 if ( interactionCase == 2 ) {
1930 ProjectileResidualMassNumber = common.TResidualMassNumber;
1931 ProjectileResidualCharge = common.TResidualCharge;
1932 ProjectileResidualExcitationEnergy = common.TResidualExcitationEnergy;
1933 } else { // interactionCase == 3
1934 ProjectileResidualMassNumber = common.PResidualMassNumber;
1935 ProjectileResidualCharge = common.PResidualCharge;
1936 ProjectileResidualExcitationEnergy = common.PResidualExcitationEnergy;
1937 }
1938 #ifdef debugAdjust
1939 G4cout << "ProjectileResidualMassNumber ProjectileResidualCharge ProjectileResidualExcitationEnergy "
1942 #endif
1943 if ( ProjectileResidualMassNumber != 0 ) {
1944 G4double Mt2 = 0.0;
1945 if ( interactionCase == 2 ) {
1946 Mt2 = sqr( common.TResidualMass ) + common.PtResidual.mag2();
1947 ProjectileResidual4Momentum.setPx( common.PtResidual.x() );
1948 ProjectileResidual4Momentum.setPy( common.PtResidual.y() );
1949 } else { // interactionCase == 3
1950 Mt2 = sqr( common.PResidualMass ) + common.PtResidualP.mag2();
1951 ProjectileResidual4Momentum.setPx( common.PtResidualP.x() );
1952 ProjectileResidual4Momentum.setPy( common.PtResidualP.y() );
1953 }
1954 G4double Pz = common.WplusProjectile * common.XplusResidual / 2.0
1955 - Mt2 / ( 2.0 * common.WplusProjectile * common.XplusResidual );
1956 G4double E = common.WplusProjectile * common.XplusResidual / 2.0
1957 + Mt2 / ( 2.0 * common.WplusProjectile * common.XplusResidual );
1961 } else {
1962 ProjectileResidual4Momentum = G4LorentzVector( 0.0, 0.0, 0.0, 0.0 );
1963 }
1964 #ifdef debugAdjust
1965 G4cout << "Pr N R " << common.Pprojectile << G4endl
1967 #endif
1968 }
1969
1970}
1971
1972
1973//============================================================================
1974
1976 // Loop over all collisions; find all primaries, and all targets
1977 // (targets may be duplicate in the List (to unique G4VSplitableHadrons) ).
1978
1979 G4ExcitedString* FirstString( 0 ); // If there will be a kink,
1980 G4ExcitedString* SecondString( 0 ); // two strings will be produced.
1981
1982 if ( ! GetProjectileNucleus() ) {
1983
1984 std::vector< G4VSplitableHadron* > primaries;
1986 while ( theParticipants.Next() ) { /* Loop checking, 10.08.2015, A.Ribon */
1988 // do not allow for duplicates ...
1989 if ( interaction.GetStatus() ) {
1990 if ( primaries.end() == std::find( primaries.begin(), primaries.end(),
1991 interaction.GetProjectile() ) ) {
1992 primaries.push_back( interaction.GetProjectile() );
1993 }
1994 }
1995 }
1996
1997 #ifdef debugBuildString
1998 G4cout << "G4FTFModel::BuildStrings()" << G4endl
1999 << "Number of projectile strings " << primaries.size() << G4endl;
2000 #endif
2001
2002 for ( unsigned int ahadron = 0; ahadron < primaries.size(); ahadron++ ) {
2003 G4bool isProjectile( true );
2004 //G4cout << "primaries[ ahadron ] " << primaries[ ahadron ] << G4endl;
2005 //if ( primaries[ ahadron ]->GetStatus() <= 1 ) isProjectile = true;
2006 FirstString = 0; SecondString = 0;
2007 if ( primaries[ahadron]->GetStatus() == 0 ) {
2008 theExcitation->CreateStrings( primaries[ ahadron ], isProjectile,
2009 FirstString, SecondString, theParameters );
2011 } else if ( primaries[ahadron]->GetStatus() == 1
2012 && primaries[ahadron]->GetSoftCollisionCount() != 0 ) {
2013 theExcitation->CreateStrings( primaries[ ahadron ], isProjectile,
2014 FirstString, SecondString, theParameters );
2016 } else if ( primaries[ahadron]->GetStatus() == 1
2017 && primaries[ahadron]->GetSoftCollisionCount() == 0 ) {
2018 G4LorentzVector ParticleMomentum=primaries[ahadron]->Get4Momentum();
2019 G4KineticTrack* aTrack = new G4KineticTrack( primaries[ahadron]->GetDefinition(),
2020 primaries[ahadron]->GetTimeOfCreation(),
2021 primaries[ahadron]->GetPosition(),
2022 ParticleMomentum );
2023 FirstString = new G4ExcitedString( aTrack );
2024 } else if (primaries[ahadron]->GetStatus() == 2) {
2025 G4LorentzVector ParticleMomentum=primaries[ahadron]->Get4Momentum();
2026 G4KineticTrack* aTrack = new G4KineticTrack( primaries[ahadron]->GetDefinition(),
2027 primaries[ahadron]->GetTimeOfCreation(),
2028 primaries[ahadron]->GetPosition(),
2029 ParticleMomentum );
2030 FirstString = new G4ExcitedString( aTrack );
2032 } else {
2033 G4cout << "Something wrong in FTF Model Build String" << G4endl;
2034 }
2035
2036 if ( FirstString != 0 ) strings->push_back( FirstString );
2037 if ( SecondString != 0 ) strings->push_back( SecondString );
2038
2039 #ifdef debugBuildString
2040 G4cout << "FirstString & SecondString? " << FirstString << " " << SecondString << G4endl;
2041 if ( FirstString->IsExcited() ) {
2042 G4cout << "Quarks on the FirstString ends " << FirstString->GetRightParton()->GetPDGcode()
2043 << " " << FirstString->GetLeftParton()->GetPDGcode() << G4endl;
2044 } else {
2045 G4cout << "Kinetic track is stored" << G4endl;
2046 }
2047 #endif
2048
2049 }
2050
2051 #ifdef debugBuildString
2052 if ( FirstString->IsExcited() ) {
2053 G4cout << "Check 1 string " << strings->operator[](0)->GetRightParton()->GetPDGcode()
2054 << " " << strings->operator[](0)->GetLeftParton()->GetPDGcode() << G4endl << G4endl;
2055 }
2056 #endif
2057
2058 std::for_each( primaries.begin(), primaries.end(), DeleteVSplitableHadron() );
2059 primaries.clear();
2060
2061 } else { // Projectile is a nucleus
2062
2063 #ifdef debugBuildString
2064 G4cout << "Building of projectile-like strings" << G4endl;
2065 #endif
2066
2067 G4bool isProjectile = true;
2068 for ( G4int ahadron = 0; ahadron < NumberOfInvolvedNucleonsOfProjectile; ahadron++ ) {
2069
2070 #ifdef debugBuildString
2071 G4cout << "Nucleon #, status, intCount " << ahadron << " "
2075 #endif
2076
2077 G4VSplitableHadron* aProjectile =
2079
2080 #ifdef debugBuildString
2081 G4cout << G4endl << "ahadron aProjectile Status " << ahadron << " " << aProjectile
2082 << " " << aProjectile->GetStatus() << G4endl;
2083 #endif
2084
2085 FirstString = 0; SecondString = 0;
2086 if ( aProjectile->GetStatus() == 0 ) { // A nucleon took part in non-diffractive interaction
2087
2088 #ifdef debugBuildString
2089 G4cout << "Case1 aProjectile->GetStatus() == 0 " << G4endl;
2090 #endif
2091
2093 TheInvolvedNucleonsOfProjectile[ ahadron ]->GetSplitableHadron(),
2094 isProjectile, FirstString, SecondString, theParameters );
2096 } else if ( aProjectile->GetStatus() == 1 && aProjectile->GetSoftCollisionCount() != 0 ) {
2097 // Nucleon took part in diffractive interaction
2098
2099 #ifdef debugBuildString
2100 G4cout << "Case2 aProjectile->GetStatus() !=0 St==1 SoftCol!=0" << G4endl;
2101 #endif
2102
2104 TheInvolvedNucleonsOfProjectile[ ahadron ]->GetSplitableHadron(),
2105 isProjectile, FirstString, SecondString, theParameters );
2107 } else if ( aProjectile->GetStatus() == 1 && aProjectile->GetSoftCollisionCount() == 0 &&
2108 HighEnergyInter ) {
2109 // Nucleon was considered as a paricipant of an interaction,
2110 // but the interaction was skipped due to annihilation.
2111 // It is now considered as an involved nucleon at high energies.
2112
2113 #ifdef debugBuildString
2114 G4cout << "Case3 aProjectile->GetStatus() !=0 St==1 SoftCol==0" << G4endl;
2115 #endif
2116
2117 G4LorentzVector ParticleMomentum = aProjectile->Get4Momentum();
2118 G4KineticTrack* aTrack = new G4KineticTrack( aProjectile->GetDefinition(),
2119 aProjectile->GetTimeOfCreation(),
2120 aProjectile->GetPosition(),
2121 ParticleMomentum );
2122 FirstString = new G4ExcitedString( aTrack );
2123
2124 #ifdef debugBuildString
2125 G4cout << " Strings are built for nucleon marked for an interaction, but"
2126 << " the interaction was skipped." << G4endl;
2127 #endif
2128
2129 } else if ( aProjectile->GetStatus() == 2 || aProjectile->GetStatus() == 3 ) {
2130 // Nucleon which was involved in the Reggeon cascading
2131
2132 #ifdef debugBuildString
2133 G4cout << "Case4 aProjectile->GetStatus() !=0 St==2 " << G4endl;
2134 #endif
2135
2136 G4LorentzVector ParticleMomentum = aProjectile->Get4Momentum();
2137 G4KineticTrack* aTrack = new G4KineticTrack( aProjectile->GetDefinition(),
2138 aProjectile->GetTimeOfCreation(),
2139 aProjectile->GetPosition(),
2140 ParticleMomentum );
2141 FirstString = new G4ExcitedString( aTrack );
2142
2143 #ifdef debugBuildString
2144 G4cout << " Strings are build for involved nucleon." << G4endl;
2145 #endif
2146
2147 if ( aProjectile->GetStatus() == 2 ) NumberOfProjectileSpectatorNucleons--;
2148 } else {
2149
2150 #ifdef debugBuildString
2151 G4cout << "Case5 " << G4endl;
2152 #endif
2153
2154 //TheInvolvedNucleonsOfProjectile[ ahadron ]->Hit( 0 );
2155 //G4cout << TheInvolvedNucleonsOfProjectile[ ahadron ]->GetSplitableHadron() << G4endl;
2156
2157 #ifdef debugBuildString
2158 G4cout << " No string" << G4endl;
2159 #endif
2160
2161 }
2162
2163 if ( FirstString != 0 ) strings->push_back( FirstString );
2164 if ( SecondString != 0 ) strings->push_back( SecondString );
2165 }
2166 }
2167
2168 #ifdef debugBuildString
2169 G4cout << "Building of target-like strings" << G4endl;
2170 #endif
2171
2172 G4bool isProjectile = false;
2173 for ( G4int ahadron = 0; ahadron < NumberOfInvolvedNucleonsOfTarget; ahadron++ ) {
2175
2176 #ifdef debugBuildString
2177 G4cout << "Nucleon #, status, intCount " << aNucleon << " " << ahadron << " "
2178 << aNucleon->GetStatus() << " " << aNucleon->GetSoftCollisionCount()<<G4endl;;
2179 #endif
2180
2181 FirstString = 0 ; SecondString = 0;
2182
2183 if ( aNucleon->GetStatus() == 0 ) { // A nucleon took part in non-diffractive interaction
2184 theExcitation->CreateStrings( aNucleon, isProjectile,
2185 FirstString, SecondString, theParameters );
2187
2188 #ifdef debugBuildString
2189 G4cout << " 1 case A string is build" << G4endl;
2190 #endif
2191
2192 } else if ( aNucleon->GetStatus() == 1 && aNucleon->GetSoftCollisionCount() != 0 ) {
2193 // A nucleon took part in diffractive interaction
2194 theExcitation->CreateStrings( aNucleon, isProjectile,
2195 FirstString, SecondString, theParameters );
2196
2197 #ifdef debugBuildString
2198 G4cout << " 2 case A string is build, nucleon was excited." << G4endl;
2199 #endif
2200
2202
2203 } else if ( aNucleon->GetStatus() == 1 && aNucleon->GetSoftCollisionCount() == 0 &&
2204 HighEnergyInter ) {
2205 // A nucleon was considered as a participant but due to annihilation
2206 // its interactions were skipped. It will be considered as involved one
2207 // at high energies.
2208
2209 G4LorentzVector ParticleMomentum = aNucleon->Get4Momentum();
2210 G4KineticTrack* aTrack = new G4KineticTrack( aNucleon->GetDefinition(),
2211 aNucleon->GetTimeOfCreation(),
2212 aNucleon->GetPosition(),
2213 ParticleMomentum );
2214
2215 FirstString = new G4ExcitedString( aTrack );
2216
2217 #ifdef debugBuildString
2218 G4cout << "3 case A string is build" << G4endl;
2219 #endif
2220
2221 } else if ( aNucleon->GetStatus() == 1 && aNucleon->GetSoftCollisionCount() == 0 &&
2222 ! HighEnergyInter ) {
2223 // A nucleon was considered as a participant but due to annihilation
2224 // its interactions were skipped. It will be returned to nucleus
2225 // at low energies energies.
2226 aNucleon->SetStatus( 5 ); // 4->5
2227 // ??? delete aNucleon;
2228
2229 #ifdef debugBuildString
2230 G4cout << "4 case A string is not build" << G4endl;
2231 #endif
2232
2233 } else if ( aNucleon->GetStatus() == 2 || // A nucleon took part in quark exchange
2234 aNucleon->GetStatus() == 3 ) { // A nucleon was involved in Reggeon cascading
2235 G4LorentzVector ParticleMomentum = aNucleon->Get4Momentum();
2236 G4KineticTrack* aTrack = new G4KineticTrack( aNucleon->GetDefinition(),
2237 aNucleon->GetTimeOfCreation(),
2238 aNucleon->GetPosition(),
2239 ParticleMomentum );
2240 FirstString = new G4ExcitedString( aTrack );
2241
2242 #ifdef debugBuildString
2243 G4cout << "5 case A string is build" << G4endl;
2244 #endif
2245
2246 if ( aNucleon->GetStatus() == 2 ) NumberOfTargetSpectatorNucleons--;
2247
2248 } else {
2249
2250 #ifdef debugBuildString
2251 G4cout << "6 case No string" << G4endl;
2252 #endif
2253
2254 }
2255
2256 if ( FirstString != 0 ) strings->push_back( FirstString );
2257 if ( SecondString != 0 ) strings->push_back( SecondString );
2258
2259 }
2260
2261 #ifdef debugBuildString
2262 G4cout << G4endl << "theAdditionalString.size() " << theAdditionalString.size()
2263 << G4endl << G4endl;
2264 #endif
2265
2266 isProjectile = true;
2267 if ( theAdditionalString.size() != 0 ) {
2268 for ( unsigned int ahadron = 0; ahadron < theAdditionalString.size(); ahadron++ ) {
2269 //if ( theAdditionalString[ ahadron ]->GetStatus() <= 1 ) isProjectile = true;
2270 FirstString = 0; SecondString = 0;
2271 theExcitation->CreateStrings( theAdditionalString[ ahadron ], isProjectile,
2272 FirstString, SecondString, theParameters );
2273 if ( FirstString != 0 ) strings->push_back( FirstString );
2274 if ( SecondString != 0 ) strings->push_back( SecondString );
2275 }
2276 }
2277
2278 //for ( unsigned int ahadron = 0; ahadron < strings->size(); ahadron++ ) {
2279 // G4cout << ahadron << " " << strings->operator[]( ahadron )->GetRightParton()->GetPDGcode()
2280 // << " " << strings->operator[]( ahadron )->GetLeftParton()->GetPDGcode() << G4endl;
2281 //}
2282 //G4cout << "------------------------" << G4endl;
2283
2284 return;
2285}
2286
2287
2288//============================================================================
2289
2291 // This method is needed for the correct application of G4PrecompoundModelInterface
2292
2293 #ifdef debugFTFmodel
2294 G4cout << "GetResiduals(): HighEnergyInter? GetProjectileNucleus()?"
2296 #endif
2297
2298 if ( HighEnergyInter ) {
2299
2300 #ifdef debugFTFmodel
2301 G4cout << "NumberOfInvolvedNucleonsOfTarget "<< NumberOfInvolvedNucleonsOfTarget << G4endl;
2302 #endif
2303
2304 G4double DeltaExcitationE = TargetResidualExcitationEnergy /
2306 G4LorentzVector DeltaPResidualNucleus = TargetResidual4Momentum /
2308
2309 for ( G4int i = 0; i < NumberOfInvolvedNucleonsOfTarget; ++i ) {
2311
2312 #ifdef debugFTFmodel
2313 G4VSplitableHadron* targetSplitable = aNucleon->GetSplitableHadron();
2314 G4cout << i << " Hit? " << aNucleon->AreYouHit() << " " << targetSplitable << G4endl;
2315 if ( targetSplitable ) G4cout << i << "Status " << targetSplitable->GetStatus() << G4endl;
2316 #endif
2317
2318 G4LorentzVector tmp = -DeltaPResidualNucleus;
2319 aNucleon->SetMomentum( tmp );
2320 aNucleon->SetBindingEnergy( DeltaExcitationE );
2321 }
2322
2323 if ( TargetResidualMassNumber != 0 ) {
2325
2326 G4V3DNucleus* theTargetNucleus = GetTargetNucleus();
2327 G4LorentzVector residualMomentum( 0.0, 0.0, 0.0, 0.0 );
2328 G4Nucleon* aNucleon = 0;
2329 theTargetNucleus->StartLoop();
2330 while ( ( aNucleon = theTargetNucleus->GetNextNucleon() ) ) { /* Loop checking, 10.08.2015, A.Ribon */
2331 if ( ! aNucleon->AreYouHit() ) {
2332 G4LorentzVector tmp = aNucleon->Get4Momentum(); tmp.boost( bstToCM );
2333 aNucleon->SetMomentum( tmp );
2334 residualMomentum += tmp;
2335 }
2336 }
2337
2338 residualMomentum /= TargetResidualMassNumber;
2339
2341 G4double SumMasses = 0.0;
2342
2343 aNucleon = 0;
2344 theTargetNucleus->StartLoop();
2345 while ( ( aNucleon = theTargetNucleus->GetNextNucleon() ) ) { /* Loop checking, 10.08.2015, A.Ribon */
2346 if ( ! aNucleon->AreYouHit() ) {
2347 G4LorentzVector tmp = aNucleon->Get4Momentum() - residualMomentum;
2348 G4double E = std::sqrt( tmp.vect().mag2() +
2349 sqr( aNucleon->GetDefinition()->GetPDGMass() - aNucleon->GetBindingEnergy() ) );
2350 tmp.setE( E ); aNucleon->SetMomentum( tmp );
2351 SumMasses += E;
2352 }
2353 }
2354
2355 G4double Chigh = Mass / SumMasses; G4double Clow = 0.0; G4double C;
2356 const G4int maxNumberOfLoops = 1000;
2357 G4int loopCounter = 0;
2358 do {
2359 C = ( Chigh + Clow ) / 2.0;
2360 SumMasses = 0.0;
2361 aNucleon = 0;
2362 theTargetNucleus->StartLoop();
2363 while ( ( aNucleon = theTargetNucleus->GetNextNucleon() ) ) { /* Loop checking, 10.08.2015, A.Ribon */
2364 if ( ! aNucleon->AreYouHit() ) {
2365 G4LorentzVector tmp = aNucleon->Get4Momentum();
2366 G4double E = std::sqrt( tmp.vect().mag2()*sqr(C) +
2367 sqr( aNucleon->GetDefinition()->GetPDGMass() - aNucleon->GetBindingEnergy() ) );
2368 SumMasses += E;
2369 }
2370 }
2371
2372 if ( SumMasses > Mass ) Chigh = C;
2373 else Clow = C;
2374
2375 } while ( Chigh - Clow > 0.01 &&
2376 ++loopCounter < maxNumberOfLoops ); /* Loop checking, 10.08.2015, A.Ribon */
2377 if ( loopCounter >= maxNumberOfLoops ) {
2378 #ifdef debugFTFmodel
2379 G4cout << "BAD situation: forced exit of the first while loop in G4FTFModel::GetResidual" << G4endl
2380 << "\t return immediately from the method!" << G4endl;
2381 #endif
2382 return;
2383 }
2384
2385 aNucleon = 0;
2386 theTargetNucleus->StartLoop();
2387 while ( ( aNucleon = theTargetNucleus->GetNextNucleon() ) ) { /* Loop checking, 10.08.2015, A.Ribon */
2388 if ( !aNucleon->AreYouHit() ) {
2389 G4LorentzVector tmp = aNucleon->Get4Momentum()*C;
2390 G4double E = std::sqrt( tmp.vect().mag2()+
2391 sqr( aNucleon->GetDefinition()->GetPDGMass()-aNucleon->GetBindingEnergy() ) );
2392 tmp.setE( E ); tmp.boost( -bstToCM );
2393 aNucleon->SetMomentum( tmp );
2394 }
2395 }
2396 }
2397
2398 if ( ! GetProjectileNucleus() ) return; // The projectile is a hadron
2399
2400 #ifdef debugFTFmodel
2401 G4cout << "NumberOfInvolvedNucleonsOfProjectile " << NumberOfInvolvedNucleonsOfProjectile
2402 << G4endl << "ProjectileResidualExcitationEnergy ProjectileResidual4Momentum "
2404 #endif
2405
2406 DeltaExcitationE = ProjectileResidualExcitationEnergy /
2408 DeltaPResidualNucleus = ProjectileResidual4Momentum /
2410
2411 for ( G4int i = 0; i < NumberOfInvolvedNucleonsOfProjectile; ++i ) {
2413
2414 #ifdef debugFTFmodel
2415 G4VSplitableHadron* projSplitable = aNucleon->GetSplitableHadron();
2416 G4cout << i << " Hit? " << aNucleon->AreYouHit() << " " << projSplitable << G4endl;
2417 if ( projSplitable ) G4cout << i << "Status " << projSplitable->GetStatus() << G4endl;
2418 #endif
2419
2420 G4LorentzVector tmp = -DeltaPResidualNucleus;
2421 aNucleon->SetMomentum( tmp );
2422 aNucleon->SetBindingEnergy( DeltaExcitationE );
2423 }
2424
2425 if ( ProjectileResidualMassNumber != 0 ) {
2427
2428 G4V3DNucleus* theProjectileNucleus = GetProjectileNucleus();
2429 G4LorentzVector residualMomentum( 0.0, 0.0, 0.0, 0.0);
2430 G4Nucleon* aNucleon = 0;
2431 theProjectileNucleus->StartLoop();
2432 while ( ( aNucleon = theProjectileNucleus->GetNextNucleon() ) ) { /* Loop checking, 10.08.2015, A.Ribon */
2433 if ( ! aNucleon->AreYouHit() ) {
2434 G4LorentzVector tmp = aNucleon->Get4Momentum(); tmp.boost( bstToCM );
2435 aNucleon->SetMomentum( tmp );
2436 residualMomentum += tmp;
2437 }
2438 }
2439
2440 residualMomentum /= ProjectileResidualMassNumber;
2441
2443 G4double SumMasses= 0.0;
2444
2445 aNucleon = 0;
2446 theProjectileNucleus->StartLoop();
2447 while ( ( aNucleon = theProjectileNucleus->GetNextNucleon() ) ) { /* Loop checking, 10.08.2015, A.Ribon */
2448 if ( ! aNucleon->AreYouHit() ) {
2449 G4LorentzVector tmp = aNucleon->Get4Momentum() - residualMomentum;
2450 G4double E=std::sqrt( tmp.vect().mag2() +
2451 sqr(aNucleon->GetDefinition()->GetPDGMass()-aNucleon->GetBindingEnergy() ) );
2452 tmp.setE( E ); aNucleon->SetMomentum( tmp );
2453 SumMasses += E;
2454 }
2455 }
2456
2457 G4double Chigh = Mass / SumMasses; G4double Clow = 0.0; G4double C;
2458 const G4int maxNumberOfLoops = 1000;
2459 G4int loopCounter = 0;
2460 do {
2461 C = ( Chigh + Clow ) / 2.0;
2462
2463 SumMasses = 0.0;
2464 aNucleon = 0;
2465 theProjectileNucleus->StartLoop();
2466 while ( ( aNucleon = theProjectileNucleus->GetNextNucleon() ) ) { /* Loop checking, 10.08.2015, A.Ribon */
2467 if ( ! aNucleon->AreYouHit() ) {
2468 G4LorentzVector tmp = aNucleon->Get4Momentum();
2469 G4double E = std::sqrt( tmp.vect().mag2()*sqr(C) +
2470 sqr( aNucleon->GetDefinition()->GetPDGMass() - aNucleon->GetBindingEnergy() ) );
2471 SumMasses += E;
2472 }
2473 }
2474
2475 if ( SumMasses > Mass) Chigh = C;
2476 else Clow = C;
2477
2478 } while ( Chigh - Clow > 0.01 &&
2479 ++loopCounter < maxNumberOfLoops ); /* Loop checking, 10.08.2015, A.Ribon */
2480 if ( loopCounter >= maxNumberOfLoops ) {
2481 #ifdef debugFTFmodel
2482 G4cout << "BAD situation: forced exit of the second while loop in G4FTFModel::GetResidual" << G4endl
2483 << "\t return immediately from the method!" << G4endl;
2484 #endif
2485 return;
2486 }
2487
2488 aNucleon = 0;
2489 theProjectileNucleus->StartLoop();
2490 while ( ( aNucleon = theProjectileNucleus->GetNextNucleon() ) ) { /* Loop checking, 10.08.2015, A.Ribon */
2491 if ( ! aNucleon->AreYouHit() ) {
2492 G4LorentzVector tmp = aNucleon->Get4Momentum()*C;
2493 G4double E = std::sqrt( tmp.vect().mag2() +
2494 sqr( aNucleon->GetDefinition()->GetPDGMass() - aNucleon->GetBindingEnergy() ) );
2495 tmp.setE( E ); tmp.boost( -bstToCM );
2496 aNucleon->SetMomentum( tmp );
2497 }
2498 }
2499 } // End of if ( ProjectileResidualMassNumber != 0 )
2500
2501 #ifdef debugFTFmodel
2502 G4cout << "End projectile" << G4endl;
2503 #endif
2504
2505 } else { // Related to the condition: if ( HighEnergyInter )
2506
2507 #ifdef debugFTFmodel
2508 G4cout << "Low energy interaction: Target nucleus --------------" << G4endl
2509 << "Tr ResidualMassNumber Tr ResidualCharge Tr ResidualExcitationEnergy "
2512 #endif
2513
2514 G4int NumberOfTargetParticipant( 0 );
2515 for ( G4int i = 0; i < NumberOfInvolvedNucleonsOfTarget; ++i ) {
2517 G4VSplitableHadron* targetSplitable = aNucleon->GetSplitableHadron();
2518 if ( targetSplitable->GetSoftCollisionCount() != 0 ) NumberOfTargetParticipant++;
2519 }
2520
2521 G4double DeltaExcitationE( 0.0 );
2522 G4LorentzVector DeltaPResidualNucleus = G4LorentzVector( 0.0, 0.0, 0.0, 0.0 );
2523
2524 if ( NumberOfTargetParticipant != 0 ) {
2525 DeltaExcitationE = TargetResidualExcitationEnergy / G4double( NumberOfTargetParticipant );
2526 DeltaPResidualNucleus = TargetResidual4Momentum / G4double( NumberOfTargetParticipant );
2527 }
2528
2529 for ( G4int i = 0; i < NumberOfInvolvedNucleonsOfTarget; ++i ) {
2531 G4VSplitableHadron* targetSplitable = aNucleon->GetSplitableHadron();
2532 if ( targetSplitable->GetSoftCollisionCount() != 0 ) {
2533 G4LorentzVector tmp = -DeltaPResidualNucleus;
2534 aNucleon->SetMomentum( tmp );
2535 aNucleon->SetBindingEnergy( DeltaExcitationE );
2536 } else {
2537 delete targetSplitable;
2538 targetSplitable = 0;
2539 aNucleon->Hit( targetSplitable );
2540 aNucleon->SetBindingEnergy( 0.0 );
2541 }
2542 }
2543
2544 #ifdef debugFTFmodel
2545 G4cout << "NumberOfTargetParticipant " << NumberOfTargetParticipant << G4endl
2546 << "TargetResidual4Momentum " << TargetResidual4Momentum << G4endl;
2547 #endif
2548
2549 if ( ! GetProjectileNucleus() ) return; // The projectile is a hadron
2550
2551 #ifdef debugFTFmodel
2552 G4cout << "Low energy interaction: Projectile nucleus --------------" << G4endl
2553 << "Pr ResidualMassNumber Pr ResidualCharge Pr ResidualExcitationEnergy "
2556 #endif
2557
2558 G4int NumberOfProjectileParticipant( 0 );
2559 for ( G4int i = 0; i < NumberOfInvolvedNucleonsOfProjectile; ++i ) {
2561 G4VSplitableHadron* projectileSplitable = aNucleon->GetSplitableHadron();
2562 if ( projectileSplitable->GetSoftCollisionCount() != 0 ) NumberOfProjectileParticipant++;
2563 }
2564
2565 #ifdef debugFTFmodel
2566 G4cout << "NumberOfProjectileParticipant" << G4endl;
2567 #endif
2568
2569 DeltaExcitationE = 0.0;
2570 DeltaPResidualNucleus = G4LorentzVector( 0.0, 0.0, 0.0, 0.0 );
2571
2572 if ( NumberOfProjectileParticipant != 0 ) {
2573 DeltaExcitationE = ProjectileResidualExcitationEnergy / G4double( NumberOfProjectileParticipant );
2574 DeltaPResidualNucleus = ProjectileResidual4Momentum / G4double( NumberOfProjectileParticipant );
2575 }
2576 //G4cout << "DeltaExcitationE DeltaPResidualNucleus " << DeltaExcitationE
2577 // << " " << DeltaPResidualNucleus << G4endl;
2578 for ( G4int i = 0; i < NumberOfInvolvedNucleonsOfProjectile; ++i ) {
2580 G4VSplitableHadron* projectileSplitable = aNucleon->GetSplitableHadron();
2581 if ( projectileSplitable->GetSoftCollisionCount() != 0 ) {
2582 G4LorentzVector tmp = -DeltaPResidualNucleus;
2583 aNucleon->SetMomentum( tmp );
2584 aNucleon->SetBindingEnergy( DeltaExcitationE );
2585 } else {
2586 delete projectileSplitable;
2587 projectileSplitable = 0;
2588 aNucleon->Hit( projectileSplitable );
2589 aNucleon->SetBindingEnergy( 0.0 );
2590 }
2591 }
2592
2593 #ifdef debugFTFmodel
2594 G4cout << "NumberOfProjectileParticipant " << NumberOfProjectileParticipant << G4endl
2595 << "ProjectileResidual4Momentum " << ProjectileResidual4Momentum << G4endl;
2596 #endif
2597
2598 } // End of the condition: if ( HighEnergyInter )
2599
2600 #ifdef debugFTFmodel
2601 G4cout << "End GetResiduals -----------------" << G4endl;
2602 #endif
2603
2604}
2605
2606
2607//============================================================================
2608
2609G4ThreeVector G4FTFModel::GaussianPt( G4double AveragePt2, G4double maxPtSquare ) const {
2610
2611 G4double Pt2( 0.0 ), Pt( 0.0 );
2612
2613 if (AveragePt2 > 0.0) {
2614 const G4double ymax = maxPtSquare/AveragePt2;
2615 if ( ymax < 200. ) {
2616 Pt2 = -AveragePt2 * G4Log( 1.0 + G4UniformRand() * ( G4Exp( -ymax ) -1.0 ) );
2617 } else {
2618 Pt2 = -AveragePt2 * G4Log( 1.0 - G4UniformRand() );
2619 }
2620 Pt = std::sqrt( Pt2 );
2621 }
2622
2623 G4double phi = G4UniformRand() * twopi;
2624
2625 return G4ThreeVector( Pt*std::cos(phi), Pt*std::sin(phi), 0.0 );
2626}
2627
2628//============================================================================
2629
2631ComputeNucleusProperties( G4V3DNucleus* nucleus, // input parameter
2632 G4LorentzVector& nucleusMomentum, // input & output parameter
2633 G4LorentzVector& residualMomentum, // input & output parameter
2634 G4double& sumMasses, // input & output parameter
2635 G4double& residualExcitationEnergy, // input & output parameter
2636 G4double& residualMass, // input & output parameter
2637 G4int& residualMassNumber, // input & output parameter
2638 G4int& residualCharge ) { // input & output parameter
2639
2640 // This method, which is called only by PutOnMassShell, computes some nucleus properties for:
2641 // - either the target nucleus (which is never an antinucleus): this for any kind
2642 // of hadronic interaction (hadron-nucleus, nucleus-nucleus, antinucleus-nucleus);
2643 // - or the projectile nucleus or antinucleus: this only in the case of nucleus-nucleus
2644 // or antinucleus-nucleus interaction.
2645 // This method assumes that the all the parameters have been initialized by the caller;
2646 // the action of this method consists in modifying all these parameters, except the
2647 // first one. The return value is "false" only in the case the pointer to the nucleus
2648 // is null.
2649
2650 if ( ! nucleus ) return false;
2651
2652 G4double ExcitationEnergyPerWoundedNucleon =
2654
2655 // Loop over the nucleons of the nucleus.
2656 // The nucleons that have been involved in the interaction (either from Glauber or
2657 // Reggeon Cascading) will be candidate to be emitted.
2658 // All the remaining nucleons will be the nucleons of the candidate residual nucleus.
2659 // The variable sumMasses is the amount of energy corresponding to:
2660 // 1. transverse mass of each involved nucleon
2661 // 2. 20.0*MeV separation energy for each involved nucleon
2662 // 3. transverse mass of the residual nucleus
2663 // In this first evaluation of sumMasses, the excitation energy of the residual nucleus
2664 // (residualExcitationEnergy, estimated by adding a constant value to each involved
2665 // nucleon) is not taken into account.
2666 G4int residualNumberOfLambdas = 0; // Projectile nucleus and its residual can be a hypernucleus
2667 G4Nucleon* aNucleon = 0;
2668 nucleus->StartLoop();
2669 while ( ( aNucleon = nucleus->GetNextNucleon() ) ) { /* Loop checking, 10.08.2015, A.Ribon */
2670 nucleusMomentum += aNucleon->Get4Momentum();
2671 if ( aNucleon->AreYouHit() ) { // Involved nucleons
2672 // Consider in sumMasses the nominal, i.e. on-shell, masses of the nucleons
2673 // (not the current masses, which could be different because the nucleons are off-shell).
2674 sumMasses += std::sqrt( sqr( aNucleon->GetDefinition()->GetPDGMass() )
2675 + aNucleon->Get4Momentum().perp2() );
2676 sumMasses += 20.0*MeV; // Separation energy for a nucleon
2677
2678 //residualExcitationEnergy += ExcitationEnergyPerWoundedNucleon; // In G4 10.1
2679 residualExcitationEnergy += -ExcitationEnergyPerWoundedNucleon*G4Log( G4UniformRand() );
2680
2681 residualMassNumber--;
2682 // The absolute value below is needed only in the case of anti-nucleus.
2683 residualCharge -= std::abs( G4int( aNucleon->GetDefinition()->GetPDGCharge() ) );
2684 } else { // Spectator nucleons
2685 residualMomentum += aNucleon->Get4Momentum();
2686 if ( aNucleon->GetDefinition() == G4Lambda::Definition() ||
2687 aNucleon->GetDefinition() == G4AntiLambda::Definition() ) {
2688 ++residualNumberOfLambdas;
2689 }
2690 }
2691 }
2692 #ifdef debugPutOnMassShell
2693 G4cout << "ExcitationEnergyPerWoundedNucleon " << ExcitationEnergyPerWoundedNucleon << G4endl
2694 << "\t Residual Charge, MassNumber (LambdaNumber" << residualCharge << " "
2695 << residualMassNumber << " (" << residualNumberOfLambdas << ") "
2696 << G4endl << "\t Initial Momentum " << nucleusMomentum
2697 << G4endl << "\t Residual Momentum " << residualMomentum << G4endl;
2698 #endif
2699 residualMomentum.setPz( 0.0 );
2700 residualMomentum.setE( 0.0 );
2701 if ( residualMassNumber == 0 ) {
2702 residualMass = 0.0;
2703 residualExcitationEnergy = 0.0;
2704 } else {
2705 if ( residualNumberOfLambdas > 0 ) {
2706 residualMass = G4HyperNucleiProperties::GetNuclearMass( residualMassNumber, residualCharge,
2707 residualNumberOfLambdas );
2708 } else {
2710 GetIonMass( residualCharge, residualMassNumber );
2711 }
2712 if ( residualMassNumber == 1 ) {
2713 residualExcitationEnergy = 0.0;
2714 }
2715 residualMass += residualExcitationEnergy;
2716 }
2717 sumMasses += std::sqrt( sqr( residualMass ) + residualMomentum.perp2() );
2718 return true;
2719}
2720
2721
2722//============================================================================
2723
2725GenerateDeltaIsobar( const G4double sqrtS, // input parameter
2726 const G4int numberOfInvolvedNucleons, // input parameter
2727 G4Nucleon* involvedNucleons[], // input & output parameter
2728 G4double& sumMasses ) { // input & output parameter
2729
2730 // This method, which is called only by PutOnMassShell, check whether is possible to
2731 // re-interpret some of the involved nucleons as delta-isobars:
2732 // - either by replacing a proton (2212) with a Delta+ (2214),
2733 // - or by replacing a neutron (2112) with a Delta0 (2114).
2734 // The on-shell mass of these delta-isobars is ~1232 MeV, so ~292-294 MeV heavier than
2735 // the corresponding nucleon on-shell mass. However 400.0*MeV is considered to estimate
2736 // the max number of deltas compatible with the available energy.
2737 // The delta-isobars are considered with the same transverse momentum as their
2738 // corresponding nucleons.
2739 // This method assumes that all the parameters have been initialized by the caller;
2740 // the action of this method consists in modifying (eventually) involveNucleons and
2741 // sumMasses. The return value is "false" only in the case that the input parameters
2742 // have unphysical values.
2743
2744 if ( sqrtS < 0.0 || numberOfInvolvedNucleons <= 0 || sumMasses < 0.0 ) return false;
2745
2746 const G4double probDeltaIsobar = 0.05;
2747
2748 G4int maxNumberOfDeltas = G4int( (sqrtS - sumMasses)/(400.0*MeV) );
2749 G4int numberOfDeltas = 0;
2750
2751 for ( G4int i = 0; i < numberOfInvolvedNucleons; ++i ) {
2752
2753 if ( G4UniformRand() < probDeltaIsobar && numberOfDeltas < maxNumberOfDeltas ) {
2754 numberOfDeltas++;
2755 if ( ! involvedNucleons[i] ) continue;
2756 // Skip any eventual lambda (that can be present in a projectile hypernucleus)
2757 if ( involvedNucleons[i]->GetDefinition() == G4Lambda::Definition() ||
2758 involvedNucleons[i]->GetDefinition() == G4AntiLambda::Definition() ) continue;
2759 G4VSplitableHadron* splitableHadron = involvedNucleons[i]->GetSplitableHadron();
2760 G4double massNuc = std::sqrt( sqr( splitableHadron->GetDefinition()->GetPDGMass() )
2761 + splitableHadron->Get4Momentum().perp2() );
2762 // The absolute value below is needed in the case of an antinucleus.
2763 G4int pdgCode = std::abs( splitableHadron->GetDefinition()->GetPDGEncoding() );
2764 const G4ParticleDefinition* old_def = splitableHadron->GetDefinition();
2765 G4int newPdgCode = pdgCode/10; newPdgCode = newPdgCode*10 + 4; // Delta
2766 if ( splitableHadron->GetDefinition()->GetPDGEncoding() < 0 ) newPdgCode *= -1;
2767 const G4ParticleDefinition* ptr =
2769 splitableHadron->SetDefinition( ptr );
2770 G4double massDelta = std::sqrt( sqr( splitableHadron->GetDefinition()->GetPDGMass() )
2771 + splitableHadron->Get4Momentum().perp2() );
2772 //G4cout << i << " " << sqrtS/GeV << " " << sumMasses/GeV << " " << massDelta/GeV
2773 // << " " << massNuc << G4endl;
2774 if ( sqrtS < sumMasses + massDelta - massNuc ) { // Change cannot be accepted!
2775 splitableHadron->SetDefinition( old_def );
2776 break;
2777 } else { // Change is accepted
2778 sumMasses += ( massDelta - massNuc );
2779 }
2780 }
2781 }
2782
2783 return true;
2784}
2785
2786
2787//============================================================================
2788
2790SamplingNucleonKinematics( G4double averagePt2, // input parameter
2791 const G4double maxPt2, // input parameter
2792 G4double dCor, // input parameter
2793 G4V3DNucleus* nucleus, // input parameter
2794 const G4LorentzVector& pResidual, // input parameter
2795 const G4double residualMass, // input parameter
2796 const G4int residualMassNumber, // input parameter
2797 const G4int numberOfInvolvedNucleons, // input parameter
2798 G4Nucleon* involvedNucleons[], // input & output parameter
2799 G4double& mass2 ) { // output parameter
2800
2801 // This method, which is called only by PutOnMassShell, does the sampling of:
2802 // - either the target nucleons: this for any kind of hadronic interactions
2803 // (hadron-nucleus, nucleus-nucleus, antinucleus-nucleus);
2804 // - or the projectile nucleons or antinucleons: this only in the case of
2805 // nucleus-nucleus or antinucleus-nucleus interactions, respectively.
2806 // This method assumes that all the parameters have been initialized by the caller;
2807 // the action of this method consists in changing the properties of the nucleons
2808 // whose pointers are in the vector involvedNucleons, as well as changing the
2809 // variable mass2.
2810#ifdef debugPutOnMassShell
2811 G4cout << "G4FTFModel::SamplingNucleonKinematics:" << G4endl;
2812 G4cout << " averagePt2= " << averagePt2 << " maxPt2= " << maxPt2
2813 << " dCor= " << dCor << " resMass(GeV)= " << residualMass/GeV
2814 << " resMassN= " << residualMassNumber
2815 << " nNuc= " << numberOfInvolvedNucleons
2816 << " lv= " << pResidual << G4endl;
2817#endif
2818
2819 if ( ! nucleus || numberOfInvolvedNucleons < 1 ) return false;
2820
2821 if ( residualMassNumber == 0 && numberOfInvolvedNucleons == 1 ) {
2822 dCor = 0.0;
2823 averagePt2 = 0.0;
2824 }
2825
2826 G4bool success = true;
2827
2828 G4double SumMasses = residualMass;
2829 G4double invN = 1.0 / (G4double)numberOfInvolvedNucleons;
2830
2831 // to avoid problems due to precision lost a tolerance is added
2832 const G4double eps = 1.e-10;
2833 const G4int maxNumberOfLoops = 1000;
2834 G4int loopCounter = 0;
2835 do {
2836
2837 success = true;
2838
2839 // Sampling of nucleon Pt
2840 G4ThreeVector ptSum( 0.0, 0.0, 0.0 );
2841 if( averagePt2 > 0.0 ) {
2842 for ( G4int i = 0; i < numberOfInvolvedNucleons; ++i ) {
2843 G4Nucleon* aNucleon = involvedNucleons[i];
2844 if ( ! aNucleon ) continue;
2845 G4ThreeVector tmpPt = GaussianPt( averagePt2, maxPt2 );
2846 ptSum += tmpPt;
2847 G4LorentzVector tmp( tmpPt.x(), tmpPt.y(), 0.0, 0.0 );
2848 aNucleon->SetMomentum( tmp );
2849 }
2850 }
2851
2852 G4double deltaPx = ( ptSum.x() - pResidual.x() )*invN;
2853 G4double deltaPy = ( ptSum.y() - pResidual.y() )*invN;
2854
2855 SumMasses = residualMass;
2856 for ( G4int i = 0; i < numberOfInvolvedNucleons; ++i ) {
2857 G4Nucleon* aNucleon = involvedNucleons[i];
2858 if ( ! aNucleon ) continue;
2859 G4double px = aNucleon->Get4Momentum().px() - deltaPx;
2860 G4double py = aNucleon->Get4Momentum().py() - deltaPy;
2861 G4double MtN = std::sqrt( sqr( aNucleon->GetSplitableHadron()->GetDefinition()->GetPDGMass() )
2862 + sqr( px ) + sqr( py ) );
2863 SumMasses += MtN;
2864 G4LorentzVector tmp( px, py, 0.0, MtN);
2865 aNucleon->SetMomentum( tmp );
2866 }
2867
2868 // Sampling X of nucleon
2869 G4double xSum = 0.0;
2870
2871 for ( G4int i = 0; i < numberOfInvolvedNucleons; ++i ) {
2872 G4Nucleon* aNucleon = involvedNucleons[i];
2873 if ( ! aNucleon ) continue;
2874
2875 G4double x = 0.0;
2876 if( 0.0 != dCor ) {
2877 G4ThreeVector tmpX = GaussianPt( dCor*dCor, 1.0 );
2878 x = tmpX.x();
2879 }
2880 x += aNucleon->Get4Momentum().e()/SumMasses;
2881 if ( x < -eps || x > 1.0 + eps ) {
2882 success = false;
2883 break;
2884 }
2885 x = std::min(1.0, std::max(x, 0.0));
2886 xSum += x;
2887 // The energy is in the lab (instead of cms) frame but it will not be used
2888
2889 G4LorentzVector tmp( aNucleon->Get4Momentum().x(),
2890 aNucleon->Get4Momentum().y(),
2891 x, aNucleon->Get4Momentum().e() );
2892 aNucleon->SetMomentum( tmp );
2893 }
2894
2895 if ( xSum < -eps || xSum > 1.0 + eps ) success = false;
2896 if ( ! success ) continue;
2897
2898 G4double delta = ( residualMassNumber == 0 ) ? std::min( xSum - 1.0, 0.0 )*invN : 0.0;
2899
2900 xSum = 1.0;
2901 mass2 = 0.0;
2902 for ( G4int i = 0; i < numberOfInvolvedNucleons; ++i ) {
2903 G4Nucleon* aNucleon = involvedNucleons[i];
2904 if ( ! aNucleon ) continue;
2905 G4double x = aNucleon->Get4Momentum().pz() - delta;
2906 xSum -= x;
2907
2908 if ( residualMassNumber == 0 ) {
2909 if ( x <= -eps || x > 1.0 + eps ) {
2910 success = false;
2911 break;
2912 }
2913 } else {
2914 if ( x <= -eps || x > 1.0 + eps || xSum <= -eps || xSum > 1.0 + eps ) {
2915 success = false;
2916 break;
2917 }
2918 }
2919 x = std::min( 1.0, std::max(x, eps) );
2920
2921 mass2 += sqr( aNucleon->Get4Momentum().e() ) / x;
2922
2923 G4LorentzVector tmp( aNucleon->Get4Momentum().px(), aNucleon->Get4Momentum().py(),
2924 x, aNucleon->Get4Momentum().e() );
2925 aNucleon->SetMomentum( tmp );
2926 }
2927 if ( ! success ) continue;
2928 xSum = std::min( 1.0, std::max(xSum, eps) );
2929
2930 if ( residualMassNumber > 0 ) mass2 += ( sqr( residualMass ) + pResidual.perp2() ) / xSum;
2931
2932 #ifdef debugPutOnMassShell
2933 G4cout << "success: " << success << " Mt(GeV)= "
2934 << std::sqrt( mass2 )/GeV << G4endl;
2935 #endif
2936
2937 } while ( ( ! success ) &&
2938 ++loopCounter < maxNumberOfLoops ); /* Loop checking, 10.08.2015, A.Ribon */
2939 return ( loopCounter < maxNumberOfLoops );
2940}
2941
2942
2943//============================================================================
2944
2946CheckKinematics( const G4double sValue, // input parameter
2947 const G4double sqrtS, // input parameter
2948 const G4double projectileMass2, // input parameter
2949 const G4double targetMass2, // input parameter
2950 const G4double nucleusY, // input parameter
2951 const G4bool isProjectileNucleus, // input parameter
2952 const G4int numberOfInvolvedNucleons, // input parameter
2953 G4Nucleon* involvedNucleons[], // input parameter
2954 G4double& targetWminus, // output parameter
2955 G4double& projectileWplus, // output parameter
2956 G4bool& success ) { // input & output parameter
2957
2958 // This method, which is called only by PutOnMassShell, checks whether the
2959 // kinematics is acceptable or not.
2960 // This method assumes that all the parameters have been initialized by the caller;
2961 // notice that the input boolean parameter isProjectileNucleus is meant to be true
2962 // only in the case of nucleus or antinucleus projectile.
2963 // The action of this method consists in computing targetWminus and projectileWplus
2964 // and setting the parameter success to false in the case that the kinematics should
2965 // be rejeted.
2966
2967 G4double decayMomentum2 = sqr( sValue ) + sqr( projectileMass2 ) + sqr( targetMass2 )
2968 - 2.0*( sValue*( projectileMass2 + targetMass2 )
2969 + projectileMass2*targetMass2 );
2970 targetWminus = ( sValue - projectileMass2 + targetMass2 + std::sqrt( decayMomentum2 ) )
2971 / 2.0 / sqrtS;
2972 projectileWplus = sqrtS - targetMass2/targetWminus;
2973 G4double projectilePz = projectileWplus/2.0 - projectileMass2/2.0/projectileWplus;
2974 G4double projectileE = projectileWplus/2.0 + projectileMass2/2.0/projectileWplus;
2975 G4double projectileY = 0.5 * G4Log( (projectileE + projectilePz)/
2976 (projectileE - projectilePz) );
2977 G4double targetPz = -targetWminus/2.0 + targetMass2/2.0/targetWminus;
2978 G4double targetE = targetWminus/2.0 + targetMass2/2.0/targetWminus;
2979 G4double targetY = 0.5 * G4Log( (targetE + targetPz)/(targetE - targetPz) );
2980
2981 #ifdef debugPutOnMassShell
2982 G4cout << "decayMomentum2 " << decayMomentum2 << G4endl
2983 << "\t targetWminus projectileWplus " << targetWminus << " " << projectileWplus << G4endl
2984 << "\t projectileY targetY " << projectileY << " " << targetY << G4endl;
2985 #endif
2986
2987 for ( G4int i = 0; i < numberOfInvolvedNucleons; ++i ) {
2988 G4Nucleon* aNucleon = involvedNucleons[i];
2989 if ( ! aNucleon ) continue;
2990 G4LorentzVector tmp = aNucleon->Get4Momentum();
2991 G4double mt2 = sqr( tmp.x() ) + sqr( tmp.y() ) +
2992 sqr( aNucleon->GetSplitableHadron()->GetDefinition()->GetPDGMass() );
2993 G4double x = tmp.z();
2994 G4double pz = -targetWminus*x/2.0 + mt2/(2.0*targetWminus*x);
2995 G4double e = targetWminus*x/2.0 + mt2/(2.0*targetWminus*x);
2996 if ( isProjectileNucleus ) {
2997 pz = projectileWplus*x/2.0 - mt2/(2.0*projectileWplus*x);
2998 e = projectileWplus*x/2.0 + mt2/(2.0*projectileWplus*x);
2999 }
3000 G4double nucleonY = 0.5 * G4Log( (e + pz)/(e - pz) );
3001
3002 #ifdef debugPutOnMassShell
3003 G4cout << "i nY pY nY-AY AY " << i << " " << nucleonY << " " << projectileY <<G4endl;
3004 #endif
3005
3006 if ( std::abs( nucleonY - nucleusY ) > 2 ||
3007 ( isProjectileNucleus && targetY > nucleonY ) ||
3008 ( ! isProjectileNucleus && projectileY < nucleonY ) ) {
3009 success = false;
3010 break;
3011 }
3012 }
3013 return true;
3014}
3015
3016
3017//============================================================================
3018
3020FinalizeKinematics( const G4double w, // input parameter
3021 const G4bool isProjectileNucleus, // input parameter
3022 const G4LorentzRotation& boostFromCmsToLab, // input parameter
3023 const G4double residualMass, // input parameter
3024 const G4int residualMassNumber, // input parameter
3025 const G4int numberOfInvolvedNucleons, // input parameter
3026 G4Nucleon* involvedNucleons[], // input & output parameter
3027 G4LorentzVector& residual4Momentum ) { // output parameter
3028
3029 // This method, which is called only by PutOnMassShell, finalizes the kinematics:
3030 // this method is called when we are sure that the sampling of the kinematics is
3031 // acceptable.
3032 // This method assumes that all the parameters have been initialized by the caller;
3033 // notice that the input boolean parameter isProjectileNucleus is meant to be true
3034 // only in the case of nucleus or antinucleus projectile: this information is needed
3035 // because the sign of pz (in the center-of-mass frame) in this case is opposite
3036 // with respect to the case of a normal hadron projectile.
3037 // The action of this method consists in modifying the momenta of the nucleons
3038 // (in the lab frame) and computing the residual 4-momentum (in the center-of-mass
3039 // frame).
3040
3041 G4ThreeVector residual3Momentum( 0.0, 0.0, 1.0 );
3042
3043 for ( G4int i = 0; i < numberOfInvolvedNucleons; ++i ) {
3044 G4Nucleon* aNucleon = involvedNucleons[i];
3045 if ( ! aNucleon ) continue;
3046 G4LorentzVector tmp = aNucleon->Get4Momentum();
3047 residual3Momentum -= tmp.vect();
3048 G4double mt2 = sqr( tmp.x() ) + sqr( tmp.y() ) +
3049 sqr( aNucleon->GetSplitableHadron()->GetDefinition()->GetPDGMass() );
3050 G4double x = tmp.z();
3051 G4double pz = -w * x / 2.0 + mt2 / ( 2.0 * w * x );
3052 G4double e = w * x / 2.0 + mt2 / ( 2.0 * w * x );
3053 // Reverse the sign of pz in the case of nucleus or antinucleus projectile
3054 if ( isProjectileNucleus ) pz *= -1.0;
3055 tmp.setPz( pz );
3056 tmp.setE( e );
3057 tmp.transform( boostFromCmsToLab );
3058 aNucleon->SetMomentum( tmp );
3059 G4VSplitableHadron* splitableHadron = aNucleon->GetSplitableHadron();
3060 splitableHadron->Set4Momentum( tmp );
3061 }
3062
3063 G4double residualMt2 = sqr( residualMass ) + sqr( residual3Momentum.x() )
3064 + sqr( residual3Momentum.y() );
3065
3066 #ifdef debugPutOnMassShell
3067 G4cout << "w residual3Momentum.z() " << w << " " << residual3Momentum.z() << G4endl;
3068 #endif
3069
3070 G4double residualPz = 0.0;
3071 G4double residualE = 0.0;
3072 if ( residualMassNumber != 0 ) {
3073 residualPz = -w * residual3Momentum.z() / 2.0 +
3074 residualMt2 / ( 2.0 * w * residual3Momentum.z() );
3075 residualE = w * residual3Momentum.z() / 2.0 +
3076 residualMt2 / ( 2.0 * w * residual3Momentum.z() );
3077 // Reverse the sign of residualPz in the case of nucleus or antinucleus projectile
3078 if ( isProjectileNucleus ) residualPz *= -1.0;
3079 }
3080
3081 residual4Momentum.setPx( residual3Momentum.x() );
3082 residual4Momentum.setPy( residual3Momentum.y() );
3083 residual4Momentum.setPz( residualPz );
3084 residual4Momentum.setE( residualE );
3085
3086 return true;
3087}
3088
3089
3090//============================================================================
3091
3092void G4FTFModel::ModelDescription( std::ostream& desc ) const {
3093 desc << " FTF (Fritiof) Model \n"
3094 << "The FTF model is based on the well-known FRITIOF \n"
3095 << "model (B. Andersson et al., Nucl. Phys. B281, 289 \n"
3096 << "(1987)). Its first program implementation was given\n"
3097 << "by B. Nilsson-Almquist and E. Stenlund (Comp. Phys.\n"
3098 << "Comm. 43, 387 (1987)). The Fritiof model assumes \n"
3099 << "that all hadron-hadron interactions are binary \n"
3100 << "reactions, h_1+h_2->h_1'+h_2' where h_1' and h_2' \n"
3101 << "are excited states of the hadrons with continuous \n"
3102 << "mass spectra. The excited hadrons are considered as\n"
3103 << "QCD-strings, and the corresponding LUND-string \n"
3104 << "fragmentation model is applied for a simulation of \n"
3105 << "their decays. \n"
3106 << " The Fritiof model assumes that in the course of \n"
3107 << "a hadron-nucleus interaction a string originated \n"
3108 << "from the projectile can interact with various intra\n"
3109 << "nuclear nucleons and becomes into highly excited \n"
3110 << "states. The probability of multiple interactions is\n"
3111 << "calculated in the Glauber approximation. A cascading\n"
3112 << "of secondary particles was neglected as a rule. Due\n"
3113 << "to these, the original Fritiof model fails to des- \n"
3114 << "cribe a nuclear destruction and slow particle spectra.\n"
3115 << " In order to overcome the difficulties we enlarge\n"
3116 << "the model by the reggeon theory inspired model of \n"
3117 << "nuclear desctruction (Kh. Abdel-Waged and V.V. Uzhi-\n"
3118 << "nsky, Phys. Atom. Nucl. 60, 828 (1997); Yad. Fiz. 60, 925\n"
3119 << "(1997)). Momenta of the nucleons ejected from a nuc-\n"
3120 << "leus in the reggeon cascading are sampled according\n"
3121 << "to a Fermi motion algorithm presented in (EMU-01 \n"
3122 << "Collaboration (M.I. Adamovich et al.) Zeit. fur Phys.\n"
3123 << "A358, 337 (1997)). \n"
3124 << " New features were also added to the Fritiof model\n"
3125 << "implemented in Geant4: a simulation of elastic had-\n"
3126 << "ron-nucleon scatterings, a simulation of binary \n"
3127 << "reactions like NN>NN* in hadron-nucleon interactions,\n"
3128 << "a separate simulation of single diffractive and non-\n"
3129 << " diffractive events. These allowed to describe after\n"
3130 << "model parameter tuning a wide set of experimental \n"
3131 << "data. \n";
3132}
3133
G4double C(G4double temp)
G4double S(G4double temp)
static const G4double eps
G4double condition(const G4ErrorSymMatrix &m)
std::vector< G4ExcitedString * > G4ExcitedStringVector
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
Definition: G4Exp.hh:179
G4double G4Log(G4double x)
Definition: G4Log.hh:226
CLHEP::HepLorentzRotation G4LorentzRotation
CLHEP::HepLorentzVector G4LorentzVector
static constexpr double perCent
Definition: G4SIunits.hh:325
static constexpr double twopi
Definition: G4SIunits.hh:56
static constexpr double GeV
Definition: G4SIunits.hh:203
static constexpr double MeV
Definition: G4SIunits.hh:200
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 z() const
double x() const
double mag2() const
double y() const
HepLorentzRotation inverse() const
Hep3Vector boostVector() const
HepLorentzVector & boost(double, double, double)
Hep3Vector vect() const
double perp2() const
void setVect(const Hep3Vector &)
Hep3Vector findBoostToCM() const
HepLorentzVector & transform(const HepRotation &)
static G4AntiLambda * Definition()
Definition: G4AntiLambda.cc:52
static G4AntiNeutron * Definition()
static G4AntiProton * Definition()
Definition: G4AntiProton.cc:50
virtual G4bool ExciteParticipants(G4VSplitableHadron *aPartner, G4VSplitableHadron *bPartner, G4FTFParameters *theParameters, G4ElasticHNScattering *theElastic) const
virtual void CreateStrings(G4VSplitableHadron *aHadron, G4bool isProjectile, G4ExcitedString *&FirstString, G4ExcitedString *&SecondString, G4FTFParameters *theParameters) const
virtual G4bool ElasticScattering(G4VSplitableHadron *aPartner, G4VSplitableHadron *bPartner, G4FTFParameters *theParameters) const
G4Parton * GetRightParton(void) const
G4Parton * GetLeftParton(void) const
G4bool IsExcited() const
virtual G4bool Annihilate(G4VSplitableHadron *aPartner, G4VSplitableHadron *bPartner, G4VSplitableHadron *&AdditionalString, G4FTFParameters *theParameters) const
G4bool FinalizeKinematics(const G4double w, const G4bool isProjectileNucleus, const G4LorentzRotation &boostFromCmsToLab, const G4double residualMass, const G4int residualMassNumber, const G4int numberOfInvolvedNucleons, G4Nucleon *involvedNucleons[], G4LorentzVector &residual4Momentum)
Definition: G4FTFModel.cc:3020
G4bool SamplingNucleonKinematics(G4double averagePt2, const G4double maxPt2, G4double dCor, G4V3DNucleus *nucleus, const G4LorentzVector &pResidual, const G4double residualMass, const G4int residualMassNumber, const G4int numberOfInvolvedNucleons, G4Nucleon *involvedNucleons[], G4double &mass2)
Definition: G4FTFModel.cc:2790
G4bool SampleBinInterval() const
Definition: G4FTFModel.hh:240
G4DiffractiveExcitation * theExcitation
Definition: G4FTFModel.hh:183
G4Nucleon * TheInvolvedNucleonsOfProjectile[250]
Definition: G4FTFModel.hh:179
G4ElasticHNScattering * theElastic
Definition: G4FTFModel.hh:184
G4bool ComputeNucleusProperties(G4V3DNucleus *nucleus, G4LorentzVector &nucleusMomentum, G4LorentzVector &residualMomentum, G4double &sumMasses, G4double &residualExcitationEnergy, G4double &residualMass, G4int &residualMassNumber, G4int &residualCharge)
Definition: G4FTFModel.cc:2631
G4double LowEnergyLimit
Definition: G4FTFModel.hh:189
void SetImpactParameter(const G4double b_value)
Definition: G4FTFModel.hh:224
G4bool GenerateDeltaIsobar(const G4double sqrtS, const G4int numberOfInvolvedNucleons, G4Nucleon *involvedNucleons[], G4double &sumMasses)
Definition: G4FTFModel.cc:2725
G4V3DNucleus * GetTargetNucleus() const
Definition: G4FTFModel.hh:216
std::vector< G4VSplitableHadron * > theAdditionalString
Definition: G4FTFModel.hh:187
G4int NumberOfTargetSpectatorNucleons
Definition: G4FTFModel.hh:208
G4int NumberOfInvolvedNucleonsOfProjectile
Definition: G4FTFModel.hh:180
G4double ProjectileResidualExcitationEnergy
Definition: G4FTFModel.hh:196
G4FTFModel(const G4String &modelName="FTF")
Definition: G4FTFModel.cc:70
G4LorentzVector TargetResidual4Momentum
Definition: G4FTFModel.hh:198
G4ThreeVector GaussianPt(G4double AveragePt2, G4double maxPtSquare) const
Definition: G4FTFModel.cc:2609
G4int NumberOfNNcollisions
Definition: G4FTFModel.hh:209
G4int ProjectileResidualCharge
Definition: G4FTFModel.hh:194
G4Nucleon * TheInvolvedNucleonsOfTarget[250]
Definition: G4FTFModel.hh:176
G4bool HighEnergyInter
Definition: G4FTFModel.hh:190
G4ExcitedStringVector * GetStrings() override
Definition: G4FTFModel.cc:298
G4ReactionProduct theProjectile
Definition: G4FTFModel.hh:173
G4int ProjectileResidualMassNumber
Definition: G4FTFModel.hh:193
void BuildStrings(G4ExcitedStringVector *strings)
Definition: G4FTFModel.cc:1975
G4bool PutOnMassShell()
Definition: G4FTFModel.cc:559
G4int AdjustNucleonsAlgorithm_beforeSampling(G4int interactionCase, G4VSplitableHadron *SelectedAntiBaryon, G4Nucleon *ProjectileNucleon, G4VSplitableHadron *SelectedTargetNucleon, G4Nucleon *TargetNucleon, G4bool Annihilation, CommonVariables &common)
Definition: G4FTFModel.cc:1148
void ReggeonCascade()
Definition: G4FTFModel.cc:456
G4FTFAnnihilation * theAnnihilation
Definition: G4FTFModel.hh:185
G4int NumberOfInvolvedNucleonsOfTarget
Definition: G4FTFModel.hh:177
G4bool ExciteParticipants()
Definition: G4FTFModel.cc:847
G4double Bimpact
Definition: G4FTFModel.hh:203
G4double Bmin
Definition: G4FTFModel.hh:205
G4FTFParameters * theParameters
Definition: G4FTFModel.hh:182
G4int TargetResidualMassNumber
Definition: G4FTFModel.hh:199
void GetResiduals()
Definition: G4FTFModel.cc:2290
void StoreInvolvedNucleon()
Definition: G4FTFModel.cc:405
G4FTFParticipants theParticipants
Definition: G4FTFModel.hh:174
~G4FTFModel() override
Definition: G4FTFModel.cc:122
G4bool BinInterval
Definition: G4FTFModel.hh:204
G4V3DNucleus * GetProjectileNucleus() const override
Definition: G4FTFModel.hh:220
void Init(const G4Nucleus &aNucleus, const G4DynamicParticle &aProjectile) override
Definition: G4FTFModel.cc:162
G4int ProjectileResidualLambdaNumber
Definition: G4FTFModel.hh:195
G4double GetBmin() const
Definition: G4FTFModel.hh:244
G4bool CheckKinematics(const G4double sValue, const G4double sqrtS, const G4double projectileMass2, const G4double targetMass2, const G4double nucleusY, const G4bool isProjectileNucleus, const G4int numberOfInvolvedNucleons, G4Nucleon *involvedNucleons[], G4double &targetWminus, G4double &projectileWplus, G4bool &success)
Definition: G4FTFModel.cc:2946
void ModelDescription(std::ostream &) const override
Definition: G4FTFModel.cc:3092
G4bool AdjustNucleonsAlgorithm_Sampling(G4int interactionCase, CommonVariables &common)
Definition: G4FTFModel.cc:1501
G4LorentzVector ProjectileResidual4Momentum
Definition: G4FTFModel.hh:192
G4double TargetResidualExcitationEnergy
Definition: G4FTFModel.hh:201
void AdjustNucleonsAlgorithm_afterSampling(G4int interactionCase, G4VSplitableHadron *SelectedAntiBaryon, G4VSplitableHadron *SelectedTargetNucleon, CommonVariables &common)
Definition: G4FTFModel.cc:1836
G4int TargetResidualCharge
Definition: G4FTFModel.hh:200
G4double Bmax
Definition: G4FTFModel.hh:206
G4int NumberOfProjectileSpectatorNucleons
Definition: G4FTFModel.hh:207
G4double GetBmax() const
Definition: G4FTFModel.hh:248
G4bool AdjustNucleons(G4VSplitableHadron *SelectedAntiBaryon, G4Nucleon *ProjectileNucleon, G4VSplitableHadron *SelectedTargetNucleon, G4Nucleon *TargetNucleon, G4bool Annihilation)
Definition: G4FTFModel.cc:1032
G4double GetCofNuclearDestructionPr()
G4double GetProbabilityOfAnnihilation()
G4double GetMaxNumberOfCollisions()
void SetProbabilityOfElasticScatt(const G4double Xtotal, const G4double Xelastic)
G4double GetPt2ofNuclearDestruction()
G4double GetMaxPt2ofNuclearDestruction()
G4double GetProbabilityOfElasticScatt()
G4double GetExcitationEnergyPerWoundedNucleon()
void InitForInteraction(const G4ParticleDefinition *, G4int theA, G4int theZ, G4double s)
G4double GetDofNuclearDestruction()
G4double GetR2ofNuclearDestruction()
G4double GetCofNuclearDestruction()
void GetList(const G4ReactionProduct &thePrimary, G4FTFParameters *theParameters)
void SetBminBmax(const G4double bmin_value, const G4double bmax_value)
G4double GetImpactParameter() const
G4InteractionContent & GetInteraction()
void SetEnergyMomentumCheckLevels(G4double relativeLevel, G4double absoluteLevel)
static G4double GetNuclearMass(G4int A, G4int Z, G4int L)
G4Nucleon * GetTargetNucleon() const
G4VSplitableHadron * GetProjectile() const
G4Nucleon * GetProjectileNucleon() const
void SetStatus(G4int aValue)
G4VSplitableHadron * GetTarget() const
G4double GetIonMass(G4int Z, G4int A, G4int nL=0, G4int lvl=0) const
Definition: G4IonTable.cc:1517
static G4Lambda * Definition()
Definition: G4Lambda.cc:52
static G4Neutron * Definition()
Definition: G4Neutron.cc:53
const G4ThreeVector & GetPosition() const
Definition: G4Nucleon.hh:140
G4bool AreYouHit() const
Definition: G4Nucleon.hh:98
void SetMomentum(G4LorentzVector &aMomentum)
Definition: G4Nucleon.hh:70
G4VSplitableHadron * GetSplitableHadron() const
Definition: G4Nucleon.hh:97
virtual const G4LorentzVector & Get4Momentum() const
Definition: G4Nucleon.hh:72
void Hit(G4VSplitableHadron *aHit)
Definition: G4Nucleon.hh:91
G4double GetBindingEnergy() const
Definition: G4Nucleon.hh:75
void SetParticleType(G4Proton *aProton)
Definition: G4Nucleon.hh:77
void SetBindingEnergy(G4double anEnergy)
Definition: G4Nucleon.hh:74
virtual const G4ParticleDefinition * GetDefinition() const
Definition: G4Nucleon.hh:86
G4int GetA_asInt() const
Definition: G4Nucleus.hh:99
G4int GetZ_asInt() const
Definition: G4Nucleus.hh:105
G4double GetPDGCharge() const
G4int GetNumberOfLambdasInHypernucleus() const
G4int GetNumberOfAntiLambdasInAntiHypernucleus() const
const G4String & GetParticleName() const
G4IonTable * GetIonTable() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
G4int GetPDGcode() const
Definition: G4Parton.hh:127
static G4Proton * Definition()
Definition: G4Proton.cc:48
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetTotalEnergy(const G4double en)
G4double GetTotalMomentum() const
const G4ParticleDefinition * GetDefinition() const
G4double GetTotalEnergy() const
G4ThreeVector GetMomentum() const
G4double GetMass() const
virtual G4Nucleon * GetNextNucleon()=0
virtual G4bool StartLoop()=0
virtual void DoLorentzBoost(const G4LorentzVector &theBoost)=0
virtual void DoLorentzContraction(const G4LorentzVector &theBoost)=0
virtual G4int GetMassNumber()=0
virtual void InitProjectileNucleus(G4int theZ, G4int theA, G4int numberOfLambdasOrAntiLambdas=0)
virtual void Init(G4int theZ, G4int theA)
virtual void SetProjectileNucleus(G4V3DNucleus *aNucleus)
virtual G4V3DNucleus * GetProjectileNucleus() const
void SetTimeOfCreation(G4double aTime)
void SetStatus(const G4int aStatus)
const G4ParticleDefinition * GetDefinition() const
void Set4Momentum(const G4LorentzVector &a4Momentum)
void SetDefinition(const G4ParticleDefinition *aDefinition)
const G4LorentzVector & Get4Momentum() const
const G4ThreeVector & GetPosition() const
T max(const T t1, const T t2)
brief Return the largest of the two arguments
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
void operator()(G4VSplitableHadron *aH)
Definition: G4FTFModel.cc:117
T sqr(const T &x)
Definition: templates.hh:128
static int FASTCALL common(PROLOG_STATE *state, int tok)
Definition: xmlrole.cc:1309