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(std::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);