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 
47 #include "TMath.h"
48 
49 
50 class METTester: public edm::EDAnalyzer {
51 public:
52 
53  explicit METTester(const edm::ParameterSet&);
54 
55  virtual void analyze(const edm::Event&, const edm::EventSetup&);
56  //virtual void beginJob() ;
57  virtual void beginRun(const edm::Run&, const edm::EventSetup&) ;
58  //virtual void beginJob() ;
59  virtual void endJob() ;
60 // virtual void endRun(const edm::Run&, const edm::EventSetup&);
61  void FillMETRes();
62 
63 
64  private:
65 
66  std::map<std::string, MonitorElement*> me;
67 
68  // Inputs from Configuration File
69 
75 
81 
82  //Tokens
90  //for tcmet
97 
98  bool isGoodTrack( const reco::TrackRef, float d0corr );
99 
100  int minhits_;
101  double maxd0_;
102  double maxchi2_;
103  double maxeta_;
104  double maxpt_;
105  double maxPtErr_;
106  std::vector<int> trkQuality_;
107  std::vector<int> trkAlgos_;
108 
109  // Events variables
111 
112  // Common variables
125  //CaloMET variables
126 
142 
143  //GenMET variables
150 
151  //MET variables
152 
153  //PFMET variables
168 
180 
181 
182  //TCMET specific variables
197 
215 
216  bool isCaloMET;
217 // bool isCorMET;
218  bool isTcMET;
219  bool isPFMET;
220  bool isGenMET;
221 
222 };
223 
224 #endif // METTESTER_H
225 
226 
MonitorElement * mChargedEMEtFraction
Definition: METTester.h:146
MonitorElement * mMETDifference_GenMETTrue_METResolution
Definition: METTester.h:179
edm::InputTag inputCaloMETLabel_
Definition: METTester.h:76
MonitorElement * mMExCorrection
Definition: METTester.h:183
double maxchi2_
Definition: METTester.h:102
edm::InputTag inputTrackLabel_
Definition: METTester.h:77
edm::InputTag mInputCollection_
Definition: METTester.h:70
MonitorElement * mmuSAhits
Definition: METTester.h:205
MonitorElement * mMuonEtFraction
Definition: METTester.h:148
MonitorElement * mMETPhi
Definition: METTester.h:119
MonitorElement * mMET
Definition: METTester.h:116
MonitorElement * mMETDifference_GenMETTrue
Definition: METTester.h:121
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition: METTester.cc:322
MonitorElement * mtrkPtErr
Definition: METTester.h:193
MonitorElement * mMETDifference_GenMETTrue_MET400to500
Definition: METTester.h:178
MonitorElement * mdMETx
Definition: METTester.h:210
void FillMETRes()
Definition: METTester.cc:762
MonitorElement * mPFelectronEtFraction
Definition: METTester.h:158
MonitorElement * mMETSig
Definition: METTester.h:115
MonitorElement * mmuD0
Definition: METTester.h:202
MonitorElement * mtrkNhits
Definition: METTester.h:188
MonitorElement * mCaloMaxEtInEmTowers
Definition: METTester.h:127
MonitorElement * mMEy
Definition: METTester.h:114
MonitorElement * mCaloSETInpHF
Definition: METTester.h:138
MonitorElement * mCaloHadEtInHF
Definition: METTester.h:134
edm::EDGetTokenT< edm::View< reco::GsfElectron > > electronToken_
Definition: METTester.h:93
MonitorElement * mCaloHadEtInEE
Definition: METTester.h:136
MonitorElement * mdMUx
Definition: METTester.h:213
virtual void beginRun(const edm::Run &, const edm::EventSetup &)
Definition: METTester.cc:317
MonitorElement * mPFphotonEtFraction
Definition: METTester.h:154
MonitorElement * mnEls
Definition: METTester.h:207
MonitorElement * mPFHFEMEt
Definition: METTester.h:167
MonitorElement * mMETDifference_GenMETTrue_MET40to60
Definition: METTester.h:171
bool isPFMET
Definition: METTester.h:219
MonitorElement * mmuEta
Definition: METTester.h:199
MonitorElement * mCaloEmEtFraction
Definition: METTester.h:130
MonitorElement * mCaloEmEtInEE
Definition: METTester.h:140
std::string METType_
Definition: METTester.h:74
MonitorElement * mCaloSETInmHF
Definition: METTester.h:139
std::vector< int > trkQuality_
Definition: METTester.h:106
MonitorElement * mNeutralEMEtFraction
Definition: METTester.h:144
edm::InputTag inputElectronLabel_
Definition: METTester.h:79
MonitorElement * mMETDifference_GenMETTrue_MET20to40
Definition: METTester.h:170
MonitorElement * mMETDifference_GenMETTrue_MET60to80
Definition: METTester.h:172
MonitorElement * mCaloMaxEtInHadTowers
Definition: METTester.h:128
MonitorElement * mfracTrks
Definition: METTester.h:208
std::vector< int > trkAlgos_
Definition: METTester.h:107
std::string sample_
Definition: METTester.h:72
MonitorElement * mInvisibleEtFraction
Definition: METTester.h:149
MonitorElement * mCaloEtFractionHadronic
Definition: METTester.h:129
MonitorElement * mtrkChi2
Definition: METTester.h:189
bool isTcMET
Definition: METTester.h:218
MonitorElement * mPFmuonEt
Definition: METTester.h:163
MonitorElement * mPFelectronEt
Definition: METTester.h:159
MonitorElement * mnMusPis
Definition: METTester.h:204
MonitorElement * mtrkEta
Definition: METTester.h:187
MonitorElement * mPFphotonEt
Definition: METTester.h:155
MonitorElement * mCaloEmEtInEB
Definition: METTester.h:141
MonitorElement * mCaloHadEtInHE
Definition: METTester.h:133
edm::EDGetTokenT< reco::PFMETCollection > pfMETsToken_
Definition: METTester.h:85
edm::EDGetTokenT< reco::CaloMETCollection > caloMETsToken_
Definition: METTester.h:84
MonitorElement * mPFneutralHadronEtFraction
Definition: METTester.h:156
MonitorElement * mtrkQuality
Definition: METTester.h:191
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
Definition: METTester.h:94
MonitorElement * mdMETy
Definition: METTester.h:211
edm::EDGetTokenT< reco::TrackCollection > trackToken_
Definition: METTester.h:92
MonitorElement * mPFHFHadronEt
Definition: METTester.h:165
bool isGenMET
Definition: METTester.h:220
edm::InputTag inputBeamSpotLabel_
Definition: METTester.h:80
MonitorElement * mdMEy
Definition: METTester.h:212
edm::EDGetTokenT< std::vector< reco::Vertex > > pvToken_
Definition: METTester.h:83
edm::EDGetTokenT< reco::GenMETCollection > genMETsToken_
Definition: METTester.h:87
std::string mOutputFile
Definition: METTester.h:71
double maxPtErr_
Definition: METTester.h:105
MonitorElement * mMETDifference_GenMETTrue_MET150to200
Definition: METTester.h:175
MonitorElement * mtrkPt
Definition: METTester.h:186
MonitorElement * mCaloHadEtInEB
Definition: METTester.h:135
bool isCaloMET
Definition: METTester.h:216
MonitorElement * mMETDeltaPhi_GenMETCalo
Definition: METTester.h:124
MonitorElement * mnMus
Definition: METTester.h:203
MonitorElement * mMETDifference_GenMETTrue_MET100to150
Definition: METTester.h:174
MonitorElement * mCaloHadEtInHB
Definition: METTester.h:131
edm::InputTag inputMuonLabel_
Definition: METTester.h:78
MonitorElement * mMETDifference_GenMETTrue_MET300to400
Definition: METTester.h:177
MonitorElement * mMETDifference_GenMETCalo
Definition: METTester.h:123
MonitorElement * mCaloHadEtInHO
Definition: METTester.h:132
MonitorElement * mmuPt
Definition: METTester.h:198
double maxpt_
Definition: METTester.h:104
edm::EDGetTokenT< reco::METCollection > tcMETsToken_
Definition: METTester.h:86
edm::EDGetTokenT< reco::MuonCollection > muonToken_
Definition: METTester.h:91
MonitorElement * mPFchargedHadronEt
Definition: METTester.h:161
MonitorElement * mMEx
Definition: METTester.h:113
MonitorElement * melePt
Definition: METTester.h:194
MonitorElement * mChargedHadEtFraction
Definition: METTester.h:147
MonitorElement * mMETDeltaPhi_GenMETTrue
Definition: METTester.h:122
MonitorElement * mPFneutralHadronEt
Definition: METTester.h:157
MonitorElement * mmuNhits
Definition: METTester.h:200
edm::EDGetTokenT< reco::GenMETCollection > genMETsCaloToken_
Definition: METTester.h:89
edm::EDGetTokenT< edm::ValueMap< reco::MuonMETCorrectionData > > tcMet_ValueMap_Token_
Definition: METTester.h:95
edm::EDGetTokenT< reco::GenMETCollection > genMETsTrueToken_
Definition: METTester.h:88
std::map< std::string, MonitorElement * > me
Definition: METTester.h:66
MonitorElement * mPFmuonEtFraction
Definition: METTester.h:162
MonitorElement * mMETFine
Definition: METTester.h:117
MonitorElement * mmuChi2
Definition: METTester.h:201
MonitorElement * mNeutralHadEtFraction
Definition: METTester.h:145
MonitorElement * mPFHFEMEtFraction
Definition: METTester.h:166
int minhits_
Definition: METTester.h:100
MonitorElement * mtrkD0
Definition: METTester.h:190
virtual void endJob()
Definition: METTester.cc:752
MonitorElement * mMuonCorrectionFlag
Definition: METTester.h:185
METTester(const edm::ParameterSet &)
Definition: METTester.cc:32
edm::EDGetTokenT< edm::ValueMap< reco::MuonMETCorrectionData > > met_ValueMap_Token_
Definition: METTester.h:96
MonitorElement * mtrkAlgo
Definition: METTester.h:192
MonitorElement * mNvertex
Definition: METTester.h:110
bool isGoodTrack(const reco::TrackRef, float d0corr)
Definition: METTester.cc:788
MonitorElement * mMET_Nvtx
Definition: METTester.h:118
double maxeta_
Definition: METTester.h:103
MonitorElement * mPFchargedHadronEtFraction
Definition: METTester.h:160
MonitorElement * mdMET
Definition: METTester.h:209
MonitorElement * mMEyCorrection
Definition: METTester.h:184
MonitorElement * mMETDifference_GenMETTrue_MET0to20
Definition: METTester.h:169
MonitorElement * mSumET
Definition: METTester.h:120
edm::InputTag inputMETLabel_
Definition: METTester.h:73
double maxd0_
Definition: METTester.h:101
MonitorElement * meleHoE
Definition: METTester.h:196
MonitorElement * mdMUy
Definition: METTester.h:214
MonitorElement * mMETDifference_GenMETTrue_MET200to300
Definition: METTester.h:176
MonitorElement * meleEta
Definition: METTester.h:195
MonitorElement * mMETDifference_GenMETTrue_MET80to100
Definition: METTester.h:173
Definition: Run.h:41
MonitorElement * mCaloEmEtInHF
Definition: METTester.h:137
MonitorElement * mmuTesthits
Definition: METTester.h:206
MonitorElement * mPFHFHadronEtFraction
Definition: METTester.h:164