Geant4 11.2.2
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 ()
 

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 //G4int nbr_particle = 2;
86
87 if(rdm < 0.35){
88 // Lambda-K chosen
89 nucleon_initial->setType(Lambda);
90 available_iso = 1;
91 min_pions = 3;
93 }
94 else if((iso == 0 && rdm < 0.55) || rdm < 0.5){
95 // N-K-Kb chosen
96 //nbr_particle++;
97 available_iso = 3;
98 min_pions = 1;
100 }
101 else{
102 // Sigma-K chosen
103 available_iso = 3;
104 min_pions = 3;
106 }
107 // Gaussian noise + mean value nbr pions fonction energy (choice)
108 G4double intermediaire = min_pions + Random::gauss(2) + std::sqrt(pLab-2.2);
109 nbr_pions = std::min(max_pions,std::max(min_pions,G4int(intermediaire )));
110
111 available_iso += nbr_pions*2;
112#ifdef INCLXX_IN_GEANT4_MODE
113 // Erase the parent resonance information of the initial particles
114 particle1->setParentResonancePDGCode(0);
115 particle1->setParentResonanceID(0);
116 particle2->setParentResonancePDGCode(0);
117 particle2->setParentResonanceID(0);
118#endif
119 //nbr_particle += nbr_pions;
120
121 ParticleList list;
122 ParticleType PionType = PiZero;
123 const ThreeVector &rcol1 = pion_initial->getPosition();
124 const ThreeVector zero;
125
126 // (pip piz pim) (sp sz sm) (L S Kb)
127 //pip_p 0.63 0.26 0.11 0.73 0.25 0.02 0.42 0.49 0.09 // inital
128 //pip_p 0.54 0.26 0.20 0.73 0.25 0.02 0.42 0.49 0.09 // choice
129 G4bool pip_p = (std::abs(iso) == 3);
130 //piz_p 0.32 0.45 0.23 0.52 0.40 0.08 0.40 0.41 0.19
131 G4bool piz_p = (ParticleTable::getIsospin(pion_initial->getType()) == 0);
132 //pim_p 0.18 0.37 0.45 0.20 0.63 0.17 0.39 0.33 0.28
133 G4bool pim_p = (!pip_p && !piz_p);
134
135 for(Int_t i=0; i<nbr_pions; i++){
136 Particle *pion = new Particle(PionType,zero,rcol1);
137 if(available_iso-std::abs(iso-iso_system) >= 4){
138 rdm = Random::shoot();
139 if((pip_p && rdm < 0.54) || (piz_p && rdm < 0.32) || (pim_p && rdm < 0.45)){
140 pion->setType(ParticleTable::getPionType(G4int(Math::sign(iso))*2)); //pip/pip/pim
141 iso_system += 2*G4int(Math::sign(iso));
142 available_iso -= 2;
143 }
144 else if((pip_p && rdm < 0.80) || (piz_p && rdm < 0.77) || (pim_p && rdm < 0.82)){
145 pion->setType(PiZero);
146 available_iso -= 2;
147 }
148 else{
150 iso_system -= 2*G4int(Math::sign(iso));
151 available_iso -= 2;
152 }
153 }
154 else if(available_iso-std::abs(iso-iso_system) == 2){
155 rdm = Random::shoot();
156 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)) ||
157 (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)) ||
158 (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))){
159 pion->setType(PiZero);
160 available_iso -= 2;
161 }
162 else{
163 pion->setType(ParticleTable::getPionType(Math::sign(iso-iso_system)*2));
164 iso_system += Math::sign(iso-iso_system)*2;
165 available_iso -= 2;
166 }
167 }
168 else if(available_iso-std::abs(iso-iso_system) == 0){
169 pion->setType(ParticleTable::getPionType(Math::sign(iso-iso_system)*2));
170 iso_system += Math::sign(iso-iso_system)*2;
171 available_iso -= 2;
172 }
173 else INCL_ERROR("Pion Generation Problem in NpiToMissingStrangenessChannel" << '\n');
174 list.push_back(pion);
175 }
176
177 if(nucleon_initial->isLambda()){ // K-Lambda
178// assert(available_iso == 1);
179 pion_initial->setType(ParticleTable::getKaonType(iso-iso_system));
180 }
181 else if(min_pions == 1){ // N-K-Kb chosen
182// assert(available_iso == 3);
183 Particle *antikaon = new Particle(KMinus,zero,rcol1);
184 if(std::abs(iso-iso_system) == 3){
185 pion_initial->setType(ParticleTable::getKaonType((iso-iso_system)/3));
186 nucleon_initial->setType(ParticleTable::getNucleonType((iso-iso_system)/3));
187 antikaon->setType(ParticleTable::getAntiKaonType((iso-iso_system)/3));
188 }
189 else if(std::abs(iso-iso_system) == 1){ // equi-repartition
190 rdm = G4int(Random::shoot()*3.)-1;
191 nucleon_initial->setType(ParticleTable::getNucleonType((G4int(rdm+0.5)*2-1)*(iso_system-iso)));
192 pion_initial->setType(ParticleTable::getKaonType((std::abs(rdm*2)-1)*(iso-iso_system)));
193 antikaon->setType(ParticleTable::getAntiKaonType((G4int(rdm-0.5)*2+1)*(iso-iso_system)));
194 }
195 else INCL_ERROR("Isospin non-conservation in NNToMissingStrangenessChannel" << '\n');
196 list.push_back(antikaon);
197 nbr_pions += 1; // need for addCreatedParticle loop
198 }
199 else{// Sigma-K
200// assert(available_iso == 3);
201 if(std::abs(iso-iso_system) == 3){
202 pion_initial->setType(ParticleTable::getKaonType((iso-iso_system)/3));
203 nucleon_initial->setType(ParticleTable::getSigmaType((iso-iso_system)*2/3));
204 }
205 else if(std::abs(iso-iso_system) == 1){
206 rdm = Random::shoot();
207 if((pip_p && rdm < 0.73) || (piz_p && rdm < 0.32) || (pim_p && rdm < 0.45)){
208 nucleon_initial->setType(SigmaZero);
209 pion_initial->setType(ParticleTable::getKaonType(iso-iso_system));
210 }
211 else{
212 nucleon_initial->setType(ParticleTable::getSigmaType((iso-iso_system)*2));
213 pion_initial->setType(ParticleTable::getKaonType(iso_system-iso));
214 }
215 }
216 else INCL_ERROR("Isospin non-conservation in NNToMissingStrangenessChannel" << '\n');
217 }
218
219 list.push_back(pion_initial);
220 list.push_back(nucleon_initial);
221
222 PhaseSpaceGenerator::generateBiased(sqrtS, list, list.size()-1, angularSlope);
223
224 fs->addModifiedParticle(pion_initial);
225 fs->addModifiedParticle(nucleon_initial);
226 for(Int_t i=0; i<nbr_pions; i++) fs->addCreatedParticle(list[i]);
227
228 }
#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()

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