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

#include <G4INCLNDeltaToNLKChannel.hh>

+ Inheritance diagram for G4INCL::NDeltaToNLKChannel:

Public Member Functions

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

Constructor & Destructor Documentation

◆ NDeltaToNLKChannel()

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

Definition at line 51 of file G4INCLNDeltaToNLKChannel.cc.

52 : particle1(p1), particle2(p2)
53 {}

◆ ~NDeltaToNLKChannel()

G4INCL::NDeltaToNLKChannel::~NDeltaToNLKChannel ( )
virtual

Definition at line 55 of file G4INCLNDeltaToNLKChannel.cc.

55{}

Member Function Documentation

◆ fillFinalState()

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

Implements G4INCL::IChannel.

Definition at line 57 of file G4INCLNDeltaToNLKChannel.cc.

57 {
58 // D++ n -> p L K+ (3)
59 //
60 // D+ p -> p L K+ (1)
61 //
62 // D+ n -> p L K0 (1)
63 // D+ n -> n L K+ (1)
64
65 const G4double sqrtS = KinematicsUtils::totalEnergyInCM(particle1, particle2);
66
67 const G4int iso = ParticleTable::getIsospin(particle1->getType()) + ParticleTable::getIsospin(particle2->getType());
68
69 ParticleType KaonType;
70 ParticleType NucleonType;
71 particle2->setType(Lambda);
72
73 if(std::abs(iso) == 2){// D++ n and D+ p
74 KaonType = ParticleTable::getKaonType(iso/2);
75 NucleonType = ParticleTable::getNucleonType(iso/2);
76 }
77 else if(Random::shoot() < 0.5){// D+ n
78 KaonType = KPlus;
79 NucleonType = Neutron;
80 }
81 else{// D+ n
82 KaonType = KZero;
83 NucleonType = Proton;
84 }
85 particle1->setType(NucleonType);
86
87 ParticleList list;
88 list.push_back(particle1);
89 list.push_back(particle2);
90 const ThreeVector &rcol = particle2->getPosition();
91 const ThreeVector zero;
92 Particle *kaon = new Particle(KaonType,zero,rcol);
93 list.push_back(kaon);
94
95 if(Random::shoot()<0.5) PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
96 else PhaseSpaceGenerator::generateBiased(sqrtS, list, 1, angularSlope);
97
98 fs->addModifiedParticle(particle1);
99 fs->addModifiedParticle(particle2);
100 fs->addCreatedParticle(kaon);
101
102 }
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
const G4INCL::ThreeVector & getPosition() const
G4INCL::ParticleType getType() const
void setType(ParticleType t)
G4double totalEnergyInCM(Particle const *const p1, Particle const *const p2)
ParticleType getKaonType(const G4int isosp)
Get the type of kaon.
G4int getIsospin(const ParticleType t)
Get the isospin of a particle.
ParticleType getNucleonType(const G4int isosp)
Get the type of nucleon.
void generateBiased(const G4double sqrtS, ParticleList &particles, const size_t index, const G4double slope)
Generate a biased event in the CM system.
G4double shoot()
Definition: G4INCLRandom.cc:93

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