69 if (OutputDefinitions.size() != 2)
70 throw G4HadronicException(__FILE__, __LINE__,
"G4VScatteringCollision: Too many output particles!");
72 if (OutputDefinitions[0]->IsShortLived() && OutputDefinitions[1]->IsShortLived())
74 if(getenv(
"G4KCDEBUG"))
G4cerr <<
"two shortlived for Type = "<<
typeid(*this).name()<<
G4endl;
78 G4double outm1 = OutputDefinitions[0]->GetPDGMass();
79 G4double outm2 = OutputDefinitions[1]->GetPDGMass();
81 if (OutputDefinitions[0]->IsShortLived())
84 OutputDefinitions[0]->GetPDGWidth(),
89 if (OutputDefinitions[1]->IsShortLived())
105 toZ.rotateZ(-1*TempPtr.phi());
106 toZ.rotateY(-1*TempPtr.theta());
109 G4ThreeVector pFinal1(std::sin(std::acos(cosTheta))*std::cos(phi), std::sin(std::acos(cosTheta))*std::sin(phi), cosTheta);
112 G4double pCM = std::sqrt( (S-(outm1+outm2)*(outm1+outm2)) * (S-(outm1-outm2)*(outm1-outm2)) /(4.*S));
113 pFinal1 = pFinal1 * pCM;
116 G4double eFinal1 = std::sqrt(pFinal1.mag2() + outm1*outm1);
117 G4double eFinal2 = std::sqrt(pFinal2.mag2() + outm2*outm2);
121 p4Final1 = toCMS*p4Final1;
122 p4Final2 = toCMS*p4Final2;
127 p4Final1 *= toLabFrame;
128 p4Final2 *= toLabFrame;
132 G4double chargeBalance = OutputDefinitions[0]->GetPDGCharge()+OutputDefinitions[1]->GetPDGCharge();
135 if(std::abs(chargeBalance) >.1)
138 G4cout << OutputDefinitions[0]->GetPDGCharge()<<
" "<<OutputDefinitions[0]->GetParticleName()
139 << OutputDefinitions[1]->GetPDGCharge()<<
" "<<OutputDefinitions[1]->GetParticleName()
148 finalTracks->push_back(final1);
149 finalTracks->push_back(final2);
158 const double aMinMass,
159 const double maxMass)
const
166 if (minMass > maxMass)
G4cerr <<
"##################### SampleResonanceMass: particle out of mass range" <<
G4endl;
168 if(minMass > maxMass) minMass = 0;
170 if (gamma < 1E-10*
GeV)
173 double fmin =
BrWigInt0(minMass, gamma, poleMass);
174 double fmax =
BrWigInt0(maxMass, gamma, poleMass);
176 return BrWigInv(f, gamma, poleMass);
CLHEP::Hep3Vector G4ThreeVector
CLHEP::HepLorentzRotation G4LorentzRotation
const G4ThreeVector & GetPosition() const
G4double GetActualMass() const
virtual G4double CosTheta(G4double s, G4double m1, G4double m2) const =0
const G4String & GetParticleName() const
void establish_G4MT_TLS_G4VCollision()
G4GLOB_DLL std::ostream G4cout
virtual G4double Phi() const
virtual const G4VAngularDistribution * GetAngularDistribution() const
static G4PionPlus * PionPlus()
G4VAngularDistribution * theAngularDistribution
double SampleResonanceMass(const double poleMass, const double width, const double minMass, const double maxMass) const
virtual const std::vector< const G4ParticleDefinition * > & GetOutgoingParticles() const =0
G4double GetPDGMass() const
virtual ~G4VScatteringCollision()
T max(const T t1, const T t2)
brief Return the largest of the two arguments
virtual G4KineticTrackVector * FinalState(const G4KineticTrack &trk1, const G4KineticTrack &trk2) const
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
double BrWigInt0(const double x, const double gamma, const double m0) const
double BrWigInv(const double x, const double gamma, const double m0) const
G4double GetPDGCharge() const
const G4LorentzVector & Get4Momentum() const
void establish_G4MT_TLS_G4VScatteringCollision()
const G4ParticleDefinition * GetDefinition() const
static G4Neutron * NeutronDefinition()
G4GLOB_DLL std::ostream G4cerr
CLHEP::HepLorentzVector G4LorentzVector