45 std::vector<G4KineticTrack *> & someCandidates,
49 if(someCandidates.size() >1)
51 std::vector<G4KineticTrack *>::iterator j=someCandidates.begin();
52 for(; j != someCandidates.end(); ++j)
60 aTarget.push_back(*j);
75 G4KineticTrack * aProjectile, std::vector<G4KineticTrack *> & someCandidates)
77 std::vector<G4KineticTrack *>::iterator j=someCandidates.begin();
84 for(; j != someCandidates.end(); ++j)
86 if(*j == aTarget)
continue;
87 G4int cCharge =
G4lrint((*j)->GetDefinition()->GetPDGCharge());
88 if (chargeSum+cCharge > 2)
continue;
89 if (chargeSum+cCharge < 0)
continue;
92 if((firstBase+secodeBase).mag()<min)
94 min=(firstBase+secodeBase).mag();
98 if(partner) result.push_back(partner);
105 std::vector<G4KineticTrack *> & targets)
116 + targets[0]->GetDefinition()->GetPDGCharge()
117 + targets[1]->GetDefinition()->GetPDGCharge());
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);
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: "
257 if ( mom1.
mag2() < -1.*
eV )
259 G4cout <<
"G4MesonAbsorption::GetTimeToInteraction(): negative m2:" << mom1.
mag2() <<
G4endl;
262 G4double collisionTime = - (position * velocity) / (velocity * velocity);
264 if (collisionTime > 0)
268 mom1 = toCMSFrame * mom1;
269 mom2 = toCMSFrame * mom2;
274 (toCMSFrame * coordinate2).vect());
277 G4double distance = pos * pos - (pos*mom) * (pos*mom) / (mom*mom);
281 if(
pi*distance>maxCrossSection)
return time;
286 pi*distance>maxChargedCrossSection)
return time;
290 sqrtS>1.91*
GeV &&
pi*distance>maxChargedCrossSection)
return time;
293 if ( totalCrossSection > 0 )
295 if (distance <= totalCrossSection /
pi)
297 time = collisionTime;
321 {0,4,50,5.5,75,8,95,10,120,11.5,140,12,160,11.5,180,10,190,8,210,6,235,4,260,3,300,2};
327 while(t>it[count])count+=2;
333 aCross = y1+(y2-
y1)/(x2-x1)*(t-
x1);
const G4LorentzVector & Get4Momentum() const
static const G4double pos
static constexpr double MeV
Float_t y1[n_points_granero]
Float_t x1[n_points_granero]
const G4LorentzVector & GetTrackingMomentum() const
const G4ParticleDefinition * GetDefinition() const
G4double GetPDGCharge() const
G4double AbsorptionCrossSection(const G4KineticTrack &trk1, const G4KineticTrack &trk2)
static G4PionPlus * PionPlusDefinition()
virtual G4KineticTrackVector * GetFinalState(G4KineticTrack *aProjectile, std::vector< G4KineticTrack * > &theTargets)
G4double GetPDGMass() const
Float_t y2[n_points_geant4]
static constexpr double millibarn
static G4Proton * ProtonDefinition()
G4int GetBaryonNumber() const
G4double GetActualMass() const
virtual const std::vector< G4CollisionInitialState * > & GetCollisions(G4KineticTrack *aProjectile, std::vector< G4KineticTrack * > &someCandidates, G4double aCurrentTime)
void FindAndFillCluster(G4KineticTrackVector &result, G4KineticTrack *aProjectile, std::vector< G4KineticTrack * > &someCandidates)
HepLorentzRotation inverse() const
G4double GetTimeToAbsorption(const G4KineticTrack &trk1, const G4KineticTrack &trk2)
HepLorentzVector & rotateY(double)
static constexpr double eV
static G4PionMinus * PionMinusDefinition()
G4double G4ParticleHPJENDLHEData::G4double result
HepLorentzVector & rotateZ(double)
static constexpr double c_light
static G4Neutron * Neutron()
static G4Neutron * NeutronDefinition()
G4GLOB_DLL std::ostream G4cout
std::vector< G4CollisionInitialState * > theCollisions
static constexpr double pi
const G4ThreeVector & GetPosition() const
Float_t x2[n_points_geant4]
static constexpr double GeV
T min(const T t1, const T t2)
brief Return the smallest of the two arguments