00001 00002 TGraph* derivative(TGraph* input) 00003 { 00004 TGraph * output = new TGraph(input->GetN()-1); 00005 output->SetName(input->GetName()+TString("_derivative")); 00006 00007 for (int ip=0; ip!=input->GetN()-1;ip++) 00008 { 00009 double x1,x2,y1,y2; 00010 input->GetPoint(ip,x1,y1); 00011 input->GetPoint(ip+1,x2,y2); 00012 00013 if (x2==x1) 00014 cout<<" 0, I am not happy"<<endl; 00015 else 00016 { 00017 double slope = (y2-y1)/(x2-x1); 00018 output->SetPoint(ip,(x2+x1)/2.,slope); 00019 } 00020 } 00021 return output; 00022 } 00023 TGraph* exponetialdecrease(TGraph* input,bool oppositesign=false) 00024 { 00025 TGraph * output = new TGraph(input->GetN()-1); 00026 output->SetName(input->GetName()+TString("_lambda")); 00027 00028 for (int ip=0; ip!=input->GetN()-1;ip++) 00029 { 00030 double x1,x2,y1,y2; 00031 input->GetPoint(ip,x1,y1); 00032 input->GetPoint(ip+1,x2,y2); 00033 00034 if (y2==y1) 00035 cout<<" 0, I am not happy"<<endl; 00036 else 00037 { 00038 double lambda = (x2-x1)/log(y2/y1); 00039 if (oppositesign) lambda*=-1; 00040 output->SetPoint(ip,(x2+x1)/2.,lambda); 00041 } 00042 } 00043 return output; 00044 } 00045 00046 double x[10]={50,100,150,200,250,300,400,500,600,700}; 00047 double width[10]={1e-3, 0.0022, 0.017, 1.36, 3.99, 8.36, 26.5, 60.9, 110.1, 176.9}; 00048 00049 TGraph * width() 00050 { 00051 TGraph * w = new TGraph(); 00052 w->SetName("Hwidth"); 00053 00054 for (int i =0;i!=10;i++) 00055 {w->SetPoint(i,x[i],width[i]);} 00056 return w; 00057 } 00058 00059 00060 void do(TGraph * ecm) 00061 00062 { 00063 TCanvas * c = new TCanvas("lambda","***",600,600); 00064 c->cd(); 00065 TGraph * l = exponetialdecrease(ecm,true); 00066 l->GetXaxis()->SetTitle("#sqrt{s} [GeV]"); 00067 l->GetYaxis()->SetTitle("#lambda(#sqrt{s}) [GeV]"); 00068 00069 TGraph * w = width(); 00070 w->GetXaxis()->SetTitle("#sqrt{s} [GeV]"); 00071 w->GetYaxis()->SetTitle("#Gamma_{Higgs} [GeV]"); 00072 00073 l->Draw("apl"); 00074 w->Draw("ap same"); 00075 }