75 G4double M0projectile2 = M0projectile * M0projectile;
80 G4double M0target2 = M0target * M0target;
86 Psum = Pprojectile + Ptarget;
89 if ( Ptmp.
pz() <= 0.0 )
return false;
101 if ( SqrtS < M0projectile + M0target )
return false;
103 PZcms2 = (
S*
S +
sqr( M0projectile2 ) +
sqr( M0target2 )
104 - 2*
S*M0projectile2 - 2*
S*M0target2 - 2*M0projectile2*M0target2 ) / 4.0 /
S;
106 PZcms = ( PZcms2 > 0.0 ? std::sqrt( PZcms2 ) : 0.0 );
116 const G4int maxNumberOfLoops = 1000;
117 G4int loopCounter = 0;
119 Qmomentum =
G4LorentzVector( GaussianPt( AveragePt2, maxPtSquare ), 0.0 );
121 ProjMassT2 = M0projectile2 + Pt2;
122 ProjMassT = std::sqrt( ProjMassT2 );
123 TargMassT2 = M0target2 + Pt2;
124 TargMassT = std::sqrt( TargMassT2 );
125 }
while ( ( SqrtS < ProjMassT + TargMassT ) &&
126 ++loopCounter < maxNumberOfLoops );
127 if ( loopCounter >= maxNumberOfLoops ) {
131 PZcms2 = (
S*
S +
sqr( ProjMassT2 ) +
sqr( TargMassT2 )
132 - 2.0*
S*ProjMassT2 - 2.0*
S*TargMassT2 - 2.0*ProjMassT2*TargMassT2 ) / 4.0 /
S;
134 if ( PZcms2 < 0.0 ) { PZcms2 = 0.0; };
135 PZcms = std::sqrt( PZcms2 );
136 Pprojectile.
setPz( PZcms );
137 Ptarget.
setPz( -PZcms );
138 Pprojectile += Qmomentum;
139 Ptarget -= Qmomentum;
168 if ( AveragePt2 <= 0.0 ) {
173 G4double Pt = ( Pt2 > 0.0 ? std::sqrt( Pt2 ) : 0.0 );
175 return G4ThreeVector( Pt * std::cos( phi ), Pt * std::sin( phi ), 0.0 );
183 "G4ElasticHNScattering copy constructor not meant to be called" );
196 "G4ElasticHNScattering = operator not meant to be called" );
204 "G4ElasticHNScattering == operator not meant to be called" );
212 "G4ElasticHNScattering != operator not meant to be called" );
G4double S(G4double temp)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double G4Log(G4double x)
CLHEP::HepLorentzVector G4LorentzVector
CLHEP::Hep3Vector G4ThreeVector
HepLorentzRotation & rotateY(double delta)
HepLorentzRotation & rotateZ(double delta)
HepLorentzRotation inverse() const
Hep3Vector boostVector() const
HepLorentzVector & transform(const HepRotation &)
virtual ~G4ElasticHNScattering()
virtual G4bool ElasticScattering(G4VSplitableHadron *aPartner, G4VSplitableHadron *bPartner, G4FTFParameters *theParameters) const
G4double GetAvaragePt2ofElasticScattering()
void SetTimeOfCreation(G4double aTime)
G4double GetTimeOfCreation()
void Set4Momentum(const G4LorentzVector &a4Momentum)
const G4LorentzVector & Get4Momentum() const
const G4ThreeVector & GetPosition() const
void IncrementCollisionCount(G4int aCount)
void SetPosition(const G4ThreeVector &aPosition)