57 {
58
60
61
63
65 G4int available_iso = 0;
69
70 Particle *pion_initial;
71 Particle *nucleon_initial;
72
74 pion_initial = particle1;
75 nucleon_initial = particle2;
76 }
77 else{
78 pion_initial = particle2;
79 nucleon_initial = particle1;
80 }
82
84
85 G4int nbr_particle = 2;
86
87 if(rdm < 0.35){
88
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
96 nbr_particle++;
97 available_iso = 3;
98 min_pions = 1;
100 }
101 else{
102
103 available_iso = 3;
104 min_pions = 3;
106 }
107
109 nbr_pions = std::min(max_pions,std::max(min_pions,
G4int(intermediaire )));
110
111 available_iso += nbr_pions*2;
112 nbr_particle += nbr_pions;
113
114 ParticleList list;
116 const ThreeVector &rcol1 = pion_initial->getPosition();
117 const ThreeVector zero;
118
119
120
121
122 G4bool pip_p = (std::abs(iso) == 3);
123
125
126 G4bool pim_p = (!pip_p && !piz_p);
127
128 for(
Int_t i=0; i<nbr_pions; i++){
129 Particle *
pion =
new Particle(PionType,zero,rcol1);
130 if(available_iso-std::abs(iso-iso_system) >= 4){
132 if((pip_p && rdm < 0.54) || (piz_p && rdm < 0.32) || (pim_p && rdm < 0.45)){
135 available_iso -= 2;
136 }
137 else if((pip_p && rdm < 0.80) || (piz_p && rdm < 0.77) || (pim_p && rdm < 0.82)){
139 available_iso -= 2;
140 }
141 else{
144 available_iso -= 2;
145 }
146 }
147 else if(available_iso-std::abs(iso-iso_system) == 2){
153 available_iso -= 2;
154 }
155 else{
158 available_iso -= 2;
159 }
160 }
161 else if(available_iso-std::abs(iso-iso_system) == 0){
164 available_iso -= 2;
165 }
166 else INCL_ERROR(
"Pion Generation Problem in NpiToMissingStrangenessChannel" <<
'\n');
167 list.push_back(pion);
168 }
169
170 if(nucleon_initial->isLambda()){
171
173 }
174 else if(min_pions == 1){
175
176 Particle *antikaon =
new Particle(
KMinus,zero,rcol1);
177 if(std::abs(iso-iso_system) == 3){
181 }
182 else if(std::abs(iso-iso_system) == 1){
187 }
188 else INCL_ERROR(
"Isospin non-conservation in NNToMissingStrangenessChannel" <<
'\n');
189 list.push_back(antikaon);
190 nbr_pions += 1;
191 }
192 else{
193
194 if(std::abs(iso-iso_system) == 3){
197 }
198 else if(std::abs(iso-iso_system) == 1){
200 if((pip_p && rdm < 0.73) || (piz_p && rdm < 0.32) || (pim_p && rdm < 0.45)){
203 }
204 else{
207 }
208 }
209 else INCL_ERROR(
"Isospin non-conservation in NNToMissingStrangenessChannel" <<
'\n');
210 }
211
212 list.push_back(pion_initial);
213 list.push_back(nucleon_initial);
214
216
217 fs->addModifiedParticle(pion_initial);
218 fs->addModifiedParticle(nucleon_initial);
219 for(
Int_t i=0; i<nbr_pions; i++) fs->addCreatedParticle(list[i]);
220
221 }
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.
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.)