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

#include <G4INCLNpiToLKpiChannel.hh>

Inheritance diagram for G4INCL::NpiToLKpiChannel:
G4INCL::IChannel

Public Member Functions

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

Private Member Functions

 INCL_DECLARE_ALLOCATION_POOL (NpiToLKpiChannel)
 

Private Attributes

Particleparticle1
 
Particleparticle2
 

Static Private Attributes

static const G4double angularSlope = 6.
 

Detailed Description

Definition at line 47 of file G4INCLNpiToLKpiChannel.hh.

Constructor & Destructor Documentation

◆ NpiToLKpiChannel()

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

Definition at line 51 of file G4INCLNpiToLKpiChannel.cc.

◆ ~NpiToLKpiChannel()

G4INCL::NpiToLKpiChannel::~NpiToLKpiChannel ( )
virtual

Definition at line 55 of file G4INCLNpiToLKpiChannel.cc.

55{}

Member Function Documentation

◆ fillFinalState()

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

Implements G4INCL::IChannel.

Definition at line 57 of file G4INCLNpiToLKpiChannel.cc.

57 {
58
59 // ratio
60 // p pi+ (1) p pi0 (3/2) p pi- (2)
61 //
62 // p pi0 -> L K+ pi0 (1/2)
63 // all the others (1)
64
65 Particle *nucleon;
66 Particle *pion;
67
68 if(particle1->isNucleon()){
71 }
72 else{
75 }
76
78
79 const G4int iso = ParticleTable::getIsospin(nucleon->getType()) + ParticleTable::getIsospin(pion->getType());
80 G4double rdm = Random::shoot();
81
82 ParticleType KaonType;
83
84 if(iso == 3 || iso == -3){
85 KaonType = ParticleTable::getKaonType(iso/3);
86 }
87 else if(pion->getType() == PiZero){
88 if(rdm*3. < 1.){
89 KaonType = ParticleTable::getKaonType(iso);
90 }
91 else{
92 KaonType = ParticleTable::getKaonType(-iso);
93 pion->setType(ParticleTable::getPionType(2*iso));
94 }
95 }
96 else{
97 if(rdm < 0.5){
98 KaonType = ParticleTable::getKaonType(-iso);
99 }
100 else{
101 KaonType = ParticleTable::getKaonType(iso);
102 pion->setType(PiZero);
103 }
104 }
105
106 nucleon->setType(Lambda);
107
108 ParticleList list;
109 list.push_back(nucleon);
110 list.push_back(pion);
111 const ThreeVector &rcol = nucleon->getPosition();
112 const ThreeVector zero;
113 Particle *kaon = new Particle(KaonType,zero,rcol);
114 list.push_back(kaon);
115
117
118 INCL_DEBUG("NpiToLKpi " << (kaon->getMomentum().theta()) * 180. / G4INCL::Math::pi << '\n');
119
120 fs->addModifiedParticle(nucleon);
121 fs->addModifiedParticle(pion);
122 fs->addCreatedParticle(kaon);
123
124 }
#define INCL_DEBUG(x)
double G4double
Definition: G4Types.hh:83
int G4int
Definition: G4Types.hh:85
static const G4double angularSlope
G4bool isNucleon() const
G4double totalEnergyInCM(Particle const *const p1, Particle const *const p2)
const G4double pi
ParticleType getKaonType(const G4int isosp)
Get the type of kaon.
G4int getIsospin(const ParticleType t)
Get the isospin of a particle.
ParticleType getPionType(const G4int isosp)
Get the type of pion.
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
G4bool pion(G4int ityp)
G4bool nucleon(G4int ityp)
static const G4LorentzVector zero(0., 0., 0., 0.)

References G4INCL::FinalState::addCreatedParticle(), G4INCL::FinalState::addModifiedParticle(), angularSlope, G4INCL::PhaseSpaceGenerator::generateBiased(), G4INCL::ParticleTable::getIsospin(), G4INCL::ParticleTable::getKaonType(), G4INCL::Particle::getMomentum(), G4INCL::ParticleTable::getPionType(), INCL_DEBUG, G4INCL::Particle::isNucleon(), G4INCL::Lambda, G4InuclParticleNames::nucleon(), particle1, particle2, G4INCL::Math::pi, G4InuclParticleNames::pion(), G4INCL::PiZero, G4INCL::Random::shoot(), G4INCL::ThreeVector::theta(), G4INCL::KinematicsUtils::totalEnergyInCM(), and anonymous_namespace{G4CascadeDeexciteBase.cc}::zero.

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

◆ INCL_DECLARE_ALLOCATION_POOL()

G4INCL::NpiToLKpiChannel::INCL_DECLARE_ALLOCATION_POOL ( NpiToLKpiChannel  )
private

Field Documentation

◆ angularSlope

const G4double G4INCL::NpiToLKpiChannel::angularSlope = 6.
staticprivate

Definition at line 57 of file G4INCLNpiToLKpiChannel.hh.

Referenced by fillFinalState().

◆ particle1

Particle* G4INCL::NpiToLKpiChannel::particle1
private

Definition at line 55 of file G4INCLNpiToLKpiChannel.hh.

Referenced by fillFinalState().

◆ particle2

Particle * G4INCL::NpiToLKpiChannel::particle2
private

Definition at line 55 of file G4INCLNpiToLKpiChannel.hh.

Referenced by fillFinalState().


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