64 projectile->IncrementCollisionCount( 1 );
65 target->IncrementCollisionCount( 1 );
69 if ( Pprojectile.
z() < 0.0 )
return false;
70 G4bool PutOnMassShell(
false );
72 if ( M0projectile < projectile->GetDefinition()->GetPDGMass() ) {
73 PutOnMassShell =
true;
74 M0projectile = projectile->GetDefinition()->GetPDGMass();
76 G4double M0projectile2 = M0projectile * M0projectile;
82 if ( M0target < target->GetDefinition()->GetPDGMass() ) {
83 PutOnMassShell =
true;
84 M0target =
target->GetDefinition()->GetPDGMass();
86 G4double M0target2 = M0target * M0target;
90 Psum = Pprojectile + Ptarget;
93 if ( Ptmp.pz() <= 0.0 )
return false;
97 toCms.
rotateY( -1*Ptmp.theta() );
106 if ( SqrtS < M0projectile + M0target )
return false;
108 PZcms2 = ( S*S +
sqr( M0projectile2 ) +
sqr( M0target2 )
109 - 2*S*M0projectile2 - 2*S*M0target2 - 2*M0projectile2*M0target2 ) / 4.0 / S;
111 if ( PZcms2 < 0.0 ) {
112 if ( M0projectile > projectile->GetDefinition()->GetPDGMass() ) {
115 M0projectile = projectile->GetDefinition()->GetPDGMass();
116 M0projectile2 = M0projectile * M0projectile;
117 PZcms2= ( S*S +
sqr( M0projectile2 ) +
sqr( M0target2 )
118 - 2*S*M0projectile2 - 2*S*M0target2 - 2*M0projectile2*M0target2 ) / 4.0 / S;
119 if ( PZcms2 < 0.0 ) {
return false; }
126 PZcms = std::sqrt( PZcms2 );
128 if ( PutOnMassShell ) {
129 if ( Pprojectile.z() > 0.0 ) {
130 Pprojectile.setPz( PZcms );
131 Ptarget.setPz( -PZcms );
133 Pprojectile.setPz( -PZcms );
134 Ptarget.setPz( PZcms );
136 Pprojectile.setE( std::sqrt( M0projectile2 + Pprojectile.x() * Pprojectile.x() +
137 Pprojectile.y() * Pprojectile.y() + PZcms2 ) );
138 Ptarget.setE( std::sqrt( M0target2 + Ptarget.x() * Ptarget.x() + Ptarget.y() * Ptarget.y() +
151 Qmomentum =
G4LorentzVector( GaussianPt( AveragePt2, maxPtSquare ), 0.0 );
153 ProjMassT2 = M0projectile2 + Pt2;
154 ProjMassT = std::sqrt( ProjMassT2 );
155 TargMassT2 = M0target2 + Pt2;
156 TargMassT = std::sqrt( TargMassT2 );
157 }
while ( SqrtS < ProjMassT + TargMassT );
159 PZcms2 = ( S*S +
sqr( ProjMassT2 ) +
sqr( TargMassT2 )
160 - 2.0*S*ProjMassT2 - 2.0*S*TargMassT2 - 2.0*ProjMassT2*TargMassT2 ) / 4.0 / S;
162 if ( PZcms2 < 0.0 ) { PZcms2 = 0.0; };
163 PZcms = std::sqrt( PZcms2 );
164 Pprojectile.setPz( PZcms );
165 Ptarget.setPz( -PZcms );
166 Pprojectile += Qmomentum;
167 Ptarget -= Qmomentum;
174 projectile->SetTimeOfCreation(
target->GetTimeOfCreation() );
175 projectile->SetPosition(
target->GetPosition() );
180 projectile->Set4Momentum( Pprojectile );
181 target->Set4Momentum( Ptarget );
Hep3Vector boostVector() const
CLHEP::Hep3Vector G4ThreeVector
G4double GetAvaragePt2ofElasticScattering()
HepLorentzVector & rotateZ(double)
HepLorentzRotation & transform(const HepBoost &b)
HepLorentzVector & rotateY(double)
HepLorentzVector & transform(const HepRotation &)
CLHEP::HepLorentzVector G4LorentzVector