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

#include <G4INCLPiNToDeltaChannel.hh>

Inheritance diagram for G4INCL::PiNToDeltaChannel:
G4INCL::IChannel

Public Member Functions

void fillFinalState (FinalState *fs)
 
FinalStategetFinalState ()
 
 PiNToDeltaChannel (Particle *, Particle *)
 
virtual ~PiNToDeltaChannel ()
 

Private Attributes

Particleparticle1
 
Particleparticle2
 

Detailed Description

Definition at line 47 of file G4INCLPiNToDeltaChannel.hh.

Constructor & Destructor Documentation

◆ PiNToDeltaChannel()

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

Definition at line 47 of file G4INCLPiNToDeltaChannel.cc.

◆ ~PiNToDeltaChannel()

G4INCL::PiNToDeltaChannel::~PiNToDeltaChannel ( )
virtual

Definition at line 53 of file G4INCLPiNToDeltaChannel.cc.

53 {
54
55 }

Member Function Documentation

◆ fillFinalState()

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

Implements G4INCL::IChannel.

Definition at line 57 of file G4INCLPiNToDeltaChannel.cc.

57 {
58 Particle * nucleon;
59 Particle * pion;
60 if(particle1->isNucleon()) {
63 } else {
66 }
67
68 ParticleType deltaType = DeltaZero;
70 deltaType = DeltaPlusPlus;
72 deltaType = DeltaPlus;
74 deltaType = DeltaPlus;
76 deltaType = DeltaZero;
78 deltaType = DeltaZero;
80 deltaType = DeltaMinus;
81 } else {
82 INCL_ERROR("Unknown particle pair in Pi-N collision." << '\n');
83 }
84
85 G4double deltaEnergy = nucleon->getEnergy()+ pion->getEnergy();
86
87 nucleon->setType(deltaType); // nucleon becomes the delta
88 nucleon->setEnergy(deltaEnergy); // set the energy of the delta
89
90 ThreeVector deltaMomentum = nucleon->getMomentum() + pion->getMomentum();
91 nucleon->setMomentum(deltaMomentum);
92
93 const G4double deltaMass = std::sqrt(deltaEnergy*deltaEnergy - deltaMomentum.mag2());
94 nucleon->setMass(deltaMass);
95
96 fs->addModifiedParticle(nucleon); // nucleon became a delta
97 fs->addDestroyedParticle(pion); // pion was removed
98 }
#define INCL_ERROR(x)
double G4double
Definition: G4Types.hh:83
G4bool isNucleon() const
G4bool isPair(Particle const *const p1, Particle const *const p2, ParticleType t1, ParticleType t2)
G4bool pion(G4int ityp)
G4bool nucleon(G4int ityp)

References G4INCL::FinalState::addDestroyedParticle(), G4INCL::FinalState::addModifiedParticle(), G4INCL::DeltaMinus, G4INCL::DeltaPlus, G4INCL::DeltaPlusPlus, G4INCL::DeltaZero, INCL_ERROR, G4INCL::Particle::isNucleon(), G4INCL::ParticleConfig::isPair(), G4INCL::ThreeVector::mag2(), G4INCL::Neutron, G4InuclParticleNames::nucleon(), particle1, particle2, G4INCL::PiMinus, G4InuclParticleNames::pion(), G4INCL::PiPlus, G4INCL::PiZero, and G4INCL::Proton.

◆ 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().

Field Documentation

◆ particle1

Particle* G4INCL::PiNToDeltaChannel::particle1
private

Definition at line 55 of file G4INCLPiNToDeltaChannel.hh.

Referenced by fillFinalState().

◆ particle2

Particle * G4INCL::PiNToDeltaChannel::particle2
private

Definition at line 55 of file G4INCLPiNToDeltaChannel.hh.

Referenced by fillFinalState().


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