G4ee2KChargedModel Class Reference

#include <G4ee2KChargedModel.hh>

Inheritance diagram for G4ee2KChargedModel:

G4Vee2hadrons

Public Member Functions

 G4ee2KChargedModel (G4eeCrossSections *)
virtual ~G4ee2KChargedModel ()
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 G4ee2KChargedModel.hh.


Constructor & Destructor Documentation

G4ee2KChargedModel::G4ee2KChargedModel ( G4eeCrossSections  ) 

Definition at line 64 of file G4ee2KChargedModel.cc.

References G4ParticleDefinition::GetPDGMass(), and G4KaonPlus::KaonPlus().

00064                                                            :
00065   cross(cr)
00066 {
00067   massK = G4KaonPlus::KaonPlus()->GetPDGMass();
00068   massPhi = 1019.46*MeV;
00069 }

G4ee2KChargedModel::~G4ee2KChargedModel (  )  [virtual]

Definition at line 73 of file G4ee2KChargedModel.cc.

00074 {}


Member Function Documentation

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

Implements G4Vee2hadrons.

Definition at line 92 of file G4ee2KChargedModel.cc.

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

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

G4double G4ee2KChargedModel::PeakEnergy (  )  const [virtual]

Implements G4Vee2hadrons.

Definition at line 85 of file G4ee2KChargedModel.cc.

00086 {
00087   return massPhi;
00088 }

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

Implements G4Vee2hadrons.

Definition at line 100 of file G4ee2KChargedModel.cc.

References G4PhysicsVector::SetSpline().

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

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

Implements G4Vee2hadrons.

Definition at line 113 of file G4ee2KChargedModel.cc.

References G4UniformRand, G4KaonMinus::KaonMinus(), and G4KaonPlus::KaonPlus().

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

G4double G4ee2KChargedModel::ThresholdEnergy (  )  const [virtual]

Implements G4Vee2hadrons.

Definition at line 78 of file G4ee2KChargedModel.cc.

00079 {
00080   return 2.0*massK;
00081 }


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