Geant4-11
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
G4INCL::SigmaZeroDecayChannel Class Reference

#include <G4INCLSigmaZeroDecayChannel.hh>

Inheritance diagram for G4INCL::SigmaZeroDecayChannel:
G4INCL::IChannel

Public Member Functions

void fillFinalState (FinalState *fs)
 
FinalStategetFinalState ()
 
 SigmaZeroDecayChannel (Particle *, ThreeVector const &)
 
virtual ~SigmaZeroDecayChannel ()
 

Static Public Member Functions

static G4double computeDecayTime (Particle *p)
 

Private Member Functions

 INCL_DECLARE_ALLOCATION_POOL (SigmaZeroDecayChannel)
 
void sampleAngles (G4double *, G4double *, G4double *)
 

Private Attributes

ThreeVector const incidentDirection
 
ParticletheParticle
 

Detailed Description

Definition at line 49 of file G4INCLSigmaZeroDecayChannel.hh.

Constructor & Destructor Documentation

◆ SigmaZeroDecayChannel()

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

◆ ~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()
Definition: G4INCLRandom.cc:93

References G4INCL::Particle::getMass(), G4INCL::Particle::getMomentum(), G4INCL::ParticleTable::getWidth(), G4INCL::ThreeVector::mag(), G4INCL::Random::shoot(), and G4INCL::SigmaZero.

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
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);
83
84 G4double q1, q2, q3;
85 G4double sal=0.0;
86 if (beta >= 1.0e-10)
88 if (sal >= 1.0e-6) {
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
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);
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.
void sampleAngles(G4double *, G4double *, G4double *)
G4double getY() const
G4double getZ() const
G4double mag() 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)

References G4INCL::FinalState::addCreatedParticle(), G4INCL::FinalState::addModifiedParticle(), G4INCL::Particle::adjustEnergyFromMomentum(), anonymous_namespace{G4PionRadiativeDecayChannel.cc}::beta, G4INCL::ParticleTable::getINCLMass(), G4INCL::Particle::getMass(), G4INCL::Particle::getPosition(), G4INCL::ThreeVector::getX(), G4INCL::ThreeVector::getY(), G4INCL::ThreeVector::getZ(), incidentDirection, G4INCL::Lambda, G4INCL::ThreeVector::mag(), G4INCL::KinematicsUtils::momentumInCM(), G4INCL::ThreeVector::perp(), G4INCL::Photon, sampleAngles(), G4INCL::Particle::setMomentum(), G4INCL::Particle::setType(), and theParticle.

◆ getFinalState()

FinalState * G4INCL::IChannel::getFinalState ( )
inherited

Definition at line 50 of file G4INCLIChannel.cc.

50 {
51 FinalState *fs = new FinalState;
53 return fs;
54 }
virtual void fillFinalState(FinalState *fs)=0

References G4INCL::IChannel::fillFinalState().

◆ INCL_DECLARE_ALLOCATION_POOL()

G4INCL::SigmaZeroDecayChannel::INCL_DECLARE_ALLOCATION_POOL ( SigmaZeroDecayChannel  )
private

◆ sampleAngles()

void G4INCL::SigmaZeroDecayChannel::sampleAngles ( G4double ctet_par,
G4double stet_par,
G4double phi_par 
)
private

Definition at line 61 of file G4INCLSigmaZeroDecayChannel.cc.

61 {
62
63 (*ctet_par) = -1.0 + 2.0*Random::shoot();
64 if(std::abs(*ctet_par) > 1.0) (*ctet_par) = Math::sign(*ctet_par); // needed?
65 (*stet_par) = std::sqrt(1.-(*ctet_par)*(*ctet_par));
66 (*phi_par) = Math::twoPi * Random::shoot();
67 }
const G4double twoPi
G4int sign(const T t)

References G4INCL::Random::shoot(), G4INCL::Math::sign(), and G4INCL::Math::twoPi.

Referenced by fillFinalState().

Field Documentation

◆ incidentDirection

ThreeVector const G4INCL::SigmaZeroDecayChannel::incidentDirection
private

Definition at line 61 of file G4INCLSigmaZeroDecayChannel.hh.

Referenced by fillFinalState().

◆ theParticle

Particle* G4INCL::SigmaZeroDecayChannel::theParticle
private

Definition at line 60 of file G4INCLSigmaZeroDecayChannel.hh.

Referenced by fillFinalState().


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