49const G4int G4QPionPlusElasticCrossSection::nPoints=128;
50const G4int G4QPionPlusElasticCrossSection::nLast=nPoints-1;
51G4double G4QPionPlusElasticCrossSection::lPMin=-8.;
52G4double G4QPionPlusElasticCrossSection::lPMax= 8.;
53G4double G4QPionPlusElasticCrossSection::dlnP=(lPMax-lPMin)/nLast;
54G4bool G4QPionPlusElasticCrossSection::onlyCS=
true;
55G4double G4QPionPlusElasticCrossSection::lastSIG=0.;
56G4double G4QPionPlusElasticCrossSection::lastLP=-10.;
57G4double G4QPionPlusElasticCrossSection::lastTM=0.;
58G4double G4QPionPlusElasticCrossSection::theSS=0.;
59G4double G4QPionPlusElasticCrossSection::theS1=0.;
60G4double G4QPionPlusElasticCrossSection::theB1=0.;
61G4double G4QPionPlusElasticCrossSection::theS2=0.;
62G4double G4QPionPlusElasticCrossSection::theB2=0.;
63G4double G4QPionPlusElasticCrossSection::theS3=0.;
64G4double G4QPionPlusElasticCrossSection::theB3=0.;
65G4double G4QPionPlusElasticCrossSection::theS4=0.;
66G4double G4QPionPlusElasticCrossSection::theB4=0.;
67G4int G4QPionPlusElasticCrossSection::lastTZ=0;
68G4int G4QPionPlusElasticCrossSection::lastTN=0;
69G4double G4QPionPlusElasticCrossSection::lastPIN=0.;
70G4double* G4QPionPlusElasticCrossSection::lastCST=0;
71G4double* G4QPionPlusElasticCrossSection::lastPAR=0;
72G4double* G4QPionPlusElasticCrossSection::lastSST=0;
73G4double* G4QPionPlusElasticCrossSection::lastS1T=0;
74G4double* G4QPionPlusElasticCrossSection::lastB1T=0;
75G4double* G4QPionPlusElasticCrossSection::lastS2T=0;
76G4double* G4QPionPlusElasticCrossSection::lastB2T=0;
77G4double* G4QPionPlusElasticCrossSection::lastS3T=0;
78G4double* G4QPionPlusElasticCrossSection::lastB3T=0;
79G4double* G4QPionPlusElasticCrossSection::lastS4T=0;
80G4double* G4QPionPlusElasticCrossSection::lastB4T=0;
81G4int G4QPionPlusElasticCrossSection::lastN=0;
82G4int G4QPionPlusElasticCrossSection::lastZ=0;
83G4double G4QPionPlusElasticCrossSection::lastP=0.;
84G4double G4QPionPlusElasticCrossSection::lastTH=0.;
85G4double G4QPionPlusElasticCrossSection::lastCS=0.;
86G4int G4QPionPlusElasticCrossSection::lastI=0;
88std::vector<G4double*> G4QPionPlusElasticCrossSection::PAR;
89std::vector<G4double*> G4QPionPlusElasticCrossSection::CST;
90std::vector<G4double*> G4QPionPlusElasticCrossSection::SST;
91std::vector<G4double*> G4QPionPlusElasticCrossSection::S1T;
92std::vector<G4double*> G4QPionPlusElasticCrossSection::B1T;
93std::vector<G4double*> G4QPionPlusElasticCrossSection::S2T;
94std::vector<G4double*> G4QPionPlusElasticCrossSection::B2T;
95std::vector<G4double*> G4QPionPlusElasticCrossSection::S3T;
96std::vector<G4double*> G4QPionPlusElasticCrossSection::B3T;
97std::vector<G4double*> G4QPionPlusElasticCrossSection::S4T;
98std::vector<G4double*> G4QPionPlusElasticCrossSection::B4T;
106 std::vector<G4double*>::iterator pos;
107 for (pos=CST.begin(); pos<CST.end(); pos++)
110 for (pos=PAR.begin(); pos<PAR.end(); pos++)
113 for (pos=SST.begin(); pos<SST.end(); pos++)
116 for (pos=S1T.begin(); pos<S1T.end(); pos++)
119 for (pos=B1T.begin(); pos<B1T.end(); pos++)
122 for (pos=S2T.begin(); pos<S2T.end(); pos++)
125 for (pos=B2T.begin(); pos<B2T.end(); pos++)
128 for (pos=S3T.begin(); pos<S3T.end(); pos++)
131 for (pos=B3T.begin(); pos<B3T.end(); pos++)
134 for (pos=S4T.begin(); pos<S4T.end(); pos++)
137 for (pos=B4T.begin(); pos<B4T.end(); pos++)
147 G4cout<<
"G4QPiPlElCS::GetCS: PiPlus Elastic pointer is taken"<<
G4endl;
149 return &theCrossSection;
157 static std::vector <G4int> colN;
158 static std::vector <G4int> colZ;
159 static std::vector <G4double> colP;
160 static std::vector <G4double> colTH;
161 static std::vector <G4double> colCS;
166 G4cout<<
"G4QPElCS::GetCS:>>> f="<<fCS<<
", p="<<pMom<<
", Z="<<tgZ<<
"("<<lastZ<<
") ,N="
167 <<tgN<<
"("<<lastN<<
"), T="<<pEn<<
"("<<lastTH<<
")"<<
",Sz="<<colN.size()<<
G4endl;
172 G4cout<<
"*Warning*G4QPionPlusElCS::GetCS:**> Found pPDG="<<pPDG<<
" =--=> CS=0"<<
G4endl;
181 if(lastI)
for(
G4int i=0; i<lastI; i++)
183 if(colN[i]==tgN && colZ[i]==tgZ)
188 G4cout<<
"G4QElCS::GetCS:*Found* P="<<pMom<<
",Threshold="<<lastTH<<
",i="<<i<<
G4endl;
194 G4cout<<
"G4QElCS::GetCS:Found T="<<pEn<<
" < Threshold="<<lastTH<<
",CS=0"<<
G4endl;
205 G4cout<<
"G4QElCS::GetCS:P="<<pMom<<
",CS="<<lastCS*millibarn<<
G4endl;
208 return lastCS*millibarn;
213 G4cout<<
"G4QElCS::G:UpdateDB P="<<pMom<<
",f="<<fCS<<
",I="<<lastI<<
",i="<<i<<
G4endl;
217 G4cout<<
"G4QElCS::GetCrosSec: *****> New (inDB) Calculated CS="<<lastCS<<
G4endl;
220 if(lastCS<=0. && pEn>lastTH)
223 G4cout<<
"G4QElCS::GetCS: New T="<<pEn<<
"(CS=0) > Threshold="<<lastTH<<
G4endl;
230 G4cout<<
"---G4QElCrossSec::GetCrosSec:pPDG="<<pPDG<<
",i="<<i<<
",N="<<colN[i]
231 <<
",Z["<<i<<
"]="<<colZ[i]<<
G4endl;
238 G4cout<<
"G4QElCS::GetCrosSec:CalcNew P="<<pMom<<
",f="<<fCS<<
",lastI="<<lastI<<
G4endl;
246 G4cout<<
"G4QElCrossSection::GetCrossSect: NewThresh="<<lastTH<<
",T="<<pEn<<
G4endl;
251 G4cout<<
"G4QElCS::GetCS: First T="<<pEn<<
"(CS=0) > Threshold="<<lastTH<<
G4endl;
257 G4cout<<
"G4QElCS::GetCrosSec: New CS="<<lastCS<<
",lZ="<<lastN<<
",lN="<<lastZ<<
G4endl;
262 colP.push_back(pMom);
263 colTH.push_back(lastTH);
264 colCS.push_back(lastCS);
266 G4cout<<
"G4QElCS::GetCS:1st,P="<<pMom<<
"(MeV),CS="<<lastCS*millibarn<<
"(mb)"<<
G4endl;
269 return lastCS*millibarn;
280 G4cout<<
"G4QElCS::GetCrSec:End,P="<<pMom<<
"(MeV),CS="<<lastCS*millibarn<<
"(mb)"<<
G4endl;
282 G4cout<<
"G4QElCS::GetCrSec:***End***, onlyCS="<<onlyCS<<
G4endl;
284 return lastCS*millibarn;
293 static std::vector <G4double> PIN;
298 G4cout<<
"G4QPionPlusElasticCroS::CalcCS:->onlyCS="<<onlyCS<<
",F="<<F<<
",p="<<pIU<<
G4endl;
300 lastLP=std::log(pMom);
318 G4cout<<
"G4QElasticCS::CalcCS: DB is updated for I="<<I<<
",*,PIN4="<<PIN[4]<<
G4endl;
322 G4cout<<
"G4QPionPlusElasticCroS::CalcCS:*read*, LP="<<lastLP<<
",PIN="<<lastPIN<<
G4endl;
324 if(lastLP>lastPIN && lastLP<lPMax)
326 lastPIN=GetPTables(lastLP,lastPIN,PDG,tgZ,tgN);
328 G4cout<<
"G4QElCS::CalcCS:*updated(I)*,LP="<<lastLP<<
"<IN["<<I<<
"]="<<lastPIN<<
G4endl;
348 G4cout<<
"G4QPionPlusElasticCroS::CalcCS:*ini*,lastLP="<<lastLP<<
",min="<<lPMin<<
G4endl;
350 lastPIN = GetPTables(lastLP,lPMin,PDG,tgZ,tgN);
352 G4cout<<
"G4QPiPlElCS::CCS:i,Z="<<tgZ<<
",N="<<tgN<<
",PDG="<<PDG<<
",LP"<<lastPIN<<
G4endl;
354 PIN.push_back(lastPIN);
355 PAR.push_back(lastPAR);
356 CST.push_back(lastCST);
357 SST.push_back(lastSST);
358 S1T.push_back(lastS1T);
359 B1T.push_back(lastB1T);
360 S2T.push_back(lastS2T);
361 B2T.push_back(lastB2T);
362 S3T.push_back(lastS3T);
363 B3T.push_back(lastB3T);
364 S4T.push_back(lastS4T);
365 B4T.push_back(lastB4T);
369 G4cout<<
"G4QElCS::CalcCS:?update?,LP="<<lastLP<<
",IN="<<lastPIN<<
",ML="<<lPMax<<
G4endl;
371 if(lastLP>lastPIN && lastLP<lPMax)
373 lastPIN = GetPTables(lastLP,lastPIN,PDG,tgZ,tgN);
375 G4cout<<
"G4QElCS::CalcCS: *updated(O)*, LP="<<lastLP<<
" < IN="<<lastPIN<<
G4endl;
379 G4cout<<
"G4QElastCS::CalcCS: lastLP="<<lastLP<<
",lPM="<<lPMin<<
",lPIN="<<lastPIN<<
G4endl;
381 if(!onlyCS) lastTM=GetQ2max(PDG, tgZ, tgN, pMom);
383 G4cout<<
"G4QElasticCrosSec::CalcCS:oCS="<<onlyCS<<
",-t="<<lastTM<<
", p="<<lastLP<<
G4endl;
385 if(lastLP>lPMin && lastLP<=lastPIN)
389 G4double shift=(lastLP-lPMin)/dlnP+.000001;
390 G4int blast=
static_cast<int>(shift);
391 if(blast<0 || blast>=nLast)
G4cout<<
"G4QEleastCS::CCS:b="<<blast<<
","<<nLast<<
G4endl;
392 lastSIG = lastCST[blast];
395 theSS = lastSST[blast];
396 theS1 = lastS1T[blast];
397 theB1 = lastB1T[blast];
398 theS2 = lastS2T[blast];
399 theB2 = lastB2T[blast];
400 theS3 = lastS3T[blast];
401 theB3 = lastB3T[blast];
402 theS4 = lastS4T[blast];
403 theB4 = lastB4T[blast];
406 G4cout<<
"G4QPionPlusElasticCroS::CalculateCS:(E) S1="<<theS1<<
", B1="<<theB1<<
G4endl;
412 G4int blast=
static_cast<int>(shift);
414 if(blast>=nLast) blast=nLast-1;
418 lastSIG= SIGL+shift*(lastCST[lastL]-SIGL);
420 G4cout<<
"G4QElCS::CalcCrossSection: Sig="<<lastSIG<<
", P="<<pMom<<
", Z="<<tgZ<<
", N="
421 <<tgN<<
", PDG="<<PDG<<
", onlyCS="<<onlyCS<<
G4endl;
426 theSS=SSTL+shift*(lastSST[lastL]-SSTL);
428 theS1=S1TL+shift*(lastS1T[lastL]-S1TL);
431 G4cout<<
"G4QElCS::CalcCrossSection:bl="<<blast<<
",ls="<<lastL<<
",SL="<<S1TL<<
",SU="
432 <<lastS1T[lastL]<<
",BL="<<B1TL<<
",BU="<<lastB1T[lastL]<<
G4endl;
434 theB1=B1TL+shift*(lastB1T[lastL]-B1TL);
436 theS2=S2TL+shift*(lastS2T[lastL]-S2TL);
438 theB2=B2TL+shift*(lastB2T[lastL]-B2TL);
440 theS3=S3TL+shift*(lastS3T[lastL]-S3TL);
442 G4cout<<
"G4QElCS::CCS: s3l="<<S3TL<<
",sh3="<<shift<<
",s3h="<<lastS3T[lastL]<<
",b="
443 <<blast<<
",l="<<lastL<<
G4endl;
446 theB3=B3TL+shift*(lastB3T[lastL]-B3TL);
448 theS4=S4TL+shift*(lastS4T[lastL]-S4TL);
450 G4cout<<
"G4QElCS::CCS: s4l="<<S4TL<<
",sh4="<<shift<<
",s4h="<<lastS4T[lastL]<<
",b="
451 <<blast<<
",l="<<lastL<<
G4endl;
454 theB4=B4TL+shift*(lastB4T[lastL]-B4TL);
457 G4cout<<
"G4QPionPlusElasticCroS::CalculateCS:(I) S1="<<theS1<<
", B1="<<theB1<<
G4endl;
461 else lastSIG=GetTabValues(lastLP, PDG, tgZ, tgN);
462 if(lastSIG<0.) lastSIG = 0.;
464 G4cout<<
"G4QPionPlusElasticCrossSection::CalculateCS: END, onlyCS="<<onlyCS<<
G4endl;
475 const G4int n_pippel=35;
477 G4double pipp_el[n_pippel]={1.27,13.,.0676,3.5,.32,.0576,.0557,2.4,6.,3.,.7,5.,74.,3.,
478 3.4,.2,.17,.001,8.,.055,3.64,5.e-5,4000.,1500.,.46,1.2e6,
479 3.5e6,5.e-5,1.e10,8.5e8,1.e10,1.1,3.4e6,6.8e6,0.};
495 if(lastPAR[nLast]!=pwd)
497 if ( tgZ == 1 && tgN == 0 )
499 for (
G4int ip=0; ip<n_pippel; ip++) lastPAR[ip]=pipp_el[ip];
523 lastPAR[0]=(.95*sa+2.E5/a16)/(1.+17/a);
524 lastPAR[1]=a/(1./4.4+1./a);
525 lastPAR[2]=.22/std::pow(a,.33);
526 lastPAR[3]=.5*a/(1.+3./a+1800./a8);
527 lastPAR[4]=3.E-4*std::pow(a,.32)/(1.+14./a2);
529 lastPAR[6]=(.55+.001*a2)/(1.+4.E-4*a2);
530 lastPAR[7]=(.0002/asa+4.E-9*a)/(1.+9./a4);
538 lastPAR[10]=1.2e7*a8+380*a17;
539 lastPAR[11]=.7/(1.+4.e-12*a16);
540 lastPAR[12]=2.5/a8/(a4+1.e-16*a32);
542 lastPAR[14]=1.2*a2+2.3;
545 lastPAR[16]=.01/(1.+.0024*a5);
547 lastPAR[18]=9.e-7/(1.+.035*a5);
548 lastPAR[19]=(42.+2.7e-11*a16)/(1.+.14*a);
552 lastPAR[22]=2.4e-3*a8/(1.+2.6e-4*a7);
553 lastPAR[23]=3.5e-36*a32*a8/(1.+5.e-15*a32/a);
555 lastPAR[24]=1.e5/(a8+2.5e12/a16);
556 lastPAR[25]=8.e7/(a12+1.e-27*a28*a28);
557 lastPAR[26]=.0006*a3;
559 lastPAR[27]=10.+4.e-8*a12*a;
564 lastPAR[31]=1./(1.+.0001*a8);
565 lastPAR[32]=1.5e-4/(1.+5.e-6*a12);
569 lastPAR[35]=2.e-7*a4;
573 lastPAR[38]=1.e8*std::exp(.32*asa);
574 lastPAR[39]=20.*std::exp(.45*asa);
575 lastPAR[40]=7.e3+2.4e6/a5;
576 lastPAR[41]=2.5e5*std::exp(.085*a3);
579 lastPAR[43]=920.+.03*a8*a3;
580 lastPAR[44]=93.+.0023*a12;
582 G4cout<<
"G4QElCS::CalcCS:la "<<lastPAR[38]<<
", "<<lastPAR[39]<<
", "<<lastPAR[40]
583 <<
", "<<lastPAR[42]<<
", "<<lastPAR[43]<<
", "<<lastPAR[44]<<
G4endl;
594 lastPAR[ 9]=4.5*std::pow(a,1.15);
595 lastPAR[10]=.06*std::pow(a,.6);
596 lastPAR[11]=.6*a/(1.+2.e15/a16);
597 lastPAR[12]=.17/(a+9.e5/a3+1.5e33/a32);
598 lastPAR[13]=(.001+7.e-11*a5)/(1.+4.4e-11*a5);
599 lastPAR[14]=(p1a10*p1a10+2.e-29)/(1.+2.e-22*a12);
601 lastPAR[15]=400./a12+2.e-22*a9;
602 lastPAR[16]=1.e-32*a12/(1.+5.e22/a14);
603 lastPAR[17]=1000./a2+9.5*sa*ssa;
604 lastPAR[18]=4.e-6*a*asa+1.e11/a16;
605 lastPAR[19]=(120./a+.002*a2)/(1.+2.e14/a16);
606 lastPAR[20]=9.+100./a;
608 lastPAR[21]=.002*a3+3.e7/a6;
609 lastPAR[22]=7.e-15*a4*asa;
610 lastPAR[23]=9000./a4;
612 lastPAR[24]=.0011*asa/(1.+3.e34/a32/a4);
613 lastPAR[25]=1.e-5*a2+2.e14/a16;
614 lastPAR[26]=1.2e-11*a2/(1.+1.5e19/a12);
615 lastPAR[27]=.016*asa/(1.+5.e16/a16);
617 lastPAR[28]=.002*a4/(1.+7.e7/std::pow(a-6.83,14));
618 lastPAR[29]=2.e6/a6+7.2/std::pow(a,.11);
619 lastPAR[30]=11.*a3/(1.+7.e23/a16/a8);
620 lastPAR[31]=100./asa;
622 lastPAR[32]=(.1+4.4e-5*a2)/(1.+5.e5/a4);
623 lastPAR[33]=3.5e-4*a2/(1.+1.e8/a8);
624 lastPAR[34]=1.3+3.e5/a4;
625 lastPAR[35]=500./(a2+50.)+3;
626 lastPAR[36]=1.e-9/a+s4a16*s4a16;
628 lastPAR[37]=.4*asa+3.e-9*a6;
629 lastPAR[38]=.0005*a5;
633 lastPAR[41]=.05+.005*a;
634 lastPAR[42]=7.e-8/sa;
638 lastPAR[46]=3.e32/(a32+1.e32);
642 lastPAR[49]=7.e3*a/(sa+1.);
643 lastPAR[50]=900.*sa/(1.+500./a3);
645 G4cout<<
"G4QElCS::CalcCS:ha "<<lastPAR[41]<<
", "<<lastPAR[42]<<
", "<<lastPAR[43]
646 <<
", "<<lastPAR[44]<<
", "<<lastPAR[45]<<
", "<<lastPAR[46]<<
G4endl;
650 lastPAR[51]=1.e15+2.e27/a4/(1.+2.e-18*a16);
657 lastCST[0]=GetTabValues(lp, PDG, tgZ, tgN);
669 G4cout<<
"G4QPionPlusElasticCrossSection::GetPTables:ip=0(init), lp="<<lp<<
",S1="
670 <<theS1<<
",B1="<<theB1<<
",S2="<<theS2<<
",B2="<<theB3<<
",S3="<<theS3
671 <<
",B3="<<theB3<<
",S4="<<theS4<<
",B4="<<theB4<<
G4endl;
676 G4int ini =
static_cast<int>((ILP-lPMin+.000001)/dlnP)+1;
680 G4int fin =
static_cast<int>((LP-lPMin)/dlnP)+1;
681 if(fin>=nPoints) fin=nLast;
685 for(
G4int ip=ini; ip<=fin; ip++)
690 lastCST[ip]=GetTabValues(lp, PDG, tgZ, tgN);
702 G4cout<<
"G4QPionPlusElasticCrossSection::GetPTables:ip="<<ip<<
",lp="<<lp
703 <<
",S1="<<theS1<<
",B1="<<theB1<<
",S2="<<theS2<<
",B2="<<theB2<<
",S3="
704 <<theS3<<
",B3="<<theB3<<
",S4="<<theS4<<
",B4="<<theB4<<
G4endl;
709 else G4cout<<
"*Warning*G4QPionPlusElasticCrossSection::GetPTables: PDG="<<PDG
710 <<
", Z="<<tgZ<<
", N="<<tgN<<
", i="<<ini<<
" > fin="<<fin<<
", LP="<<LP
711 <<
" > ILP="<<ILP<<
" nothing is done!"<<
G4endl;
713 else G4cout<<
"*Warning*G4QPionPlusElasticCrossSection::GetPTables: PDG="<<PDG<<
", Z="
714 <<tgZ<<
", N="<<tgN<<
", i="<<ini<<
">= max="<<nPoints<<
", LP="<<LP
715 <<
" > ILP="<<ILP<<
", lPMax="<<lPMax<<
" nothing is done!"<<
G4endl;
718 else G4cout<<
"*Warning*G4QPionPlusElasticCrossSection::GetPTabl:PDG="<<PDG<<
", Z="<<tgZ
719 <<
", N="<<tgN<<
", LP="<<LP<<
" <= ILP="<<ILP<<
" nothing is done!"<<
G4endl;
728 ed <<
"PDG = " << PDG <<
", Z = " << tgZ <<
", N = " << tgN
729 <<
", while it is defined only for PDG=211 (pi+)" <<
G4endl;
730 G4Exception(
"G4QPionPlusElasticCrossSection::GetPTables()",
"HAD_CHPS_0000",
739 static const G4double GeVSQ=gigaelectronvolt*gigaelectronvolt;
744 G4cout<<
"G4QPiPlElCS::GetExcT: F="<<onlyCS<<
",Z="<<tgZ<<
",N="<<tgN<<
",PDG="<<PDG<<
G4endl;
746 if(PDG!= 211)
G4cout<<
"*Warning*G4QPionPlusElasticCrossSection::GetExT:PDG="<<PDG<<
G4endl;
747 if(onlyCS)
G4cout<<
"*Warning*G4QPionPlusElasticCrossSection::GetExchanT:onlyCS=1"<<
G4endl;
753 G4cout<<
"G4QElasticCS::GetExchangeT: TM="<<lastTM<<
",S1="<<theS1<<
",B1="<<theB1<<
",S2="
754 <<theS2<<
",B2="<<theB2<<
",S3="<<theS3<<
",B3="<<theB3<<
",GeV2="<<GeVSQ<<
G4endl;
759 G4double ts1=-std::log(1.-R1)/theB1;
760 G4double ds1=std::fabs(ts1-lastTM)/lastTM;
762 G4cout<<
"*Warning*G4QElCS::GetExT:1p "<<ts1<<
"#"<<lastTM<<
",d="<<ds1
763 <<
",R1="<<R1<<
",E1="<<E1<<
G4endl;
766 G4double R2=(1.-std::exp(-E2*E2*E2));
768 G4double ts2=std::pow(-std::log(1.-R2),.333333333)/theB2;
769 G4double ds2=std::fabs(ts2-lastTM)/lastTM;
771 G4cout<<
"*Warning*G4QElCS::GetExT:2p "<<ts2<<
"#"<<lastTM<<
",d="<<ds2
772 <<
",R2="<<R2<<
",E2="<<E2<<
G4endl;
777 G4double ts3=-std::log(1.-R3)/theB3;
778 G4double ds3=std::fabs(ts3-lastTM)/lastTM;
780 G4cout<<
"*Warning*G4QElCS::GetExT:3p "<<ts3<<
"#"<<lastTM<<
",d="<<ds3
781 <<
",R3="<<R1<<
",E3="<<E3<<
G4endl;
792 q2=-std::log(1.-ran)/theB1;
798 q2=-std::log(1.-ran);
800 q2=std::pow(q2,third)/theB2;
806 q2=-std::log(1.-ran)/theB3;
813 G4cout<<
"G4QElCS::GetExT: a="<<a<<
",t="<<lastTM<<
",S1="<<theS1<<
",B1="<<theB1<<
",SS="
814 <<theSS<<
",S2="<<theS2<<
",B2="<<theB2<<
",S3="<<theS3<<
",B3="<<theB3<<
",S4="
815 <<theS4<<
",B4="<<theB4<<
G4endl;
817 G4double E1=lastTM*(theB1+lastTM*theSS);
821 G4double ts1=-std::log(1.-R1)/theB1;
822 if(std::fabs(tss)>1.e-7) ts1=(std::sqrt(theB1*(theB1+(tss+tss)*ts1))-theB1)/tss;
825 G4cout<<
"*Warning*G4QElCS::GetExT:1a "<<ts1<<
"#"<<lastTM<<
",d="<<ds1
826 <<
",R1="<<R1<<
",E1="<<E1<<
G4endl;
833 G4double ts2=-std::log(1.-R2)/theB2;
834 if(a<6.5)ts2=std::pow(ts2,third);
835 else ts2=std::pow(ts2,fifth);
836 G4double ds2=std::fabs(ts2-lastTM)/lastTM;
838 G4cout<<
"*Warning*G4QElCS::GetExT:2a "<<ts2<<
"#"<<lastTM<<
",d="<<ds2
839 <<
",R2="<<R2<<
",E2="<<E2<<
G4endl;
842 if(a>6.5)E3*=tm2*tm2*tm2;
845 G4double ts3=-std::log(1.-R3)/theB3;
846 if(a>6.5)ts3=std::pow(ts3,sevth);
847 G4double ds3=std::fabs(ts3-lastTM)/lastTM;
849 G4cout<<
"*Warning*G4QElCS::GetExT:3a "<<ts3<<
"#"<<lastTM<<
",d="<<ds3
850 <<
",R3="<<R3<<
",E3="<<E3<<
G4endl;
855 G4double ts4=-std::log(1.-R4)/theB4;
856 G4double ds4=std::fabs(ts4-lastTM)/lastTM;
858 G4cout<<
"*Warning*G4QElCS::GetExT:4a "<<ts4<<
"#"<<lastTM<<
",d="<<ds4
859 <<
",R4="<<R4<<
",E4="<<E4<<
G4endl;
869 G4cout<<
"G4QElCS::GtExT:1="<<I1<<
",2="<<I2<<
",3="<<I3<<
",4="<<I4<<
",r="<<rand<<
G4endl;
875 q2=-std::log(1.-ran)/theB1;
876 if(std::fabs(tss)>1.e-7) q2=(std::sqrt(theB1*(theB1+(tss+tss)*q2))-theB1)/tss;
878 G4cout<<
"G4QElCS::GetExT:Q2="<<q2<<
",ss="<<tss/2<<
",b1="<<theB1<<
",t1="<<ts1<<
G4endl;
885 q2=-std::log(1.-ran)/theB2;
887 if(a<6.5) q2=std::pow(q2,third);
888 else q2=std::pow(q2,fifth);
890 G4cout<<
"G4QElCS::GetExT: Q2="<<q2<<
", r2="<<R2<<
", b2="<<theB2<<
",t2="<<ts2<<
G4endl;
897 q2=-std::log(1.-ran)/theB3;
899 if(a>6.5) q2=std::pow(q2,sevth);
901 G4cout<<
"G4QElCS::GetExT:Q2="<<q2<<
", r3="<<R2<<
", b3="<<theB2<<
",t3="<<ts2<<
G4endl;
908 q2=-std::log(1.-ran)/theB4;
909 if(a<6.5) q2=lastTM-q2;
911 G4cout<<
"G4QElCS::GetExT:Q2="<<q2<<
",m="<<lastTM<<
",b4="<<theB3<<
",t4="<<ts3<<
G4endl;
916 if(!(q2>=-1.||q2<=1.))
G4cout<<
"*NAN*G4QElasticCrossSect::GetExchangeT: -t="<<q2<<
G4endl;
920 G4cout<<
"*Warning*G4QElasticCrossSect::GetExT:-t="<<q2<<
">"<<lastTM<<
G4endl;
930 static const G4double GeVSQ=gigaelectronvolt*gigaelectronvolt;
932 G4cout<<
"G4QElasticCS::GetSlope:"<<onlyCS<<
", Z="<<tgZ<<
",N="<<tgN<<
",PDG="<<PDG<<
G4endl;
934 if(onlyCS)
G4cout<<
"Warning*G4QPionPlusElasticCrossSection::GetSlope:onlyCS=true"<<
G4endl;
935 if(lastLP<-4.3)
return 0.;
942 ed <<
"PDG = " << PDG <<
", Z = " << tgZ <<
", N = " << tgN
943 <<
", while it is defined only for PDG=211 (pi-)" <<
G4endl;
944 G4Exception(
"G4QPionPlusElasticCrossSection::GetSlope()",
"HAD_CHPS_000",
947 if(theB1<0.) theB1=0.;
948 if(!(theB1>=-1.||theB1<=1.))
G4cout<<
"*NAN*G4QElasticCrossSect::Getslope:"<<theB1<<
G4endl;
955 static const G4double HGeVSQ=gigaelectronvolt*gigaelectronvolt/2.;
956 return lastTM*HGeVSQ;
963 if(PDG!= 211)
G4cout<<
"Warning*G4QPionPlusElasticCrossSection::GetTabV:PDG="<<PDG<<
G4endl;
966 G4cout<<
"*Warning*G4QPionPlusElCS::GetTabValue:(1-92) No isotopes for Z="<<tgZ<<
G4endl;
984 G4cout<<
"G4QElasticCS::GetTabVal: lp="<<lp<<
",Z="<<tgZ<<
",N="<<tgN<<
",PDG="<<PDG<<
G4endl;
991 if ( tgZ == 1 && tgN == 0 )
995 theS1=(lastPAR[12]+lastPAR[13]*dl2*dl2)/(1.+lastPAR[14]/p4/p)+
996 (lastPAR[15]/p2+lastPAR[16]*p)/(p4+lastPAR[17]*sp);
997 theB1=lastPAR[18]*std::pow(p,lastPAR[19])/(1.+lastPAR[20]/p3);
998 theS2=lastPAR[21]+lastPAR[22]/(p4+lastPAR[23]*p);
999 theB2=lastPAR[24]+lastPAR[25]/(p4+lastPAR[26]/
sp);
1000 theS3=lastPAR[27]+lastPAR[28]/(p4*p4+lastPAR[29]*p2+lastPAR[30]);
1001 theB3=lastPAR[31]+lastPAR[32]/(p4+lastPAR[33]);
1005 G4cout<<
"G4QElasticCS::GetTableValues:(pp) TM="<<lastTM<<
",S1="<<theS1<<
",B1="<<theB1
1006 <<
",S2="<<theS2<<
",B2="<<theB2<<
",S3="<<theS1<<
",B3="<<theB1<<
G4endl;
1013 return lastPAR[1]/(lr2+lr2*lr2+lastPAR[2])+(lastPAR[6]*dl3*dl3+lastPAR[7]+
1014 lastPAR[8]/sp)/(1.+lastPAR[9]/p4)+lastPAR[10]/(dl4*dl4+lastPAR[5]);
1032 theS1=lastPAR[9]/(1.+lastPAR[10]*p4*pa)+lastPAR[11]/(p4+lastPAR[12]*p4/pa2)+
1033 (lastPAR[13]*dl*dl+lastPAR[14])/(1.+lastPAR[15]/p2);
1034 theB1=(lastPAR[16]+lastPAR[17]*p2)/(p4+lastPAR[18]/pah)+lastPAR[19];
1035 theSS=lastPAR[20]/(1.+lastPAR[21]/p2)+lastPAR[22]/(p6/pa+lastPAR[23]/p16);
1036 theS2=lastPAR[24]/(pa/p2+lastPAR[25]/p4)+lastPAR[26];
1037 theB2=lastPAR[27]*std::pow(p,lastPAR[28])+lastPAR[29]/(p8+lastPAR[30]/p16);
1038 theS3=lastPAR[31]/(pa*p+lastPAR[32]/pa)+lastPAR[33];
1039 theB3=lastPAR[34]/(p3+lastPAR[35]/p6)+lastPAR[36]/(1.+lastPAR[37]/p2);
1040 theS4=p2*(pah*lastPAR[38]*std::exp(-pah*lastPAR[39])+
1041 lastPAR[40]/(1.+lastPAR[41]*std::pow(p,lastPAR[42])));
1042 theB4=lastPAR[43]*pa/p2/(1.+pa*lastPAR[44]);
1044 G4cout<<
"G4QElCS::GetTabV: lA, p="<<p<<
",S1="<<theS1<<
",B1="<<theB1<<
",SS="<<theSS
1045 <<
",S2="<<theS2<<
",B2="<<theB2<<
",S3="<<theS3<<
",B3="<<theB3<<
",S4="<<theS4
1051 theS1=lastPAR[9]/(1.+lastPAR[10]/p4)+lastPAR[11]/(p4+lastPAR[12]/p2)+
1052 lastPAR[13]/(p5+lastPAR[14]/p16);
1053 theB1=(lastPAR[15]/p8+lastPAR[19])/(p+lastPAR[16]/std::pow(p,lastPAR[20]))+
1054 lastPAR[17]/(1.+lastPAR[18]/p4);
1055 theSS=lastPAR[21]/(p4/std::pow(p,lastPAR[23])+lastPAR[22]/p4);
1056 theS2=lastPAR[24]/p4/(std::pow(p,lastPAR[25])+lastPAR[26]/p12)+lastPAR[27];
1057 theB2=lastPAR[28]/std::pow(p,lastPAR[29])+lastPAR[30]/std::pow(p,lastPAR[31]);
1058 theS3=lastPAR[32]/std::pow(p,lastPAR[35])/(1.+lastPAR[36]/p12)+
1059 lastPAR[33]/(1.+lastPAR[34]/p6);
1060 theB3=lastPAR[37]/p8+lastPAR[38]/p2+lastPAR[39]/(1.+lastPAR[40]/p8);
1061 theS4=(lastPAR[41]/p4+lastPAR[46]/p)/(1.+lastPAR[42]/p10)+
1062 (lastPAR[43]+lastPAR[44]*dl*dl)/(1.+lastPAR[45]/p12);
1063 theB4=lastPAR[47]/(1.+lastPAR[48]/p)+lastPAR[49]*p4/(1.+lastPAR[50]*p5);
1065 G4cout<<
"G4QElCS::GetTabV: hA, p="<<p<<
",S1="<<theS1<<
",B1="<<theB1<<
",SS="<<theSS
1066 <<
",S2="<<theS2<<
",B2="<<theB2<<
",S3="<<theS3<<
",B3="<<theB3<<
",S4="<<theS4
1072 G4cout<<
"G4QElCS::GetTabV: PDG="<<PDG<<
",P="<<p<<
",N="<<tgN<<
",Z="<<tgZ<<
G4endl;
1075 return (lastPAR[0]*dl*dl+lastPAR[1])/(1.+lastPAR[2]/p8)+
1076 lastPAR[3]/(p4+lastPAR[4]/p3)+lastPAR[6]/(p4+lastPAR[7]/p4);
1093 static const G4double mPi2= mPi*mPi;
1102 G4double s_value=dmt*std::sqrt(pP2+mPi2)+mPi2+mt*mt;
1103 return dmt*dmt*pP2/s_value;
1111 ed <<
"PDG = " << PDG <<
", Z = " << tgZ <<
",N = " << tgN
1112 <<
", while it is defined only for p projectiles & Z_target>0" <<
G4endl;
1113 G4Exception(
"G4QPionPlusElasticCrossSection::GetQ2max()",
"HAD_CHPS_0000",
G4DLLIMPORT std::ostream G4cout
G4double CalculateCrossSection(G4bool CS, G4int F, G4int I, G4int pPDG, G4int Z, G4int N, G4double pP)
G4double GetExchangeT(G4int tZ, G4int tN, G4int pPDG)
static G4VQCrossSection * GetPointer()
virtual G4double GetCrossSection(G4bool fCS, G4double pMom, G4int tgZ, G4int tgN, G4int pPDG=2212)
G4QPionPlusElasticCrossSection()
~G4QPionPlusElasticCrossSection()
G4double GetSlope(G4int tZ, G4int tN, G4int pPDG)
virtual G4double ThresholdEnergy(G4int Z, G4int N, G4int PDG=0)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
std::ostringstream G4ExceptionDescription