Fork me on GitHub

Changeset 473 in svn for trunk/routines/resolutions.C


Ignore:
Timestamp:
Jul 13, 2009, 5:26:01 PM (15 years ago)
Author:
Xavier Rouby
Message:

update des labels / securites dans le code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/routines/resolutions.C

    r443 r473  
    4949 
    5050  TFile *f1 = new TFile("JET2.root","read");
     51  if(!f1->IsOpen()) { cout << "could not open "<< f1->GetName() << ". Exiting..." << endl; return;}
     52  if(!f1->FindKey("Analysis")) { cout << "Bad input file, could not find the \"Analysis\" tree. Exiting..." << endl; return;}
    5153  TTree *Analyze = (TTree*)f1->Get("Analysis");
    5254 
     
    153155 
    154156  TFile *f1 = new TFile("ETMIS2.root","read");
     157  if(!f1->IsOpen()) { cout << "could not open "<< f1->GetName() << ". Exiting..." << endl; return;}
     158  if(!f1->FindKey("Analysis")) { cout << "Bad input file, could not find the \"Analysis\" tree. Exiting..." << endl; return;}
    155159  TTree *Analyze = (TTree*)f1->Get("Analysis");
    156160 
     
    240244 
    241245  TFile *f1 = new TFile("TAUJET2.root","read");
     246  if(!f1->IsOpen()) { cout << "could not open "<< f1->GetName() << ". Exiting..." << endl; return;}
     247  if(!f1->FindKey("Analysis")) { cout << "Bad input file, could not find the \"Analysis\" tree. Exiting..." << endl; return;}
    242248  TTree *Analyze = (TTree*)f1->Get("Analysis");
    243249 
     
    283289  gROOT->Reset();
    284290 
    285   TFile *f1 = new TFile("JET2.root","read");
     291  //TFile *f1 = new TFile("JET2.root","read");
     292  TFile *f1 = new TFile("JET2_cms_midpoint.root","read");
     293 
     294  if(!f1->IsOpen()) { cout << "could not open "<< f1->GetName() << ". Exiting..." << endl; return;}
     295  if(!f1->FindKey("Analysis")) { cout << "Bad input file, could not find the \"Analysis\" tree. Exiting..." << endl; return;}
    286296  TTree *Analyze = (TTree*)f1->Get("Analysis");
    287297 
    288298  TF1 *fitfun = new TF1("user","[0]*sqrt(x)",0,600);
     299  fitfun->SetLineColor(kBlue);
    289300  const Int_t numBin=6;
    290301  double bins[numBin]={180,260,340,420,500,580};
     
    330341  x[numBin]=0;
    331342  y[numBin]=0;
    332   TGraph *gr11 = new TGraph((numBin),x,rms);
     343  TGraph *gr11 = new TGraph(numBin,x,rms);
     344  gr11->SetTitle("");
     345  gr11->SetMarkerStyle(3);
    333346  gr11->Draw("AP");
    334   gr11->GetXaxis()->SetTitle("Offline sum of E_{T} [GeV]");
     347  gr11->GetXaxis()->SetTitle("#Sigma E_{T} [GeV]");
    335348  gr11->GetYaxis()->SetTitle("Resolution of x-component  of MET [GeV]");
    336349  gr11->Fit("user","RQ");
     
    340353  gr11->GetYaxis()->SetRangeUser(0,60);
    341354  gr11->GetXaxis()->SetRangeUser(1,600);
     355  gr11->SetMaximum(16);
    342356
    343357  Double_t* params = fitfun->GetParameters();
    344358 
    345359  char tempResol[500];
    346   sprintf(tempResol,"%f * #sqrt{E_{T}}",params[0]);
    347 
    348   TPaveText *leg1 = MakeTPave(0.4,0.6,0.8,0.65,tempResol);
     360  sprintf(tempResol,"E_{x}^{mis} resolution: %.2f #times #sqrt{E_{T}}",params[0]);
     361
     362  TPaveText *leg1 = MakeTPave(0.26,0.84,0.43,0.89,tempResol);
    349363  leg1->Draw();
    350364
    351   TPaveText *leg2 = MakeTPave(0.2,0.8,0.8,0.85,"WHq'#rightarrow WWWq'#rightarrow lllq', m_{H}=150 GeV ");
     365  TPaveText *leg2 = MakeTPave(0.15,0.75,0.45,0.8,"Events: pp #rightarrow ggX");
    352366  leg2->Draw();
    353367
    354   TPaveText *Delphes = MakeTPave(0.2,0.15,0.35,0.2,"MG/ME + Delphes");
     368  TPaveText *Delphes = MakeTPave(0.65,0.19,0.8,0.24,"MG/ME + Pythia + Delphes");
    355369  Delphes->Draw();
    356  
    357  
     370 
     371  TPaveText *atlas = MakeTPave(0.65,0.25,0.8,0.30,"CMS-like detector");
     372  atlas->Draw();
     373 
    358374  delete fitfun;
    359375}
Note: See TracChangeset for help on using the changeset viewer.