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] [ 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 ]

  1 //
  2 // ********************************************************************
  3 // * License and Disclaimer                                           *
  4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.                             *
 10 // *                                                                  *
 11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                                                  *
 18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Software license.          *
 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 Helsinki Institute of Physics, Finland
 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 "G4INCLNpiToSK2piChannel.hh"
 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 NpiToSK2piChannel::angularSlope = 6.; // What is the exact effect? Sould be check
 50   
 51   NpiToSK2piChannel::NpiToSK2piChannel(Particle *p1, Particle *p2)
 52     : particle1(p1), particle2(p2)
 53     {}
 54   
 55   NpiToSK2piChannel::~NpiToSK2piChannel(){}
 56   
 57   void NpiToSK2piChannel::fillFinalState(FinalState *fs) {
 58     
 59         
 60         // p pi+ -> S+ K+ pi+ pi- (1)
 61     // p pi+ -> S+ K+ pi0 pi0 (1/4)
 62     // p pi+ -> S0 K+ pi+ pi0 (1/2)
 63     // p pi+ -> S- K+ pi+ pi+ (1/4)
 64     // p pi+ -> S+ K0 pi+ pi0 (1)
 65     // p pi+ -> S0 K0 pi+ pi+ (1/4)
 66     //
 67     // p pi0 -> S+ K+ pi0 pi- (1/2)
 68     // p pi0 -> S0 K+ pi+ pi- (1/2)
 69     // p pi0 -> S0 K+ pi0 pi0 (1/4)
 70     // p pi0 -> S- K+ pi+ pi0 (1/4)
 71     // p pi0 -> S+ K0 pi+ pi- (1)
 72     // p pi0 -> S+ K0 pi0 pi0 (1/4)
 73     // p pi0 -> S0 K0 pi+ pi0 (1/4)
 74     // p pi0 -> S- K0 pi+ pi+ (1/2)
 75     //
 76     // p pi- -> S+ K+ pi- pi- (1/4)
 77     // p pi- -> S0 K+ pi0 pi- (1/2)
 78     // p pi- -> S- K+ pi+ pi- (1/4)
 79     // p pi- -> S- K+ pi0 pi0 (1/4)
 80     // p pi- -> S+ K0 pi0 pi- (1/2)
 81     // p pi- -> S0 K0 pi+ pi- (1)
 82     // p pi- -> S0 K0 pi0 pi0 (1/2)
 83     // p pi- -> S- K0 pi+ pi0 (1/2)
 84     
 85     Particle *nucleon;
 86     Particle *pion;
 87     
 88     
 89     if(particle1->isNucleon()){
 90       nucleon = particle1;
 91       pion = particle2;
 92     }
 93     else{
 94       nucleon = particle2;
 95       pion = particle1;
 96     }
 97     
 98     const G4double sqrtS = KinematicsUtils::totalEnergyInCM(nucleon, pion);
 99     
100     const G4int iso = ParticleTable::getIsospin(nucleon->getType()) + ParticleTable::getIsospin(pion->getType());
101     G4double rdm = Random::shoot();
102     
103     ParticleType KaonType;
104     ParticleType PionType;
105     
106     if(iso == 3 || iso == -3){
107       if(rdm*13. < 4.){
108         KaonType = ParticleTable::getKaonType(iso/3);
109         PionType = ParticleTable::getPionType(-2*iso/3);
110         nucleon->setType(ParticleTable::getSigmaType(2*iso/3));
111       }
112       else if(rdm*13. < 5.){
113         KaonType = ParticleTable::getKaonType(iso/3);
114         PionType = PiZero;
115         pion->setType(PiZero);
116         nucleon->setType(ParticleTable::getSigmaType(2*iso/3));
117       }
118       else if(rdm*13. < 7.){
119         KaonType = ParticleTable::getKaonType(iso/3);
120         PionType = PiZero;
121         nucleon->setType(SigmaZero);
122       }
123       else if(rdm*13. < 8.){
124         KaonType = ParticleTable::getKaonType(iso/3);
125         PionType = ParticleTable::getPionType(2*iso/3);
126         nucleon->setType(ParticleTable::getSigmaType(-2*iso/3));
127       }
128       else if(rdm*13. < 12.){
129         KaonType = ParticleTable::getKaonType(-iso/3);
130         PionType = PiZero;
131         nucleon->setType(ParticleTable::getSigmaType(2*iso/3));
132       }
133       else{
134         KaonType = ParticleTable::getKaonType(-iso/3);
135         PionType = ParticleTable::getPionType(2*iso/3);
136         nucleon->setType(SigmaZero);
137       }
138     }
139     else if(pion->getType() == PiZero){
140       if(rdm*14. < 2.){
141         KaonType = ParticleTable::getKaonType(iso);
142         PionType = ParticleTable::getPionType(-2*iso);
143         nucleon->setType(ParticleTable::getSigmaType(2*iso));
144       }
145       else if(rdm*14. < 4.){
146         KaonType = ParticleTable::getKaonType(iso);
147         PionType = ParticleTable::getPionType(-2*iso);
148         nucleon->setType(SigmaZero);
149         pion->setType(ParticleTable::getPionType(2*iso));
150       }
151       else if(rdm*14. < 5.){
152         KaonType = ParticleTable::getKaonType(iso);
153         PionType = PiZero;
154         nucleon->setType(SigmaZero);
155       }
156       else if(rdm*14. < 6.){
157         KaonType = ParticleTable::getKaonType(iso);
158         PionType = ParticleTable::getPionType(2*iso);
159         nucleon->setType(ParticleTable::getSigmaType(-2*iso));
160       }
161       else if(rdm*14. < 10.){
162         KaonType = ParticleTable::getKaonType(-iso);
163         PionType = ParticleTable::getPionType(-2*iso);
164         nucleon->setType(ParticleTable::getSigmaType(2*iso));
165         pion->setType(ParticleTable::getPionType(2*iso));
166       }
167       else if(rdm*14. < 11.){
168         KaonType = ParticleTable::getKaonType(-iso);
169         PionType = PiZero;
170         nucleon->setType(ParticleTable::getSigmaType(2*iso));
171       }
172       else if(rdm*14. < 12.){
173         KaonType = ParticleTable::getKaonType(-iso);
174         PionType = ParticleTable::getPionType(2*iso);
175         nucleon->setType(SigmaZero);
176       }
177       else{
178         KaonType = ParticleTable::getKaonType(-iso);
179         PionType = ParticleTable::getPionType(2*iso);
180         nucleon->setType(ParticleTable::getSigmaType(-2*iso));
181         pion->setType(ParticleTable::getPionType(2*iso));
182       }
183     }
184     else{
185       if(rdm*15. < 1.){
186         KaonType = ParticleTable::getKaonType(-iso);
187         PionType = ParticleTable::getPionType(2*iso);
188         nucleon->setType(ParticleTable::getSigmaType(-2*iso));
189       }
190       else if(rdm*15. < 3.){
191         KaonType = ParticleTable::getKaonType(-iso);
192         PionType = PiZero;
193         nucleon->setType(SigmaZero);
194       }
195       else if(rdm*15. < 4.){
196         KaonType = ParticleTable::getKaonType(-iso);
197         PionType = ParticleTable::getPionType(-2*iso);
198         nucleon->setType(ParticleTable::getSigmaType(2*iso));
199       }
200       else if(rdm*15. < 5.){
201         KaonType = ParticleTable::getKaonType(-iso);
202         PionType = PiZero;
203         nucleon->setType(ParticleTable::getSigmaType(2*iso));
204         pion->setType(PiZero);
205       }
206       else if(rdm*15. < 7.){
207         KaonType = ParticleTable::getKaonType(iso);
208         PionType = PiZero;
209         nucleon->setType(ParticleTable::getSigmaType(-2*iso));
210       }
211       else if(rdm*15. < 11.){
212         KaonType = ParticleTable::getKaonType(iso);
213         PionType = ParticleTable::getPionType(-2*iso);
214         nucleon->setType(SigmaZero);
215       }
216       else if(rdm*15. < 13.){
217         KaonType = ParticleTable::getKaonType(iso);
218         PionType = PiZero;
219         nucleon->setType(SigmaZero);
220         pion->setType(PiZero);
221       }
222       else{
223         KaonType = ParticleTable::getKaonType(iso);
224         PionType = ParticleTable::getPionType(-2*iso);
225         nucleon->setType(ParticleTable::getSigmaType(2*iso));
226         pion->setType(PiZero);
227       }
228     }
229     
230 #ifdef INCLXX_IN_GEANT4_MODE
231     // Erase the parent resonance information of the nucleon and pion
232     nucleon->setParentResonancePDGCode(0);
233     nucleon->setParentResonanceID(0);
234     pion->setParentResonancePDGCode(0);
235     pion->setParentResonanceID(0);
236 #endif
237     
238     ParticleList list;
239     list.push_back(nucleon);
240     list.push_back(pion);
241     const ThreeVector &rcol1 = nucleon->getPosition();
242     const ThreeVector &rcol2 = pion->getPosition();
243     const ThreeVector zero;
244     Particle *kaon = new Particle(KaonType,zero,rcol1);
245     Particle *pion2 = new Particle(PionType,zero,rcol2);
246     list.push_back(kaon);
247     list.push_back(pion2);
248     
249     PhaseSpaceGenerator::generateBiased(sqrtS, list, 0, angularSlope);
250     
251     INCL_DEBUG("NpiToSK2pi " << (kaon->getMomentum().theta()) * 180. / G4INCL::Math::pi << '\n');
252     
253     fs->addModifiedParticle(nucleon);
254     fs->addModifiedParticle(pion);
255     fs->addCreatedParticle(kaon);
256     fs->addCreatedParticle(pion2);
257     
258   }
259 }
260