CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/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   // Addition to have recomputed METs : by S. Dutta 
00056   reco::MET getMET1(){return MET1_;}
00057   reco::MET getMET2(){return MET2_;}
00058   //-----------------------------------------------
00059 
00060  private:
00061  
00063   reco::MET computeGenMET( const reco::GenParticleCollection* ) const;
00064   reco::MET recomputePFMET( const reco::PFCandidateCollection&) const;
00065   reco::MET propagateJEC(const reco::MET&, const std::vector<reco::CaloJet> caloJets,
00066                          const std::vector<reco::CaloJet> corr_caloJets) const;
00067 
00069   reco::MET MET1_;
00070   reco::MET MET2_;
00072   std::map<std::string,GenericBenchmark> GenBenchmarkMap_;
00073   std::string outmetfilename_;
00074   TFile* outfile_;
00075   std::vector<unsigned int> vIgnoreParticlesIDs_;
00076   std::vector<unsigned int> trueMetSpecificIdCut_;
00077   std::vector<double> trueMetSpecificEtaCut_;
00078 
00079 };
00080 
00081 #endif