2 double bemc_escale_rda(
double *x,
double * ){
3 double p[]={2.14037e-01,6.55108e-03};
4 return 0.5*(p[0]+p[1]*x[0]);
6 double bemc_spread_rda(
double * ,
double * ){
9 double material_rda(
double * ,
double * ){
12 double yield_extract_rda(
double *x,
double * ){
13 if(x[0]<4.)
return (
double)0.071;
16 double prescale_rda(
double *x,
double * ){
17 if(x[0]<4.)
return (
double)0.;
20 double beambg_rda(
double *x,
double * ){
21 if(x[0]<5.)
return (
double)0.0;
22 return (
double)0.007*(x[0]-5.);
24 double total_sys_rda(
double *x,
double *par){
26 ret=bemc_escale_rda(x,par)*bemc_escale_rda(x,par);
27 ret+=bemc_spread_rda(x,par)*bemc_spread_rda(x,par);
28 ret+=material_rda(x,par)*material_rda(x,par);
29 ret+=yield_extract_rda(x,par)*yield_extract_rda(x,par);
30 ret+=prescale_rda(x,par)*prescale_rda(x,par);
31 ret+=beambg_rda(x,par)*beambg_rda(x,par);
32 return par[0]*sqrt(ret);
34 void set_sys_rda(TGraphErrors *g){
35 TF1 *sys=
new TF1(
"sys",&total_sys_rda,1.,15.,1);
36 sys->SetParameter(0,1.);
37 for(
int i=0;i<g->GetN();i++){
41 double rel_err=sys->Eval(x);
42 g->SetPointError(i,0.,rel_err*y);
47 double error_norm_rda(
double * ,
double * ){
48 return (
double)sqrt(0.069*0.069+0.092*0.092+0.01*0.01+0.053*0.053);