G4eeToTwoPiModel Class Reference

#include <G4eeToTwoPiModel.hh>

Inheritance diagram for G4eeToTwoPiModel:

G4Vee2hadrons

Public Member Functions

 G4eeToTwoPiModel (G4eeCrossSections *)
virtual ~G4eeToTwoPiModel ()
virtual G4double ThresholdEnergy () const
virtual G4double PeakEnergy () const
virtual G4double ComputeCrossSection (G4double) const
virtual G4PhysicsVectorPhysicsVector (G4double, G4double) const
virtual void SampleSecondaries (std::vector< G4DynamicParticle * > *, G4double, const G4ThreeVector &)

Detailed Description

Definition at line 59 of file G4eeToTwoPiModel.hh.


Constructor & Destructor Documentation

G4eeToTwoPiModel::G4eeToTwoPiModel ( G4eeCrossSections  ) 

Definition at line 64 of file G4eeToTwoPiModel.cc.

References G4ParticleDefinition::GetPDGMass(), and G4PionPlus::PionPlus().

00064                                                        :
00065   cross(cr)
00066 {
00067   massPi = G4PionPlus::PionPlus()->GetPDGMass();
00068   massRho = 775.5*MeV;
00069 }

G4eeToTwoPiModel::~G4eeToTwoPiModel (  )  [virtual]

Definition at line 73 of file G4eeToTwoPiModel.cc.

00074 {}


Member Function Documentation

G4double G4eeToTwoPiModel::ComputeCrossSection ( G4double   )  const [virtual]

Implements G4Vee2hadrons.

Definition at line 92 of file G4eeToTwoPiModel.cc.

References G4eeCrossSections::CrossSection2pi(), and G4Vee2hadrons::HighEnergy().

00093 {
00094   G4double ee = std::min(HighEnergy(),e);
00095   return cross->CrossSection2pi(ee);
00096 }

G4double G4eeToTwoPiModel::PeakEnergy (  )  const [virtual]

Implements G4Vee2hadrons.

Definition at line 85 of file G4eeToTwoPiModel.cc.

00086 {
00087   return massRho;
00088 }

G4PhysicsVector * G4eeToTwoPiModel::PhysicsVector ( G4double  ,
G4double   
) const [virtual]

Implements G4Vee2hadrons.

Definition at line 100 of file G4eeToTwoPiModel.cc.

References G4PhysicsVector::SetSpline().

00102 {
00103   G4double tmin = std::max(emin, 2.0*massPi);
00104   G4double tmax = std::max(tmin, emax);
00105   G4int nbins = (G4int)((tmax - tmin)/(5.*MeV));
00106   G4PhysicsVector* v = new G4PhysicsLinearVector(emin,emax,nbins);
00107   v->SetSpline(true);
00108   return v;
00109 }

void G4eeToTwoPiModel::SampleSecondaries ( std::vector< G4DynamicParticle * > *  ,
G4double  ,
const G4ThreeVector  
) [virtual]

Implements G4Vee2hadrons.

Definition at line 113 of file G4eeToTwoPiModel.cc.

References G4UniformRand, G4PionMinus::PionMinus(), G4PionPlus::PionPlus(), and G4InuclParticleNames::pip.

00115 {
00116 
00117   G4double tkin = 0.5*e - massPi;
00118   if(tkin < 0.0) tkin = 0.0;
00119   G4double cost;
00120   do {
00121     cost = 2.0*G4UniformRand() - 1.0;
00122   } while( G4UniformRand() > 1.0 - cost*cost );
00123 
00124   G4double sint = sqrt(1.0 - cost*cost);
00125   G4double phi  = twopi * G4UniformRand();
00126 
00127   G4ThreeVector dir(sint*cos(phi),sint*sin(phi), cost);
00128   dir.rotateUz(direction);
00129 
00130   // create G4DynamicParticle objects
00131   G4DynamicParticle* pip = 
00132      new G4DynamicParticle(G4PionPlus::PionPlus(),dir,tkin);
00133   G4DynamicParticle* pin = 
00134      new G4DynamicParticle(G4PionMinus::PionMinus(),-dir,tkin);
00135   newp->push_back(pip);
00136   newp->push_back(pin);
00137 }

G4double G4eeToTwoPiModel::ThresholdEnergy (  )  const [virtual]

Implements G4Vee2hadrons.

Definition at line 78 of file G4eeToTwoPiModel.cc.

00079 {
00080   return 2.0*massPi;
00081 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:51:50 2013 for Geant4 by  doxygen 1.4.7