Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4ElasticHNScattering Class Reference

#include <G4ElasticHNScattering.hh>

Public Member Functions

 G4ElasticHNScattering ()
 
virtual ~G4ElasticHNScattering ()
 
virtual G4bool ElasticScattering (G4VSplitableHadron *aPartner, G4VSplitableHadron *bPartner, G4FTFParameters *theParameters) const
 

Detailed Description

Definition at line 51 of file G4ElasticHNScattering.hh.

Constructor & Destructor Documentation

G4ElasticHNScattering::G4ElasticHNScattering ( )

Definition at line 59 of file G4ElasticHNScattering.cc.

59 {}
G4ElasticHNScattering::~G4ElasticHNScattering ( )
virtual

Definition at line 237 of file G4ElasticHNScattering.cc.

237 {}

Member Function Documentation

G4bool G4ElasticHNScattering::ElasticScattering ( G4VSplitableHadron aPartner,
G4VSplitableHadron bPartner,
G4FTFParameters theParameters 
) const
virtual

Definition at line 64 of file G4ElasticHNScattering.cc.

66  {
67  projectile->IncrementCollisionCount( 1 );
68  target->IncrementCollisionCount( 1 );
69 
71 
72  // Projectile parameters
73  G4LorentzVector Pprojectile = projectile->Get4Momentum();
74  if ( Pprojectile.z() < 0.0 ) return false;
75  G4bool PutOnMassShell( false );
76  G4double M0projectile = Pprojectile.mag();
77  //if ( M0projectile < projectile->GetDefinition()->GetPDGMass() ) {
78 
79  G4double MminProjectile=BrW.GetMinimumMass(projectile->GetDefinition());
80 
81  if ( M0projectile < MminProjectile ) {
82  PutOnMassShell = true;
83  M0projectile = projectile->GetDefinition()->GetPDGMass();
84  }
85  G4double M0projectile2 = M0projectile * M0projectile;
86  G4double AveragePt2 = theParameters->GetAvaragePt2ofElasticScattering();
87 
88  // Target parameters
89  G4LorentzVector Ptarget = target->Get4Momentum();
90  G4double M0target = Ptarget.mag();
91  //if ( M0target < target->GetDefinition()->GetPDGMass() ) {
92 
93  G4double MminTarget=BrW.GetMinimumMass(target->GetDefinition());
94 
95  if ( M0target < MminTarget ) {
96  PutOnMassShell = true;
97  M0target = target->GetDefinition()->GetPDGMass();
98  }
99  G4double M0target2 = M0target * M0target;
100 
101  // Transform momenta to cms and then rotate parallel to z axis;
102  G4LorentzVector Psum;
103  Psum = Pprojectile + Ptarget;
104  G4LorentzRotation toCms( -1*Psum.boostVector() );
105  G4LorentzVector Ptmp = toCms*Pprojectile;
106  if ( Ptmp.pz() <= 0.0 ) return false;
107  //"String" moving backwards in CMS, abort collision !
108  //G4cout << " abort Collision! " << G4endl;
109  toCms.rotateZ( -1*Ptmp.phi() );
110  toCms.rotateY( -1*Ptmp.theta() );
111  G4LorentzRotation toLab( toCms.inverse() );
112  Pprojectile.transform( toCms );
113  Ptarget.transform( toCms );
114 
115  // Putting on mass-on-shell, if needed
116  G4double PZcms2, PZcms;
117  G4double S = Psum.mag2();
118  G4double SqrtS = std::sqrt( S );
119  if ( SqrtS < M0projectile + M0target ) return false;
120 
121  PZcms2 = ( S*S + sqr( M0projectile2 ) + sqr( M0target2 )
122  - 2*S*M0projectile2 - 2*S*M0target2 - 2*M0projectile2*M0target2 ) / 4.0 / S;
123 
124  if ( PZcms2 < 0.0 ) { // It can be in an interaction with off-shell nuclear nucleon
125  if ( M0projectile > projectile->GetDefinition()->GetPDGMass() ) {
126  // An attempt to de-excite the projectile
127  // It is assumed that the target is in the ground state
128  M0projectile = projectile->GetDefinition()->GetPDGMass();
129  M0projectile2 = M0projectile * M0projectile;
130  PZcms2= ( S*S + sqr( M0projectile2 ) + sqr( M0target2 )
131  - 2*S*M0projectile2 - 2*S*M0target2 - 2*M0projectile2*M0target2 ) / 4.0 / S;
132  if ( PZcms2 < 0.0 ) { return false; } // Nonsuccesful attempt to de-excitate the projectile
133  } else {
134  return false; // The projectile was not excited, but the energy was too low to put
135  // the target nucleon on mass-shell
136  }
137  }
138 
139  PZcms = std::sqrt( PZcms2 );
140 
141  if ( PutOnMassShell ) {
142  if ( Pprojectile.z() > 0.0 ) {
143  Pprojectile.setPz( PZcms );
144  Ptarget.setPz( -PZcms );
145  } else {
146  Pprojectile.setPz( -PZcms );
147  Ptarget.setPz( PZcms );
148  };
149  Pprojectile.setE( std::sqrt( M0projectile2 + Pprojectile.x() * Pprojectile.x() +
150  Pprojectile.y() * Pprojectile.y() + PZcms2 ) );
151  Ptarget.setE( std::sqrt( M0target2 + Ptarget.x() * Ptarget.x() + Ptarget.y() * Ptarget.y() +
152  PZcms2 ) );
153  }
154 
155  G4double maxPtSquare = PZcms2;
156 
157  // Now we can calculate the transferred Pt
158  G4double Pt2;
159  G4double ProjMassT2, ProjMassT;
160  G4double TargMassT2, TargMassT;
161  G4LorentzVector Qmomentum;
162 
163  const G4int maxNumberOfLoops = 1000;
164  G4int loopCounter = 0;
165  do {
166  Qmomentum = G4LorentzVector( GaussianPt( AveragePt2, maxPtSquare ), 0.0 );
167  Pt2 = G4ThreeVector( Qmomentum.vect() ).mag2();
168  ProjMassT2 = M0projectile2 + Pt2;
169  ProjMassT = std::sqrt( ProjMassT2 );
170  TargMassT2 = M0target2 + Pt2;
171  TargMassT = std::sqrt( TargMassT2 );
172  } while ( ( SqrtS < ProjMassT + TargMassT ) &&
173  ++loopCounter < maxNumberOfLoops ); /* Loop checking, 10.08.2015, A.Ribon */
174  if ( loopCounter >= maxNumberOfLoops ) {
175  return false;
176  }
177 
178  PZcms2 = ( S*S + sqr( ProjMassT2 ) + sqr( TargMassT2 )
179  - 2.0*S*ProjMassT2 - 2.0*S*TargMassT2 - 2.0*ProjMassT2*TargMassT2 ) / 4.0 / S;
180 
181  if ( PZcms2 < 0.0 ) { PZcms2 = 0.0; }; // to avoid the exactness problem
182  PZcms = std::sqrt( PZcms2 );
183  Pprojectile.setPz( PZcms );
184  Ptarget.setPz( -PZcms );
185  Pprojectile += Qmomentum;
186  Ptarget -= Qmomentum;
187 
188  // Transform back and update SplitableHadron Participant.
189  Pprojectile.transform( toLab );
190  Ptarget.transform( toLab );
191 
192  // Calculation of the creation time
193  projectile->SetTimeOfCreation( target->GetTimeOfCreation() );
194  projectile->SetPosition( target->GetPosition() );
195 
196  // Creation time and position of target nucleon were determined at
197  // ReggeonCascade() of G4FTFModel
198 
199  projectile->Set4Momentum( Pprojectile );
200  target->Set4Momentum( Ptarget );
201 
202  //projectile->IncrementCollisionCount( 1 );
203  //target->IncrementCollisionCount( 1 );
204 
205  return true;
206 }
Hep3Vector boostVector() const
const XML_Char * target
Definition: expat.h:268
double S(double temp)
CLHEP::Hep3Vector G4ThreeVector
G4double GetAvaragePt2ofElasticScattering()
HepLorentzVector & rotateZ(double)
int G4int
Definition: G4Types.hh:78
Hep3Vector vect() const
double mag() const
bool G4bool
Definition: G4Types.hh:79
HepLorentzRotation & transform(const HepBoost &b)
G4double GetMinimumMass(const G4ParticleDefinition *p) const
double mag2() const
HepLorentzVector & rotateY(double)
HepLorentzVector & transform(const HepRotation &)
T sqr(const T &x)
Definition: templates.hh:145
double G4double
Definition: G4Types.hh:76
CLHEP::HepLorentzVector G4LorentzVector

Here is the call graph for this function:

Here is the caller graph for this function:


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