#include <G4eeToPGammaModel.hh>
Inheritance diagram for G4eeToPGammaModel:
Public Member Functions | |
G4eeToPGammaModel (G4eeCrossSections *, const G4String &) | |
virtual | ~G4eeToPGammaModel () |
virtual G4double | ThresholdEnergy () const |
virtual G4double | PeakEnergy () const |
virtual G4double | ComputeCrossSection (G4double) const |
virtual G4PhysicsVector * | PhysicsVector (G4double, G4double) const |
virtual void | SampleSecondaries (std::vector< G4DynamicParticle * > *, G4double, const G4ThreeVector &) |
Definition at line 60 of file G4eeToPGammaModel.hh.
G4eeToPGammaModel::G4eeToPGammaModel | ( | G4eeCrossSections * | , | |
const G4String & | ||||
) |
Definition at line 65 of file G4eeToPGammaModel.cc.
References G4Eta::Eta(), G4ParticleDefinition::GetPDGMass(), and G4PionZero::PionZero().
00065 : 00066 cross(cr) 00067 { 00068 pi0 = G4PionZero::PionZero(); 00069 if(npart == "pi0") { 00070 massR = 782.62*MeV; 00071 particle = pi0; 00072 } else { 00073 massR = 1019.46*MeV; 00074 particle = G4Eta::Eta(); 00075 } 00076 massP = particle->GetPDGMass(); 00077 }
G4eeToPGammaModel::~G4eeToPGammaModel | ( | ) | [virtual] |
Implements G4Vee2hadrons.
Definition at line 100 of file G4eeToPGammaModel.cc.
References G4eeCrossSections::CrossSectionEtaG(), G4eeCrossSections::CrossSectionPi0G(), and G4Vee2hadrons::HighEnergy().
00101 { 00102 G4double ee = std::min(HighEnergy(),e); 00103 G4double xs; 00104 if(particle == pi0) xs = cross->CrossSectionPi0G(ee); 00105 else xs = cross->CrossSectionEtaG(ee); 00106 return xs; 00107 }
G4double G4eeToPGammaModel::PeakEnergy | ( | ) | const [virtual] |
G4PhysicsVector * G4eeToPGammaModel::PhysicsVector | ( | G4double | , | |
G4double | ||||
) | const [virtual] |
Implements G4Vee2hadrons.
Definition at line 111 of file G4eeToPGammaModel.cc.
References G4PhysicsVector::SetSpline(), and ThresholdEnergy().
00113 { 00114 G4double tmin = std::max(emin, ThresholdEnergy()); 00115 G4double tmax = std::max(tmin, emax); 00116 G4int nbins = (G4int)((tmax - tmin)/(5.*MeV)); 00117 G4PhysicsVector* v = new G4PhysicsLinearVector(emin,emax,nbins); 00118 v->SetSpline(true); 00119 return v; 00120 }
void G4eeToPGammaModel::SampleSecondaries | ( | std::vector< G4DynamicParticle * > * | , | |
G4double | , | |||
const G4ThreeVector & | ||||
) | [virtual] |
Implements G4Vee2hadrons.
Definition at line 124 of file G4eeToPGammaModel.cc.
References G4UniformRand, and G4Gamma::Gamma().
00126 { 00127 G4double egam = 0.5*e*(1.0 - massP*massP/(massR*massR)); 00128 G4double tkin = e - egam - massP; 00129 if(tkin < 0.0) tkin = 0.0; 00130 G4double cost; 00131 do { 00132 cost = 2.0*G4UniformRand() - 1.0; 00133 } while( 2.0*G4UniformRand() > 1.0 + cost*cost ); 00134 00135 G4double sint = sqrt(1.0 - cost*cost); 00136 G4double phi = twopi * G4UniformRand(); 00137 00138 G4ThreeVector dir(sint*cos(phi),sint*sin(phi), cost); 00139 dir.rotateUz(direction); 00140 00141 // create G4DynamicParticle objects 00142 G4DynamicParticle* p1 = 00143 new G4DynamicParticle(particle,dir,tkin); 00144 G4DynamicParticle* p2 = 00145 new G4DynamicParticle(G4Gamma::Gamma(),-dir,egam); 00146 newp->push_back(p1); 00147 newp->push_back(p2); 00148 }
G4double G4eeToPGammaModel::ThresholdEnergy | ( | ) | const [virtual] |
Implements G4Vee2hadrons.
Definition at line 86 of file G4eeToPGammaModel.cc.
References G4Vee2hadrons::LowEnergy().
Referenced by PhysicsVector().
00087 { 00088 return LowEnergy(); 00089 }