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

#include <G4INCLNpiToMissingStrangenessChannel.hh>

+ Inheritance diagram for G4INCL::NpiToMissingStrangenessChannel:

Public Member Functions

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

Constructor & Destructor Documentation

◆ NpiToMissingStrangenessChannel()

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

Definition at line 51 of file G4INCLNpiToMissingStrangenessChannel.cc.

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

◆ ~NpiToMissingStrangenessChannel()

G4INCL::NpiToMissingStrangenessChannel::~NpiToMissingStrangenessChannel ( )
virtual

Definition at line 55 of file G4INCLNpiToMissingStrangenessChannel.cc.

55{}

Member Function Documentation

◆ fillFinalState()

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

Implements G4INCL::IChannel.

Definition at line 57 of file G4INCLNpiToMissingStrangenessChannel.cc.

57 {
58
59 const G4double sqrtS = KinematicsUtils::totalEnergyInCM(particle1, particle2); // MeV /!\/!\/!\.
60// assert(sqrtS > 2.240); // ! > 2.109 Not supposed to be under 2.244 GeV.
61
62 const G4int iso = ParticleTable::getIsospin(particle1->getType()) + ParticleTable::getIsospin(particle2->getType());
63// assert(iso == -3 || iso == -1 || iso == 1 || iso == 3);
64 G4int iso_system = 0;
65 G4int available_iso = 0;
66 G4int nbr_pions = 0;
67 G4int min_pions = 0;
68 G4int max_pions = 0;
69
70 Particle *pion_initial;
71 Particle *nucleon_initial;
72
73 if(particle1->isPion()){
74 pion_initial = particle1;
75 nucleon_initial = particle2;
76 }
77 else{
78 pion_initial = particle2;
79 nucleon_initial = particle1;
80 }
81 const G4double pLab = 0.001*KinematicsUtils::momentumInLab(pion_initial, nucleon_initial); // GeV /!\/!\/!\.
82
83 G4double rdm = Random::shoot();
84
85 if(rdm < 0.35){
86 // Lambda-K chosen
87 nucleon_initial->setType(Lambda);
88 available_iso = 1;
89 min_pions = 3;
91 }
92 else if((iso == 0 && rdm < 0.55) || rdm < 0.5){
93 // N-K-Kb chosen
94 available_iso = 3;
95 min_pions = 1;
97 }
98 else{
99 // Sigma-K chosen
100 available_iso = 3;
101 min_pions = 3;
103 }
104 // Gaussian noise + mean value nbr pions fonction energy (choice)
105 G4double intermediaire = min_pions + Random::gauss(2) + std::sqrt(pLab-2.2);
106 nbr_pions = std::min(max_pions,std::max(min_pions,G4int(intermediaire )));
107
108 available_iso += nbr_pions*2;
109
110 // Erase the parent resonance information of the initial particles
111 particle1->setParentResonancePDGCode(0);
112 particle1->setParentResonanceID(0);
113 particle2->setParentResonancePDGCode(0);
114 particle2->setParentResonanceID(0);
115
116 ParticleList list;
117 ParticleType PionType = PiZero;
118 const ThreeVector &rcol1 = pion_initial->getPosition();
119 const ThreeVector zero;
120
121 // (pip piz pim) (sp sz sm) (L S Kb)
122 //pip_p 0.63 0.26 0.11 0.73 0.25 0.02 0.42 0.49 0.09 // inital
123 //pip_p 0.54 0.26 0.20 0.73 0.25 0.02 0.42 0.49 0.09 // choice
124 G4bool pip_p = (std::abs(iso) == 3);
125 //piz_p 0.32 0.45 0.23 0.52 0.40 0.08 0.40 0.41 0.19
126 G4bool piz_p = (ParticleTable::getIsospin(pion_initial->getType()) == 0);
127 //pim_p 0.18 0.37 0.45 0.20 0.63 0.17 0.39 0.33 0.28
128 G4bool pim_p = (!pip_p && !piz_p);
129
130 for(Int_t i=0; i<nbr_pions; i++){
131 Particle *pion = new Particle(PionType,zero,rcol1);
132 if(available_iso-std::abs(iso-iso_system) >= 4){
133 rdm = Random::shoot();
134 if((pip_p && rdm < 0.54) || (piz_p && rdm < 0.32) || (pim_p && rdm < 0.45)){
135 pion->setType(ParticleTable::getPionType(G4int(Math::sign(iso))*2)); //pip/pip/pim
136 iso_system += 2*G4int(Math::sign(iso));
137 available_iso -= 2;
138 }
139 else if((pip_p && rdm < 0.80) || (piz_p && rdm < 0.77) || (pim_p && rdm < 0.82)){
140 pion->setType(PiZero);
141 available_iso -= 2;
142 }
143 else{
145 iso_system -= 2*G4int(Math::sign(iso));
146 available_iso -= 2;
147 }
148 }
149 else if(available_iso-std::abs(iso-iso_system) == 2){
150 rdm = Random::shoot();
151 if((pip_p && rdm < 0.26/0.37 && (Math::sign(iso)*Math::sign(iso-iso_system)+1)) || (pip_p && rdm < 0.26/0.89 && (Math::sign(iso)*Math::sign(iso-iso_system)-1)) ||
152 (piz_p && rdm < 0.45/0.68 && (Math::sign(iso)*Math::sign(iso-iso_system)+1)) || (piz_p && rdm < 0.45/0.77 && (Math::sign(iso)*Math::sign(iso-iso_system)-1)) ||
153 (pim_p && rdm < 0.37/0.82 && (Math::sign(iso)*Math::sign(iso-iso_system)+1)) || (piz_p && rdm < 0.37/0.55 && (Math::sign(iso)*Math::sign(iso-iso_system)-1))){
154 pion->setType(PiZero);
155 available_iso -= 2;
156 }
157 else{
158 pion->setType(ParticleTable::getPionType(Math::sign(iso-iso_system)*2));
159 iso_system += Math::sign(iso-iso_system)*2;
160 available_iso -= 2;
161 }
162 }
163 else if(available_iso-std::abs(iso-iso_system) == 0){
164 pion->setType(ParticleTable::getPionType(Math::sign(iso-iso_system)*2));
165 iso_system += Math::sign(iso-iso_system)*2;
166 available_iso -= 2;
167 }
168 else INCL_ERROR("Pion Generation Problem in NpiToMissingStrangenessChannel" << '\n');
169 list.push_back(pion);
170 }
171
172 if(nucleon_initial->isLambda()){ // K-Lambda
173// assert(available_iso == 1);
174 pion_initial->setType(ParticleTable::getKaonType(iso-iso_system));
175 }
176 else if(min_pions == 1){ // N-K-Kb chosen
177// assert(available_iso == 3);
178 Particle *antikaon = new Particle(KMinus,zero,rcol1);
179 if(std::abs(iso-iso_system) == 3){
180 pion_initial->setType(ParticleTable::getKaonType((iso-iso_system)/3));
181 nucleon_initial->setType(ParticleTable::getNucleonType((iso-iso_system)/3));
182 antikaon->setType(ParticleTable::getAntiKaonType((iso-iso_system)/3));
183 }
184 else if(std::abs(iso-iso_system) == 1){ // equi-repartition
185 rdm = G4int(Random::shoot()*3.)-1;
186 nucleon_initial->setType(ParticleTable::getNucleonType((G4int(rdm+0.5)*2-1)*(iso_system-iso)));
187 pion_initial->setType(ParticleTable::getKaonType((std::abs(rdm*2)-1)*(iso-iso_system)));
188 antikaon->setType(ParticleTable::getAntiKaonType((G4int(rdm-0.5)*2+1)*(iso-iso_system)));
189 }
190 else INCL_ERROR("Isospin non-conservation in NNToMissingStrangenessChannel" << '\n');
191 list.push_back(antikaon);
192 nbr_pions += 1; // need for addCreatedParticle loop
193 }
194 else{// Sigma-K
195// assert(available_iso == 3);
196 if(std::abs(iso-iso_system) == 3){
197 pion_initial->setType(ParticleTable::getKaonType((iso-iso_system)/3));
198 nucleon_initial->setType(ParticleTable::getSigmaType((iso-iso_system)*2/3));
199 }
200 else if(std::abs(iso-iso_system) == 1){
201 rdm = Random::shoot();
202 if((pip_p && rdm < 0.73) || (piz_p && rdm < 0.32) || (pim_p && rdm < 0.45)){
203 nucleon_initial->setType(SigmaZero);
204 pion_initial->setType(ParticleTable::getKaonType(iso-iso_system));
205 }
206 else{
207 nucleon_initial->setType(ParticleTable::getSigmaType((iso-iso_system)*2));
208 pion_initial->setType(ParticleTable::getKaonType(iso_system-iso));
209 }
210 }
211 else INCL_ERROR("Isospin non-conservation in NNToMissingStrangenessChannel" << '\n');
212 }
213
214 list.push_back(pion_initial);
215 list.push_back(nucleon_initial);
216
217 PhaseSpaceGenerator::generateBiased(sqrtS, list, list.size()-1, angularSlope);
218
219 fs->addModifiedParticle(pion_initial);
220 fs->addModifiedParticle(nucleon_initial);
221 for(Int_t i=0; i<nbr_pions; i++) fs->addCreatedParticle(list[i]);
222
223 }
#define INCL_ERROR(x)
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
void setParentResonancePDGCode(const G4int parentPDGCode)
void setParentResonanceID(const G4int parentID)
G4bool isPion() const
Is this a pion?
G4INCL::ParticleType getType() const
G4double totalEnergyInCM(Particle const *const p1, Particle const *const p2)
G4double momentumInLab(Particle const *const p1, Particle const *const p2)
gives the momentum in the lab frame of two particles.
G4int sign(const T t)
ParticleType getKaonType(const G4int isosp)
Get the type of kaon.
ParticleType getSigmaType(const G4int isosp)
Get the type of sigma.
G4double getINCLMass(const G4int A, const G4int Z, const G4int S)
Get INCL nuclear mass (in MeV/c^2)
G4int getIsospin(const ParticleType t)
Get the isospin of a particle.
ParticleType getNucleonType(const G4int isosp)
Get the type of nucleon.
ParticleType getPionType(const G4int isosp)
Get the type of pion.
ParticleType getAntiKaonType(const G4int isosp)
Get the type of antikaon.
void generateBiased(const G4double sqrtS, ParticleList &particles, const size_t index, const G4double slope)
Generate a biased event in the CM system.
G4double gauss(G4double sigma=1.)
G4double shoot()
Definition: G4INCLRandom.cc:93
G4int Int_t
G4bool pion(G4int ityp)

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