CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
METTester.h
Go to the documentation of this file.
1 #ifndef METTESTER_H
2 #define METTESTER_H
3 
4 // author: Mike Schmitt (The University of Florida)
5 // date: 8/24/2006
6 // modification: Bobby Scurlock
7 // date: 03.11.2006
8 // note: added RMS(METx) vs SumET capability
9 // modification: Rick Cavanaugh
10 // date: 05.11.2006
11 // note: added configuration parameters
12 // modification: Mike Schmitt
13 // date: 02.28.2007
14 // note: code rewrite
15 
16 // Rewritten by Viola Sordini, Matthias Artur Weber, Robert Schoefbeck Nov./Dez. 2013
17 
18 
48 #include "TMath.h"
49 
50 
51 //class METTester: public edm::EDAnalyzer {
52 class METTester: public DQMEDAnalyzer {
53 public:
54 
55  explicit METTester(const edm::ParameterSet&);
56 
57  virtual void analyze(const edm::Event&, const edm::EventSetup&);
58  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
59  void FillMETRes();
60 
61 
62  private:
63 
64  std::map<std::string, MonitorElement*> me;
65 
66  // Inputs from Configuration File
67 
73 
79 
80  //Tokens
88  //for tcmet
95 
96  bool isGoodTrack( const reco::TrackRef, float d0corr );
97 
98  int minhits_;
99  double maxd0_;
100  double maxchi2_;
101  double maxeta_;
102  double maxpt_;
103  double maxPtErr_;
104  std::vector<int> trkQuality_;
105  std::vector<int> trkAlgos_;
106 
107  // Events variables
109 
110  // Common variables
123  //CaloMET variables
124 
140 
141  //GenMET variables
148 
149  //MET variables
150 
151  //PFMET variables
166 
178 
179 
180  //TCMET specific variables
195 
213 
214  bool isCaloMET;
215 // bool isCorMET;
216 // bool isTcMET;
217  bool isPFMET;
218  bool isGenMET;
219 
220 };
221 
222 #endif // METTESTER_H
223 
224 
MonitorElement * mChargedEMEtFraction
Definition: METTester.h:144
MonitorElement * mMETDifference_GenMETTrue_METResolution
Definition: METTester.h:177
edm::InputTag inputCaloMETLabel_
Definition: METTester.h:74
MonitorElement * mMExCorrection
Definition: METTester.h:181
double maxchi2_
Definition: METTester.h:100
edm::InputTag inputTrackLabel_
Definition: METTester.h:75
edm::InputTag mInputCollection_
Definition: METTester.h:68
MonitorElement * mmuSAhits
Definition: METTester.h:203
MonitorElement * mMuonEtFraction
Definition: METTester.h:146
MonitorElement * mMETPhi
Definition: METTester.h:117
MonitorElement * mMET
Definition: METTester.h:114
MonitorElement * mMETDifference_GenMETTrue
Definition: METTester.h:119
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition: METTester.cc:220
MonitorElement * mtrkPtErr
Definition: METTester.h:191
MonitorElement * mMETDifference_GenMETTrue_MET400to500
Definition: METTester.h:176
MonitorElement * mdMETx
Definition: METTester.h:208
void FillMETRes()
Definition: METTester.cc:383
MonitorElement * mPFelectronEtFraction
Definition: METTester.h:156
MonitorElement * mMETSig
Definition: METTester.h:113
MonitorElement * mmuD0
Definition: METTester.h:200
MonitorElement * mtrkNhits
Definition: METTester.h:186
MonitorElement * mCaloMaxEtInEmTowers
Definition: METTester.h:125
MonitorElement * mMEy
Definition: METTester.h:112
MonitorElement * mCaloSETInpHF
Definition: METTester.h:136
MonitorElement * mCaloHadEtInHF
Definition: METTester.h:132
edm::EDGetTokenT< edm::View< reco::GsfElectron > > electronToken_
Definition: METTester.h:91
MonitorElement * mCaloHadEtInEE
Definition: METTester.h:134
MonitorElement * mdMUx
Definition: METTester.h:211
MonitorElement * mPFphotonEtFraction
Definition: METTester.h:152
MonitorElement * mnEls
Definition: METTester.h:205
MonitorElement * mPFHFEMEt
Definition: METTester.h:165
MonitorElement * mMETDifference_GenMETTrue_MET40to60
Definition: METTester.h:169
bool isPFMET
Definition: METTester.h:217
MonitorElement * mmuEta
Definition: METTester.h:197
MonitorElement * mCaloEmEtFraction
Definition: METTester.h:128
MonitorElement * mCaloEmEtInEE
Definition: METTester.h:138
std::string METType_
Definition: METTester.h:72
MonitorElement * mCaloSETInmHF
Definition: METTester.h:137
std::vector< int > trkQuality_
Definition: METTester.h:104
MonitorElement * mNeutralEMEtFraction
Definition: METTester.h:142
edm::InputTag inputElectronLabel_
Definition: METTester.h:77
MonitorElement * mMETDifference_GenMETTrue_MET20to40
Definition: METTester.h:168
MonitorElement * mMETDifference_GenMETTrue_MET60to80
Definition: METTester.h:170
MonitorElement * mCaloMaxEtInHadTowers
Definition: METTester.h:126
MonitorElement * mfracTrks
Definition: METTester.h:206
std::vector< int > trkAlgos_
Definition: METTester.h:105
std::string sample_
Definition: METTester.h:70
MonitorElement * mInvisibleEtFraction
Definition: METTester.h:147
MonitorElement * mCaloEtFractionHadronic
Definition: METTester.h:127
MonitorElement * mtrkChi2
Definition: METTester.h:187
MonitorElement * mPFmuonEt
Definition: METTester.h:161
MonitorElement * mPFelectronEt
Definition: METTester.h:157
MonitorElement * mnMusPis
Definition: METTester.h:202
MonitorElement * mtrkEta
Definition: METTester.h:185
MonitorElement * mPFphotonEt
Definition: METTester.h:153
MonitorElement * mCaloEmEtInEB
Definition: METTester.h:139
MonitorElement * mCaloHadEtInHE
Definition: METTester.h:131
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: METTester.cc:140
edm::EDGetTokenT< reco::PFMETCollection > pfMETsToken_
Definition: METTester.h:83
edm::EDGetTokenT< reco::CaloMETCollection > caloMETsToken_
Definition: METTester.h:82
MonitorElement * mPFneutralHadronEtFraction
Definition: METTester.h:154
MonitorElement * mtrkQuality
Definition: METTester.h:189
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
Definition: METTester.h:92
MonitorElement * mdMETy
Definition: METTester.h:209
edm::EDGetTokenT< reco::TrackCollection > trackToken_
Definition: METTester.h:90
MonitorElement * mPFHFHadronEt
Definition: METTester.h:163
bool isGenMET
Definition: METTester.h:218
edm::InputTag inputBeamSpotLabel_
Definition: METTester.h:78
MonitorElement * mdMEy
Definition: METTester.h:210
edm::EDGetTokenT< std::vector< reco::Vertex > > pvToken_
Definition: METTester.h:81
edm::EDGetTokenT< reco::GenMETCollection > genMETsToken_
Definition: METTester.h:85
std::string mOutputFile
Definition: METTester.h:69
double maxPtErr_
Definition: METTester.h:103
MonitorElement * mMETDifference_GenMETTrue_MET150to200
Definition: METTester.h:173
MonitorElement * mtrkPt
Definition: METTester.h:184
MonitorElement * mCaloHadEtInEB
Definition: METTester.h:133
bool isCaloMET
Definition: METTester.h:214
MonitorElement * mMETDeltaPhi_GenMETCalo
Definition: METTester.h:122
MonitorElement * mnMus
Definition: METTester.h:201
MonitorElement * mMETDifference_GenMETTrue_MET100to150
Definition: METTester.h:172
MonitorElement * mCaloHadEtInHB
Definition: METTester.h:129
edm::InputTag inputMuonLabel_
Definition: METTester.h:76
MonitorElement * mMETDifference_GenMETTrue_MET300to400
Definition: METTester.h:175
MonitorElement * mMETDifference_GenMETCalo
Definition: METTester.h:121
MonitorElement * mCaloHadEtInHO
Definition: METTester.h:130
MonitorElement * mmuPt
Definition: METTester.h:196
double maxpt_
Definition: METTester.h:102
edm::EDGetTokenT< reco::METCollection > tcMETsToken_
Definition: METTester.h:84
edm::EDGetTokenT< reco::MuonCollection > muonToken_
Definition: METTester.h:89
MonitorElement * mPFchargedHadronEt
Definition: METTester.h:159
MonitorElement * mMEx
Definition: METTester.h:111
MonitorElement * melePt
Definition: METTester.h:192
MonitorElement * mChargedHadEtFraction
Definition: METTester.h:145
MonitorElement * mMETDeltaPhi_GenMETTrue
Definition: METTester.h:120
MonitorElement * mPFneutralHadronEt
Definition: METTester.h:155
MonitorElement * mmuNhits
Definition: METTester.h:198
edm::EDGetTokenT< reco::GenMETCollection > genMETsCaloToken_
Definition: METTester.h:87
edm::EDGetTokenT< edm::ValueMap< reco::MuonMETCorrectionData > > tcMet_ValueMap_Token_
Definition: METTester.h:93
edm::EDGetTokenT< reco::GenMETCollection > genMETsTrueToken_
Definition: METTester.h:86
std::map< std::string, MonitorElement * > me
Definition: METTester.h:64
MonitorElement * mPFmuonEtFraction
Definition: METTester.h:160
MonitorElement * mMETFine
Definition: METTester.h:115
MonitorElement * mmuChi2
Definition: METTester.h:199
MonitorElement * mNeutralHadEtFraction
Definition: METTester.h:143
MonitorElement * mPFHFEMEtFraction
Definition: METTester.h:164
int minhits_
Definition: METTester.h:98
MonitorElement * mtrkD0
Definition: METTester.h:188
MonitorElement * mMuonCorrectionFlag
Definition: METTester.h:183
METTester(const edm::ParameterSet &)
Definition: METTester.cc:32
edm::EDGetTokenT< edm::ValueMap< reco::MuonMETCorrectionData > > met_ValueMap_Token_
Definition: METTester.h:94
MonitorElement * mtrkAlgo
Definition: METTester.h:190
MonitorElement * mNvertex
Definition: METTester.h:108
bool isGoodTrack(const reco::TrackRef, float d0corr)
Definition: METTester.cc:411
MonitorElement * mMET_Nvtx
Definition: METTester.h:116
double maxeta_
Definition: METTester.h:101
MonitorElement * mPFchargedHadronEtFraction
Definition: METTester.h:158
MonitorElement * mdMET
Definition: METTester.h:207
MonitorElement * mMEyCorrection
Definition: METTester.h:182
MonitorElement * mMETDifference_GenMETTrue_MET0to20
Definition: METTester.h:167
MonitorElement * mSumET
Definition: METTester.h:118
edm::InputTag inputMETLabel_
Definition: METTester.h:71
double maxd0_
Definition: METTester.h:99
MonitorElement * meleHoE
Definition: METTester.h:194
MonitorElement * mdMUy
Definition: METTester.h:212
MonitorElement * mMETDifference_GenMETTrue_MET200to300
Definition: METTester.h:174
MonitorElement * meleEta
Definition: METTester.h:193
MonitorElement * mMETDifference_GenMETTrue_MET80to100
Definition: METTester.h:171
Definition: Run.h:41
MonitorElement * mCaloEmEtInHF
Definition: METTester.h:135
MonitorElement * mmuTesthits
Definition: METTester.h:204
MonitorElement * mPFHFHadronEtFraction
Definition: METTester.h:162