115 G4int chargeBalance =
G4lrint(projectile->GetDefinition()->GetPDGCharge()
116 + targets[0]->GetDefinition()->GetPDGCharge()
117 + targets[1]->GetDefinition()->GetPDGCharge());
119 G4int baryonBalance = projectile->GetDefinition()->GetBaryonNumber()
120 + targets[0]->GetDefinition()->GetBaryonNumber()
121 + targets[1]->GetDefinition()->GetBaryonNumber();
126 theT1 = toSPS * theT1;
127 theT2 = toSPS * theT2;
128 thePro = toSPS * thePro;
138 thePro = toZ * thePro;
147 temp=
d1;d1=
d2;d2=temp;
152 if(d1->GetPDGCharge()>.5)
170 if(d1->GetPDGCharge()<.5)
188 G4double M_sq = (thePro+theT1+theT2).mag2();
192 G4double p = std::sqrt((m_sq*m_sq - 4.*m1_sq * m2_sq)/(4.*M_sq));
195 G4ThreeVector pFinal(p*std::sin(std::acos(costh))*std::cos(phi), p*std::sin(std::acos(costh))*std::sin(phi), p*costh);
199 G4double eFinal1 = std::sqrt(m1_sq+pFinal.mag2());
201 G4double eFinal2 = std::sqrt(m2_sq+pFinal.mag2());
205 final1 = toLab * final1;
206 final2 = toLab * final2;
209 final1 = fromSPS * final1;
210 final2 = fromSPS * final2;
218 result->push_back(f1);
219 result->push_back(f2);
221 for(
size_t hpw=0; hpw<result->size(); hpw++)
223 energyBalance-=result->operator[](hpw)->Get4Momentum().t();
224 chargeBalance-=
G4lrint(result->operator[](hpw)->GetDefinition()->GetPDGCharge());
225 baryonBalance-=result->operator[](hpw)->GetDefinition()->GetBaryonNumber();
227 if(getenv(
"AbsorptionEnergyBalanceCheck"))
228 std::cout <<
"DEBUGGING energy balance B: "
G4double G4ParticleHPJENDLHEData::G4double result
static G4Proton * ProtonDefinition()
HepLorentzVector & rotateZ(double)
G4double GetPDGMass() const
HepLorentzVector & rotateY(double)
static constexpr double pi
G4double GetPDGCharge() const
static G4Neutron * NeutronDefinition()