Geant4 Cross Reference |
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 // 27 // 28 #ifndef G4FTFParameters_h 29 #define G4FTFParameters_h 1 30 31 #include <CLHEP/Units/SystemOfUnits.h> 32 #include <vector> 33 #include "G4Types.hh" 34 #include "G4Exp.hh" 35 #include "G4FTFTunings.hh" 36 37 class G4ParticleDefinition; 38 class G4VComponentCrossSection; 39 class G4LundStringFragmentation; 40 41 42 class G4FTFParameters { 43 public: 44 G4FTFParameters(); 45 ~G4FTFParameters(); 46 47 void InitForInteraction( const G4ParticleDefinition* , G4int theA, G4int theZ, G4double s ); 48 49 // Set geometrical parameteres 50 void SethNcmsEnergy( const G4double s ); 51 void SetTotalCrossSection( const G4double Xtotal ); 52 void SetElasticCrossSection( const G4double Xelastic ); 53 void SetInelasticCrossSection( const G4double Xinelastic ); 54 void SetProbabilityOfElasticScatt( const G4double Xtotal, const G4double Xelastic ); 55 void SetProbabilityOfElasticScatt( const G4double aValue ); 56 void SetProbabilityOfAnnihilation( const G4double aValue ); 57 void SetRadiusOfHNinteractions2( const G4double Radius2 ); 58 59 void SetSlope( const G4double Slope ); 60 void SetGamma0( const G4double Gamma0 ); 61 G4double GammaElastic( const G4double impactsquare ); 62 63 // Set parameters of elastic scattering 64 void SetAvaragePt2ofElasticScattering( const G4double aPt2 ); 65 66 // Set parameters of excitations 67 void SetParams( const G4int ProcN, 68 const G4double A1, const G4double B1, const G4double A2, const G4double B2, 69 const G4double A3, const G4double Atop, const G4double Ymin ); 70 71 void SetDeltaProbAtQuarkExchange( const G4double aValue ); 72 void SetProbOfSameQuarkExchange( const G4double aValue ); 73 74 void SetProjMinDiffMass( const G4double aValue ); 75 void SetProjMinNonDiffMass( const G4double aValue ); 76 //void SetProbabilityOfProjDiff( const G4double aValue ); 77 void SetProbLogDistrPrD( const G4double aValue ); 78 79 void SetTarMinDiffMass( const G4double aValue ); 80 void SetTarMinNonDiffMass( const G4double aValue ); 81 //void SetProbabilityOfTarDiff( const G4double aValue ); 82 83 void SetAveragePt2( const G4double aValue ); 84 void SetProbLogDistr( const G4double aValue ); 85 86 // Set parameters of a string kink 87 void SetPt2Kink( const G4double aValue ); 88 void SetQuarkProbabilitiesAtGluonSplitUp( const G4double Puubar, const G4double Pddbar, 89 const G4double Pssbar ); 90 91 // Set parameters of nuclear destruction 92 void SetMaxNumberOfCollisions( const G4double aValue, const G4double bValue ); 93 void SetProbOfInteraction( const G4double aValue ); 94 95 void SetCofNuclearDestructionPr( const G4double aValue ); 96 void SetCofNuclearDestruction( const G4double aValue ); 97 void SetR2ofNuclearDestruction( const G4double aValue ); 98 99 void SetExcitationEnergyPerWoundedNucleon( const G4double aValue ); 100 101 void SetDofNuclearDestruction( const G4double aValue ); 102 void SetPt2ofNuclearDestruction( const G4double aValue ); 103 void SetMaxPt2ofNuclearDestruction( const G4double aValue ); 104 105 // Get geometrical parameteres 106 G4double GetTotalCrossSection(); 107 G4double GetElasticCrossSection(); 108 G4double GetInelasticCrossSection(); 109 110 G4double GetProbabilityOfInteraction( const G4double impactsquare ); 111 G4double GetInelasticProbability( const G4double impactsquare ); 112 G4double GetProbabilityOfElasticScatt(); 113 G4double GetSlope(); 114 G4double GetProbabilityOfAnnihilation(); 115 116 // Get parameters of elastic scattering 117 G4double GetAvaragePt2ofElasticScattering(); 118 119 // Get parameters of excitations 120 G4double GetProcProb( const G4int ProcN, const G4double y ); 121 122 G4double GetDeltaProbAtQuarkExchange(); 123 G4double GetProbOfSameQuarkExchange(); 124 125 G4double GetProjMinDiffMass(); 126 G4double GetProjMinNonDiffMass(); 127 G4double GetProbLogDistrPrD(); 128 129 G4double GetTarMinDiffMass(); 130 G4double GetTarMinNonDiffMass(); 131 132 G4double GetAveragePt2(); 133 G4double GetProbLogDistr(); 134 135 // Get parameters of a string kink 136 G4double GetPt2Kink(); 137 std::vector< G4double > GetQuarkProbabilitiesAtGluonSplitUp(); 138 139 // Get parameters of nuclear destruction 140 G4double GetMaxNumberOfCollisions(); 141 G4double GetProbOfInteraction(); 142 143 G4double GetCofNuclearDestructionPr(); 144 G4double GetCofNuclearDestruction(); 145 G4double GetR2ofNuclearDestruction(); 146 147 G4double GetExcitationEnergyPerWoundedNucleon(); 148 149 G4double GetDofNuclearDestruction(); 150 G4double GetPt2ofNuclearDestruction(); 151 G4double GetMaxPt2ofNuclearDestruction(); 152 153 // JVY, July 31, 2017: Is there any reason for NOT making 154 // all the members data private ??? 155 // 156 // private: 157 158 // Initial energy of hN interactions 159 G4double FTFhNcmsEnergy; // Initial hN CMS energy 160 161 // Geometrical parameteres 162 G4double FTFXtotal; // Total X in mb 163 G4double FTFXelastic; // Elastic X in mb 164 G4double FTFXinelastic; // Inelastic X in mb 165 G4double FTFXannihilation; // Annihilation X in mb 166 G4double ProbabilityOfAnnihilation; // Xannih/Xinelast 167 G4double ProbabilityOfElasticScatt; // Xel/Xtot 168 G4double RadiusOfHNinteractions2; // Xtot/pi, in fm^2 169 G4double FTFSlope; // in fm^-1 170 G4double AvaragePt2ofElasticScattering; // in MeV^2 171 G4double FTFGamma0; 172 173 // Parameters of excitations 174 G4double ProcParams[5][7]; 175 176 G4double DeltaProbAtQuarkExchange; 177 G4double ProbOfSameQuarkExchange; 178 179 G4double ProjMinDiffMass; 180 G4double ProjMinNonDiffMass; 181 G4double ProbLogDistrPrD; 182 G4double TarMinDiffMass; 183 G4double TarMinNonDiffMass; 184 185 G4double AveragePt2; 186 G4double ProbLogDistr; 187 188 // Parameters of kink 189 G4double Pt2kink; 190 std::vector< G4double > QuarkProbabilitiesAtGluonSplitUp; 191 192 // Parameters of nuclear destruction 193 G4double MaxNumberOfCollisions; 194 G4double ProbOfInelInteraction; 195 196 G4double CofNuclearDestructionPr; // Cnd of nuclear destruction of projectile nucleus 197 G4double CofNuclearDestruction; // Cnd of nuclear destruction 198 G4double R2ofNuclearDestruction; // R2nd 199 200 G4double ExcitationEnergyPerWoundedNucleon; 201 202 G4double DofNuclearDestruction; // Dispersion for momentum sampling 203 G4double Pt2ofNuclearDestruction; // Pt2 204 G4double MaxPt2ofNuclearDestruction; // Max Pt2 205 206 G4bool EnableDiffDissociationForBGreater10; ///< Control over whether to do nucleon-hadron diffractive dissociation or not. 207 208 private: 209 G4LundStringFragmentation* StringMass; 210 G4double GetMinMass( const G4ParticleDefinition* aParticle ); 211 212 void Reset(); 213 214 // Different sets of parameters (called "tunes") of the FTF model are possible. 215 // These tunes are kept as std::array - instead of std::vector - members of this class, 216 // because their size is fixed during a run, and expected to be small. 217 // For the time being, separate parameters are kept for "baryons", "pions", and 218 // the rest of "mesons"; if in the future we make more distinctions between 219 // projectile types (e.g. kaons, anti-baryon, hyperons, etc.), then corresponding 220 // new arrays will be introduced. In all cases, the size of these arrays is the 221 // same (and kept as a static constant in the singleton G4FTFTunings). 222 std::array< G4FTFParamCollBaryonProj, G4FTFTunings::sNumberOfTunes > fArrayParCollBaryonProj; 223 std::array< G4FTFParamCollMesonProj, G4FTFTunings::sNumberOfTunes > fArrayParCollMesonProj; 224 std::array< G4FTFParamCollPionProj, G4FTFTunings::sNumberOfTunes > fArrayParCollPionProj; 225 226 // Glauber-Gribov hN x-section 227 G4VComponentCrossSection* csGGinstance; 228 }; 229 230 231 inline G4double G4FTFParameters::GammaElastic( const G4double impactsquare ) { 232 return ( FTFGamma0 * G4Exp( -FTFSlope * impactsquare ) ); 233 } 234 235 inline void G4FTFParameters::SethNcmsEnergy( const G4double S ) { 236 FTFhNcmsEnergy = S; 237 } 238 239 // Set geometrical parameteres 240 241 inline void G4FTFParameters::SetTotalCrossSection( const G4double Xtotal ) { 242 FTFXtotal = Xtotal; 243 } 244 245 inline void G4FTFParameters::SetElasticCrossSection( const G4double Xelastic ) { 246 FTFXelastic = Xelastic; 247 } 248 249 inline void G4FTFParameters::SetInelasticCrossSection( const G4double Xinelastic ) { 250 FTFXinelastic = Xinelastic; 251 } 252 253 inline void G4FTFParameters::SetProbabilityOfElasticScatt( const G4double Xtotal, 254 const G4double Xelastic ) { 255 if ( Xtotal == 0.0 ) { 256 ProbabilityOfElasticScatt = 0.0; 257 } else { 258 ProbabilityOfElasticScatt = Xelastic / Xtotal; 259 } 260 } 261 262 inline void G4FTFParameters::SetProbabilityOfElasticScatt( const G4double aValue ) { 263 ProbabilityOfElasticScatt = aValue; 264 } 265 266 inline void G4FTFParameters::SetProbabilityOfAnnihilation( const G4double aValue ) { 267 ProbabilityOfAnnihilation = aValue; 268 } 269 270 inline void G4FTFParameters::SetRadiusOfHNinteractions2( const G4double Radius2 ) { 271 RadiusOfHNinteractions2 = Radius2; 272 } 273 274 inline void G4FTFParameters::SetSlope( const G4double Slope ) { 275 FTFSlope = 12.84 / Slope; // Slope is in GeV^-2, FTFSlope in fm^-2 276 } 277 278 inline void G4FTFParameters::SetGamma0( const G4double Gamma0 ) { 279 FTFGamma0 = Gamma0; 280 } 281 282 // Set parameters of elastic scattering 283 inline void G4FTFParameters::SetAvaragePt2ofElasticScattering( const G4double aPt2 ) { 284 AvaragePt2ofElasticScattering = aPt2; 285 } 286 287 // Set parameters of excitations 288 289 inline void G4FTFParameters::SetParams( const G4int ProcN, 290 const G4double A1, const G4double B1, const G4double A2, 291 const G4double B2, const G4double A3, const G4double Atop, 292 const G4double Ymin ) { 293 ProcParams[ProcN][0] = A1; ProcParams[ProcN][1] = B1; 294 ProcParams[ProcN][2] = A2; ProcParams[ProcN][3] = B2; 295 ProcParams[ProcN][4] = A3; 296 ProcParams[ProcN][5] = Atop; ProcParams[ProcN][6] = Ymin; 297 } 298 299 inline void G4FTFParameters::SetDeltaProbAtQuarkExchange( const G4double aValue ) { 300 DeltaProbAtQuarkExchange = aValue; 301 } 302 303 inline void G4FTFParameters::SetProbOfSameQuarkExchange( const G4double aValue ) { 304 ProbOfSameQuarkExchange = aValue; 305 } 306 307 inline void G4FTFParameters::SetProjMinDiffMass( const G4double aValue ) { 308 ProjMinDiffMass = aValue*CLHEP::GeV; 309 } 310 311 inline void G4FTFParameters::SetProjMinNonDiffMass( const G4double aValue ) { 312 ProjMinNonDiffMass = aValue*CLHEP::GeV; 313 } 314 315 inline void G4FTFParameters::SetTarMinDiffMass( const G4double aValue ) { 316 TarMinDiffMass = aValue*CLHEP::GeV; 317 } 318 319 inline void G4FTFParameters::SetTarMinNonDiffMass( const G4double aValue ) { 320 TarMinNonDiffMass = aValue*CLHEP::GeV; 321 } 322 323 inline void G4FTFParameters::SetAveragePt2( const G4double aValue ) { 324 AveragePt2 = aValue*CLHEP::GeV*CLHEP::GeV; 325 } 326 327 inline void G4FTFParameters::SetProbLogDistrPrD( const G4double aValue ) { 328 ProbLogDistrPrD = aValue; 329 } 330 331 inline void G4FTFParameters::SetProbLogDistr( const G4double aValue ) { 332 ProbLogDistr = aValue; 333 } 334 335 // Set parameters of a string kink 336 337 inline void G4FTFParameters::SetPt2Kink( const G4double aValue ) { 338 Pt2kink = aValue; 339 } 340 341 inline void G4FTFParameters::SetQuarkProbabilitiesAtGluonSplitUp( const G4double Puubar, 342 const G4double Pddbar, 343 const G4double Pssbar ) { 344 QuarkProbabilitiesAtGluonSplitUp.push_back( Puubar ); 345 QuarkProbabilitiesAtGluonSplitUp.push_back( Puubar + Pddbar ); 346 QuarkProbabilitiesAtGluonSplitUp.push_back( Puubar + Pddbar + Pssbar ); 347 } 348 349 // Set parameters of nuclear destruction 350 inline void G4FTFParameters::SetMaxNumberOfCollisions( const G4double Plab, 351 const G4double Pbound ) { 352 if ( Plab > Pbound ) { 353 MaxNumberOfCollisions = Plab/Pbound; 354 SetProbOfInteraction( -1.0 ); 355 } else { 356 //MaxNumberOfCollisions = -1.0; 357 //SetProbOfInteraction( G4Exp( 0.25*(Plab-Pbound) ) ); 358 MaxNumberOfCollisions = 1; 359 SetProbOfInteraction( -1.0 ); 360 } 361 } 362 363 inline void G4FTFParameters::SetProbOfInteraction( const G4double aValue ) { 364 ProbOfInelInteraction = aValue; 365 } 366 367 inline void G4FTFParameters::SetCofNuclearDestructionPr( const G4double aValue ) { 368 CofNuclearDestructionPr = aValue; 369 } 370 371 inline void G4FTFParameters::SetCofNuclearDestruction( const G4double aValue ) { 372 CofNuclearDestruction = aValue; 373 } 374 375 inline void G4FTFParameters::SetR2ofNuclearDestruction( const G4double aValue ) { 376 R2ofNuclearDestruction = aValue; 377 } 378 379 inline void G4FTFParameters::SetExcitationEnergyPerWoundedNucleon( const G4double aValue ) { 380 ExcitationEnergyPerWoundedNucleon = aValue; 381 } 382 383 inline void G4FTFParameters::SetDofNuclearDestruction( const G4double aValue ) { 384 DofNuclearDestruction = aValue; 385 } 386 387 inline void G4FTFParameters::SetPt2ofNuclearDestruction( const G4double aValue ) { 388 Pt2ofNuclearDestruction = aValue; 389 } 390 391 inline void G4FTFParameters::SetMaxPt2ofNuclearDestruction( const G4double aValue ) { 392 MaxPt2ofNuclearDestruction = aValue; 393 } 394 395 // Get geometrical parameteres 396 inline G4double G4FTFParameters::GetTotalCrossSection() { 397 return FTFXtotal; 398 } 399 400 inline G4double G4FTFParameters::GetElasticCrossSection() { 401 return FTFXelastic; 402 } 403 404 inline G4double G4FTFParameters::GetInelasticCrossSection() { 405 return FTFXinelastic; 406 } 407 408 inline G4double G4FTFParameters::GetSlope() { 409 return FTFSlope; 410 } 411 412 inline G4double G4FTFParameters::GetProbabilityOfInteraction( const G4double impactsquare ) { 413 if ( RadiusOfHNinteractions2 > impactsquare ) { 414 return 1.0; 415 } else { 416 return 0.0; 417 } 418 } 419 420 inline G4double G4FTFParameters::GetProbabilityOfElasticScatt() { 421 return ProbabilityOfElasticScatt; 422 } 423 424 inline G4double G4FTFParameters::GetInelasticProbability( const G4double impactsquare ) { 425 G4double Gamma = GammaElastic( impactsquare ); 426 return 2*Gamma - Gamma*Gamma; 427 } 428 429 inline G4double G4FTFParameters::GetProbabilityOfAnnihilation() { 430 return ProbabilityOfAnnihilation; 431 } 432 433 // Get parameters of elastic scattering 434 inline G4double G4FTFParameters::GetAvaragePt2ofElasticScattering() { 435 return AvaragePt2ofElasticScattering; 436 } 437 438 // Get parameters of excitations 439 440 inline G4double G4FTFParameters::GetDeltaProbAtQuarkExchange() { 441 return DeltaProbAtQuarkExchange; 442 } 443 444 inline G4double G4FTFParameters::GetProbOfSameQuarkExchange() { 445 return ProbOfSameQuarkExchange; 446 } 447 448 inline G4double G4FTFParameters::GetProjMinDiffMass() { 449 return ProjMinDiffMass; 450 } 451 452 inline G4double G4FTFParameters::GetProjMinNonDiffMass() { 453 return ProjMinNonDiffMass; 454 } 455 456 inline G4double G4FTFParameters::GetTarMinDiffMass() { 457 return TarMinDiffMass; 458 } 459 460 inline G4double G4FTFParameters::GetTarMinNonDiffMass() { 461 return TarMinNonDiffMass; 462 } 463 464 inline G4double G4FTFParameters::GetAveragePt2() { 465 return AveragePt2; 466 } 467 468 inline G4double G4FTFParameters::GetProbLogDistrPrD() { 469 return ProbLogDistrPrD; 470 } 471 472 inline G4double G4FTFParameters::GetProbLogDistr() { 473 return ProbLogDistr; 474 } 475 476 // Get parameters of a string kink 477 478 inline G4double G4FTFParameters::GetPt2Kink() { 479 return Pt2kink; 480 } 481 482 inline std::vector< G4double > G4FTFParameters::GetQuarkProbabilitiesAtGluonSplitUp() { 483 return QuarkProbabilitiesAtGluonSplitUp; 484 } 485 486 // Get parameters of nuclear destruction 487 488 inline G4double G4FTFParameters::GetMaxNumberOfCollisions() { 489 return MaxNumberOfCollisions; 490 } 491 492 inline G4double G4FTFParameters::GetProbOfInteraction() { 493 return ProbOfInelInteraction; 494 } 495 496 inline G4double G4FTFParameters::GetCofNuclearDestructionPr() { 497 return CofNuclearDestructionPr; 498 } 499 500 inline G4double G4FTFParameters::GetCofNuclearDestruction() { 501 return CofNuclearDestruction; 502 } 503 504 inline G4double G4FTFParameters::GetR2ofNuclearDestruction() { 505 return R2ofNuclearDestruction; 506 } 507 508 inline G4double G4FTFParameters::GetExcitationEnergyPerWoundedNucleon() { 509 return ExcitationEnergyPerWoundedNucleon; 510 } 511 512 inline G4double G4FTFParameters::GetDofNuclearDestruction() { 513 return DofNuclearDestruction; 514 } 515 516 inline G4double G4FTFParameters::GetPt2ofNuclearDestruction() { 517 return Pt2ofNuclearDestruction; 518 } 519 520 inline G4double G4FTFParameters::GetMaxPt2ofNuclearDestruction() { 521 return MaxPt2ofNuclearDestruction; 522 } 523 524 #endif 525 526