71 if ( Pprojectile.z() < 0.0 )
return false;
72 G4bool PutOnMassShell(
false );
73 G4double M0projectile = Pprojectile.mag();
78 if ( M0projectile < MminProjectile ) {
79 PutOnMassShell =
true;
82 G4double M0projectile2 = M0projectile * M0projectile;
92 if ( M0target < MminTarget ) {
93 PutOnMassShell =
true;
96 G4double M0target2 = M0target * M0target;
100 Psum = Pprojectile + Ptarget;
103 if ( Ptmp.pz() <= 0.0 )
return false;
106 toCms.rotateZ( -1*Ptmp.phi() );
107 toCms.rotateY( -1*Ptmp.theta() );
109 Pprojectile.transform( toCms );
110 Ptarget.transform( toCms );
116 if ( SqrtS < M0projectile + M0target )
return false;
118 PZcms2 = ( S*S +
sqr( M0projectile2 ) +
sqr( M0target2 )
119 - 2*S*M0projectile2 - 2*S*M0target2 - 2*M0projectile2*M0target2 ) / 4.0 / S;
121 if ( PZcms2 < 0.0 ) {
126 M0projectile2 = M0projectile * M0projectile;
127 PZcms2= ( S*S +
sqr( M0projectile2 ) +
sqr( M0target2 )
128 - 2*S*M0projectile2 - 2*S*M0target2 - 2*M0projectile2*M0target2 ) / 4.0 / S;
129 if ( PZcms2 < 0.0 ) {
return false; }
136 PZcms = std::sqrt( PZcms2 );
138 if ( PutOnMassShell ) {
139 if ( Pprojectile.z() > 0.0 ) {
140 Pprojectile.setPz( PZcms );
141 Ptarget.setPz( -PZcms );
143 Pprojectile.setPz( -PZcms );
144 Ptarget.setPz( PZcms );
146 Pprojectile.setE( std::sqrt( M0projectile2 + Pprojectile.x() * Pprojectile.x() +
147 Pprojectile.y() * Pprojectile.y() + PZcms2 ) );
148 Ptarget.setE( std::sqrt( M0target2 + Ptarget.x() * Ptarget.x() + Ptarget.y() * Ptarget.y() +
163 ProjMassT2 = M0projectile2 + Pt2;
164 ProjMassT = std::sqrt( ProjMassT2 );
165 TargMassT2 = M0target2 + Pt2;
166 TargMassT = std::sqrt( TargMassT2 );
167 }
while ( SqrtS < ProjMassT + TargMassT );
169 PZcms2 = ( S*S +
sqr( ProjMassT2 ) +
sqr( TargMassT2 )
170 - 2.0*S*ProjMassT2 - 2.0*S*TargMassT2 - 2.0*ProjMassT2*TargMassT2 ) / 4.0 / S;
172 if ( PZcms2 < 0.0 ) { PZcms2 = 0.0; };
173 PZcms = std::sqrt( PZcms2 );
174 Pprojectile.setPz( PZcms );
175 Ptarget.setPz( -PZcms );
176 Pprojectile += Qmomentum;
177 Ptarget -= Qmomentum;
180 Pprojectile.transform( toLab );
181 Ptarget.transform( toLab );
206 if ( AveragePt2 <= 0.0 ) {
210 ( std::exp( -maxPtSquare/AveragePt2 ) -1.0 ) );
214 return G4ThreeVector( Pt * std::cos( phi ), Pt * std::sin( phi ), 0.0 );
222 "G4ElasticHNScattering copy contructor not meant to be called" );
235 "G4ElasticHNScattering = operator not meant to be called" );
243 "G4ElasticHNScattering == operator not meant to be called" );
251 "G4ElasticHNScattering != operator not meant to be called" );
virtual G4bool ElasticScattering(G4VSplitableHadron *aPartner, G4VSplitableHadron *bPartner, G4FTFParameters *theParameters) const
CLHEP::Hep3Vector G4ThreeVector
int operator==(const G4ElasticHNScattering &right) const
CLHEP::HepLorentzRotation G4LorentzRotation
void SetTimeOfCreation(G4double aTime)
G4double GetAvaragePt2ofElasticScattering()
const G4ParticleDefinition * GetDefinition() const
const G4ElasticHNScattering & operator=(const G4ElasticHNScattering &right)
G4double GetTimeOfCreation()
G4ThreeVector GaussianPt(G4double AveragePt2, G4double maxPtSquare) const
void IncrementCollisionCount(G4int aCount)
const G4LorentzVector & Get4Momentum() const
G4double GetMinimumMass(const G4ParticleDefinition *p) const
G4double GetPDGMass() const
void SetPosition(const G4ThreeVector &aPosition)
virtual ~G4ElasticHNScattering()
const G4ThreeVector & GetPosition() const
int operator!=(const G4ElasticHNScattering &right) const
void Set4Momentum(const G4LorentzVector &a4Momentum)
CLHEP::HepLorentzVector G4LorentzVector