CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
METManager.h
Go to the documentation of this file.
1 #ifndef __RecoParticleFlow_PFRootEvent_METManager__
2 #define __RecoParticleFlow_PFRootEvent_METManager__
3 
5 
8 
14 
15 class METManager {
16 
17  public:
18 
19  METManager(std::string outmetfilename);
20 
22  void addGenBenchmark(std::string GenBenchmarkName);
23 
26  void FillHisto(std::string);
27 
29  void write();
30 
31  void setMET1(const reco::MET*);
32  void setMET2(const reco::MET*);
33 
37 
41 
43  void coutTailEvents(const int entry, const double DeltaMETcut,
44  const double DeltaPhicut, const double MET1cut) const;
45 
47  void propagateJECtoMET1(const std::vector<reco::CaloJet> caloJets,
48  const std::vector<reco::CaloJet> corr_caloJets);
49  void propagateJECtoMET2(const std::vector<reco::CaloJet> caloJets,
50  const std::vector<reco::CaloJet> corr_caloJets);
51 
52  void SetIgnoreParticlesIDs(const std::vector<unsigned int>*);
53  void SetSpecificIdCut(const std::vector<unsigned int>*, const std::vector<double>*);
54 
55  // Addition to have recomputed METs : by S. Dutta
56  reco::MET getMET1(){return MET1_;}
57  reco::MET getMET2(){return MET2_;}
58  //-----------------------------------------------
59 
60  private:
61 
65  reco::MET propagateJEC(const reco::MET&, const std::vector<reco::CaloJet> caloJets,
66  const std::vector<reco::CaloJet> corr_caloJets) const;
67 
72  std::map<std::string,GenericBenchmark> GenBenchmarkMap_;
73  std::string outmetfilename_;
74  TFile* outfile_;
75  std::vector<unsigned int> vIgnoreParticlesIDs_;
76  std::vector<unsigned int> trueMetSpecificIdCut_;
77  std::vector<double> trueMetSpecificEtaCut_;
78 
79 };
80 
81 #endif
void propagateJECtoMET1(const std::vector< reco::CaloJet > caloJets, const std::vector< reco::CaloJet > corr_caloJets)
propagate the Jet Energy Corrections to the MET
Definition: METManager.cc:262
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
void addGenBenchmark(std::string GenBenchmarkName)
setup a genericBenchmark
Definition: METManager.cc:145
METManager(std::string outmetfilename)
Definition: METManager.cc:12
void write()
Write the output root file of the genericBenchmark.
Definition: METManager.cc:48
TFile * outfile_
Definition: METManager.h:74
reco::MET MET2_
Definition: METManager.h:70
reco::MET recomputePFMET(const reco::PFCandidateCollection &) const
Definition: METManager.cc:181
void coutTailEvents(const int entry, const double DeltaMETcut, const double DeltaPhicut, const double MET1cut) const
cout events in tail of Delta(MET1,MET2)
Definition: METManager.cc:240
reco::MET computeGenMET(const reco::GenParticleCollection *) const
private functions
Definition: METManager.cc:98
void FillHisto(std::string)
Definition: METManager.cc:23
Definition: MET.h:32
std::pair< std::string, MonitorElement * > entry
Definition: ME_MAP.h:8
void setMET2(const reco::MET *)
Definition: METManager.cc:62
std::string outmetfilename_
Definition: METManager.h:73
void propagateJECtoMET2(const std::vector< reco::CaloJet > caloJets, const std::vector< reco::CaloJet > corr_caloJets)
Definition: METManager.cc:268
void setMET1(const reco::MET *)
Definition: METManager.cc:57
reco::MET MET1_
data members
Definition: METManager.h:69
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
std::vector< unsigned int > vIgnoreParticlesIDs_
Definition: METManager.h:75
std::map< std::string, GenericBenchmark > GenBenchmarkMap_
map of GenericBenchmarks, the key is his name
Definition: METManager.h:72
reco::MET getMET2()
Definition: METManager.h:57
std::vector< double > trueMetSpecificEtaCut_
Definition: METManager.h:77
std::vector< unsigned int > trueMetSpecificIdCut_
Definition: METManager.h:76
reco::MET getMET1()
Definition: METManager.h:56
void SetIgnoreParticlesIDs(const std::vector< unsigned int > *)
Definition: METManager.cc:87
reco::MET propagateJEC(const reco::MET &, const std::vector< reco::CaloJet > caloJets, const std::vector< reco::CaloJet > corr_caloJets) const
Definition: METManager.cc:274
void SetSpecificIdCut(const std::vector< unsigned int > *, const std::vector< double > *)
Definition: METManager.cc:92