Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4INCL::SigmaZeroDecayChannel Class Reference

#include <G4INCLSigmaZeroDecayChannel.hh>

+ Inheritance diagram for G4INCL::SigmaZeroDecayChannel:

Public Member Functions

 SigmaZeroDecayChannel (Particle *, ThreeVector const &)
 
virtual ~SigmaZeroDecayChannel ()
 
void fillFinalState (FinalState *fs)
 
- Public Member Functions inherited from G4INCL::IChannel
 IChannel ()
 
virtual ~IChannel ()
 
FinalStategetFinalState ()
 

Static Public Member Functions

static G4double computeDecayTime (Particle *p)
 

Detailed Description

Definition at line 49 of file G4INCLSigmaZeroDecayChannel.hh.

Constructor & Destructor Documentation

◆ SigmaZeroDecayChannel()

G4INCL::SigmaZeroDecayChannel::SigmaZeroDecayChannel ( Particle * p,
ThreeVector const & dir )

Definition at line 46 of file G4INCLSigmaZeroDecayChannel.cc.

47 :theParticle(p), incidentDirection(dir)
48 {}

◆ ~SigmaZeroDecayChannel()

G4INCL::SigmaZeroDecayChannel::~SigmaZeroDecayChannel ( )
virtual

Definition at line 50 of file G4INCLSigmaZeroDecayChannel.cc.

50{}

Member Function Documentation

◆ computeDecayTime()

G4double G4INCL::SigmaZeroDecayChannel::computeDecayTime ( Particle * p)
static

Definition at line 53 of file G4INCLSigmaZeroDecayChannel.cc.

53 {
54// assert(p->getType() == SigmaZero);
55 const G4double gamma = std::sqrt(1+std::pow(p->getMomentum().mag()/p->getMass(),2));
56 const G4double tau = ParticleTable::getWidth(SigmaZero)*3E8*1E15*gamma; // fm
57 const G4double t = -tau * std::log(Random::shoot());
58 return t;
59 }
double G4double
Definition G4Types.hh:83
G4double getWidth(const ParticleType t)
Get particle width (in s)
G4double shoot()

Referenced by G4INCL::StandardPropagationModel::generateDecays().

◆ fillFinalState()

void G4INCL::SigmaZeroDecayChannel::fillFinalState ( FinalState * fs)
virtual

Implements G4INCL::IChannel.

Definition at line 69 of file G4INCLSigmaZeroDecayChannel.cc.

69 {
70
71// assert( theParticle->getType() == SigmaZero);
72 ParticleType createdType = Photon;
73
74 const G4double sqrtS = theParticle->getMass();
75
76 theParticle->setType(Lambda);
77 G4double phi, c_tet, s_tet;
78 sampleAngles(&c_tet, &s_tet, &phi);
79
80 G4double c_phi = std::cos(phi);
81 G4double s_phi = std::sin(phi);
82 G4double beta = incidentDirection.mag();
83
84 G4double q1, q2, q3;
85 G4double sal=0.0;
86 if (beta >= 1.0e-10)
87 sal = incidentDirection.perp()/beta;
88 if (sal >= 1.0e-6) {
89 G4double b1 = incidentDirection.getX();
90 G4double b2 = incidentDirection.getY();
91 G4double b3 = incidentDirection.getZ();
92 G4double cal = b3/beta;
93 G4double t1 = c_tet+cal*s_tet*s_phi/sal;
94 G4double t2 = s_tet/sal;
95 q1=(b1*t1+b2*t2*c_phi)/beta;
96 q2=(b2*t1-b1*t2*c_phi)/beta;
97 q3=(b3*t1/beta-t2*s_phi);
98 } else {
99 q1 = s_tet*c_phi;
100 q2 = s_tet*s_phi;
101 q3 = c_tet;
102 }
103
105 theParticle->getMass(),
106 ParticleTable::getINCLMass(createdType));
107 q1 *= xq;
108 q2 *= xq;
109 q3 *= xq;
110
111 ThreeVector createdMomentum(q1, q2, q3);
112 ThreeVector createdPosition(theParticle->getPosition());
113 Particle *createdParticle = new Particle(createdType, createdMomentum, createdPosition);
114 theParticle->setMomentum(-createdMomentum);
115 theParticle->adjustEnergyFromMomentum();
116
117 fs->addModifiedParticle(theParticle);
118 fs->addCreatedParticle(createdParticle);
119
120 }
const G4INCL::ThreeVector & getPosition() const
G4double adjustEnergyFromMomentum()
Recompute the energy to match the momentum.
virtual void setMomentum(const G4INCL::ThreeVector &momentum)
void setType(ParticleType t)
G4double getMass() const
Get the cached particle mass.
G4double getY() const
G4double getZ() const
G4double perp() const
G4double getX() const
G4double momentumInCM(Particle const *const p1, Particle const *const p2)
gives the momentum in the CM frame of two particles.
G4double getINCLMass(const G4int A, const G4int Z, const G4int S)
Get INCL nuclear mass (in MeV/c^2)

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