Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ee2KChargedModel Class Reference

#include <G4ee2KChargedModel.hh>

+ Inheritance diagram for G4ee2KChargedModel:

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 &)
 
- Public Member Functions inherited from G4Vee2hadrons
 G4Vee2hadrons ()
 
virtual ~G4Vee2hadrons ()
 
virtual G4double ThresholdEnergy () const =0
 
virtual G4double PeakEnergy () const =0
 
virtual G4double ComputeCrossSection (G4double) const =0
 
virtual G4PhysicsVectorPhysicsVector (G4double, G4double) const =0
 
virtual void SampleSecondaries (std::vector< G4DynamicParticle * > *, G4double, const G4ThreeVector &)=0
 
void SetLowEnergy (G4double val)
 
G4double LowEnergy () const
 
void SetHighEnergy (G4double val)
 
G4double HighEnergy () const
 

Detailed Description

Definition at line 59 of file G4ee2KChargedModel.hh.

Constructor & Destructor Documentation

◆ G4ee2KChargedModel()

G4ee2KChargedModel::G4ee2KChargedModel ( G4eeCrossSections cr)

Definition at line 64 of file G4ee2KChargedModel.cc.

64 :
65 cross(cr)
66{
68 massPhi = 1019.46*MeV;
69}
static G4KaonPlus * KaonPlus()
Definition: G4KaonPlus.cc:113

◆ ~G4ee2KChargedModel()

G4ee2KChargedModel::~G4ee2KChargedModel ( )
virtual

Definition at line 73 of file G4ee2KChargedModel.cc.

74{}

Member Function Documentation

◆ ComputeCrossSection()

G4double G4ee2KChargedModel::ComputeCrossSection ( G4double  e) const
virtual

Implements G4Vee2hadrons.

Definition at line 92 of file G4ee2KChargedModel.cc.

93{
94 G4double ee = std::min(HighEnergy(),e);
95 return cross->CrossSection2Kcharged(ee);
96}
double G4double
Definition: G4Types.hh:64
G4double HighEnergy() const
G4double CrossSection2Kcharged(G4double)

◆ PeakEnergy()

G4double G4ee2KChargedModel::PeakEnergy ( ) const
virtual

Implements G4Vee2hadrons.

Definition at line 85 of file G4ee2KChargedModel.cc.

86{
87 return massPhi;
88}

◆ PhysicsVector()

G4PhysicsVector * G4ee2KChargedModel::PhysicsVector ( G4double  emin,
G4double  emax 
) const
virtual

Implements G4Vee2hadrons.

Definition at line 100 of file G4ee2KChargedModel.cc.

102{
103 G4double tmin = std::max(emin, 2.0*massK);
104 G4double tmax = std::max(tmin, emax);
105 G4int nbins = (G4int)((tmax - tmin)/(1.*MeV));
106 G4PhysicsVector* v = new G4PhysicsLinearVector(emin,emax,nbins);
107 v->SetSpline(true);
108 return v;
109}
int G4int
Definition: G4Types.hh:66
void SetSpline(G4bool)

◆ SampleSecondaries()

void G4ee2KChargedModel::SampleSecondaries ( std::vector< G4DynamicParticle * > *  newp,
G4double  e,
const G4ThreeVector direction 
)
virtual

Implements G4Vee2hadrons.

Definition at line 113 of file G4ee2KChargedModel.cc.

115{
116
117 G4double tkin = 0.5*e - massK;
118 if(tkin < 0.0) tkin = 0.0;
119
120 G4double cost;
121 do {
122 cost = 2.0*G4UniformRand() - 1.0;
123 } while( G4UniformRand() > 1.0 - cost*cost );
124
125 G4double sint = sqrt(1.0 - cost*cost);
126 G4double phi = twopi * G4UniformRand();
127
128 G4ThreeVector dir(sint*cos(phi),sint*sin(phi), cost);
129 dir.rotateUz(direction);
130
131 // create G4DynamicParticle objects
132 G4DynamicParticle* p1 =
134 G4DynamicParticle* p2 =
136 newp->push_back(p1);
137 newp->push_back(p2);
138}
#define G4UniformRand()
Definition: Randomize.hh:53
static G4KaonMinus * KaonMinus()
Definition: G4KaonMinus.cc:113

◆ ThresholdEnergy()

G4double G4ee2KChargedModel::ThresholdEnergy ( ) const
virtual

Implements G4Vee2hadrons.

Definition at line 78 of file G4ee2KChargedModel.cc.

79{
80 return 2.0*massK;
81}

The documentation for this class was generated from the following files: