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

#include <G4INCLPiNToDeltaChannel.hh>

+ Inheritance diagram for G4INCL::PiNToDeltaChannel:

Public Member Functions

 PiNToDeltaChannel (Particle *, Particle *)
 
virtual ~PiNToDeltaChannel ()
 
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 G4INCLPiNToDeltaChannel.hh.

Constructor & Destructor Documentation

◆ PiNToDeltaChannel()

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

Definition at line 47 of file G4INCLPiNToDeltaChannel.cc.

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

◆ ~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()) {
61 nucleon = particle1;
62 pion = particle2;
63 } else {
64 nucleon = particle2;
65 pion = particle1;
66 }
67
68 ParticleType deltaType = DeltaZero;
69 if(ParticleConfig::isPair(particle1, particle2, Proton, PiPlus)) {
70 deltaType = DeltaPlusPlus;
71 } else if(ParticleConfig::isPair(particle1, particle2, Neutron, PiPlus)) {
72 deltaType = DeltaPlus;
73 } else if(ParticleConfig::isPair(particle1, particle2, Proton, PiZero)) {
74 deltaType = DeltaPlus;
75 } else if(ParticleConfig::isPair(particle1, particle2, Neutron, PiZero)) {
76 deltaType = DeltaZero;
77 } else if(ParticleConfig::isPair(particle1, particle2, Proton, PiMinus)) {
78 deltaType = DeltaZero;
79 } else if(ParticleConfig::isPair(particle1, particle2, Neutron, PiMinus)) {
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)

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