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

#include <G4eeTo3PiModel.hh>

+ Inheritance diagram for G4eeTo3PiModel:

Public Member Functions

 G4eeTo3PiModel (G4eeCrossSections *)
 
virtual ~G4eeTo3PiModel ()
 
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 G4eeTo3PiModel.hh.

Constructor & Destructor Documentation

◆ G4eeTo3PiModel()

G4eeTo3PiModel::G4eeTo3PiModel ( G4eeCrossSections cr)

Definition at line 66 of file G4eeTo3PiModel.cc.

66 :
67 cross(cr)
68{
69 massPi = G4PionPlus::PionPlus()->GetPDGMass();
70 massPi0 = G4PionZero::PionZero()->GetPDGMass();
71 massOm = 782.62*MeV;
72 massPhi = 1019.46*MeV;
73 gcash = 0.0;
74 gmax = 1.0;
75}
static G4PionPlus * PionPlus()
Definition: G4PionPlus.cc:98
static G4PionZero * PionZero()
Definition: G4PionZero.cc:104

◆ ~G4eeTo3PiModel()

G4eeTo3PiModel::~G4eeTo3PiModel ( )
virtual

Definition at line 79 of file G4eeTo3PiModel.cc.

80{
81 G4cout << "### G4eeTo3PiModel::~G4eeTo3PiModel: gmax= "
82 << gmax << " gcash= " << gcash << G4endl;
83}
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout

Member Function Documentation

◆ ComputeCrossSection()

G4double G4eeTo3PiModel::ComputeCrossSection ( G4double  e) const
virtual

Implements G4Vee2hadrons.

Definition at line 103 of file G4eeTo3PiModel.cc.

104{
105 G4double ee = std::min(HighEnergy(),e);
106 return cross->CrossSection3pi(ee);
107}
double G4double
Definition: G4Types.hh:64
G4double HighEnergy() const
G4double CrossSection3pi(G4double)

◆ PeakEnergy()

G4double G4eeTo3PiModel::PeakEnergy ( ) const
virtual

Implements G4Vee2hadrons.

Definition at line 94 of file G4eeTo3PiModel.cc.

95{
96 G4double e = massOm;
97 if(HighEnergy() > massPhi) e = massPhi;
98 return e;
99}

◆ PhysicsVector()

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

Implements G4Vee2hadrons.

Definition at line 111 of file G4eeTo3PiModel.cc.

113{
114 G4double tmin = std::max(emin, ThresholdEnergy());
115 G4double tmax = std::max(tmin, emax);
116 G4int nbins = (G4int)((tmax - tmin)/(1.*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 G4eeTo3PiModel::SampleSecondaries ( std::vector< G4DynamicParticle * > *  newp,
G4double  e,
const G4ThreeVector direction 
)
virtual

Implements G4Vee2hadrons.

Definition at line 124 of file G4eeTo3PiModel.cc.

126{
127 if(e < ThresholdEnergy()) return;
128
129 G4double x0 = massPi0/e;
130 G4double x1 = massPi/e;
131
132 G4LorentzVector w0, w1, w2;
133 G4ThreeVector dir0, dir1;
134 G4double e0, p0, e2, p, gg, m01, m02, m12;
135
136 // max pi0 energy
137 G4double edel = 0.5*e*(1.0 + x0*x0 - 4.0*x1*x1) - massPi0;
138
139 do {
140 // pi0 sample
141 e0 = edel*G4UniformRand() + massPi0;
142 p0 = sqrt(e0 - massPi0*massPi0);
143 dir0 = G4RandomDirection();
144 w0 = G4LorentzVector(p0*dir0.x(),p0*dir0.y(),p0*dir0.z(),e0);
145
146 // pi+pi- pair
147 w1 = G4LorentzVector(-p0*dir0.x(),-p0*dir0.y(),-p0*dir0.z(),e-e0);
148 G4ThreeVector bst = w1.boostVector();
149 e2 = 0.25*w1.m2();
150
151 // pi+
152 p = sqrt(e2 - massPi*massPi);
153 dir1 = G4RandomDirection();
154 w2 = G4LorentzVector(p*dir1.x(),p*dir1.y(),p*dir1.z(),sqrt(e2));
155 w2.boost(bst);
156 G4double px2 = w2.x();
157 G4double py2 = w2.y();
158 G4double pz2 = w2.z();
159
160 // pi-
161 w1 -= w2;
162 G4double px1 = w1.x();
163 G4double py1 = w1.y();
164 G4double pz1 = w1.z();
165
166 m01 = w0*w1;
167 m02 = w0*w2;
168 m12 = w1*w2;
169
170 G4double px = py1*pz2 - py2*pz1;
171 G4double py = pz1*px2 - pz2*px1;
172 G4double pz = px1*py2 - px2*py1;
173
174 gg = (px*px + py*py + pz*pz)*
175 norm( 1.0/cross->DpRho(m01) + 1.0/cross->DpRho(m02)
176 + 1.0/cross->DpRho(m12) );
177 if(gg > gmax) {
178 G4cout << "G4eeTo3PiModel::SampleSecondaries WARNING matrix element g= "
179 << gg << " > " << gmax << " (majoranta)" << G4endl;
180 }
181 if(gg > gcash) gcash = gg;
182
183 } while( gmax*G4UniformRand() > gg );
184
185 w0.rotateUz(direction);
186 w1.rotateUz(direction);
187 w2.rotateUz(direction);
188
189 // create G4DynamicParticle objects
190 G4DynamicParticle* dp0 =
192 G4DynamicParticle* dp1 =
194 G4DynamicParticle* dp2 =
196 newp->push_back(dp0);
197 newp->push_back(dp1);
198 newp->push_back(dp2);
199}
CLHEP::HepLorentzVector G4LorentzVector
G4ThreeVector G4RandomDirection()
#define G4UniformRand()
Definition: Randomize.hh:53
double z() const
double x() const
double y() const
Hep3Vector boostVector() const
HepLorentzVector & boost(double, double, double)
HepLorentzVector & rotateUz(const Hep3Vector &)
static G4PionMinus * PionMinus()
Definition: G4PionMinus.cc:98
std::complex< G4double > DpRho(G4double e)

◆ ThresholdEnergy()

G4double G4eeTo3PiModel::ThresholdEnergy ( ) const
virtual

Implements G4Vee2hadrons.

Definition at line 87 of file G4eeTo3PiModel.cc.

88{
89 return std::max(LowEnergy(),2.0*massPi + massPi0);
90}
G4double LowEnergy() const

Referenced by PhysicsVector(), and SampleSecondaries().


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