Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:09:44

0001 #ifndef RecoParticleFlow_Benchmark_METBenchmark_h
0002 #define RecoParticleFlow_Benchmark_METBenchmark_h
0003 
0004 #include "DQMOffline/PFTau/interface/Benchmark.h"
0005 
0006 #include "DataFormats/METReco/interface/METFwd.h"
0007 
0008 #include "DQMServices/Core/interface/DQMStore.h"
0009 
0010 /// To plot MET quantities
0011 class METBenchmark : public Benchmark {
0012 public:
0013   METBenchmark(Mode mode) : Benchmark(mode) {}
0014   ~METBenchmark() override;
0015 
0016   /// book histograms
0017   void setup(DQMStore::IBooker &b);
0018 
0019   /// fill a collection
0020   template <class C>
0021   void fill(const C &candidates);
0022 
0023   /// fill histograms with a given particle
0024   void fillOne(const reco::MET &candidate);
0025 
0026 protected:
0027   TH1F *pt_;
0028   TH1F *pt2_;
0029   TH1F *px_;
0030   TH1F *py_;
0031   TH1F *phi_;
0032   TH1F *sumEt_;
0033   TH1F *sumEt2_;
0034   TH1F *etOverSumEt_;
0035   TH2F *mex_VS_sumEt_;
0036 };
0037 
0038 template <class C>
0039 void METBenchmark::fill(const C &candCollection) {
0040   for (unsigned int i = 0; i < candCollection.size(); ++i) {
0041     const reco::MET &cand = candCollection[i];
0042     fillOne(cand);
0043   }
0044 }
0045 
0046 #endif