Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/Validation.cpp

    r2075bc1 r1408174  
    188188  TH1D *histRecoPtfwd = new TH1D(name+" reco spectra Eta",name+" reco spectra fwd", Nbins, TMath::Log10(ptrangemin), TMath::Log10(ptrangemax));
    189189
    190   histGenPtcen->SetDirectory(0);
    191   histRecoPtcen->SetDirectory(0);
    192   histGenPtfwd->SetDirectory(0);
    193   histRecoPtfwd->SetDirectory(0);
    194190
    195191  BinLogX(histGenPtcen);
     
    328324      if(deltaR < 0.3)
    329325      {
    330         pt  = bestGenMomentum.E();
     326        pt  = bestGenMomentum.Pt();
    331327        eta = TMath::Abs(bestGenMomentum.Eta());
    332328
    333329        for (bin = 0; bin < Nbins; bin++)
    334330        {
    335           if(pt > histos->at(bin).ptmin && pt < histos->at(bin).ptmax && eta < 2.5)
     331          if(pt > histos->at(bin).ptmin && pt < histos->at(bin).ptmax && eta > 0.0 && eta < 2.5)
    336332          {
    337             if (eta < 1.5) {histos->at(bin).cenResolHist->Fill(recoMomentum.E()/bestGenMomentum.E());}
    338             else if (eta < 2.5) {histos->at(bin).fwdResolHist->Fill(recoMomentum.E()/bestGenMomentum.E());}
     333            if (eta < 1.5) {histos->at(bin).cenResolHist->Fill(recoMomentum.Pt()/bestGenMomentum.Pt());}
     334            else if (eta < 2.5) {histos->at(bin).fwdResolHist->Fill(recoMomentum.Pt()/bestGenMomentum.Pt());}
    339335          }
    340336        }
     
    735731  std::pair<TH1D*,TH1D*> histos_el = GetEff<Electron>(branchElectron, branchParticleElectron, "Electron", elID, treeReaderElectron);
    736732
    737   histos_el.second->SaveAs("test1.pdf");
    738 
    739733  // tracking reconstruction efficiency
    740734  std::pair <TH1D*,TH1D*> histos_eltrack = GetEff<Track>(branchTrackElectron, branchParticleElectron, "electronTrack", elID, treeReaderElectron);
     
    801795  DrawAxis(histos_eltrack.second, leg_el2, 0);
    802796  leg_el2->Draw();
     797
     798  C_el1->cd(0);
    803799
    804800  TString elRes = "electronERes";
     
    12801276  char *appName = "Validation";
    12811277
    1282   if(argc != 8)
     1278  if(argc != 3)
    12831279  {
    12841280    cout << " Usage: " << appName << " input_file_electron input_file_muon input_file_photon input_file_jet input_file_bjet input_file_taujet output_file" << endl;
Note: See TracChangeset for help on using the changeset viewer.