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p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /processes/hadronic/models/inclxx/incl_physics/src/G4INCLNpiToMissingStrangenessChannel.cc (Version 11.3.0) and /processes/hadronic/models/inclxx/incl_physics/src/G4INCLNpiToMissingStrangenessChannel.cc (Version 10.0)


  1 //                                                  1 
  2 // *******************************************    
  3 // * License and Disclaimer                       
  4 // *                                              
  5 // * The  Geant4 software  is  copyright of th    
  6 // * the Geant4 Collaboration.  It is provided    
  7 // * conditions of the Geant4 Software License    
  8 // * LICENSE and available at  http://cern.ch/    
  9 // * include a list of copyright holders.         
 10 // *                                              
 11 // * Neither the authors of this software syst    
 12 // * institutes,nor the agencies providing fin    
 13 // * work  make  any representation or  warran    
 14 // * regarding  this  software system or assum    
 15 // * use.  Please see the license in the file     
 16 // * for the full disclaimer and the limitatio    
 17 // *                                              
 18 // * This  code  implementation is the result     
 19 // * technical work of the GEANT4 collaboratio    
 20 // * By using,  copying,  modifying or  distri    
 21 // * any work based  on the software)  you  ag    
 22 // * use  in  resulting  scientific  publicati    
 23 // * acceptance of all terms of the Geant4 Sof    
 24 // *******************************************    
 25 //                                                
 26 // INCL++ intra-nuclear cascade model             
 27 // Alain Boudard, CEA-Saclay, France              
 28 // Joseph Cugnon, University of Liege, Belgium    
 29 // Jean-Christophe David, CEA-Saclay, France      
 30 // Pekka Kaitaniemi, CEA-Saclay, France, and H    
 31 // Sylvie Leray, CEA-Saclay, France               
 32 // Davide Mancusi, CEA-Saclay, France             
 33 //                                                
 34 #define INCLXX_IN_GEANT4_MODE 1                   
 35                                                   
 36 #include "globals.hh"                             
 37                                                   
 38 #include "G4INCLNpiToMissingStrangenessChannel    
 39 #include "G4INCLKinematicsUtils.hh"               
 40 #include "G4INCLBinaryCollisionAvatar.hh"         
 41 #include "G4INCLRandom.hh"                        
 42 #include "G4INCLGlobals.hh"                       
 43 #include "G4INCLLogger.hh"                        
 44 #include <algorithm>                              
 45 #include "G4INCLPhaseSpaceGenerator.hh"           
 46                                                   
 47 namespace G4INCL {                                
 48                                                   
 49   const G4double NpiToMissingStrangenessChanne    
 50                                                   
 51   NpiToMissingStrangenessChannel::NpiToMissing    
 52     : particle1(p1), particle2(p2)                
 53     {}                                            
 54                                                   
 55   NpiToMissingStrangenessChannel::~NpiToMissin    
 56                                                   
 57   void NpiToMissingStrangenessChannel::fillFin    
 58                                                   
 59     const G4double sqrtS = KinematicsUtils::to    
 60 // assert(sqrtS > 2.240); // ! > 2.109 Not sup    
 61                                                   
 62     const G4int iso = ParticleTable::getIsospi    
 63 // assert(iso == -3 || iso == -1 || iso == 1 |    
 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*KinematicsUtil    
 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;                              
 92       max_pions = G4int((sqrtS-ParticleTable::    
 93     }                                             
 94     else if((iso == 0 && rdm < 0.55) || rdm <     
 95       // N-K-Kb chosen                            
 96       //nbr_particle++;                           
 97       available_iso = 3;                          
 98       min_pions = 1;                              
 99       max_pions = G4int((sqrtS-ParticleTable::    
100     }                                             
101     else{                                         
102       // Sigma-K chosen                           
103       available_iso = 3;                          
104       min_pions = 3;                              
105       max_pions = G4int((sqrtS-ParticleTable::    
106     }                                             
107                     // Gaussian noise  + mean     
108     G4double intermediaire = min_pions + Rando    
109     nbr_pions = std::min(max_pions,std::max(mi    
110                                                   
111     available_iso += nbr_pions*2;                 
112 #ifdef INCLXX_IN_GEANT4_MODE                      
113     // Erase the parent resonance information     
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->g    
124     const ThreeVector zero;                       
125                                                   
126     //      (pip   piz   pim)   (sp    sz    s    
127     //pip_p  0.63  0.26  0.11   0.73  0.25  0.    
128     //pip_p  0.54  0.26  0.20   0.73  0.25  0.    
129     G4bool pip_p = (std::abs(iso) == 3);          
130     //piz_p  0.32  0.45  0.23   0.52  0.40  0.    
131     G4bool piz_p = (ParticleTable::getIsospin(    
132     //pim_p  0.18  0.37  0.45   0.20  0.63  0.    
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,z    
137       if(available_iso-std::abs(iso-iso_system    
138         rdm = Random::shoot();                    
139         if((pip_p && rdm < 0.54) || (piz_p &&     
140           pion->setType(ParticleTable::getPion    
141           iso_system += 2*G4int(Math::sign(iso    
142           available_iso -= 2;                     
143         }                                         
144         else if((pip_p && rdm < 0.80) || (piz_    
145           pion->setType(PiZero);                  
146           available_iso -= 2;                     
147         }                                         
148         else{                                     
149           pion->setType(ParticleTable::getPion    
150           iso_system -= 2*G4int(Math::sign(iso    
151           available_iso -= 2;                     
152         }                                         
153       }                                           
154       else if(available_iso-std::abs(iso-iso_s    
155         rdm = Random::shoot();                    
156         if((pip_p && rdm < 0.26/0.37 && (Math:    
157            (piz_p && rdm < 0.45/0.68 && (Math:    
158            (pim_p && rdm < 0.37/0.82 && (Math:    
159           pion->setType(PiZero);                  
160           available_iso -= 2;                     
161         }                                         
162         else{                                     
163           pion->setType(ParticleTable::getPion    
164           iso_system += Math::sign(iso-iso_sys    
165           available_iso -= 2;                     
166         }                                         
167       }                                           
168       else if(available_iso-std::abs(iso-iso_s    
169         pion->setType(ParticleTable::getPionTy    
170         iso_system += Math::sign(iso-iso_syste    
171         available_iso -= 2;                       
172       }                                           
173       else INCL_ERROR("Pion Generation Problem    
174       list.push_back(pion);                       
175     }                                             
176                                                   
177     if(nucleon_initial->isLambda()){ // K-Lamb    
178 // assert(available_iso == 1);                    
179       pion_initial->setType(ParticleTable::get    
180     }                                             
181     else if(min_pions == 1){ // N-K-Kb chosen     
182 // assert(available_iso == 3);                    
183       Particle *antikaon = new Particle(KMinus    
184       if(std::abs(iso-iso_system) == 3){          
185         pion_initial->setType(ParticleTable::g    
186         nucleon_initial->setType(ParticleTable    
187         antikaon->setType(ParticleTable::getAn    
188       }                                           
189       else if(std::abs(iso-iso_system) == 1){     
190         rdm = G4int(Random::shoot()*3.)-1;        
191         nucleon_initial->setType(ParticleTable    
192         pion_initial->setType(ParticleTable::g    
193         antikaon->setType(ParticleTable::getAn    
194       }                                           
195       else INCL_ERROR("Isospin non-conservatio    
196       list.push_back(antikaon);                   
197       nbr_pions += 1; // need for addCreatedPa    
198     }                                             
199     else{// Sigma-K                               
200 // assert(available_iso == 3);                    
201       if(std::abs(iso-iso_system) == 3){          
202         pion_initial->setType(ParticleTable::g    
203         nucleon_initial->setType(ParticleTable    
204       }                                           
205       else if(std::abs(iso-iso_system) == 1){     
206         rdm = Random::shoot();                    
207         if((pip_p && rdm < 0.73) || (piz_p &&     
208           nucleon_initial->setType(SigmaZero);    
209           pion_initial->setType(ParticleTable:    
210         }                                         
211         else{                                     
212           nucleon_initial->setType(ParticleTab    
213           pion_initial->setType(ParticleTable:    
214         }                                         
215       }                                           
216       else INCL_ERROR("Isospin non-conservatio    
217     }                                             
218                                                   
219     list.push_back(pion_initial);                 
220     list.push_back(nucleon_initial);              
221                                                   
222     PhaseSpaceGenerator::generateBiased(sqrtS,    
223                                                   
224     fs->addModifiedParticle(pion_initial);        
225     fs->addModifiedParticle(nucleon_initial);     
226     for(Int_t i=0; i<nbr_pions; i++) fs->addCr    
227                                                   
228   }                                               
229 }                                                 
230