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

Diff markup

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


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 // INCL++ intra-nuclear cascade model              26 // INCL++ intra-nuclear cascade model
 27 // Alain Boudard, CEA-Saclay, France               27 // Alain Boudard, CEA-Saclay, France
 28 // Joseph Cugnon, University of Liege, Belgium     28 // Joseph Cugnon, University of Liege, Belgium
 29 // Jean-Christophe David, CEA-Saclay, France       29 // Jean-Christophe David, CEA-Saclay, France
 30 // Pekka Kaitaniemi, CEA-Saclay, France, and H     30 // Pekka Kaitaniemi, CEA-Saclay, France, and Helsinki Institute of Physics, Finland
 31 // Sylvie Leray, CEA-Saclay, France                31 // Sylvie Leray, CEA-Saclay, France
 32 // Davide Mancusi, CEA-Saclay, France              32 // Davide Mancusi, CEA-Saclay, France
 33 //                                                 33 //
 34 #define INCLXX_IN_GEANT4_MODE 1                    34 #define INCLXX_IN_GEANT4_MODE 1
 35                                                    35 
 36 #include "globals.hh"                              36 #include "globals.hh"
 37                                                    37 
 38 #include "G4INCLPiNToEtaChannel.hh"                38 #include "G4INCLPiNToEtaChannel.hh"
 39 #include "G4INCLKinematicsUtils.hh"                39 #include "G4INCLKinematicsUtils.hh"
 40 #include "G4INCLBinaryCollisionAvatar.hh"          40 #include "G4INCLBinaryCollisionAvatar.hh"
 41 #include "G4INCLRandom.hh"                         41 #include "G4INCLRandom.hh"
 42 #include "G4INCLGlobals.hh"                        42 #include "G4INCLGlobals.hh"
 43 #include "G4INCLLogger.hh"                         43 #include "G4INCLLogger.hh"
 44                                                    44 
 45 namespace G4INCL {                                 45 namespace G4INCL {
 46                                                    46 
 47     PiNToEtaChannel::PiNToEtaChannel(Particle      47     PiNToEtaChannel::PiNToEtaChannel(Particle *p1, Particle *p2)
 48     : particle1(p1), particle2(p2)                 48     : particle1(p1), particle2(p2)
 49     {                                              49     {
 50                                                    50 
 51     }                                              51     }
 52                                                    52 
 53     PiNToEtaChannel::~PiNToEtaChannel(){           53     PiNToEtaChannel::~PiNToEtaChannel(){
 54                                                    54 
 55     }                                              55     }
 56                                                    56 
 57     void PiNToEtaChannel::fillFinalState(Final     57     void PiNToEtaChannel::fillFinalState(FinalState *fs) {
 58         Particle * nucleon;                        58         Particle * nucleon;
 59         Particle * pion;                           59         Particle * pion;
 60         if(particle1->isNucleon()) {               60         if(particle1->isNucleon()) {
 61             nucleon = particle1;                   61             nucleon = particle1;
 62             pion = particle2;                      62             pion = particle2;
 63         } else {                                   63         } else {
 64             nucleon = particle2;                   64             nucleon = particle2;
 65             pion = particle1;                      65             pion = particle1;
 66         }                                          66         }
 67                                                    67 
 68     G4int iso=ParticleTable::getIsospin(nucleo     68     G4int iso=ParticleTable::getIsospin(nucleon->getType())+ParticleTable::getIsospin(pion->getType());
 69 // assert(iso == 1 || iso == -1);                  69 // assert(iso == 1 || iso == -1);
 70     if (iso == 1) {                                70     if (iso == 1) {
 71       nucleon->setType(Proton);                    71       nucleon->setType(Proton);
 72     }                                              72     }
 73     else if (iso == -1) {                          73     else if (iso == -1) {
 74       nucleon->setType(Neutron);                   74       nucleon->setType(Neutron);
 75         }                                          75         }
 76     pion->setType(Eta);                            76     pion->setType(Eta);
 77 #ifdef INCLXX_IN_GEANT4_MODE                       77 #ifdef INCLXX_IN_GEANT4_MODE
 78     // Erase the parent resonance information      78     // Erase the parent resonance information of the nucleon and pion
 79     nucleon->setParentResonancePDGCode(0);         79     nucleon->setParentResonancePDGCode(0);
 80     nucleon->setParentResonanceID(0);              80     nucleon->setParentResonanceID(0);
 81     pion->setParentResonancePDGCode(0);            81     pion->setParentResonancePDGCode(0);
 82     pion->setParentResonanceID(0);                 82     pion->setParentResonanceID(0);
 83 #endif                                             83 #endif
 84     G4double sh=nucleon->getEnergy()+pion->get     84     G4double sh=nucleon->getEnergy()+pion->getEnergy();
 85     G4double mn=nucleon->getMass();                85     G4double mn=nucleon->getMass();
 86     G4double me=pion->getMass();                   86     G4double me=pion->getMass();
 87     G4double en=(sh*sh+mn*mn-me*me)/(2*sh);        87     G4double en=(sh*sh+mn*mn-me*me)/(2*sh);
 88     nucleon->setEnergy(en);                        88     nucleon->setEnergy(en);
 89     G4double ee=std::sqrt(en*en-mn*mn+me*me);      89     G4double ee=std::sqrt(en*en-mn*mn+me*me);
 90     pion->setEnergy(ee);                           90     pion->setEnergy(ee);
 91     G4double pn=std::sqrt(en*en-mn*mn);            91     G4double pn=std::sqrt(en*en-mn*mn);
 92                                                    92 
 93 // real distribution (from PRC 78, 025204 (200     93 // real distribution (from PRC 78, 025204 (2008))
 94                                                    94  
 95     G4double ECM=G4INCL::KinematicsUtils::tota     95     G4double ECM=G4INCL::KinematicsUtils::totalEnergyInCM(particle1,particle2);
 96                                                    96 
 97     const G4double pi=std::acos(-1.0);             97     const G4double pi=std::acos(-1.0);
 98     G4double x1;                                   98     G4double x1;
 99     G4double u1;                                   99     G4double u1;
100     G4double fteta;                               100     G4double fteta;
101     G4double teta;                                101     G4double teta;
102     G4double fi;                                  102     G4double fi;
103                                                   103 
104     if (ECM < 1650.) {                            104     if (ECM < 1650.) {
105 // below 1650 MeV - angular distribution (x=co    105 // below 1650 MeV - angular distribution (x=cos(theta): ax^2+bx+c   
106                                                   106         
107     G4double f1= -0.0000288627*ECM*ECM+0.09155    107     G4double f1= -0.0000288627*ECM*ECM+0.09155289*ECM-72.25436;  // f(1) that is the maximum (fit on experimental data)
108     G4double b1=(f1-(f1/(1.5-0.5*std::pow((ECM    108     G4double b1=(f1-(f1/(1.5-0.5*std::pow((ECM-1580.)/95.,2))))/2.; // ideas: 1) f(-1)=0.5f(1); 2) "power term" flattens the distribution away from ECM=1580 MeV
109     G4double a1=2.5*b1; // minimum at cos(thet    109     G4double a1=2.5*b1; // minimum at cos(theta) = -0.2
110     G4double c1=f1-3.5*b1;                        110     G4double c1=f1-3.5*b1;
111                                                   111            
112     G4double interg1=2.*a1/3. +2.*c1; // (inte    112     G4double interg1=2.*a1/3. +2.*c1; // (integral to normalize)   
113                                                   113  
114     G4int passe1=0;                               114     G4int passe1=0;
115     while (passe1==0) {                           115     while (passe1==0) {
116       // Sample x from -1 to 1                    116       // Sample x from -1 to 1
117       x1=Random::shoot();                         117       x1=Random::shoot();
118       if (Random::shoot() > 0.5) x1=-x1;          118       if (Random::shoot() > 0.5) x1=-x1;
119                                                   119       
120       // Sample u from 0 to 1                     120       // Sample u from 0 to 1
121       u1=Random::shoot();                         121       u1=Random::shoot();
122       fteta=(a1*x1*x1+b1*x1+c1)/interg1;          122       fteta=(a1*x1*x1+b1*x1+c1)/interg1;
123       // The condition                            123       // The condition
124       if (u1*f1/interg1 < fteta) {                124       if (u1*f1/interg1 < fteta) {
125         teta=std::acos(x1);                       125         teta=std::acos(x1);
126         passe1=1;                                 126         passe1=1;
127       }                                           127       }
128     }                                             128     }
129   }                                               129   }
130   else {                                          130   else {       
131 // above 1650 MeV - angular distribution (x=co    131 // above 1650 MeV - angular distribution (x=cos(theta): (ax^2+bx+c)*(0.5+(arctan(10*(x+dev)))/pi) + vert
132                                                   132         
133     G4double a2=-0.29;                            133     G4double a2=-0.29;
134     G4double b2=0.348;    // ax^2+bx+c: around    134     G4double b2=0.348;    // ax^2+bx+c: around cos(theta)=0.6 with maximum at 0.644963 (value = 0.1872666)
135     G4double c2=0.0546;                           135     G4double c2=0.0546;
136     G4double dev=-0.2;  // tail close to zero     136     G4double dev=-0.2;  // tail close to zero from "dev" down to -1
137     G4double vert=0.04; // to avoid negative d    137     G4double vert=0.04; // to avoid negative differential cross sections
138                                                   138       
139     G4double interg2=0.1716182902205207; // wi    139     G4double interg2=0.1716182902205207; // with the above given parameters! (integral to normalize)
140     const G4double f2=1.09118088; // maximum (    140     const G4double f2=1.09118088; // maximum (integral taken into account)
141                                                   141       
142     G4int passe2=0;                               142     G4int passe2=0;
143     while (passe2==0) {                           143     while (passe2==0) {
144       // Sample x from -1 to 1                    144       // Sample x from -1 to 1
145       x1=Random::shoot();                         145       x1=Random::shoot();
146       if (Random::shoot() > 0.5) x1=-x1;          146       if (Random::shoot() > 0.5) x1=-x1;
147                                                   147       
148       // Sample u from 0 to 1                     148       // Sample u from 0 to 1
149       u1=Random::shoot();                         149       u1=Random::shoot();
150       fteta=((a2*x1*x1+b2*x1+c2)*(0.5+(std::at    150       fteta=((a2*x1*x1+b2*x1+c2)*(0.5+(std::atan(10*(x1+dev)))/pi) + vert)/interg2;
151       // The condition                            151       // The condition
152       if (u1*f2 < fteta) {                        152       if (u1*f2 < fteta) {
153         teta=std::acos(x1);                       153         teta=std::acos(x1);
154         passe2=1;                                 154         passe2=1;
155       }                                           155       }
156     }                                             156     }
157  }                                                157  }
158                                                   158            
159     fi=(2.0*pi)*Random::shoot();                  159     fi=(2.0*pi)*Random::shoot();    
160                                                   160 
161     ThreeVector mom_nucleon(                      161     ThreeVector mom_nucleon(
162                                 pn*std::sin(te    162                                 pn*std::sin(teta)*std::cos(fi),
163                                 pn*std::sin(te    163                                 pn*std::sin(teta)*std::sin(fi),
164                                 pn*std::cos(te    164                                 pn*std::cos(teta)
165                                 );                165                                 );
166 // end real distribution                          166 // end real distribution      
167                                                   167     
168     nucleon->setMomentum(-mom_nucleon);           168     nucleon->setMomentum(-mom_nucleon);
169     pion->setMomentum(mom_nucleon);               169     pion->setMomentum(mom_nucleon);
170                                                   170         
171     fs->addModifiedParticle(nucleon);             171     fs->addModifiedParticle(nucleon);
172     fs->addModifiedParticle(pion);                172     fs->addModifiedParticle(pion);
173     }                                             173     }
174                                                   174 
175 }                                                 175 }
176                                                   176