Changeset 473 in svn for trunk/routines/resolutions.C
- Timestamp:
- Jul 13, 2009, 5:26:01 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/routines/resolutions.C
r443 r473 49 49 50 50 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;} 51 53 TTree *Analyze = (TTree*)f1->Get("Analysis"); 52 54 … … 153 155 154 156 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;} 155 159 TTree *Analyze = (TTree*)f1->Get("Analysis"); 156 160 … … 240 244 241 245 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;} 242 248 TTree *Analyze = (TTree*)f1->Get("Analysis"); 243 249 … … 283 289 gROOT->Reset(); 284 290 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;} 286 296 TTree *Analyze = (TTree*)f1->Get("Analysis"); 287 297 288 298 TF1 *fitfun = new TF1("user","[0]*sqrt(x)",0,600); 299 fitfun->SetLineColor(kBlue); 289 300 const Int_t numBin=6; 290 301 double bins[numBin]={180,260,340,420,500,580}; … … 330 341 x[numBin]=0; 331 342 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); 333 346 gr11->Draw("AP"); 334 gr11->GetXaxis()->SetTitle(" Offline sum ofE_{T} [GeV]");347 gr11->GetXaxis()->SetTitle("#Sigma E_{T} [GeV]"); 335 348 gr11->GetYaxis()->SetTitle("Resolution of x-component of MET [GeV]"); 336 349 gr11->Fit("user","RQ"); … … 340 353 gr11->GetYaxis()->SetRangeUser(0,60); 341 354 gr11->GetXaxis()->SetRangeUser(1,600); 355 gr11->SetMaximum(16); 342 356 343 357 Double_t* params = fitfun->GetParameters(); 344 358 345 359 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); 349 363 leg1->Draw(); 350 364 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"); 352 366 leg2->Draw(); 353 367 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"); 355 369 Delphes->Draw(); 356 357 370 371 TPaveText *atlas = MakeTPave(0.65,0.25,0.8,0.30,"CMS-like detector"); 372 atlas->Draw(); 373 358 374 delete fitfun; 359 375 }
Note:
See TracChangeset
for help on using the changeset viewer.