45 std::vector<G4KineticTrack *> & someCandidates,
48 theCollisions.clear();
49 if(someCandidates.size() >1)
51 std::vector<G4KineticTrack *>::iterator j=someCandidates.begin();
52 for(; j != someCandidates.end(); ++j)
54 G4double collisionTime = GetTimeToAbsorption(*aProjectile, **j);
60 aTarget.push_back(*j);
61 FindAndFillCluster(aTarget, aProjectile, someCandidates);
64 theCollisions.push_back(
73void G4MesonAbsorption::
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;
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;
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);
280 static const G4double maxCrossSection = 500*millibarn;
281 if(pi*distance>maxCrossSection)
return time;
283 static const G4double maxChargedCrossSection = 200*millibarn;
286 pi*distance>maxChargedCrossSection)
return time;
290 sqrtS>1.91*GeV && pi*distance>maxChargedCrossSection)
return time;
292 G4double totalCrossSection = AbsorptionCrossSection(trk1,trk2);
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;
332 aCross = y1+(y2-y1)/(x2-x1)*(t-x1);
336 return .5*aCross*millibarn;
G4DLLIMPORT std::ostream G4cout
HepLorentzRotation & rotateY(double delta)
HepLorentzRotation & rotateZ(double delta)
HepLorentzRotation inverse() const
const G4ThreeVector & GetPosition() const
G4ParticleDefinition * GetDefinition() const
const G4LorentzVector & GetTrackingMomentum() const
const G4LorentzVector & Get4Momentum() const
G4double GetActualMass() const
virtual const std::vector< G4CollisionInitialState * > & GetCollisions(G4KineticTrack *aProjectile, std::vector< G4KineticTrack * > &someCandidates, G4double aCurrentTime)
virtual G4KineticTrackVector * GetFinalState(G4KineticTrack *aProjectile, std::vector< G4KineticTrack * > &theTargets)
static G4Neutron * NeutronDefinition()
static G4Neutron * Neutron()
G4double GetPDGMass() const
G4double GetPDGCharge() const
G4int GetBaryonNumber() const
static G4PionMinus * PionMinusDefinition()
static G4PionPlus * PionPlusDefinition()
static G4Proton * ProtonDefinition()