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

#include <G4eeToTwoPiModel.hh>

+ Inheritance diagram for G4eeToTwoPiModel:

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 &)
 
- 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 G4eeToTwoPiModel.hh.

Constructor & Destructor Documentation

◆ G4eeToTwoPiModel()

G4eeToTwoPiModel::G4eeToTwoPiModel ( G4eeCrossSections cr)

Definition at line 64 of file G4eeToTwoPiModel.cc.

64 :
65 cross(cr)
66{
67 massPi = G4PionPlus::PionPlus()->GetPDGMass();
68 massRho = 775.5*MeV;
69}
static G4PionPlus * PionPlus()
Definition: G4PionPlus.cc:98

◆ ~G4eeToTwoPiModel()

G4eeToTwoPiModel::~G4eeToTwoPiModel ( )
virtual

Definition at line 73 of file G4eeToTwoPiModel.cc.

74{}

Member Function Documentation

◆ ComputeCrossSection()

G4double G4eeToTwoPiModel::ComputeCrossSection ( G4double  e) const
virtual

Implements G4Vee2hadrons.

Definition at line 92 of file G4eeToTwoPiModel.cc.

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

◆ PeakEnergy()

G4double G4eeToTwoPiModel::PeakEnergy ( ) const
virtual

Implements G4Vee2hadrons.

Definition at line 85 of file G4eeToTwoPiModel.cc.

86{
87 return massRho;
88}

◆ PhysicsVector()

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

Implements G4Vee2hadrons.

Definition at line 100 of file G4eeToTwoPiModel.cc.

102{
103 G4double tmin = std::max(emin, 2.0*massPi);
104 G4double tmax = std::max(tmin, emax);
105 G4int nbins = (G4int)((tmax - tmin)/(5.*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 G4eeToTwoPiModel::SampleSecondaries ( std::vector< G4DynamicParticle * > *  newp,
G4double  e,
const G4ThreeVector direction 
)
virtual

Implements G4Vee2hadrons.

Definition at line 113 of file G4eeToTwoPiModel.cc.

115{
116
117 G4double tkin = 0.5*e - massPi;
118 if(tkin < 0.0) tkin = 0.0;
119 G4double cost;
120 do {
121 cost = 2.0*G4UniformRand() - 1.0;
122 } while( G4UniformRand() > 1.0 - cost*cost );
123
124 G4double sint = sqrt(1.0 - cost*cost);
125 G4double phi = twopi * G4UniformRand();
126
127 G4ThreeVector dir(sint*cos(phi),sint*sin(phi), cost);
128 dir.rotateUz(direction);
129
130 // create G4DynamicParticle objects
133 G4DynamicParticle* pin =
135 newp->push_back(pip);
136 newp->push_back(pin);
137}
#define G4UniformRand()
Definition: Randomize.hh:53
static G4PionMinus * PionMinus()
Definition: G4PionMinus.cc:98

◆ ThresholdEnergy()

G4double G4eeToTwoPiModel::ThresholdEnergy ( ) const
virtual

Implements G4Vee2hadrons.

Definition at line 78 of file G4eeToTwoPiModel.cc.

79{
80 return 2.0*massPi;
81}

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