Main Page | Namespace List | Class List | Directories | File List | Class Members | File Members

higgspolarization_incorrect_boost.C

Go to the documentation of this file.
00001 double beta(double x)
00002 {
00003   double gamma = ((91.876**4)/(x**4))*(8/((1-((2*(91.768**2))/(x**2)))**2));
00004   return (-gamma+2)/(2+gamma);
00005  
00006 }
00007 
00008 
00009 
00010 void higgspolarization(char *filelistname)
00011 
00012 {
00013   TString filename;
00014   TFile * f;
00015 
00016 
00017   ifstream filelist(filelistname);
00018   string line;
00019 
00020 
00021   const int n = 31; //how large the arrray is that it creates
00022 
00023   double x[n],y[n],y1[n],ex[n],ey[n],ey1[n],y3[n],ey3[n];
00024 
00025 
00026   int ipoint = 0;
00027 
00028   filelist >> line;
00029   double higgsmass = 140;
00030   
00031   //loop over the files from file list
00032  
00033   while (!filelist.eof())
00034     {
00035       filename = line;
00036       //open the file, now pointed by f
00037 
00038 
00039       f = TFile::Open(filename);
00040       
00041       TH1F * thish = (TH1F*) f->Get("Cosine1graph");
00042       thish->SetTitle("Cos(#theta) of muon1 in Z1 rest frame");
00043       thish->Rebin(30);
00044       TF1 *f2 = new TF1("f2","[0]*([1]*(3/4)*(1-x**2)+(3/8)*(1-[1])*(1+x**2))",-1,1);
00045       TF1 *f3 = new TF1("f3","[0]*( (1/(1+[1]))*(3/4)*(1-x**2) + (3/8)*([1]/(1+[1]))*(1+x**2) )",-1,1);
00046       TF1 *f5 = new TF1("f5","[0]*( ((-[1]-1)/([1]-3)) * (3/4)*(1-x**2) + (3/8)*((2*[1]-2)/([1]-3))*(1+x**2) )",-1,1);
00047       
00048       
00049        f2->SetParNames("Normalization","alpha");
00050        f3->SetParNames("Normalization","R");
00051        f5->SetParNames("Normalization","Asymmetry");      
00052  
00053        f2->SetParameter(1,0.9);
00054        f3->SetParameter(1,0.1);
00055        f5->SetParameter(1,0.5);      
00056 
00057        f2->FixParameter(0,thish->Integral("bin width"));
00058        f3->FixParameter(0,thish->Integral("bin width"));
00059        f5->FixParameter(0,thish->Integral("bin width"));
00060 
00061        thish->Fit("f2","L+");
00062        thish->Fit("f3","L+");
00063        thish->Fit("f5","L+");
00064        
00065        float alpha =  f2->GetParameter("alpha");
00066        float alpha_error = f2->GetParError(1);
00067        float ratio = f3->GetParameter("R");
00068        float ratio_error = f3->GetParError(1);
00069        //  float tully_ratio = f4->GetParameter("tullyR");
00070        // float tully_ratio_error = f4->GetParError(1);
00071        float correct_tratio = f5->GetParameter("Asymmetry");
00072        float correct_tratio_error = f5->GetParError(1);
00073       
00074        f->Close();
00075        
00076        
00077        
00078        
00079        x[ipoint] = higgsmass;
00080        y[ipoint] = alpha;
00081        ey[ipoint] = alpha_error;
00082        y1[ipoint] = ratio;
00083        ey1[ipoint] = ratio_error;
00084        // y2[ipoint] = tully_ratio;
00085        // ey2[ipoint] = tully_ratio_error;
00086        y3[ipoint] = correct_tratio;
00087        ey3[ipoint] = correct_tratio_error;
00088        
00089       ipoint++;
00090       higgsmass+=10;
00091       
00092       filelist >> line; 
00093       
00094     }
00095   
00096   TGraphErrors *gr1 = new TGraphErrors(n,x,y,ex,ey);
00097   
00098   TGraphErrors *gr2 = new TGraphErrors(n,x,y1,ex,ey1);
00099   TF1 *f6 = new TF1("f6","((91.876**4)/(x**4))*(8/((1-((2*(91.768**2))/(x**2)))**2))",150,500);
00100   
00101   //  TGraphErrors *gr3 = new TGraphErrors(n,x,y2,ex,ey2);
00102 
00103   TGraphErrors *gr4 = new TGraphErrors(n,x,y3,ex,ey3);
00104   TF1 *f7 = new TF1("f7","beta(x)",150,500);
00105 
00106   TCanvas *c1 = new TCanvas("c1","alpha",200,10,600,400);
00107 
00108   gr1->SetLineColor(4);
00109   gr1->SetMarkerStyle(7);
00110   gr1->SetMarkerSize(3);
00111   gr1->SetMarkerColor(4);
00112   gr1->SetTitle("Alpha versus Higgs mass");
00113   gr1->GetXaxis()->SetTitle("Higgs Mass (GeV)"); 
00114   gr1->Draw("AP");
00115   
00116   TCanvas *c2 = new TCanvas("c2","Ratio",200,10,600,400);
00117   
00118   c2->cd();
00119   gr2->SetLineColor(2);
00120   gr2->SetMarkerStyle(7);
00121   gr2->SetMarkerSize(3);
00122   gr2->SetMarkerColor(2);
00123   gr2->SetTitle("Plot of Ratio of transverse to longitudinal polarization");
00124   gr2->GetXaxis()->SetTitle("Higgs Mass (GeV)");
00125   gr2->GetYaxis()->SetTitle("Ratio");
00126   gr2->Draw("AP");
00127   f6->Draw("CSAME");
00128 
00129   /*TCanvas *c3 = new TCanvas("c3","Tully Ratio",200,10,600,400);
00130 
00131   c3->cd();
00132   gr3->SetMarkerStyle(7);
00133   gr3->SetMarkerSize(3);
00134   gr3->SetTitle("Tully Ratio");
00135   gr3->GetXaxis()->SetTitle("Higgs Mass (GeV)");
00136   gr3->Draw("AP");
00137   */
00138   TCanvas *c4 = new TCanvas("c4","Tully Ratio",200,10,600,400);
00139   c4->cd();
00140   gr4->SetMarkerStyle(7);
00141   gr4->SetMarkerSize(3);
00142   gr4->SetTitle("Asymmetry");
00143   gr4->GetXaxis()->SetTitle("Higgs Mass (GeV)");
00144   gr4->Draw("AP");
00145   f7->Draw("CSAME");
00146 }

Generated on Thu Jul 12 14:04:54 2007 for RebassooAnalysis by  doxygen 1.3.9.1