Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:13:09

0001 #ifndef RecoParticleFlow_Benchmark_MatchCandidateBenchmark_h
0002 #define RecoParticleFlow_Benchmark_MatchCandidateBenchmark_h
0003 
0004 #include "DQMOffline/PFTau/interface/Benchmark.h"
0005 
0006 #include "DataFormats/Candidate/interface/Candidate.h"
0007 #include "DataFormats/Candidate/interface/CandidateFwd.h"
0008 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0009 
0010 #include <vector>
0011 
0012 /// To plot Candidate quantities
0013 class MatchCandidateBenchmark : public Benchmark {
0014 public:
0015   MatchCandidateBenchmark(Mode mode);
0016 
0017   ~MatchCandidateBenchmark() override;
0018 
0019   /// book histograms
0020   void setup(DQMStore::IBooker &b);
0021   void setup(DQMStore::IBooker &b, const edm::ParameterSet &parameterSet);
0022 
0023   /// fill histograms with a given particle
0024   void fillOne(const reco::Candidate &candidate, const reco::Candidate &matchedCandidate);
0025 
0026   void fillOne(const reco::Candidate &candidate,
0027                const reco::Candidate &matchedCandidate,
0028                const edm::ParameterSet &parameterSet);
0029 
0030 protected:
0031   TH2F *delta_et_Over_et_VS_et_;
0032   TH2F *delta_et_VS_et_;
0033   TH2F *delta_eta_VS_et_;
0034   TH2F *delta_phi_VS_et_;
0035 
0036   TH2F *BRdelta_et_Over_et_VS_et_;
0037   TH2F *ERdelta_et_Over_et_VS_et_;
0038   std::vector<TH1F *> pTRes_;
0039   std::vector<TH1F *> BRpTRes_;
0040   std::vector<TH1F *> ERpTRes_;
0041   std::vector<float> ptBins_;
0042 
0043   bool histogramBooked_;
0044   double eta_min_barrel_;
0045   double eta_max_barrel_;
0046   double eta_min_endcap_;
0047   double eta_max_endcap_;
0048 
0049 private:
0050   void computePtBins(const edm::ParameterSet &, const edm::ParameterSet &);
0051   bool inEtaRange(double, bool);
0052   inline bool inBarrelRange(double value) { return inEtaRange(value, true); }
0053   inline bool inEndcapRange(double value) { return inEtaRange(value, false); }
0054 };
0055 
0056 #endif