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

#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 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 60 of file G4eeToPGammaModel.hh.

Constructor & Destructor Documentation

◆ G4eeToPGammaModel()

G4eeToPGammaModel::G4eeToPGammaModel ( G4eeCrossSections cr,
const G4String npart 
)

Definition at line 65 of file G4eeToPGammaModel.cc.

65 :
66 cross(cr)
67{
69 if(npart == "pi0") {
70 massR = 782.62*MeV;
71 particle = pi0;
72 } else {
73 massR = 1019.46*MeV;
74 particle = G4Eta::Eta();
75 }
76 massP = particle->GetPDGMass();
77}
static G4Eta * Eta()
Definition: G4Eta.cc:109
static G4PionZero * PionZero()
Definition: G4PionZero.cc:104

◆ ~G4eeToPGammaModel()

G4eeToPGammaModel::~G4eeToPGammaModel ( )
virtual

Definition at line 81 of file G4eeToPGammaModel.cc.

82{}

Member Function Documentation

◆ ComputeCrossSection()

G4double G4eeToPGammaModel::ComputeCrossSection ( G4double  e) const
virtual

Implements G4Vee2hadrons.

Definition at line 100 of file G4eeToPGammaModel.cc.

101{
102 G4double ee = std::min(HighEnergy(),e);
103 G4double xs;
104 if(particle == pi0) xs = cross->CrossSectionPi0G(ee);
105 else xs = cross->CrossSectionEtaG(ee);
106 return xs;
107}
double G4double
Definition: G4Types.hh:64
G4double HighEnergy() const
G4double CrossSectionEtaG(G4double)
G4double CrossSectionPi0G(G4double)

◆ PeakEnergy()

G4double G4eeToPGammaModel::PeakEnergy ( ) const
virtual

Implements G4Vee2hadrons.

Definition at line 93 of file G4eeToPGammaModel.cc.

94{
95 return massR;
96}

◆ PhysicsVector()

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

Implements G4Vee2hadrons.

Definition at line 111 of file G4eeToPGammaModel.cc.

113{
114 G4double tmin = std::max(emin, ThresholdEnergy());
115 G4double tmax = std::max(tmin, emax);
116 G4int nbins = (G4int)((tmax - tmin)/(5.*MeV));
117 G4PhysicsVector* v = new G4PhysicsLinearVector(emin,emax,nbins);
118 v->SetSpline(true);
119 return v;
120}
int G4int
Definition: G4Types.hh:66
void SetSpline(G4bool)
virtual G4double ThresholdEnergy() const

◆ SampleSecondaries()

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

Implements G4Vee2hadrons.

Definition at line 124 of file G4eeToPGammaModel.cc.

126{
127 G4double egam = 0.5*e*(1.0 - massP*massP/(massR*massR));
128 G4double tkin = e - egam - massP;
129 if(tkin < 0.0) tkin = 0.0;
130 G4double cost;
131 do {
132 cost = 2.0*G4UniformRand() - 1.0;
133 } while( 2.0*G4UniformRand() > 1.0 + cost*cost );
134
135 G4double sint = sqrt(1.0 - cost*cost);
136 G4double phi = twopi * G4UniformRand();
137
138 G4ThreeVector dir(sint*cos(phi),sint*sin(phi), cost);
139 dir.rotateUz(direction);
140
141 // create G4DynamicParticle objects
142 G4DynamicParticle* p1 =
143 new G4DynamicParticle(particle,dir,tkin);
144 G4DynamicParticle* p2 =
145 new G4DynamicParticle(G4Gamma::Gamma(),-dir,egam);
146 newp->push_back(p1);
147 newp->push_back(p2);
148}
#define G4UniformRand()
Definition: Randomize.hh:53
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86

◆ ThresholdEnergy()

G4double G4eeToPGammaModel::ThresholdEnergy ( ) const
virtual

Implements G4Vee2hadrons.

Definition at line 86 of file G4eeToPGammaModel.cc.

87{
88 return LowEnergy();
89}
G4double LowEnergy() const

Referenced by PhysicsVector().


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