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

Additional Inherited Members

- Protected Attributes inherited from G4Vee2hadrons
G4eeCrossSectionscross
 

Detailed Description

Definition at line 59 of file G4eeToPGammaModel.hh.

Constructor & Destructor Documentation

◆ G4eeToPGammaModel() [1/2]

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}
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout
static G4Eta * Eta()
Definition G4Eta.cc:107
static G4PionZero * PionZero()
G4Vee2hadrons(G4eeCrossSections *cr, G4double vlowEnergy, G4double vhighEnergy, G4double vdelta)

◆ ~G4eeToPGammaModel()

G4eeToPGammaModel::~G4eeToPGammaModel ( )
override

Definition at line 89 of file G4eeToPGammaModel.cc.

90{}

◆ G4eeToPGammaModel() [2/2]

G4eeToPGammaModel::G4eeToPGammaModel ( const G4eeToPGammaModel & )
delete

Member Function Documentation

◆ ComputeCrossSection()

G4double G4eeToPGammaModel::ComputeCrossSection ( G4double e) const
overridevirtual

Implements G4Vee2hadrons.

Definition at line 101 of file G4eeToPGammaModel.cc.

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

◆ operator=()

G4eeToPGammaModel & G4eeToPGammaModel::operator= ( const G4eeToPGammaModel & right)
delete

◆ PeakEnergy()

G4double G4eeToPGammaModel::PeakEnergy ( ) const
overridevirtual

Implements G4Vee2hadrons.

Definition at line 94 of file G4eeToPGammaModel.cc.

95{
96 return massR;
97}

◆ SampleSecondaries()

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

Implements G4Vee2hadrons.

Definition at line 111 of file G4eeToPGammaModel.cc.

113{
114 G4double egam = 0.5*e*(1.0 - massP*massP/(massR*massR));
115 G4double tkin = e - egam - massP;
116 if(tkin < 0.0) tkin = 0.0;
117 G4double cost;
118 do {
119 cost = 2.0*G4UniformRand() - 1.0;
120 // Loop checking, 07-Aug-2015, Vladimir Ivanchenko
121 } while( 2.0*G4UniformRand() > 1.0 + cost*cost );
122
123 G4double sint = sqrt(1.0 - cost*cost);
124 G4double phi = twopi * G4UniformRand();
125
126 G4ThreeVector dir(sint*cos(phi),sint*sin(phi), cost);
127 dir.rotateUz(direction);
128
129 // create G4DynamicParticle objects
130 G4DynamicParticle* p1 =
131 new G4DynamicParticle(particle,dir,tkin);
132 G4DynamicParticle* p2 =
133 new G4DynamicParticle(G4Gamma::Gamma(),-dir,egam);
134 newp->push_back(p1);
135 newp->push_back(p2);
136}
#define G4UniformRand()
Definition Randomize.hh:52
static G4Gamma * Gamma()
Definition G4Gamma.cc:81

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