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

#include <G4INCLPiNToOmegaChannel.hh>

+ Inheritance diagram for G4INCL::PiNToOmegaChannel:

Public Member Functions

 PiNToOmegaChannel (Particle *, Particle *)
 
virtual ~PiNToOmegaChannel ()
 
void fillFinalState (FinalState *fs)
 
- Public Member Functions inherited from G4INCL::IChannel
 IChannel ()
 
virtual ~IChannel ()
 
FinalStategetFinalState ()
 
virtual void fillFinalState (FinalState *fs)=0
 

Detailed Description

Definition at line 47 of file G4INCLPiNToOmegaChannel.hh.

Constructor & Destructor Documentation

◆ PiNToOmegaChannel()

G4INCL::PiNToOmegaChannel::PiNToOmegaChannel ( Particle p1,
Particle p2 
)

Definition at line 47 of file G4INCLPiNToOmegaChannel.cc.

48 : particle1(p1), particle2(p2)
49 {
50
51 }

◆ ~PiNToOmegaChannel()

G4INCL::PiNToOmegaChannel::~PiNToOmegaChannel ( )
virtual

Definition at line 53 of file G4INCLPiNToOmegaChannel.cc.

53 {
54
55 }

Member Function Documentation

◆ fillFinalState()

void G4INCL::PiNToOmegaChannel::fillFinalState ( FinalState fs)
virtual

Implements G4INCL::IChannel.

Definition at line 57 of file G4INCLPiNToOmegaChannel.cc.

57 {
58 Particle * nucleon;
59 Particle * pion;
60 if(particle1->isNucleon()) {
61 nucleon = particle1;
62 pion = particle2;
63 } else {
64 nucleon = particle2;
65 pion = particle1;
66 }
67
68
70// assert(iso == 1 || iso == -1);
71 if (iso == 1) {
72 nucleon->setType(Proton);
73 }
74 else if (iso == -1) {
75 nucleon->setType(Neutron);
76 }
77 pion->setType(Omega);
78// nucleon->setEnergy(std::sqrt((nucleon->getMass())*(nucleon->getMass())+(mom_nucleon.mag()*mom_nucleon.mag())));
79// pion->setEnergy(std::sqrt((pion->getMass())*(pion->getMass())+(mom_nucleon.mag()*mom_nucleon.mag())));
80 G4double sh=nucleon->getEnergy()+pion->getEnergy();
81 G4double mn=nucleon->getMass();
82 G4double me=pion->getMass();
83 G4double en=(sh*sh+mn*mn-me*me)/(2*sh);
84 nucleon->setEnergy(en);
85 G4double ee=std::sqrt(en*en-mn*mn+me*me);
86 pion->setEnergy(ee);
87 G4double pn=std::sqrt(en*en-mn*mn);
88
89 ThreeVector mom_nucleon = Random::normVector(pn);
90
91 nucleon->setMomentum(mom_nucleon);
92 pion->setMomentum(-mom_nucleon);
93
94 fs->addModifiedParticle(nucleon);
95 fs->addModifiedParticle(pion);
96 }
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
G4bool isNucleon() const
G4int getIsospin(const ParticleType t)
Get the isospin of a particle.
ThreeVector normVector(G4double norm=1.)
G4bool pion(G4int ityp)
G4bool nucleon(G4int ityp)

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