Fork me on GitHub

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_atlas.C

    r470 r473  
    5555  //TFile *f1 = new TFile("JET2_atlas_midpoint_newCaloRes.root","read");
    5656  if(!f1->IsOpen()) { cout << "could not open "<< f1->GetName() << ". Exiting..." << endl; return;}
     57  if(!f1->FindKey("Analysis")) { cout << "Bad input file, could not find the \"Analysis\" tree. Exiting..." << endl; return;}
    5758  TTree *Analyze = (TTree*)f1->Get("Analysis");
    5859 
     
    124125  Double_t* params = fitfun->GetParameters();
    125126
    126   fitfun->SetLineColor(1);
     127  fitfun->SetLineColor(kBlue);
    127128  gr11->Fit("user","QRN");
    128129  gr11->Fit("user","QRN");
     
    136137
    137138  TF1 *fitfunDelphes = new TF1("userDelphes",tempResol2,7,1000);
    138   fitfunDelphes->SetLineColor(596);
     139  fitfunDelphes->SetLineColor(kBlue);
    139140  fitfunDelphes->SetLineStyle(7);
    140141  fitfunDelphes->Draw("same");
    141142
    142   fitfunATLAS->SetLineColor(1);
     143  fitfunATLAS->SetLineColor(kRed);
    143144  fitfunATLAS->SetLineWidth(2);
    144145  fitfunATLAS->Draw("same");
     
    168169  TFile *f1 = new TFile("ETMIS2_ATLAS.root","read");
    169170  if(!f1->IsOpen()) { cout << "could not open "<< f1->GetName() << ". Exiting..." << endl; return;}
     171  if(!f1->FindKey("Analysis")) { cout << "Bad input file, could not find the \"Analysis\" tree. Exiting..." << endl; return;}
    170172  TTree *Analyze = (TTree*)f1->Get("Analysis");
    171173 
     
    256258  TFile *f1 = new TFile("TAUJET2_ATLAS.root","read");
    257259  if(!f1->IsOpen()) { cout << "could not open "<< f1->GetName() << ". Exiting..." << endl; return;}
     260  if(!f1->FindKey("Analysis")) { cout << "Bad input file, could not find the \"Analysis\" tree. Exiting..." << endl; return;}
    258261  TTree *Analyze = (TTree*)f1->Get("Analysis");
    259262 
     
    299302  gROOT->Reset();
    300303 
    301   TFile *f1 = new TFile("JET2_ATLAS.root","read");
     304  //TFile *f1 = new TFile("JET2_ATLAS.root","read");
     305  TFile *f1 = new TFile("JET2_atlas_midpoint.root","read");
    302306  if(!f1->IsOpen()) { cout << "could not open "<< f1->GetName() << ". Exiting..." << endl; return;}
     307  if(!f1->FindKey("Analysis")) { cout << "Bad input file, could not find the \"Analysis\" tree. Exiting..." << endl; return;}
    303308  TTree *Analyze = (TTree*)f1->Get("Analysis");
    304309 
    305310  TF1 *fitfun = new TF1("user","[0]*sqrt(x)",0,600);
     311  fitfun->SetLineColor(kBlue);
    306312  const Int_t numBin=6;
    307313  double bins[numBin]={180,260,340,420,500,580};
     
    333339      char tempName[500];
    334340      sprintf(tempName,"ETmisResol.ExSmeare>>hETSoverET%d",i);
     341      //sprintf(tempName,"ETmisResol.EtSmeare>>hETSoverET%d",i); // non-gaussian, so it does not work properly
    335342      string mystringName(tempName);
    336343     
     
    347354  x[numBin]=0;
    348355  y[numBin]=0;
    349   TGraph *gr11 = new TGraph((numBin),x,rms);
     356  TGraph *gr11 = new TGraph(numBin,x,rms);
     357  gr11->SetTitle("");
     358  gr11->SetMarkerStyle(3);
    350359  gr11->Draw("AP");
    351   gr11->GetXaxis()->SetTitle("Offline sum of E_{T} [GeV]");
     360  gr11->GetXaxis()->SetTitle("#Sigma E_{T} [GeV]");
    352361  gr11->GetYaxis()->SetTitle("Resolution of x-component  of MET [GeV]");
    353362  gr11->Fit("user","RQ");
     
    357366  gr11->GetYaxis()->SetRangeUser(0,60);
    358367  gr11->GetXaxis()->SetRangeUser(1,600);
     368  gr11->SetMaximum(16);
    359369
    360370  Double_t* params = fitfun->GetParameters();
    361371 
    362372  char tempResol[500];
    363   sprintf(tempResol,"%f * #sqrt{E_{T}}",params[0]);
    364 
    365   TPaveText *leg1 = MakeTPave(0.4,0.6,0.8,0.65,tempResol);
     373  sprintf(tempResol,"E_{x}^{mis} resolution: %.2f #times #sqrt{E_{T}}",params[0]);
     374
     375  TPaveText *leg1 = MakeTPave(0.26,0.84,0.43,0.89,tempResol);
    366376  leg1->Draw();
    367377
    368   TPaveText *leg2 = MakeTPave(0.2,0.8,0.8,0.85,"WHq'#rightarrow WWWq'#rightarrow lllq', m_{H}=150 GeV ");
     378  TPaveText *leg2 = MakeTPave(0.15,0.75,0.45,0.8,"Events: pp #rightarrow ggX");
    369379  leg2->Draw();
    370380
    371   TPaveText *Delphes = MakeTPave(0.2,0.15,0.35,0.2,"MG/ME + Delphes");
     381  TPaveText *Delphes = MakeTPave(0.65,0.19,0.8,0.24,"MG/ME + Pythia + Delphes");
    372382  Delphes->Draw();
    373383 
     384  TPaveText *atlas = MakeTPave(0.65,0.25,0.8,0.30,"ATLAS-like detector");
     385  atlas->Draw();
    374386 
    375387  delete fitfun;
Note: See TracChangeset for help on using the changeset viewer.