Changeset 473 in svn
- Timestamp:
- Jul 13, 2009, 5:26:01 PM (15 years ago)
- Location:
- trunk/routines
- Files:
-
- 2 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 } -
trunk/routines/resolutions_atlas.C
r470 r473 55 55 //TFile *f1 = new TFile("JET2_atlas_midpoint_newCaloRes.root","read"); 56 56 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;} 57 58 TTree *Analyze = (TTree*)f1->Get("Analysis"); 58 59 … … 124 125 Double_t* params = fitfun->GetParameters(); 125 126 126 fitfun->SetLineColor( 1);127 fitfun->SetLineColor(kBlue); 127 128 gr11->Fit("user","QRN"); 128 129 gr11->Fit("user","QRN"); … … 136 137 137 138 TF1 *fitfunDelphes = new TF1("userDelphes",tempResol2,7,1000); 138 fitfunDelphes->SetLineColor( 596);139 fitfunDelphes->SetLineColor(kBlue); 139 140 fitfunDelphes->SetLineStyle(7); 140 141 fitfunDelphes->Draw("same"); 141 142 142 fitfunATLAS->SetLineColor( 1);143 fitfunATLAS->SetLineColor(kRed); 143 144 fitfunATLAS->SetLineWidth(2); 144 145 fitfunATLAS->Draw("same"); … … 168 169 TFile *f1 = new TFile("ETMIS2_ATLAS.root","read"); 169 170 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;} 170 172 TTree *Analyze = (TTree*)f1->Get("Analysis"); 171 173 … … 256 258 TFile *f1 = new TFile("TAUJET2_ATLAS.root","read"); 257 259 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;} 258 261 TTree *Analyze = (TTree*)f1->Get("Analysis"); 259 262 … … 299 302 gROOT->Reset(); 300 303 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"); 302 306 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;} 303 308 TTree *Analyze = (TTree*)f1->Get("Analysis"); 304 309 305 310 TF1 *fitfun = new TF1("user","[0]*sqrt(x)",0,600); 311 fitfun->SetLineColor(kBlue); 306 312 const Int_t numBin=6; 307 313 double bins[numBin]={180,260,340,420,500,580}; … … 333 339 char tempName[500]; 334 340 sprintf(tempName,"ETmisResol.ExSmeare>>hETSoverET%d",i); 341 //sprintf(tempName,"ETmisResol.EtSmeare>>hETSoverET%d",i); // non-gaussian, so it does not work properly 335 342 string mystringName(tempName); 336 343 … … 347 354 x[numBin]=0; 348 355 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); 350 359 gr11->Draw("AP"); 351 gr11->GetXaxis()->SetTitle(" Offline sum ofE_{T} [GeV]");360 gr11->GetXaxis()->SetTitle("#Sigma E_{T} [GeV]"); 352 361 gr11->GetYaxis()->SetTitle("Resolution of x-component of MET [GeV]"); 353 362 gr11->Fit("user","RQ"); … … 357 366 gr11->GetYaxis()->SetRangeUser(0,60); 358 367 gr11->GetXaxis()->SetRangeUser(1,600); 368 gr11->SetMaximum(16); 359 369 360 370 Double_t* params = fitfun->GetParameters(); 361 371 362 372 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); 366 376 leg1->Draw(); 367 377 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"); 369 379 leg2->Draw(); 370 380 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"); 372 382 Delphes->Draw(); 373 383 384 TPaveText *atlas = MakeTPave(0.65,0.25,0.8,0.30,"ATLAS-like detector"); 385 atlas->Draw(); 374 386 375 387 delete fitfun;
Note:
See TracChangeset
for help on using the changeset viewer.