1 #ifndef __WISER_PION_HH
2 #define __WISER_PION_HH
6 #define me_w 0.511E-3 //electron restmass (GeV)
7 #define alpha_w 0.007299
8 #define WISER_VERBOSE 0
12 G4double
wiser_sigma(G4double Ebeam, G4double pf, G4double thf, G4double rad_len, G4int type){
42 G4double A5[] = {-5.49, -5.23, -5.91, -4.45, -6.77, -6.53 };
43 G4double A6[] = {-1.73, -1.82, -1.74, -3.23, 1.90, -2.45 };
45 const G4double mass_p = 0.9383;
46 const G4double mass_p2 = mass_p*mass_p;
47 const G4double mass_pi = 0.13957;
48 const G4double mass_K = 0.4973;
49 const G4double mass_Lambda = 1.116;
51 G4double mass[] = {mass_pi, mass_pi, mass_K, mass_K, mass_p, mass_p};
52 G4double *mass2 =
new G4double[ntype];
55 for( i = 0; i < 6; i++ ){
56 mass2[i] = mass[i]*mass[i];
74 M_X = mass_p + mass_pi;
91 fprintf(stderr,
"%s: %s line %d - Forbidden type passed to Wiser parameterization\n",
92 __PRETTY_FUNCTION__, __FILE__, __LINE__ );
98 double Ef = sqrt(pf*pf + mass2[type]);
100 G4double E_gamma_min = ( MX2 - mass2[type] - mass_p2 + 2.0*mass_p*Ef )/
101 ( 2.0*( mass_p - Ef + pf*cos(thf) ) );
104 double pT = pf*sin(thf);
105 double ML = sqrt(pT*pT + mass2[type]);
111 G4cout <<
"In wiser_pion.h: \n"<< Ebeam <<
"\t" << pf <<
"\t" << thf <<
"\t" << rad_len <<
"\t" << type << G4endl;
114 G4cout <<
"E_gamma_min:: " << E_gamma_min << G4endl;
115 G4cout <<
"Ebeam:: " << Ebeam << G4endl;
118 if( E_gamma_min > 0.0 && E_gamma_min < Ebeam ){
120 TF1 *wiserfit =
new TF1(
"wiserfit",
wiser_all_fit, E_gamma_min, Ebeam, 5);
121 wiserfit->SetParameter(0, Ebeam);
122 wiserfit->SetParameter(1, pf);
123 wiserfit->SetParameter(2, thf);
124 wiserfit->SetParameter(3, (G4double) type);
125 wiserfit->SetParameter(4, M_X);
127 fitres = wiserfit->Integral(E_gamma_min, Ebeam);
132 sig_e = fitres*exp(A5[type]*ML)*exp(A6[type]*pT*pT/Ef);
134 sig_e = fitres*exp(A5[type]*ML);
138 sigma = pf*pf*sig_e*rad_len*1000.0/Ef;
141 G4cout <<
"Pion crsec :: " << sigma << G4endl;
148 G4cout <<
"--** Creation of Pions kinematically Forbidden **--" << G4endl;
154 G4cout <<
"--** No pions. E_gamma is outside the valid range **--" << G4endl;
168 G4double pf = par[1];
170 G4double thf = par[2];
172 G4int type = (G4int) par[3];
174 G4double M_X = par[4];
177 const G4double mass_p = 0.9383;
178 const G4double mass_p2 = mass_p*mass_p;
179 const G4double mass_pi = 0.13957;
180 const G4double mass_K = 0.4973;
182 G4double mass[] = {mass_pi, mass_pi, mass_K, mass_K, mass_p, mass_p};
184 G4double E_gamma = x[0];
186 double s = mass_p2 + 2.0*E_gamma*mass_p;
189 G4double A1[] = {566., 486., 368., 18.2, 1.33E5, 1.63E3 };
190 G4double A2[] = {829., 115., 1.91, 307., 5.69E4, -4.30E3};
191 G4double A3[] = {1.79, 1.77, 1.91, 0.98, 1.41, 1.79 };
192 G4double A4[] = {2.10, 2.18, 1.15, 1.83, .72, 2.24 };
194 G4double A7 = -.0117;
198 double beta_cm = E_gamma/(E_gamma+mass_p);
199 double gamma_cm = 1.0/sqrt(1.0 - beta_cm*beta_cm);
201 double p_cm_z = -gamma_cm*beta_cm*sqrt(pf*pf+mass[type]*mass[type])
202 +gamma_cm*pf*cos(thf);
204 double pT = pf*sin(thf);
205 double p_cm = sqrt( pT*pT + p_cm_z*p_cm_z );
206 double Ef = sqrt( p_cm*p_cm + mass[type]*mass[type] );
208 double p_cm_max = sqrt(s +pow(M_X*M_X - mass[type]*mass[type],2.0)/s -
209 2.0*(M_X*M_X + mass[type]*mass[type]) )/2.0;
211 double X_R = p_cm/p_cm_max;
213 if( X_R > 1.0 ){
return 0.0; }
217 return ( A1[type] + A2[type]/sqrt(s) )*
218 pow(1.0 - X_R + A3[type]*A3[type]/s, A4[type])/E_gamma;
220 G4double U_MAN = fabs(2.0*mass_p2 - 2.0*mass_p*Ef);
222 return ( A1[type] + A2[type]/sqrt(s) )*
223 pow(1.0 - X_R + A3[type]*A3[type]/s, A4[type])/pow(1.0 + U_MAN,A6+A7*s)/E_gamma;
230 #endif//__WISER_PION_HH
G4double wiser_all_fit(G4double *x, G4double *par)
G4double wiser_sigma(G4double Ebeam, G4double pf, G4double thf, G4double rad_len, G4int type)