Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/Validation.cpp

    r360d17e r1160e4f  
    476476  TF1 *f1 = new TF1("f1", "gaus", hist->GetMean()-2*hist->GetRMS(), hist->GetMean()+2*hist->GetRMS());
    477477  hist->Fit("f1","RQ");
    478   Double_t sig = f1->GetParameter(2);
    479   Double_t sigErr = f1->GetParError(2);
     478
     479  TF1 *f2 = new TF1("f2", "gaus", f1->GetParameter(1) - 2*f1->GetParameter(2), f1->GetParameter(1) + 2*f1->GetParameter(2));
     480  hist->Fit("f2","RQ"); 
     481
     482  Double_t sig = f2->GetParameter(2);
     483  Double_t sigErr = f2->GetParError(2);
     484
    480485  delete f1;
    481486  return make_pair (sig, sigErr);
     
    735740  std::pair<TH1D*,TH1D*> histos_el = GetEff<Electron>(branchElectron, branchParticleElectron, "Electron", elID, treeReaderElectron);
    736741
     742  histos_el.second->SaveAs("test1.pdf");
     743
    737744  // tracking reconstruction efficiency
    738745  std::pair <TH1D*,TH1D*> histos_eltrack = GetEff<Track>(branchTrackElectron, branchParticleElectron, "electronTrack", elID, treeReaderElectron);
     
    834841  DrawAxis(mg_elFwd, leg_elFwd, 0.2);
    835842
    836   C_el1->Print("delphes_validation.pdf(","pdf");
    837   C_el2->Print("delphes_validation.pdf","pdf");
     843  C_el1->Print("validation.pdf(","pdf");
     844  C_el2->Print("validation.pdf","pdf");
    838845
    839846  gDirectory->cd(0);
     
    935942  DrawAxis(mg_muFwd, leg_muFwd, 0.3);
    936943
    937   C_mu1->Print("delphes_validation.pdf","pdf");
    938   C_mu->Print("delphes_validation.pdf","pdf");
     944  //C_mu1->SaveAs(muEff+".eps");
     945  //C_mu->SaveAs(muRes+".eps");
     946
     947  C_mu1->Print("validation.pdf","pdf");
     948  C_mu->Print("validation.pdf","pdf");
    939949
    940950  gDirectory->cd(0);
     
    10031013  leg_ph2->Draw();
    10041014
     1015  C_ph1->SaveAs(phEff+".eps");
     1016
    10051017  TString phRes = "phERes";
    10061018  TString phResFwd = "phEResFwd";
     
    10361048  DrawAxis(mg_phFwd, leg_phFwd, 0.3);
    10371049
    1038   C_ph1->Print("delphes_validation.pdf","pdf");
    1039   C_ph->Print("delphes_validation.pdf","pdf");
     1050  C_ph->SaveAs(phRes+".eps");
     1051
     1052  C_ph1->Print("validation.pdf","pdf");
     1053  C_ph->Print("validation.pdf","pdf");
    10401054
    10411055  gDirectory->cd(0);
     
    11681182  DrawAxis(mg_jetFwd, leg_jetFwd, 0.25);
    11691183
     1184  C_btag1->SaveAs(btagEff+".eps");
     1185  C_jet->SaveAs(jetRes+".eps");
     1186
    11701187  TString metRes = "MetRes";
    11711188  TCanvas *C_met = new TCanvas(metRes,metRes, 800, 600);
     
    11871204  mg_met->GetYaxis()->SetTitle("#sigma(ME_{x}) [GeV]");
    11881205
    1189   C_jet->Print("delphes_validation.pdf","pdf");
    1190   C_btag1->Print("delphes_validation.pdf","pdf");
    1191   C_tautag1->Print("delphes_validation.pdf","pdf");
    1192   C_met->Print("delphes_validation.pdf)","pdf");
     1206  C_met->SaveAs(metRes+".eps");
     1207
     1208  C_jet->Print("validation.pdf","pdf");
     1209  C_btag1->Print("validation.pdf","pdf");
     1210  C_tautag1->Print("validation.pdf","pdf");
     1211  C_met->Print("validation.pdf)","pdf");
    11931212
    11941213  TFile *fout = new TFile(outputFile,"recreate");
Note: See TracChangeset for help on using the changeset viewer.