CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/RecoParticleFlow/PFRootEvent/interface/METManager.h

Go to the documentation of this file.
00001 #ifndef __RecoParticleFlow_PFRootEvent_METManager__
00002 #define __RecoParticleFlow_PFRootEvent_METManager__
00003 
00004 #include "RecoParticleFlow/Benchmark/interface/GenericBenchmark.h"
00005 
00006 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h"
00007 #include "DataFormats/HepMCCandidate/interface/GenParticleFwd.h"
00008 
00009 #include "DataFormats/METReco/interface/MET.h"
00010 #include "DataFormats/METReco/interface/METCollection.h"
00011 #include "DataFormats/METReco/interface/PFMETCollection.h"
00012 #include "DataFormats/METReco/interface/GenMETCollection.h"
00013 #include "DataFormats/JetReco/interface/CaloJetCollection.h"
00014 
00015 class METManager {
00016 
00017  public:
00018 
00019   METManager(std::string outmetfilename);
00020   
00022   void addGenBenchmark(std::string GenBenchmarkName);
00023 
00026   void FillHisto(std::string);
00027 
00029   void write();
00030 
00031   void setMET1(const reco::MET*);
00032   void setMET2(const reco::MET*);
00033 
00035   void setMET1(const reco::GenParticleCollection*);
00036   void setMET2(const reco::GenParticleCollection*);
00037 
00039   void setMET1(const reco::PFCandidateCollection&);
00040   void setMET2(const reco::PFCandidateCollection&);
00041 
00043   void coutTailEvents(const int entry, const double DeltaMETcut,
00044                       const double DeltaPhicut, const double MET1cut) const;
00045 
00047   void propagateJECtoMET1(const std::vector<reco::CaloJet> caloJets,
00048                     const std::vector<reco::CaloJet> corr_caloJets);
00049   void propagateJECtoMET2(const std::vector<reco::CaloJet> caloJets,
00050                     const std::vector<reco::CaloJet> corr_caloJets);
00051 
00052   void SetIgnoreParticlesIDs(const std::vector<unsigned int>*);
00053   void SetSpecificIdCut(const std::vector<unsigned int>*, const std::vector<double>*);
00054 
00055  private:
00056  
00058   reco::MET computeGenMET( const reco::GenParticleCollection* ) const;
00059   reco::MET recomputePFMET( const reco::PFCandidateCollection&) const;
00060   reco::MET propagateJEC(const reco::MET&, const std::vector<reco::CaloJet> caloJets,
00061                          const std::vector<reco::CaloJet> corr_caloJets) const;
00062 
00064   reco::MET MET1_;
00065   reco::MET MET2_;
00067   std::map<std::string,GenericBenchmark> GenBenchmarkMap_;
00068   std::string outmetfilename_;
00069   TFile* outfile_;
00070   std::vector<unsigned int> vIgnoreParticlesIDs_;
00071   std::vector<unsigned int> trueMetSpecificIdCut_;
00072   std::vector<double> trueMetSpecificEtaCut_;
00073 
00074 };
00075 
00076 #endif