Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4INCL::PiNToOmegaChannel Class Reference

#include <G4INCLPiNToOmegaChannel.hh>

Inheritance diagram for G4INCL::PiNToOmegaChannel:
Collaboration 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 ()
 

Detailed Description

Definition at line 47 of file G4INCLPiNToOmegaChannel.hh.

Constructor & Destructor Documentation

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

Definition at line 47 of file G4INCLPiNToOmegaChannel.cc.

48  : particle1(p1), particle2(p2)
49  {
50 
51  }
G4INCL::PiNToOmegaChannel::~PiNToOmegaChannel ( )
virtual

Definition at line 53 of file G4INCLPiNToOmegaChannel.cc.

53  {
54 
55  }

Member Function Documentation

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 
69  G4int iso=ParticleTable::getIsospin(nucleon->getType())+ParticleTable::getIsospin(pion->getType());
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  }
G4bool pion(G4int ityp)
int G4int
Definition: G4Types.hh:78
ThreeVector normVector(G4double norm=1.)
G4bool nucleon(G4int ityp)
G4int getIsospin(const ParticleType t)
Get the isospin of a particle.
G4bool isNucleon() const
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:


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