Pluto v6.3.0
Loading...
Searching...
No Matches
PSaidLowEnergy.cc
Go to the documentation of this file.
1
2// Pluto SAID parametrization implementation file
3// Low energy SAID pp-elastic parametrization.
4// Created by Nodar Lomidze and Mirian Tabidze;
5// ANKE/PAX Collaboration 03.09.09
6//
7// For each theta (0-180) deg. dsg/dT_kin distributions was fitted using function
8// a*pow[T_kin,b*pow(T_kin,c)] + d, where a,b,c, and d parameters are functions of
9// theta, T_kin is proton kinetic energy.
10// For approximation this parameters full theta region was divided into 5 intervals
11// (0-1), (1-4), (4-20), (20-40) and (40-90) deg.
12// In each interval polynomial functions (pol4-pol6) or function
13// pol1+A*x^B*sin^C(x)*exp(D*x) was used (see code below),
14// where A,B,C and D are parameters.
15// In (90-180) deg. interval same function was used as in (90-0) deg.
16//
17// Differences from SAID above 4 MeV incident proton kinetic energy in theta
18// (25-90) deg. are less then 1%, in (4-25) deg. ~4-6% and in (1-4) deg. (10-15)%.
19// Below 4 MeV parametrization is worse ~(10-20)% in all theta intervals.
20//
21//
23
24
25#include "PSaidLowEnergy.h"
26
27const long double d2r = 3.14159265358979323846/180.;
28
31
32PSaidLowEnergy::PSaidLowEnergy(const Char_t *id, const Char_t *de) :
33 PAngularDistribution(id, de) {
34 dim = 90-1;
35
36 y.Set(dim+1);
37 aa.Set(dim);
38 told = -1.;
39};
40
42 return new PSaidLowEnergy((const PSaidLowEnergy &)* this);
43};
44
45
47
49 Fatal("IsNotRejected", "Sampling not finished");
50 }
51 return kTRUE;
52};
53
54
56 if (!PAngularDistribution::Init()) return kFALSE;
57
58 if (!beam || !target) {
59 Warning("Init", "beam or target not found");
60 return kFALSE;
61 }
62
63 return kTRUE;
64}
65
66
68 return kTRUE;
69}
70
72 //boost particle 2 such to be in particle 1 rest frame
73
74 PParticle tmp(beam); //particle under investigation. Make better a copy
75 tmp.Boost(-target->BoostVector());
76 Double_t tlab = tmp.KE();
77
78 return sample(r, tlab);
79}
80
81//mita begin
82/*
83#include <TCanvas.h>
84#include <TH1F.h>
85int I_print=0;
86TCanvas *cc = new TCanvas("c","SAID parametrisation",200,10,800,700);
87TH1F *hf0t=new TH1F("hf0t",";#Theta_{lab} (deg.)",180,0,90);
88*/
89//mita end
90
91
92double PSaidLowEnergy::dsdw(double th, double tlab) {
93 // normalized pp elastic differential cross sections (mb/sr)
94 // arguments: scattering angle (deg), lab beam kinetic energy (GeV)
95
96 double Tlab = tlab*1000;
97
98 long double a0 = 825.770315997777;
99 long double a1 = -36.1806390269961;
100 long double a2 = 0.736508337604257;
101 long double a3 = -0.00245475650713848;
102 long double a4 = -9.46167840068291e-05;
103 long double a5 = 1.18647782825118e-06;
104 long double a6 = -4.23920644982741e-09;
105
106 long double a01 = 158509949.824459;
107 long double a11 = -1.05462493339422;
108 long double a21 = 0.999464445523888;
109 long double a31 = -0.331696205972712;
110 long double a41 = -1.9817093971156;
111 long double a51 = 339.459572120675;
112
113 long double a02 = 7013162.6023937;
114 long double a12 = -2.60581893459221;
115 long double a22 = -1.17622988844922 ;
116 long double a32 = -0.0572294874172003;
117 long double a42 = -242.76957186148;
118 long double a52 = 4972.40753398661;
119
120 long double a03 = 7363793.10073931;
121 long double a13 = -2.78666712844778;
122 long double a23 = -1.19175331577741;
123 // long double a33=-0.0168240994020085;
124 long double a43 = 2919.73115823142;
125 long double a53 = -11247.1848613229;
126
127 long double b0 = -1.11987335717749;
128 long double b1 = 0.0375681831247435;
129 long double b2 = -0.000806720177542215;
130 long double b3 = 7.31226869503504e-06;
131 long double b4 = -2.40772264489991e-08 ;
132
133 long double b01 = 5.49631512561751;
134 long double b11 = -1.41153243358003;
135 long double b21 = 0.0873325395997571;
136 long double b31 = -0.00210915057288232;
137 long double b41 = 1.78555710528402e-05;
138
139 long double b02 = -2.01651356175559;
140 long double b12 = 0.00952134681173633;
141 long double b22 = -0.00424259230244138;
142 long double b32 = 0.000815075673344715;
143 long double b42 = -6.09637287432679e-05;
144 long double b52 = 1.5439817446594e-06;
145
146 long double c0 = -0.0899947020336036;
147 long double c1 = 0.0165457502998486;
148 long double c2 = -0.00035225623300735;
149 long double c3 = 3.18377219079531e-06;
150 long double c4 = -1.04867548784599e-08;
151
152 long double c01 = 4.02283676522501;
153 long double c11 = -0.571280456418181;
154 long double c21 = 0.0286964703485152;
155 long double c31 = -0.000606564121973199;
156 long double c41 = 4.6543463351715e-06;
157
158 long double c02 = 0.000449138526079407;
159 long double c12 = -0.00323470722989942;
160 long double c22 = 0.00101229269064745;
161 long double c32 = -8.04320221005051e-05;
162 long double c42 = 1.38972236339651e-06;
163 long double c52 = 1.51442646510768e-08;
164
165 long double d0 = 0.14637558766108;
166 long double d1 = 0.242429384264589;
167 long double d2 = -0.00515619107849952;
168 long double d3 = 4.5272537785055e-05;
169 long double d4 = -1.42514150093272e-07;
170
171 long double d01 = 90.5702938678518;
172 long double d11 = -12.623103132398;
173 long double d21 = 0.63864747288047;
174 long double d31 = -0.0137296412910617;
175 long double d41 = 0.000107543327455007;
176
177 long double d03 = 95.4776480269654;
178 long double d13 = -2.46798492423323;
179 long double d23 = -1.27436869909584;
180 long double d33 = -0.478148940786103;
181 long double d43 = 11.6930721555554;
182 long double d53 = -64.5772975461858;
183 long double d63 = -0.702778910136937;
184 long double d73 = 0.014105237506306;
185
186 long double as=0, bs=0, cs=0, ds=0;
187
188 if(th > 40) {
189 as = a0+a1*th+a2*pow(th,2)+a3*pow(th,3)+a4*pow(th,4)+a5*pow(th,5)+a6*pow(th,6);
190 bs = b0+b1*th+b2*pow(th,2)+b3*pow(th,3)+b4*pow(th,4);
191 cs = c0+c1*th+c2*pow(th,2)+c3*pow(th,3)+c4*pow(th,4);
192 ds = d0+d1*th+d2*pow(th,2)+d3*pow(th,3)+d4*pow(th,4);
193 }
194
195 if(th > 20 && th <= 40) {
196 as = a01*powl((long double)th,a11)*pow(sin(th*d2r),a21)*exp(a31*th)+a41*th+a51;
197 bs = b01+b11*th+b21*pow(th,2)+b31*pow(th,3)+b41*pow(th,4);
198 cs = c01+c11*th+c21*pow(th,2)+c31*pow(th,3)+c41*pow(th,4);
199 ds = d01+d11*th+d21*pow(th,2)+d31*pow(th,3)+d41*pow(th,4);
200 }
201
202 if(th > 3.99 && th <= 20) {
203 as = a02*powl((long double)th,a12)*pow(sin(th*d2r),a22)*exp(a32*th)+a42*th+a52;
204 bs = b02+b12*th+b22*pow(th,2)+b32*pow(th,3)+b42*pow(th,4)+b52*pow(th,5);
205 cs = c02+c12*th+c22*pow(th,2)+c32*pow(th,3)+c42*pow(th,4)+c52*pow(th,5);
206 ds = d03*powl((long double)th,d13)*pow(sin(th*d2r),d23)*exp(d33*th)+d43*th+d53+d63*pow(th,2)+d73*pow(th,3);
207 }
208
209 if(th > 1 && th <= 3.99) {
210 as = a03*powl((long double)th,a13)*pow(sin(th*d2r),a23)*exp(a32*th)+a43*th+a53;
211 bs = b02+b12*th+b22*pow(th,2)+b32*pow(th,3)+b42*pow(th,4)+b52*pow(th,5);
212 cs = c02+c12*th+c22*pow(th,2)+c32*pow(th,3)+c42*pow(th,4)+c52*pow(th,5);
213 ds = d03*powl((long double)th,d13)*pow(sin(th*d2r),d23)*exp(d33*th)+d43*th+d53+d63*pow(th,2)+d73*pow(th,3);
214 }
215
216 if(th <= 1) {
217 as = (901707552-762)*th+762;
218 bs = (-2.01+0.628)*th-0.628;
219 cs = (-0.0024+0.229)*th-0.229;
220 ds = (10244.8+267.38)*th-267.38;
221 }
222
223 double sinth = sin(th*d2r);
224
225 /*
226 double dSdW, dSdT;
227 I_print = I_print + 1;
228 dSdW = as*pow(Tlab,bs*pow(Tlab,cs)) + ds;
229 dSdT = sinth*dSdW;
230 if(I_print <= 110) {
231 cout << I_print << " Tkin = " << Tlab << endl;
232 cout << " Theta " << th << " dS/dW " << dSdW
233 << " dS/dT " << dSdT << endl;
234 }
235 hf0t->Fill(th);
236*/
237
238 return sinth*(as*pow((long double)Tlab,bs*pow((long double)Tlab,cs)) + ds);
239
240}
241
242double PSaidLowEnergy::sample(double r, double tlab) {
243 const double fac = 1.3;
244 int i, j;
245 // _____________________________________________________________________
246 // enter whenever beam energy changes, to calculate integrals and slopes
247 if (told != tlab) {
248 told = tlab;
249 double sum = 0.;
250 for (i=0; i<=dim; ++i)
251 y[i] = fac * dsdw((double)(i+1), tlab);
252 for (i=0; i<dim; ++i) {
253 sum += (y[i+1]>y[i]) ? y[i+1] : y[i] ;
254 aa[i] = sum;
255 }
256 }
257
258 // _____________________________________________________________________
259 // sample cm scattering angle with the rejection method
260 double rr, f, tf, r2, c0, r1 = r;
261
262 repeat:
263 i = (r1>.5);
264 rr = (2.*r1-i)*aa[dim-1];
265 for (j=0; j<dim; ++j) {
266 if (rr<aa[j]) break;
267 }
268 if (j) rr -= aa[j-1];
269 tf = (y[j+1]>y[j]) ? y[j+1]: y[j];
270 c0 = rr/tf+1.+j;
271 f = dsdw(c0,tlab);
272 //r2=REngine->Rndm();
273 r2 = PUtils::sampleFlat();
274 if (r2 > f/tf) goto fail;
275 if (f <= tf) return (1-2*i)*cos(c0*d2r);
276
277 Warning("sample", "sampling failed f=%lf, tf=%lf", f, tf);
278 exit(1);
279
280 fail:
281 //r1=REngine->Rndm();
282 r1 = PUtils::sampleFlat();
283 goto repeat;
284}
285
286
ClassImp(PBeamLineSimulation) PBeamLineSimulation
const long double d2r
TFile * f
Definition analyze_g12C.C:8
virtual Double_t KE() const
Definition PParticle.h:102
Bool_t Prepare(void)
PDistribution * Clone(const char *delme=NULL) const
Bool_t Init(void)
Bool_t IsNotRejected(void)
double SamplePolarAngle(double)
static Double_t sampleFlat()
Definition PUtils.h:121
PReaction r(c,"eta_dalitz", 3, 0, 0, 0, 1)
PChannel * c4
PChannel * c2
PChannel * c3
PDecayChannel * d1
Definition dp_mult.C:9
PDecayChannel * d2
Definition dp_mult.C:13
PChannel * c11
Float_t sum