- Timestamp:
- Nov 5, 2010, 3:45:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/processes/hadronic/models/incl/include/G4InclDataDefs.hh
r1196 r1340 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4InclDataDefs.hh,v 1. 7 2009/11/18 10:43:14 kaitanieExp $26 // $Id: G4InclDataDefs.hh,v 1.10 2010/10/28 15:35:50 gcosmo Exp $ 27 27 // Translation of INCL4.2/ABLA V3 28 28 // Pekka Kaitaniemi, HIP (translation) … … 36 36 #define InclDataDefs_hh 1 37 37 38 #include "G4Nucleus.hh" 39 #include "G4HadProjectile.hh" 40 #include "G4ParticleTable.hh" 41 #include "G4Track.hh" 42 43 class G4InclFermi { 44 public: 45 G4InclFermi() { 46 G4double hc = 197.328; 47 G4double fmp = 938.2796; 48 pf=1.37*hc; 49 pf2=pf*pf; 50 tf=std::sqrt(pf*pf+fmp*fmp)-fmp; 51 }; 52 ~G4InclFermi() {}; 53 54 G4double tf,pf,pf2; 55 }; 56 57 #define max_a_proj 61 58 59 /** 60 * (eps_c,p1_s,p2_s,p3_s,eps_c used to store the kinematics of 61 * nucleons for composit projectiles before entering the potential) 62 */ 63 class G4QuadvectProjo { 64 public: 65 G4QuadvectProjo() {}; 66 ~G4QuadvectProjo() {}; 67 68 G4double eps_c[max_a_proj],p3_c[max_a_proj], 69 p1_s[max_a_proj],p2_s[max_a_proj],p3_s[max_a_proj], 70 t_c[max_a_proj]; 71 }; 72 73 class G4VBe { 74 public: 75 G4VBe() {}; 76 ~G4VBe() {}; 77 78 G4int ia_be, iz_be; 79 G4double rms_be, pms_be, bind_be; 80 }; 81 82 /** 83 * Projectile spectator 84 */ 85 class G4InclProjSpect { 86 public: 87 G4InclProjSpect() { 88 // G4cout <<"Projectile spectator data structure created!" << G4endl; 89 }; 90 ~G4InclProjSpect() {}; 91 92 void clear() { 93 for(G4int i = 0; i < 21; i++) tab[i] = 0.0; 94 for(G4int i = 0; i < 61; i++) n_projspec[i] = 0; 95 a_projspec = 0; 96 z_projspec = 0; 97 m_projspec = 0.0; 98 ex_projspec = 0.0; 99 p1_projspec = 0.0; 100 p2_projspec = 0.0; 101 p3_projspec = 0.0; 102 }; 103 104 G4double tab[21]; 105 G4int n_projspec[61]; 106 G4int a_projspec,z_projspec; 107 G4double ex_projspec,t_projspec, p1_projspec, p2_projspec, p3_projspec, m_projspec; 108 }; 109 38 110 #define FSIZE 15 39 111 /** … … 42 114 class G4Calincl { 43 115 public: 44 G4Calincl() {}; 116 G4Calincl() { 117 isExtendedProjectile = false; 118 }; 119 120 G4Calincl(const G4HadProjectile &aTrack, const G4Nucleus &theNucleus, G4bool inverseKinematics = false) { 121 for(int i = 0; i < 15; i++) { 122 f[i] = 0.0; // Initialize INCL input data 123 } 124 125 usingInverseKinematics = inverseKinematics; 126 127 f[0] = theNucleus.GetA_asInt(); // Target mass number 128 f[1] = theNucleus.GetZ_asInt(); // Target charge number 129 f[6] = getBulletType(aTrack.GetDefinition()); // Projectile type (INCL particle code) 130 f[2] = aTrack.GetKineticEnergy() / MeV; // Projectile energy (total, in MeV) 131 f[5] = 1.0; // Time scaling 132 f[4] = 45.0; // Nuclear potential 133 setExtendedProjectileInfo(aTrack.GetDefinition()); 134 // G4cout <<"Projectile type = " << f[6] << G4endl; 135 // G4cout <<"Energy = " << f[2] << G4endl; 136 // G4cout <<"Target A = " << f[0] << " Z = " << f[1] << G4endl; 137 }; 138 45 139 ~G4Calincl() {}; 46 140 141 static void printProjectileTargetInfo(const G4HadProjectile &aTrack, const G4Nucleus &theNucleus) { 142 G4cout <<"Projectile = " << aTrack.GetDefinition()->GetParticleName() << G4endl; 143 G4cout <<" four-momentum: " << aTrack.Get4Momentum() << G4endl; 144 G4cout <<"Energy = " << aTrack.GetKineticEnergy() / MeV << G4endl; 145 G4cout <<"Target A = " << theNucleus.GetA_asInt() << " Z = " << theNucleus.GetZ_asInt() << G4endl; 146 } 147 148 static G4bool canUseInverseKinematics(const G4HadProjectile &aTrack, const G4Nucleus &theNucleus) { 149 G4int targetA = theNucleus.GetA_asInt(); 150 const G4ParticleDefinition *projectileDef = aTrack.GetDefinition(); 151 G4int projectileA = projectileDef->GetAtomicMass(); 152 // G4int projectileZ = projectileDef->GetAtomicNumber(); 153 if(targetA > 0 && targetA < 18 && (projectileDef != G4Proton::Proton() && 154 projectileDef != G4Neutron::Neutron() && 155 projectileDef != G4PionPlus::PionPlus() && 156 projectileDef != G4PionZero::PionZero() && 157 projectileDef != G4PionMinus::PionMinus()) && 158 projectileA > 1) { 159 return true; 160 } else { 161 return false; 162 } 163 } 164 165 G4double bulletE() { 166 return f[2]; 167 } 168 169 G4int getBulletType() { 170 return G4int(f[6]); 171 }; 172 173 void setExtendedProjectileInfo(const G4ParticleDefinition *pd) { 174 if(getBulletType(pd) == -666) { 175 extendedProjectileA = pd->GetAtomicMass(); 176 extendedProjectileZ = pd->GetAtomicNumber(); 177 isExtendedProjectile = true; 178 } else { 179 isExtendedProjectile = false; 180 } 181 }; 182 183 G4int getBulletType(const G4ParticleDefinition *pd) { 184 G4ParticleTable *pt = G4ParticleTable::GetParticleTable(); 185 186 if(pd == G4Proton::Proton()) { 187 return 1; 188 } else if(pd == G4Neutron::Neutron()) { 189 return 2; 190 } else if(pd == G4PionPlus::PionPlus()) { 191 return 3; 192 } else if(pd == G4PionMinus::PionMinus()) { 193 return 5; 194 } else if(pd == G4PionZero::PionZero()) { 195 return 4; 196 } else if(pd == G4Deuteron::Deuteron()) { 197 return 6; 198 } else if(pd == G4Triton::Triton()) { 199 return 7; 200 } else if(pd == G4He3::He3()) { 201 return 8; 202 } else if(pd == G4Alpha::Alpha()) { 203 return 9; 204 } else if(pd == pt->GetIon(6, 12, 0.0)) { // C12 special case. This should be phased-out in favor of "extended projectile" 205 return -12; 206 } else { // Is this extended projectile? 207 G4int A = pd->GetAtomicMass(); 208 G4int Z = pd->GetAtomicNumber(); 209 if(A > 4 && A <= 16 && Z > 2 && Z <= 8) { // Ions from Lithium to Oxygen 210 return -666; // Code of an extended projectile 211 } 212 } 213 G4cout <<"Error! Projectile " << pd->GetParticleName() << " not defined!" << G4endl; 214 return 0; 215 }; 216 217 G4bool isInverseKinematics() { 218 return usingInverseKinematics; 219 }; 220 221 G4double targetA() { return f[0]; }; 222 G4double targetZ() { return f[1]; }; 223 224 G4int extendedProjectileA; 225 G4int extendedProjectileZ; 226 G4bool isExtendedProjectile; 227 47 228 /** 48 229 * Here f is an array containing the following initial values: … … 69 250 */ 70 251 G4int icoup; 252 253 G4bool usingInverseKinematics; 71 254 }; 72 255 … … 206 389 class G4Ws { 207 390 public: 208 G4Ws() {}; 391 G4Ws() { 392 fneck = 0.0; 393 }; 209 394 ~G4Ws() {}; 210 395 … … 256 441 */ 257 442 G4double bmax; 443 444 G4double fneck; 258 445 }; 259 446 … … 311 498 G4int ind1[BL1SIZE],ind2[BL1SIZE]; 312 499 G4double ta; 500 501 void dump(G4int numberOfParticles) { 502 static G4int dumpNumber = 0; 503 G4cout <<"Dump number" << dumpNumber << " of particle 4-momenta (G4Bl1):" << G4endl; 504 G4cout <<"ta = " << ta << G4endl; 505 for(G4int i = 0; i < numberOfParticles; i++) { 506 G4cout <<"i = " << i << " p1 = " << p1[i] << " p2 = " << p2[i] << " p3 = " << p3[i] << " eps = " << eps[i] << G4endl; 507 } 508 dumpNumber++; 509 } 313 510 }; 314 511 … … 383 580 */ 384 581 G4double rab2; 582 583 void dump() { 584 static G4int dumpNumber = 0; 585 G4cout <<"Dump number" << dumpNumber << " of particle positions (G4Bl3):" << G4endl; 586 G4cout <<" ia1 = " << ia1 << G4endl; 587 G4cout <<" ia2 = " << ia2 << G4endl; 588 G4cout <<" rab2 = " << rab2 << G4endl; 589 for(G4int i = 0; i <= (ia1 + ia2); i++) { 590 G4cout <<"i = " << i << " x1 = " << x1[i] << " x2 = " << x2[i] << " x3 = " << x3[i] << G4endl; 591 } 592 dumpNumber++; 593 } 385 594 }; 386 595 … … 510 719 }; 511 720 721 /** 722 * Projectile parameters. 723 */ 724 class G4Bev { 725 public: 726 /** 727 * Initialize all variables to zero. 728 */ 729 G4Bev() { 730 ia_be = 0; 731 iz_be = 0; 732 rms_be = 0.0; 733 pms_be = 0.0; 734 bind_be = 0.0; 735 }; 736 ~G4Bev() {}; 737 738 /** 739 * Mass number. 740 */ 741 G4int ia_be; 742 743 /** 744 * Charge number. 745 */ 746 G4int iz_be; 747 748 /** 749 * rms 750 */ 751 G4double rms_be; 752 753 /** 754 * pms 755 */ 756 G4double pms_be; 757 758 /** 759 * bind 760 */ 761 G4double bind_be; 762 }; 763 512 764 #define VARSIZE 3 513 765 #define VAEPSSIZE 250 … … 567 819 }; 568 820 569 #define VARNTPSIZE 255821 #define VARNTPSIZE 301 570 822 class G4VarNtp { 571 823 public: … … 582 834 targetA = 0; 583 835 targetZ = 0; 836 masp = 0.0; mzsp = 0.0; exsp = 0.0; 837 // To be deleted? 838 spectatorA = 0; 839 spectatorZ = 0; 840 spectatorEx = 0.0; 841 spectatorM = 0.0; 842 spectatorT = 0.0; 843 spectatorP1 = 0.0; 844 spectatorP2 = 0.0; 845 spectatorP3 = 0.0; 584 846 massini = 0; 585 847 mzini = 0; … … 590 852 pyrem = 0; 591 853 pzrem = 0; 854 erecrem = 0; 592 855 mulncasc = 0; 593 856 mulnevap = 0; … … 600 863 iafis = 0; 601 864 ntrack = 0; 865 needsFermiBreakup = false; 602 866 for(G4int i = 0; i < VARNTPSIZE; i++) { 603 867 itypcasc[i] = 0; … … 612 876 } 613 877 878 /** 879 * Add a particle to the INCL/ABLA final output. 880 */ 614 881 void addParticle(G4double A, G4double Z, G4double E, G4double P, G4double theta, G4double phi) { 615 882 if(full[particleIndex]) { … … 752 1019 753 1020 /** 1021 * Projectile spectator A, Z, Eex; 1022 */ 1023 G4double masp, mzsp, exsp, mrem; 1024 1025 /** 1026 * Spectator nucleus mass number for light ion projectile support. 1027 */ 1028 G4int spectatorA; 1029 1030 /** 1031 * Spectator nucleus charge number for light ion projectile support. 1032 */ 1033 G4int spectatorZ; 1034 1035 /** 1036 * Spectator nucleus excitation energy for light ion projectile support. 1037 */ 1038 G4double spectatorEx; 1039 1040 /** 1041 * Spectator nucleus mass. 1042 */ 1043 G4double spectatorM; 1044 1045 /** 1046 * Spectator nucleus kinetic energy. 1047 */ 1048 G4double spectatorT; 1049 1050 /** 1051 * Spectator nucleus momentum x-component. 1052 */ 1053 G4double spectatorP1; 1054 1055 /** 1056 * Spectator nucleus momentum y-component. 1057 */ 1058 G4double spectatorP2; 1059 1060 /** 1061 * Spectator nucleus momentum z-component. 1062 */ 1063 G4double spectatorP3; 1064 1065 /** 754 1066 * A of the remnant. 755 1067 */ … … 766 1078 G4double exini; 767 1079 768 G4double pcorem, mcorem, pxrem, pyrem, pzrem ;1080 G4double pcorem, mcorem, pxrem, pyrem, pzrem, erecrem; 769 1081 770 1082 /** … … 826 1138 827 1139 /** 1140 * Does this nucleus require Fermi break-up treatment? Only 1141 * applicable when used together with Geant4. 1142 * true = do fermi break-up (and skip ABLA part) 1143 * false = use ABLA 1144 */ 1145 G4bool needsFermiBreakup; 1146 1147 /** 828 1148 * emitted in cascade (0) or evaporation (1). 829 1149 */
Note: See TracChangeset
for help on using the changeset viewer.