Changeset 489 in svn
- Timestamp:
- Jul 15, 2009, 8:13:06 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/routines/resolutions_atlas.C
r487 r489 56 56 //TFile *f1 = new TFile("JET2_atlas_midpoint_newCaloRes.root","read"); 57 57 //TFile *f1 = new TFile("JET2_atlas_kt_40k.root","read"); // 40k events 58 TFile *f1 = new TFile("JET2_atlas_kt_60k.root","read"); // 60k events 59 //TFile *f1 = new TFile("JET2_atlas_jetclu_new_60k.root","read"); // 60k events 58 //TFile *f1 = new TFile("JET2_atlas_kt_60k.root","read"); // 60k events 59 //TFile *f1 = new TFile("JET2_atlas_jetclu_60k.root","read"); // 60k events 60 //TFile *f1 = new TFile("JET2_atlas.kt_80k.root","read"); // 80k events -- samples jx -- default Delphes 61 //TFile *f1 = new TFile("JET2_atlas.cone_80k.root","read"); // 80k events -- samples jx -- default Delphes + endcaps 62 TFile *f1 = new TFile("JET2_atlas_kt_80k_endcap.root","read"); // 80k events -- samples jx -- default Delphes + endcaps 60 63 61 64 if(!f1->IsOpen()) { cout << "could not open "<< f1->GetName() << ". Exiting..." << endl; return;} 62 65 if(!f1->FindKey("Analysis")) { cout << "Bad input file, could not find the \"Analysis\" tree. Exiting..." << endl; return;} 63 66 TTree *Analyze = (TTree*)f1->Get("Analysis"); 64 65 //const int numBin=16; 66 //double bins[numBin]={0,10,20,30,40,50,60,70,80,100,120,140,180,220,300,1200}; 67 //const int numBin=25; 68 //double bins[numBin]={21,26,32,39,48, 59,72,88,107,130, 158,191,230,278,336, 405,485,581,696,834, 1000,1198,1435,1719,2060}; 69 //const int numBin=20; 70 //double bins[numBin]={21,26,32,39,48, 59,72,88,107,130, 158,191,230,278,336, 405,485,581,696,834 }; 67 68 /* 69 const int numBin=16; 70 double bins[numBin]={0,10,20,30,40,50,60,70,80,100,120,140,180,220,300,1200}; // cms-samples bins 71 string cut = "1==1"; 72 TF1 *fitfunATLAS = new TF1("userATLAS","sqrt(pow(0.69*100/sqrt(x),2)+pow(0.03*100,2)+pow(6.3*100/x,2))",10,800); 73 TPaveText *etacut = MakeTPave(0.58,0.51,0.65,0.55,"|#eta|<0.5 "); 74 */ 75 /* 76 const int numBin=25; 77 double bins[numBin]={21,26,32,39,48, 59,72,88,107,130, 158,191,230,278,336, 405,485,581,696,834, 1000,1198,1435,1719,2060}; 78 string cut = "1==1"; 79 TF1 *fitfunATLAS = new TF1("userATLAS","sqrt(pow(0.69*100/sqrt(x),2)+pow(0.03*100,2)+pow(6.3*100/x,2))",10,800); 80 TPaveText *etacut = MakeTPave(0.58,0.51,0.65,0.55,"|#eta|<0.5 "); 81 */ 82 /* 83 const int numBin=20; 84 double bins[numBin]={21,26,32,39,48, 59,72,88,107,130, 158,191,230,278,336, 405,485,581,696,834 }; 85 string cut = "1==1"; 86 TF1 *fitfunATLAS = new TF1("userATLAS","sqrt(pow(0.69*100/sqrt(x),2)+pow(0.03*100,2)+pow(6.3*100/x,2))",10,800); 87 TPaveText *etacut = MakeTPave(0.58,0.51,0.65,0.55,"|#eta|<0.5 "); 88 */ 89 90 // for eta < 0.5, use this 71 91 const int numBin=14; 72 92 double bins[numBin]={21,26,32,39,48, 59,72,88,130, 191,278, 405,581,834 }; 93 string cut = "abs(JetPTResol.Eta)<0.5"; 94 TF1 *fitfunATLAS = new TF1("userATLAS","sqrt(pow(0.69*100/sqrt(x),2)+pow(0.03*100,2)+pow(6.3*100/x,2))",10,800); 95 TPaveText *etacut = MakeTPave(0.58,0.51,0.65,0.55,"|#eta|<0.5 "); 96 97 /* 98 // for forward 1.5 < eta < 2.0, use this 99 const int numBin=10; 100 double bins[numBin]={48, 59,72,88,130, 191,278, 405,581,834 }; 101 string cut = "abs(JetPTResol.Eta)<2.0 && abs(JetPTResol.Eta)>1.5"; 102 TF1 *fitfunATLAS= new TF1("userATLAS","sqrt(pow(1.19*100/sqrt(x),2)+pow(0.01*100,2)+pow(10*100/x,2))",10,800); 103 TPaveText *etacut = MakeTPave(0.58,0.51,0.65,0.55,"1.5<|#eta|<2.0 "); 104 */ 73 105 TProfile *ESoverE = new TProfile("ESoverE","Jet resolution for ATLAS ",numBin-1,bins,-10,10); 74 106 … … 77 109 TCanvas *c1 = new TCanvas("c1","JET resol: (E_reco - E_gen)/E_gen",0,0,1000,650); 78 110 c1->cd(); int frame=0; 79 c1->Divide(10,2); 111 int nc = numBin/2 + numBin%2; 112 c1->Divide(nc,2); 80 113 TCanvas *c1b = new TCanvas("c1b","JET resol: [(E_reco - E_gen)/E_gen]^2 ",0,0,1000,650); 81 114 c1b->cd(); int frame2=0; 82 c1b->Divide( 10,2);115 c1b->Divide(nc,2); 83 116 84 117 float x[numBin-1]; … … 116 149 string mystringName(tempName); 117 150 c1->cd(++frame); 118 //string cut = "abs(JetPTResol.Eta)<2.0 && abs(JetPTResol.Eta)>1.5";119 string cut = "abs(JetPTResol.Eta)<0.5";120 //string cut = "1==1";121 151 GaussValuesAsymmetry(Analyze,tempName,mean[i],mystringMin,mystringMax,cut); 122 152 … … 127 157 c1b->cd(++frame2); 128 158 GaussValuesAsymmetry2(Analyze,tempName,mean2[i],mystringMin,mystringMax,cut); 129 130 159 131 160 x[i]=binCenter; … … 183 212 fitfunDelphes->Draw("same"); 184 213 185 TF1 *fitfunATLAS = new TF1("userATLAS","sqrt(pow(0.69*100/sqrt(x),2)+pow(0.03*100,2)+pow(6.3*100/x,2))",10,800);186 214 fitfunATLAS->SetLineColor(kBlue); 187 215 fitfunATLAS->Draw("same"); 188 216 189 TF1 *fitfunATLAS2= new TF1("userATLAS2","sqrt(pow(1.19*100/sqrt(x),2)+pow(0.01*100,2)+pow(10*100/x,2))",10,800); 190 fitfunATLAS2->SetLineColor(kBlue); 191 //fitfunATLAS2->Draw("same"); 192 193 TPaveText *etacut = MakeTPave(0.58,0.51,0.65,0.55,"|#eta|<0.5 "); 217 194 218 etacut->Draw(); 195 219 … … 358 382 //TFile *f1 = new TFile("JET2_ATLAS.root","read"); 359 383 //TFile *f1 = new TFile("JET2_atlas_midpoint.root","read"); 360 TFile *f1 = new TFile("JET2_atlas_kt_60k.root","read"); // 60k events 384 //TFile *f1 = new TFile("JET2_atlas_kt_60k.root","read"); // 60k events 385 //TFile *f1 = new TFile("JET2_atlas_kt_80k_endcap.root","read"); // 80k events + endcap 386 TFile *f1 = new TFile("JET2_atlas.cone_80k.root","read"); // 80k events + endcap 361 387 if(!f1->IsOpen()) { cout << "could not open "<< f1->GetName() << ". Exiting..." << endl; return;} 362 388 if(!f1->FindKey("Analysis")) { cout << "Bad input file, could not find the \"Analysis\" tree. Exiting..." << endl; return;} 363 389 TTree *Analyze = (TTree*)f1->Get("Analysis"); 364 390 365 TF1 *fitfun = new TF1("user","[0]*sqrt(x)",0,600); 391 //const Int_t numBin=6; double bins[numBin]={180,260,340,420,500,580}; 392 double max = 900; 393 const Int_t numBin=6; double bins[numBin]={100,250,400,550,700,max}; 394 //const Int_t numBin=6; double bins[numBin]={180,260,340,420,500,max}; 395 TProfile *ETSoverET = new TProfile("ETSoverET","ETmis resol",numBin-1,bins,-1000,1000); 396 TF1 *fitfun = new TF1("user","[0]*sqrt(x)",0,max); 366 397 fitfun->SetLineColor(kBlue); 367 const Int_t numBin=6;368 double bins[numBin]={180,260,340,420,500,580};369 TProfile *ETSoverET = new TProfile("ETSoverET","ETmis resol",(numBin-1),bins,-1000,1000);370 398 371 399 … … 374 402 TCanvas *c5 = new TCanvas("c5","PTmis resol",0,0,1000,650); 375 403 c5->cd(); int frame=0; 376 c5->Divide(6,2); 404 int nb = numBin/2 + numBin%2; 405 c5->Divide(nb,2); 377 406 378 407 double x[numBin]; … … 420 449 gr11->Fit("user","RQ"); 421 450 gr11->GetYaxis()->SetRangeUser(0,60); 422 gr11->GetXaxis()->SetRangeUser(1, 600);451 gr11->GetXaxis()->SetRangeUser(1,max); 423 452 gr11->SetMaximum(16); 424 453
Note:
See TracChangeset
for help on using the changeset viewer.