Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4INCL::PionNucleonChannel Class Reference

#include <G4INCLPionNucleonChannel.hh>

Inheritance diagram for G4INCL::PionNucleonChannel:
G4INCL::IChannel

Public Member Functions

 PionNucleonChannel (Particle *, Particle *, Nucleus *)
 
virtual ~PionNucleonChannel ()
 
FinalStategetFinalState ()
 
- Public Member Functions inherited from G4INCL::IChannel
 IChannel ()
 
virtual ~IChannel ()
 

Detailed Description

Definition at line 46 of file G4INCLPionNucleonChannel.hh.

Constructor & Destructor Documentation

G4INCL::PionNucleonChannel::PionNucleonChannel ( Particle p1,
Particle p2,
Nucleus nucleus 
)

Definition at line 46 of file G4INCLPionNucleonChannel.cc.

47  : theNucleus(nucleus), particle1(p1), particle2(p2)
48  {
49 
50  }
G4INCL::PionNucleonChannel::~PionNucleonChannel ( )
virtual

Definition at line 52 of file G4INCLPionNucleonChannel.cc.

52  {
53 
54  }

Member Function Documentation

FinalState * G4INCL::PionNucleonChannel::getFinalState ( )
virtual

Implements G4INCL::IChannel.

Definition at line 56 of file G4INCLPionNucleonChannel.cc.

References G4INCL::FinalState::addDestroyedParticle(), G4INCL::FinalState::addModifiedParticle(), G4INCL::NuclearPotential::INuclearPotential::computePotentialEnergy(), G4INCL::DeltaMinus, G4INCL::DeltaPlus, G4INCL::DeltaPlusPlus, G4INCL::DeltaZero, G4INCL::Particle::getEnergy(), G4INCL::Particle::getMomentum(), G4INCL::Nucleus::getPotential(), G4INCL::Particle::getPotentialEnergy(), INCL_ERROR, G4INCL::Particle::isNucleon(), G4INCL::ParticleConfig::isPair(), G4INCL::ThreeVector::mag2(), G4INCL::Neutron, G4InuclParticleNames::nucleon(), G4INCL::PiMinus, G4InuclParticleNames::pion(), G4INCL::PiPlus, G4INCL::PiZero, G4INCL::Proton, G4INCL::Particle::setEnergy(), G4INCL::Particle::setMass(), G4INCL::Particle::setMomentum(), G4INCL::Particle::setType(), and G4INCL::Nucleus::updatePotentialEnergy().

56  {
57  FinalState *fs = new FinalState;
58 
59  Particle * nucleon;
60  Particle * pion;
61  if(particle1->isNucleon()) {
62  nucleon = particle1;
63  pion = particle2;
64  } else {
65  nucleon = particle2;
66  pion = particle1;
67  }
68 
69  ParticleType deltaType = DeltaZero;
70  if(ParticleConfig::isPair(particle1, particle2, Proton, PiPlus)) {
71  deltaType = DeltaPlusPlus;
72  } else if(ParticleConfig::isPair(particle1, particle2, Neutron, PiPlus)) {
73  deltaType = DeltaPlus;
74  } else if(ParticleConfig::isPair(particle1, particle2, Proton, PiZero)) {
75  deltaType = DeltaPlus;
76  } else if(ParticleConfig::isPair(particle1, particle2, Neutron, PiZero)) {
77  deltaType = DeltaZero;
78  } else if(ParticleConfig::isPair(particle1, particle2, Proton, PiMinus)) {
79  deltaType = DeltaZero;
80  } else if(ParticleConfig::isPair(particle1, particle2, Neutron, PiMinus)) {
81  deltaType = DeltaMinus;
82  } else {
83  INCL_ERROR("Unknown particle pair in Pi-N collision." << std::endl);
84  }
85 
86  G4double deltaEnergy = nucleon->getEnergy() - nucleon->getPotentialEnergy()
87  + pion->getEnergy() - pion->getPotentialEnergy();
88 
89  nucleon->setType(deltaType); // nucleon becomes the delta
90  deltaEnergy += theNucleus->getPotential()->computePotentialEnergy(nucleon);
91  nucleon->setEnergy(deltaEnergy); // set the energy of the delta
92 
93  ThreeVector deltaMomentum = nucleon->getMomentum() + pion->getMomentum();
94  nucleon->setMomentum(deltaMomentum);
95 
96  const G4double deltaMass = std::sqrt(deltaEnergy*deltaEnergy - deltaMomentum.mag2());
97  nucleon->setMass(deltaMass);
98  theNucleus->updatePotentialEnergy(nucleon);
99 
100  fs->addModifiedParticle(nucleon); // nucleon became a delta
101  fs->addDestroyedParticle(pion); // pion was removed
102  return fs;
103  }
void updatePotentialEnergy(Particle *p) const
Update the particle potential energy.
G4bool pion(G4int ityp)
#define INCL_ERROR(x)
G4bool nucleon(G4int ityp)
NuclearPotential::INuclearPotential const * getPotential() const
Getter for thePotential.
G4bool isNucleon() const
G4bool isPair(Particle const *const p1, Particle const *const p2, ParticleType t1, ParticleType t2)
virtual G4double computePotentialEnergy(const Particle *const p) const =0
double G4double
Definition: G4Types.hh:76

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