Geant4 10.7.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 &, G4double, G4double)
 
virtual ~G4eeToPGammaModel ()
 
virtual G4double PeakEnergy () const override
 
virtual G4double ComputeCrossSection (G4double) const override
 
virtual void SampleSecondaries (std::vector< G4DynamicParticle * > *, G4double, const G4ThreeVector &) override
 
- Public Member Functions inherited from G4Vee2hadrons
 G4Vee2hadrons (G4eeCrossSections *cr, G4double vlowEnergy, G4double vhighEnergy, G4double vdelta)
 
virtual ~G4Vee2hadrons ()
 
virtual G4double PeakEnergy () const =0
 
virtual G4double ComputeCrossSection (G4double) const =0
 
G4PhysicsVectorPhysicsVector () const
 
virtual void SampleSecondaries (std::vector< G4DynamicParticle * > *, G4double, const G4ThreeVector &)=0
 
G4double LowEnergy () const
 
G4double HighEnergy () const
 

Additional Inherited Members

- Protected Attributes inherited from G4Vee2hadrons
G4eeCrossSectionscross
 

Detailed Description

Definition at line 59 of file G4eeToPGammaModel.hh.

Constructor & Destructor Documentation

◆ G4eeToPGammaModel()

G4eeToPGammaModel::G4eeToPGammaModel ( G4eeCrossSections cr,
const G4String npart,
G4double  maxkinEnergy,
G4double  binWidth 
)
explicit

Definition at line 64 of file G4eeToPGammaModel.cc.

68: G4Vee2hadrons(cr,
69 npart=="pi0" ? 782.62*MeV:1019.46*MeV,
70 maxkinEnergy,
71 binWidth)
72{
73 G4cout << "####G4eeToPGammaModel & particle:" << npart
74 << "####" << G4endl;
75
77 if(npart == "pi0") {
78 massR = 782.62*MeV;
79 particle = pi0;
80 } else {
81 massR = 1019.46*MeV;
82 particle = G4Eta::Eta();
83 }
84 massP = particle->GetPDGMass();
85
86}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
static G4Eta * Eta()
Definition: G4Eta.cc:108
static G4PionZero * PionZero()
Definition: G4PionZero.cc:107

◆ ~G4eeToPGammaModel()

G4eeToPGammaModel::~G4eeToPGammaModel ( )
virtual

Definition at line 90 of file G4eeToPGammaModel.cc.

91{}

Member Function Documentation

◆ ComputeCrossSection()

G4double G4eeToPGammaModel::ComputeCrossSection ( G4double  e) const
overridevirtual

Implements G4Vee2hadrons.

Definition at line 102 of file G4eeToPGammaModel.cc.

103{
104 G4double xs;
105 if(particle == pi0) xs = cross->CrossSectionPi0G(e);
106 else xs = cross->CrossSectionEtaG(e);
107 return xs;
108}
double G4double
Definition: G4Types.hh:83
G4eeCrossSections * cross
G4double CrossSectionEtaG(G4double)
G4double CrossSectionPi0G(G4double)

◆ PeakEnergy()

G4double G4eeToPGammaModel::PeakEnergy ( ) const
overridevirtual

Implements G4Vee2hadrons.

Definition at line 95 of file G4eeToPGammaModel.cc.

96{
97 return massR;
98}

◆ SampleSecondaries()

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

Implements G4Vee2hadrons.

Definition at line 112 of file G4eeToPGammaModel.cc.

114{
115 G4double egam = 0.5*e*(1.0 - massP*massP/(massR*massR));
116 G4double tkin = e - egam - massP;
117 if(tkin < 0.0) tkin = 0.0;
118 G4double cost;
119 do {
120 cost = 2.0*G4UniformRand() - 1.0;
121 // Loop checking, 07-Aug-2015, Vladimir Ivanchenko
122 } while( 2.0*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
131 G4DynamicParticle* p1 =
132 new G4DynamicParticle(particle,dir,tkin);
133 G4DynamicParticle* p2 =
134 new G4DynamicParticle(G4Gamma::Gamma(),-dir,egam);
135 newp->push_back(p1);
136 newp->push_back(p2);
137}
#define G4UniformRand()
Definition: Randomize.hh:52
static G4Gamma * Gamma()
Definition: G4Gamma.cc:85

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