74 if ( Pprojectile.
z() < 0.0 )
return false;
75 G4bool PutOnMassShell(
false );
81 if ( M0projectile < MminProjectile ) {
82 PutOnMassShell =
true;
85 G4double M0projectile2 = M0projectile * M0projectile;
95 if ( M0target < MminTarget ) {
96 PutOnMassShell =
true;
99 G4double M0target2 = M0target * M0target;
103 Psum = Pprojectile + Ptarget;
106 if ( Ptmp.pz() <= 0.0 )
return false;
109 toCms.
rotateZ( -1*Ptmp.phi() );
110 toCms.
rotateY( -1*Ptmp.theta() );
119 if ( SqrtS < M0projectile + M0target )
return false;
121 PZcms2 = ( S*S +
sqr( M0projectile2 ) +
sqr( M0target2 )
122 - 2*S*M0projectile2 - 2*S*M0target2 - 2*M0projectile2*M0target2 ) / 4.0 / S;
124 if ( PZcms2 < 0.0 ) {
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; }
139 PZcms = std::sqrt( PZcms2 );
141 if ( PutOnMassShell ) {
142 if ( Pprojectile.z() > 0.0 ) {
143 Pprojectile.setPz( PZcms );
144 Ptarget.setPz( -PZcms );
146 Pprojectile.setPz( -PZcms );
147 Ptarget.setPz( PZcms );
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() +
163 const G4int maxNumberOfLoops = 1000;
164 G4int loopCounter = 0;
166 Qmomentum =
G4LorentzVector( GaussianPt( AveragePt2, maxPtSquare ), 0.0 );
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 );
174 if ( loopCounter >= maxNumberOfLoops ) {
178 PZcms2 = ( S*S +
sqr( ProjMassT2 ) +
sqr( TargMassT2 )
179 - 2.0*S*ProjMassT2 - 2.0*S*TargMassT2 - 2.0*ProjMassT2*TargMassT2 ) / 4.0 / S;
181 if ( PZcms2 < 0.0 ) { PZcms2 = 0.0; };
182 PZcms = std::sqrt( PZcms2 );
183 Pprojectile.setPz( PZcms );
184 Ptarget.setPz( -PZcms );
185 Pprojectile += Qmomentum;
186 Ptarget -= Qmomentum;
215 if ( AveragePt2 <= 0.0 ) {
219 (
G4Exp( -maxPtSquare/AveragePt2 ) -1.0 ) );
223 return G4ThreeVector( Pt * std::cos( phi ), Pt * std::sin( phi ), 0.0 );
231 "G4ElasticHNScattering copy contructor not meant to be called" );
244 "G4ElasticHNScattering = operator not meant to be called" );
252 "G4ElasticHNScattering == operator not meant to be called" );
260 "G4ElasticHNScattering != operator not meant to be called" );
virtual G4bool ElasticScattering(G4VSplitableHadron *aPartner, G4VSplitableHadron *bPartner, G4FTFParameters *theParameters) const
Hep3Vector boostVector() const
CLHEP::Hep3Vector G4ThreeVector
void SetTimeOfCreation(G4double aTime)
G4double GetAvaragePt2ofElasticScattering()
HepLorentzVector & rotateZ(double)
static constexpr double twopi
const G4ParticleDefinition * GetDefinition() const
G4double GetTimeOfCreation()
HepLorentzRotation & transform(const HepBoost &b)
void IncrementCollisionCount(G4int aCount)
const G4LorentzVector & Get4Momentum() const
G4double GetMinimumMass(const G4ParticleDefinition *p) const
G4double G4Log(G4double x)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double GetPDGMass() const
void SetPosition(const G4ThreeVector &aPosition)
HepLorentzVector & rotateY(double)
virtual ~G4ElasticHNScattering()
const G4ThreeVector & GetPosition() const
HepLorentzVector & transform(const HepRotation &)
void Set4Momentum(const G4LorentzVector &a4Momentum)
CLHEP::HepLorentzVector G4LorentzVector