Fork me on GitHub

Changeset 5076b1b in git for examples


Ignore:
Timestamp:
Aug 26, 2016, 12:02:18 PM (8 years ago)
Author:
GitHub <noreply@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
360d17e
Parents:
298734e (diff), 7b61e66 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Pavel Demin <pavel-demin@…> (08/26/16 12:02:18)
git-committer:
GitHub <noreply@…> (08/26/16 12:02:18)
Message:

Merge pull request #29 from AlexandreMertens/ValidationWorkWithPavel

Validation work with pavel

Location:
examples
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • examples/Validation.cpp

    r298734e r5076b1b  
    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);
    190194
    191195  BinLogX(histGenPtcen);
     
    324328      if(deltaR < 0.3)
    325329      {
    326         pt  = bestGenMomentum.Pt();
     330        pt  = bestGenMomentum.E();
    327331        eta = TMath::Abs(bestGenMomentum.Eta());
    328332
    329333        for (bin = 0; bin < Nbins; bin++)
    330334        {
    331           if(pt > histos->at(bin).ptmin && pt < histos->at(bin).ptmax && eta > 0.0 && eta < 2.5)
     335          if(pt > histos->at(bin).ptmin && pt < histos->at(bin).ptmax && eta < 2.5)
    332336          {
    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());}
     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());}
    335339          }
    336340        }
     
    731735  std::pair<TH1D*,TH1D*> histos_el = GetEff<Electron>(branchElectron, branchParticleElectron, "Electron", elID, treeReaderElectron);
    732736
     737  histos_el.second->SaveAs("test1.pdf");
     738
    733739  // tracking reconstruction efficiency
    734740  std::pair <TH1D*,TH1D*> histos_eltrack = GetEff<Track>(branchTrackElectron, branchParticleElectron, "electronTrack", elID, treeReaderElectron);
     
    795801  DrawAxis(histos_eltrack.second, leg_el2, 0);
    796802  leg_el2->Draw();
    797 
    798   C_el1->cd(0);
    799803
    800804  TString elRes = "electronERes";
     
    12761280  char *appName = "Validation";
    12771281
    1278   if(argc != 3)
     1282  if(argc != 8)
    12791283  {
    12801284    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.