Geant4 11.1.1
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
69// assert(iso == 1 || iso == -1);
70 if (iso == 1) {
71 nucleon->setType(Proton);
72 }
73 else if (iso == -1) {
74 nucleon->setType(Neutron);
75 }
76 pion->setType(Omega);
77
78 // Erase the parent resonance information of the nucleon and pion
79 nucleon->setParentResonancePDGCode(0);
80 nucleon->setParentResonanceID(0);
81 pion->setParentResonancePDGCode(0);
82 pion->setParentResonanceID(0);
83
84// nucleon->setEnergy(std::sqrt((nucleon->getMass())*(nucleon->getMass())+(mom_nucleon.mag()*mom_nucleon.mag())));
85// pion->setEnergy(std::sqrt((pion->getMass())*(pion->getMass())+(mom_nucleon.mag()*mom_nucleon.mag())));
86 G4double sh=nucleon->getEnergy()+pion->getEnergy();
87 G4double mn=nucleon->getMass();
88 G4double me=pion->getMass();
89 G4double en=(sh*sh+mn*mn-me*me)/(2*sh);
90 nucleon->setEnergy(en);
91 G4double ee=std::sqrt(en*en-mn*mn+me*me);
92 pion->setEnergy(ee);
93 G4double pn=std::sqrt(en*en-mn*mn);
94
95 ThreeVector mom_nucleon = Random::normVector(pn);
96
97 nucleon->setMomentum(mom_nucleon);
98 pion->setMomentum(-mom_nucleon);
99
100 fs->addModifiedParticle(nucleon);
101 fs->addModifiedParticle(pion);
102 }
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: