CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
METTester Class Reference

#include <METTester.h>

Inheritance diagram for METTester:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void FillMETRes ()
 
 METTester (const edm::ParameterSet &)
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

bool isGoodTrack (const reco::TrackRef, float d0corr)
 

Private Attributes

edm::EDGetTokenT< reco::BeamSpotbeamSpotToken_
 
edm::EDGetTokenT
< reco::CaloMETCollection
caloMETsToken_
 
edm::EDGetTokenT< edm::View
< reco::GsfElectron > > 
electronToken_
 
edm::EDGetTokenT
< reco::GenMETCollection
genMETsCaloToken_
 
edm::EDGetTokenT
< reco::GenMETCollection
genMETsToken_
 
edm::EDGetTokenT
< reco::GenMETCollection
genMETsTrueToken_
 
edm::InputTag inputBeamSpotLabel_
 
edm::InputTag inputCaloMETLabel_
 
edm::InputTag inputElectronLabel_
 
edm::InputTag inputMETLabel_
 
edm::InputTag inputMuonLabel_
 
edm::InputTag inputTrackLabel_
 
bool isCaloMET
 
bool isGenMET
 
bool isPFMET
 
double maxchi2_
 
double maxd0_
 
double maxeta_
 
double maxpt_
 
double maxPtErr_
 
MonitorElementmCaloEmEtFraction
 
MonitorElementmCaloEmEtInEB
 
MonitorElementmCaloEmEtInEE
 
MonitorElementmCaloEmEtInHF
 
MonitorElementmCaloEtFractionHadronic
 
MonitorElementmCaloHadEtInEB
 
MonitorElementmCaloHadEtInEE
 
MonitorElementmCaloHadEtInHB
 
MonitorElementmCaloHadEtInHE
 
MonitorElementmCaloHadEtInHF
 
MonitorElementmCaloHadEtInHO
 
MonitorElementmCaloMaxEtInEmTowers
 
MonitorElementmCaloMaxEtInHadTowers
 
MonitorElementmCaloSETInmHF
 
MonitorElementmCaloSETInpHF
 
MonitorElementmChargedEMEtFraction
 
MonitorElementmChargedHadEtFraction
 
MonitorElementmdMET
 
MonitorElementmdMETx
 
MonitorElementmdMETy
 
MonitorElementmdMEy
 
MonitorElementmdMUx
 
MonitorElementmdMUy
 
std::map< std::string,
MonitorElement * > 
me
 
MonitorElementmeleEta
 
MonitorElementmeleHoE
 
MonitorElementmelePt
 
edm::EDGetTokenT
< edm::ValueMap
< reco::MuonMETCorrectionData > > 
met_ValueMap_Token_
 
std::string METType_
 
MonitorElementmfracTrks
 
int minhits_
 
edm::InputTag mInputCollection_
 
MonitorElementmInvisibleEtFraction
 
MonitorElementmMET
 
MonitorElementmMET_Nvtx
 
MonitorElementmMETDeltaPhi_GenMETCalo
 
MonitorElementmMETDeltaPhi_GenMETTrue
 
MonitorElementmMETDifference_GenMETCalo
 
MonitorElementmMETDifference_GenMETTrue
 
MonitorElementmMETDifference_GenMETTrue_MET0to20
 
MonitorElementmMETDifference_GenMETTrue_MET100to150
 
MonitorElementmMETDifference_GenMETTrue_MET150to200
 
MonitorElementmMETDifference_GenMETTrue_MET200to300
 
MonitorElementmMETDifference_GenMETTrue_MET20to40
 
MonitorElementmMETDifference_GenMETTrue_MET300to400
 
MonitorElementmMETDifference_GenMETTrue_MET400to500
 
MonitorElementmMETDifference_GenMETTrue_MET40to60
 
MonitorElementmMETDifference_GenMETTrue_MET60to80
 
MonitorElementmMETDifference_GenMETTrue_MET80to100
 
MonitorElementmMETDifference_GenMETTrue_METResolution
 
MonitorElementmMETFine
 
MonitorElementmMETPhi
 
MonitorElementmMETSig
 
MonitorElementmMEx
 
MonitorElementmMExCorrection
 
MonitorElementmMEy
 
MonitorElementmMEyCorrection
 
MonitorElementmmuChi2
 
MonitorElementmmuD0
 
MonitorElementmmuEta
 
MonitorElementmmuNhits
 
MonitorElementmMuonCorrectionFlag
 
MonitorElementmMuonEtFraction
 
MonitorElementmmuPt
 
MonitorElementmmuSAhits
 
MonitorElementmmuTesthits
 
MonitorElementmnEls
 
MonitorElementmNeutralEMEtFraction
 
MonitorElementmNeutralHadEtFraction
 
MonitorElementmnMus
 
MonitorElementmnMusPis
 
MonitorElementmNvertex
 
std::string mOutputFile
 
MonitorElementmPFchargedHadronEt
 
MonitorElementmPFchargedHadronEtFraction
 
MonitorElementmPFelectronEt
 
MonitorElementmPFelectronEtFraction
 
MonitorElementmPFHFEMEt
 
MonitorElementmPFHFEMEtFraction
 
MonitorElementmPFHFHadronEt
 
MonitorElementmPFHFHadronEtFraction
 
MonitorElementmPFmuonEt
 
MonitorElementmPFmuonEtFraction
 
MonitorElementmPFneutralHadronEt
 
MonitorElementmPFneutralHadronEtFraction
 
MonitorElementmPFphotonEt
 
MonitorElementmPFphotonEtFraction
 
MonitorElementmSumET
 
MonitorElementmtrkAlgo
 
MonitorElementmtrkChi2
 
MonitorElementmtrkD0
 
MonitorElementmtrkEta
 
MonitorElementmtrkNhits
 
MonitorElementmtrkPt
 
MonitorElementmtrkPtErr
 
MonitorElementmtrkQuality
 
edm::EDGetTokenT
< reco::MuonCollection
muonToken_
 
edm::EDGetTokenT
< reco::PFMETCollection
pfMETsToken_
 
edm::EDGetTokenT< std::vector
< reco::Vertex > > 
pvToken_
 
std::string sample_
 
edm::EDGetTokenT
< edm::ValueMap
< reco::MuonMETCorrectionData > > 
tcMet_ValueMap_Token_
 
edm::EDGetTokenT
< reco::METCollection
tcMETsToken_
 
edm::EDGetTokenT
< reco::TrackCollection
trackToken_
 
std::vector< int > trkAlgos_
 
std::vector< int > trkQuality_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 52 of file METTester.h.

Constructor & Destructor Documentation

METTester::METTester ( const edm::ParameterSet iConfig)
explicit

Definition at line 32 of file METTester.cc.

References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

33 {
34 
35  inputMETLabel_ =iConfig.getParameter<edm::InputTag>("InputMETLabel");
36  METType_ =iConfig.getUntrackedParameter<std::string>("METType");
37  mOutputFile =iConfig.getUntrackedParameter<std::string>("OutputFile","");
38 
39  std::string inputMETCollectionLabel(inputMETLabel_.label());
40 
41  isCaloMET = (std::string("calo")==METType_);
42  isPFMET = (std::string("pf") ==METType_);
43  isGenMET = (std::string("gen") ==METType_);
44 
45  pvToken_ = consumes<std::vector<reco::Vertex> >(edm::InputTag("offlinePrimaryVertices"));
46  if (isCaloMET) caloMETsToken_ = consumes<reco::CaloMETCollection> (inputMETLabel_);
47  if (isPFMET) pfMETsToken_ = consumes<reco::PFMETCollection> (inputMETLabel_);
48  if (isGenMET) genMETsToken_ = consumes<reco::GenMETCollection> (inputMETLabel_);
49  genMETsTrueToken_ = consumes<reco::GenMETCollection> (edm::InputTag("genMetTrue"));
50  genMETsCaloToken_ = consumes<reco::GenMETCollection> (edm::InputTag("genMetCalo"));
51  //Events variables
52  mNvertex = 0;
53 
54  //Common variables
55  mMEx = 0;
56  mMEy = 0;
57  mMETSig = 0;
58  mMET = 0;
59  mMETFine = 0;
60  mMET_Nvtx = 0;
61  mMETPhi = 0;
62  mSumET = 0;
67 
68  //CaloMET variables
73  mCaloHadEtInHB = 0;
74  mCaloHadEtInHO = 0;
75  mCaloHadEtInHE = 0;
76  mCaloHadEtInHF = 0;
77  mCaloEmEtInHF = 0;
78  mCaloSETInpHF = 0;
79  mCaloSETInmHF = 0;
80  mCaloEmEtInEE = 0;
81  mCaloEmEtInEB = 0;
82 
83 
84  //GenMET variables
89  mMuonEtFraction=0;
91 
92  //MET variables
93 
94  //PFMET variables
106 
107  //TCMET specific variables
108  mMExCorrection=0;
109  mMEyCorrection=0;
111  mtrkPt=0;
112  mtrkEta=0;
113  mtrkNhits=0;
114  mtrkChi2=0;
115  mtrkD0=0;
116  mtrkQuality=0;
117  mtrkAlgo=0;
118  mtrkPtErr=0;
119  melePt=0;
120  meleEta=0;
121  meleHoE=0;
122 
123  mmuPt=0;
124  mmuEta=0;
125  mmuNhits=0;
126  mmuChi2=0;
127  mmuD0=0;
128  mnMus=0;
129  mnMusPis=0;
130  mnEls=0;
131  mfracTrks=0;
132  mdMET=0;
133  mdMETx=0;
134  mdMETy=0;
135  mdMEy=0;
136  mdMUx=0;
137  mdMUy=0;
138 
139 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * mChargedEMEtFraction
Definition: METTester.h:144
MonitorElement * mMETDifference_GenMETTrue_METResolution
Definition: METTester.h:177
MonitorElement * mMExCorrection
Definition: METTester.h:181
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
MonitorElement * mtrkPtErr
Definition: METTester.h:191
MonitorElement * mMETDifference_GenMETTrue_MET400to500
Definition: METTester.h:176
MonitorElement * mdMETx
Definition: METTester.h:208
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
MonitorElement * mdMUx
Definition: METTester.h:211
MonitorElement * mnEls
Definition: METTester.h:205
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
MonitorElement * mNeutralEMEtFraction
Definition: METTester.h:142
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
MonitorElement * mInvisibleEtFraction
Definition: METTester.h:147
MonitorElement * mCaloEtFractionHadronic
Definition: METTester.h:127
MonitorElement * mtrkChi2
Definition: METTester.h:187
MonitorElement * mnMusPis
Definition: METTester.h:202
MonitorElement * mtrkEta
Definition: METTester.h:185
MonitorElement * mCaloEmEtInEB
Definition: METTester.h:139
MonitorElement * mCaloHadEtInHE
Definition: METTester.h:131
edm::EDGetTokenT< reco::PFMETCollection > pfMETsToken_
Definition: METTester.h:83
edm::EDGetTokenT< reco::CaloMETCollection > caloMETsToken_
Definition: METTester.h:82
MonitorElement * mtrkQuality
Definition: METTester.h:189
MonitorElement * mdMETy
Definition: METTester.h:209
bool isGenMET
Definition: METTester.h:218
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
MonitorElement * mMETDifference_GenMETTrue_MET150to200
Definition: METTester.h:173
MonitorElement * mtrkPt
Definition: METTester.h:184
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
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
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 * mmuNhits
Definition: METTester.h:198
edm::EDGetTokenT< reco::GenMETCollection > genMETsCaloToken_
Definition: METTester.h:87
edm::EDGetTokenT< reco::GenMETCollection > genMETsTrueToken_
Definition: METTester.h:86
std::string const & label() const
Definition: InputTag.h:42
MonitorElement * mMETFine
Definition: METTester.h:115
MonitorElement * mmuChi2
Definition: METTester.h:199
MonitorElement * mNeutralHadEtFraction
Definition: METTester.h:143
MonitorElement * mtrkD0
Definition: METTester.h:188
MonitorElement * mMuonCorrectionFlag
Definition: METTester.h:183
MonitorElement * mtrkAlgo
Definition: METTester.h:190
MonitorElement * mNvertex
Definition: METTester.h:108
MonitorElement * mMET_Nvtx
Definition: METTester.h:116
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
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
MonitorElement * mCaloEmEtInHF
Definition: METTester.h:135

Member Function Documentation

void METTester::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Implements edm::stream::EDAnalyzerBase.

Definition at line 220 of file METTester.cc.

References reco::CaloMET::CaloSETInmHF(), reco::CaloMET::CaloSETInpHF(), reco::GenMET::ChargedEMEtFraction(), reco::GenMET::ChargedHadEtFraction(), reco::PFMET::chargedHadronEt(), reco::PFMET::chargedHadronEtFraction(), gather_cfg::cout, reco::PFMET::electronEt(), reco::PFMET::electronEtFraction(), reco::CaloMET::emEtFraction(), reco::CaloMET::emEtInEB(), reco::CaloMET::emEtInEE(), reco::CaloMET::emEtInHF(), reco::CaloMET::etFractionHadronic(), genMetCalo_cfi::genMetCalo, genMetTrue_cff::genMetTrue, edm::Event::getByToken(), reco::CaloMET::hadEtInHB(), reco::CaloMET::hadEtInHE(), reco::CaloMET::hadEtInHF(), reco::CaloMET::hadEtInHO(), reco::PFMET::HFEMEt(), reco::PFMET::HFEMEtFraction(), reco::PFMET::HFHadronEt(), reco::PFMET::HFHadronEtFraction(), reco::GenMET::InvisibleEtFraction(), edm::HandleBase::isValid(), reco::CaloMET::maxEtInEmTowers(), reco::CaloMET::maxEtInHadTowers(), CaloMET_cfi::met, reco::MET::mEtSig(), reco::PFMET::muonEt(), reco::PFMET::muonEtFraction(), reco::GenMET::MuonEtFraction(), reco::GenMET::NeutralEMEtFraction(), reco::GenMET::NeutralHadEtFraction(), reco::PFMET::neutralHadronEt(), reco::PFMET::neutralHadronEtFraction(), reco::LeafCandidate::phi(), reco::PFMET::photonEt(), reco::PFMET::photonEtFraction(), edm::Handle< T >::product(), reco::LeafCandidate::pt(), reco::LeafCandidate::px(), reco::LeafCandidate::py(), and reco::MET::sumEt().

221 { //int counter(0);
223  iEvent.getByToken(pvToken_, pvHandle);
224  if (! pvHandle.isValid())
225  {
226  std::cout << __FUNCTION__ << ":" << __LINE__ << ":pvHandle handle not found!" << std::endl;
227  assert(false);
228  }
229  const int nvtx = pvHandle->size();
230  mNvertex->Fill(nvtx);
231  //Collections for all MET collections
232 
236 
237  if (isCaloMET) iEvent.getByToken(caloMETsToken_, caloMETs);
238  if (isPFMET) iEvent.getByToken(pfMETsToken_, pfMETs);
239  if (isGenMET) iEvent.getByToken(genMETsToken_, genMETs);
240  if ((isCaloMET) and !caloMETs.isValid()) return;
241  if ((isPFMET) and !pfMETs.isValid()) return;
242  if ((isGenMET) and !genMETs.isValid()) return;
243 
244  reco::MET met;
245  if (isCaloMET) { met = caloMETs->front();}
246  if (isPFMET) { met = pfMETs->front() ;}
247  if (isGenMET) { met = genMETs->front() ;}
248 
249  const double SumET = met.sumEt();
250  const double METSig = met.mEtSig();
251  const double MET = met.pt();
252  const double MEx = met.px();
253  const double MEy = met.py();
254  const double METPhi = met.phi();
255  mMEx->Fill(MEx);
256  mMEy->Fill(MEy);
257  mMET->Fill(MET);
258  mMETFine->Fill(MET);
259  mMET_Nvtx->Fill((double)nvtx, MET);
260  mMETPhi->Fill(METPhi);
261  mSumET->Fill(SumET);
262  mMETSig->Fill(METSig);
263 
264  // Get Generated MET for Resolution plots
266  iEvent.getByToken(genMETsTrueToken_, genTrue);
267  if (genTrue.isValid()) {
268  const GenMETCollection *genmetcol = genTrue.product();
269  const GenMET *genMetTrue = &(genmetcol->front());
270  double genMET = genMetTrue->pt();
271  double genMETPhi = genMetTrue->phi();
272 
273  mMETDifference_GenMETTrue->Fill( MET - genMET );
274  mMETDeltaPhi_GenMETTrue->Fill( TMath::ACos( TMath::Cos( METPhi - genMETPhi ) ) );
275 
276  //pfMET resolution in pfMET bins : Sam, Feb, 2012
277  if (MET > 0 && MET < 20) mMETDifference_GenMETTrue_MET0to20->Fill( MET - genMET );
278  else if (MET > 20 && MET < 40) mMETDifference_GenMETTrue_MET20to40->Fill( MET - genMET );
279  else if (MET > 40 && MET < 60) mMETDifference_GenMETTrue_MET40to60->Fill( MET - genMET );
280  else if (MET > 60 && MET < 80) mMETDifference_GenMETTrue_MET60to80->Fill( MET - genMET );
281  else if (MET > 80 && MET <100) mMETDifference_GenMETTrue_MET80to100->Fill( MET - genMET );
282  else if (MET >100 && MET <150) mMETDifference_GenMETTrue_MET100to150->Fill( MET - genMET );
283  else if (MET >150 && MET <200) mMETDifference_GenMETTrue_MET150to200->Fill( MET - genMET );
284  else if (MET >200 && MET <300) mMETDifference_GenMETTrue_MET200to300->Fill( MET - genMET );
285  else if (MET >300 && MET <400) mMETDifference_GenMETTrue_MET300to400->Fill( MET - genMET );
286  else if (MET >400 && MET <500) mMETDifference_GenMETTrue_MET400to500->Fill( MET - genMET );
287 
288  } else {
289  edm::LogInfo("OutputInfo") << " failed to retrieve data required by MET Task: genMetTrue";
290  }
292  iEvent.getByToken(genMETsCaloToken_, genCalo);
293  if (genCalo.isValid()) {
294  const GenMETCollection *genmetcol = genCalo.product();
295  const GenMET *genMetCalo = &(genmetcol->front());
296  const double genMET = genMetCalo->pt();
297  const double genMETPhi = genMetCalo->phi();
298 
299  mMETDifference_GenMETCalo->Fill( MET - genMET );
300  mMETDeltaPhi_GenMETCalo->Fill( TMath::ACos( TMath::Cos( METPhi - genMETPhi ) ) );
301  } else {
302  edm::LogInfo("OutputInfo") << " failed to retrieve data required by MET Task: genMetCalo";
303  }
304 
305  if ( isCaloMET) {
306  const reco::CaloMET * calomet = &(caloMETs->front());
307  // ==========================================================
308  // Reconstructed MET Information
309  const double caloMaxEtInEMTowers = calomet->maxEtInEmTowers();
310  const double caloMaxEtInHadTowers = calomet->maxEtInHadTowers();
311  const double caloEtFractionHadronic = calomet->etFractionHadronic();
312  const double caloEmEtFraction = calomet->emEtFraction();
313  const double caloHadEtInHB = calomet->hadEtInHB();
314  const double caloHadEtInHO = calomet->hadEtInHO();
315  const double caloHadEtInHE = calomet->hadEtInHE();
316  const double caloHadEtInHF = calomet->hadEtInHF();
317  const double caloEmEtInEB = calomet->emEtInEB();
318  const double caloEmEtInEE = calomet->emEtInEE();
319  const double caloEmEtInHF = calomet->emEtInHF();
320  const double caloSETInpHF = calomet->CaloSETInpHF();
321  const double caloSETInmHF = calomet->CaloSETInmHF();
322 
323  mCaloMaxEtInEmTowers->Fill(caloMaxEtInEMTowers);
324  mCaloMaxEtInHadTowers->Fill(caloMaxEtInHadTowers);
325  mCaloEtFractionHadronic->Fill(caloEtFractionHadronic);
326  mCaloEmEtFraction->Fill(caloEmEtFraction);
327  mCaloHadEtInHB->Fill(caloHadEtInHB);
328  mCaloHadEtInHO->Fill(caloHadEtInHO);
329  mCaloHadEtInHE->Fill(caloHadEtInHE);
330  mCaloHadEtInHF->Fill(caloHadEtInHF);
331  mCaloEmEtInEB->Fill(caloEmEtInEB);
332  mCaloEmEtInEE->Fill(caloEmEtInEE);
333  mCaloEmEtInHF->Fill(caloEmEtInHF);
334  mCaloSETInpHF->Fill(caloSETInpHF);
335  mCaloSETInmHF->Fill(caloSETInmHF);
336  }
337  if (isGenMET)
338  {
339  const GenMET *genmet;
340  // Get Generated MET
341  genmet = &(genMETs->front());
342 
343  const double NeutralEMEtFraction = genmet->NeutralEMEtFraction() ;
344  const double NeutralHadEtFraction = genmet->NeutralHadEtFraction() ;
345  const double ChargedEMEtFraction = genmet->ChargedEMEtFraction () ;
346  const double ChargedHadEtFraction = genmet->ChargedHadEtFraction();
347  const double MuonEtFraction = genmet->MuonEtFraction() ;
348  const double InvisibleEtFraction = genmet->InvisibleEtFraction() ;
349 
350  mNeutralEMEtFraction->Fill( NeutralEMEtFraction );
351  mNeutralHadEtFraction->Fill( NeutralHadEtFraction );
352  mChargedEMEtFraction->Fill( ChargedEMEtFraction );
353  mChargedHadEtFraction->Fill( ChargedHadEtFraction );
354  mMuonEtFraction->Fill( MuonEtFraction );
355  mInvisibleEtFraction->Fill( InvisibleEtFraction );
356  }
357  if(isPFMET)
358  {
359  const reco::PFMET * pfmet = &(pfMETs->front());
361  mPFphotonEt->Fill(pfmet->photonEt());
365  mPFelectronEt->Fill(pfmet->electronEt());
369  mPFmuonEt->Fill(pfmet->muonEt());
371  mPFHFHadronEt->Fill(pfmet->HFHadronEt());
373  mPFHFEMEt->Fill(pfmet->HFEMEt());
374  // Reconstructed MET Information
375 
376  }
377 
378  //This is so dirty I could cry. It should be called only ONCE in endJob. But the MonitorElements don't exist then any more.
379  FillMETRes();
380 }
MonitorElement * mChargedEMEtFraction
Definition: METTester.h:144
double hadEtInHE() const
Definition: CaloMET.h:51
Collection of Gen MET.
MonitorElement * mMuonEtFraction
Definition: METTester.h:146
tuple met
____________________________________________________________________________||
Definition: CaloMET_cfi.py:4
double HFEMEtFraction() const
Definition: PFMET.h:47
double hadEtInHF() const
Definition: CaloMET.h:53
MonitorElement * mMETPhi
Definition: METTester.h:117
MonitorElement * mMET
Definition: METTester.h:114
MonitorElement * mMETDifference_GenMETTrue
Definition: METTester.h:119
double CaloSETInmHF() const
Definition: CaloMET.h:65
MonitorElement * mMETDifference_GenMETTrue_MET400to500
Definition: METTester.h:176
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
void FillMETRes()
Definition: METTester.cc:383
MonitorElement * mPFelectronEtFraction
Definition: METTester.h:156
double maxEtInHadTowers() const
Definition: CaloMET.h:40
MonitorElement * mMETSig
Definition: METTester.h:113
double neutralHadronEtFraction() const
Definition: PFMET.h:32
MonitorElement * mCaloMaxEtInEmTowers
Definition: METTester.h:125
MonitorElement * mMEy
Definition: METTester.h:112
MonitorElement * mCaloSETInpHF
Definition: METTester.h:136
MonitorElement * mCaloHadEtInHF
Definition: METTester.h:132
double muonEt() const
Definition: PFMET.h:42
tuple genMetCalo
____________________________________________________________________________||
double MuonEtFraction() const
Definition: GenMET.h:57
MonitorElement * mPFphotonEtFraction
Definition: METTester.h:152
MonitorElement * mPFHFEMEt
Definition: METTester.h:165
double maxEtInEmTowers() const
Definition: CaloMET.h:38
MonitorElement * mMETDifference_GenMETTrue_MET40to60
Definition: METTester.h:169
bool isPFMET
Definition: METTester.h:217
MonitorElement * mCaloEmEtFraction
Definition: METTester.h:128
MonitorElement * mCaloEmEtInEE
Definition: METTester.h:138
MonitorElement * mCaloSETInmHF
Definition: METTester.h:137
MonitorElement * mNeutralEMEtFraction
Definition: METTester.h:142
virtual double py() const GCC11_FINAL
y coordinate of momentum vector
MonitorElement * mMETDifference_GenMETTrue_MET20to40
Definition: METTester.h:168
MonitorElement * mMETDifference_GenMETTrue_MET60to80
Definition: METTester.h:170
MonitorElement * mCaloMaxEtInHadTowers
Definition: METTester.h:126
MonitorElement * mInvisibleEtFraction
Definition: METTester.h:147
MonitorElement * mCaloEtFractionHadronic
Definition: METTester.h:127
void Fill(long long x)
MonitorElement * mPFmuonEt
Definition: METTester.h:161
MonitorElement * mPFelectronEt
Definition: METTester.h:157
MonitorElement * mPFphotonEt
Definition: METTester.h:153
MonitorElement * mCaloEmEtInEB
Definition: METTester.h:139
MonitorElement * mCaloHadEtInHE
Definition: METTester.h:131
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
double mEtSig() const
Definition: MET.h:55
double HFHadronEtFraction() const
Definition: PFMET.h:44
double sumEt() const
Definition: MET.h:53
edm::EDGetTokenT< reco::PFMETCollection > pfMETsToken_
Definition: METTester.h:83
edm::EDGetTokenT< reco::CaloMETCollection > caloMETsToken_
Definition: METTester.h:82
MonitorElement * mPFneutralHadronEtFraction
Definition: METTester.h:154
double muonEtFraction() const
Definition: PFMET.h:41
double HFHadronEt() const
Definition: PFMET.h:45
MonitorElement * mPFHFHadronEt
Definition: METTester.h:163
Definition: MET.h:39
bool isGenMET
Definition: METTester.h:218
double photonEtFraction() const
Definition: PFMET.h:29
edm::EDGetTokenT< std::vector< reco::Vertex > > pvToken_
Definition: METTester.h:81
double ChargedEMEtFraction() const
Definition: GenMET.h:39
edm::EDGetTokenT< reco::GenMETCollection > genMETsToken_
Definition: METTester.h:85
virtual double px() const GCC11_FINAL
x coordinate of momentum vector
double emEtInEB() const
Definition: CaloMET.h:55
MonitorElement * mMETDifference_GenMETTrue_MET150to200
Definition: METTester.h:173
bool isCaloMET
Definition: METTester.h:214
MonitorElement * mMETDeltaPhi_GenMETCalo
Definition: METTester.h:122
MonitorElement * mMETDifference_GenMETTrue_MET100to150
Definition: METTester.h:172
MonitorElement * mCaloHadEtInHB
Definition: METTester.h:129
bool isValid() const
Definition: HandleBase.h:76
double CaloSETInpHF() const
Definition: CaloMET.h:63
double InvisibleEtFraction() const
Definition: GenMET.h:63
double HFEMEt() const
Definition: PFMET.h:48
MonitorElement * mMETDifference_GenMETTrue_MET300to400
Definition: METTester.h:175
MonitorElement * mMETDifference_GenMETCalo
Definition: METTester.h:121
double hadEtInHO() const
Definition: CaloMET.h:49
MonitorElement * mCaloHadEtInHO
Definition: METTester.h:130
double electronEt() const
Definition: PFMET.h:36
MonitorElement * mPFchargedHadronEt
Definition: METTester.h:159
MonitorElement * mMEx
Definition: METTester.h:111
double etFractionHadronic() const
Definition: CaloMET.h:42
MonitorElement * mChargedHadEtFraction
Definition: METTester.h:145
double photonEt() const
Definition: PFMET.h:30
MonitorElement * mMETDeltaPhi_GenMETTrue
Definition: METTester.h:120
MonitorElement * mPFneutralHadronEt
Definition: METTester.h:155
edm::EDGetTokenT< reco::GenMETCollection > genMETsCaloToken_
Definition: METTester.h:87
edm::EDGetTokenT< reco::GenMETCollection > genMETsTrueToken_
Definition: METTester.h:86
MonitorElement * mPFmuonEtFraction
Definition: METTester.h:160
T const * product() const
Definition: Handle.h:81
double NeutralEMEtFraction() const
Definition: GenMET.h:33
double emEtInEE() const
Definition: CaloMET.h:57
double electronEtFraction() const
Definition: PFMET.h:35
MonitorElement * mMETFine
Definition: METTester.h:115
double chargedHadronEtFraction() const
Definition: PFMET.h:38
MonitorElement * mNeutralHadEtFraction
Definition: METTester.h:143
MonitorElement * mPFHFEMEtFraction
Definition: METTester.h:164
double NeutralHadEtFraction() const
Definition: GenMET.h:45
MonitorElement * mNvertex
Definition: METTester.h:108
MonitorElement * mMET_Nvtx
Definition: METTester.h:116
MonitorElement * mPFchargedHadronEtFraction
Definition: METTester.h:158
double emEtInHF() const
Definition: CaloMET.h:59
tuple cout
Definition: gather_cfg.py:121
MonitorElement * mMETDifference_GenMETTrue_MET0to20
Definition: METTester.h:167
double neutralHadronEt() const
Definition: PFMET.h:33
MonitorElement * mSumET
Definition: METTester.h:118
double ChargedHadEtFraction() const
Definition: GenMET.h:51
virtual float pt() const GCC11_FINAL
transverse momentum
MonitorElement * mMETDifference_GenMETTrue_MET200to300
Definition: METTester.h:174
MonitorElement * mMETDifference_GenMETTrue_MET80to100
Definition: METTester.h:171
double hadEtInHB() const
Definition: CaloMET.h:47
double emEtFraction() const
Definition: CaloMET.h:45
double chargedHadronEt() const
Definition: PFMET.h:39
MonitorElement * mCaloEmEtInHF
Definition: METTester.h:135
MonitorElement * mPFHFHadronEtFraction
Definition: METTester.h:162
void METTester::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 140 of file METTester.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::bookProfile(), and DQMStore::IBooker::setCurrentFolder().

143 {
144  ibooker.setCurrentFolder("JetMET/METValidation/"+inputMETLabel_.label()) ;
145 
146  mNvertex = ibooker.book1D("Nvertex","Nvertex",80,0,80);
147  mMEx = ibooker.book1D("MEx","MEx",160,-800,800);
148  mMEy = ibooker.book1D("MEy","MEy",160,-800,800);
149  mMETSig = ibooker.book1D("METSig","METSig",25,0,24.5);
150  mMET = ibooker.book1D("MET", "MET (20 GeV binning)" , 100,0,2000);
151  mMETFine = ibooker.book1D("METFine", "MET (2 GeV binning)" , 1000,0,2000);
152  mMET_Nvtx = ibooker.bookProfile("MET_Nvtx", "MET vs. nvtx", 60, 0., 60., 0., 2000., " ");
153  mMETPhi = ibooker.book1D("METPhi","METPhi",80,-4,4);
154  mSumET = ibooker.book1D("SumET" , "SumET" , 200,0,4000); //10GeV
155  mMETDifference_GenMETTrue = ibooker.book1D("METDifference_GenMETTrue","METDifference_GenMETTrue", 500,-500,500);
156  mMETDeltaPhi_GenMETTrue = ibooker.book1D("METDeltaPhi_GenMETTrue","METDeltaPhi_GenMETTrue", 80,0,4);
157  mMETDifference_GenMETCalo = ibooker.book1D("METDifference_GenMETCalo","METDifference_GenMETCalo", 500,-500,500);
158  mMETDeltaPhi_GenMETCalo = ibooker.book1D("METDeltaPhi_GenMETCalo","METDeltaPhi_GenMETCalo", 80,0,4);
159 
160  mMETDifference_GenMETTrue_MET0to20 = ibooker.book1D("METResolution_GenMETTrue_MET0to20" , "METResolution_GenMETTrue_MET0to20" , 500,-500,500);
161  mMETDifference_GenMETTrue_MET20to40 = ibooker.book1D("METResolution_GenMETTrue_MET20to40" , "METResolution_GenMETTrue_MET20to40" , 500,-500,500);
162  mMETDifference_GenMETTrue_MET40to60 = ibooker.book1D("METResolution_GenMETTrue_MET40to60" , "METResolution_GenMETTrue_MET40to60" , 500,-500,500);
163  mMETDifference_GenMETTrue_MET60to80 = ibooker.book1D("METResolution_GenMETTrue_MET60to80" , "METResolution_GenMETTrue_MET60to80" , 500,-500,500);
164  mMETDifference_GenMETTrue_MET80to100 = ibooker.book1D("METResolution_GenMETTrue_MET80to100" , "METResolution_GenMETTrue_MET80to100" , 500,-500,500);
165  mMETDifference_GenMETTrue_MET100to150 = ibooker.book1D("METResolution_GenMETTrue_MET100to150", "METResolution_GenMETTrue_MET100to150", 500,-500,500);
166  mMETDifference_GenMETTrue_MET150to200 = ibooker.book1D("METResolution_GenMETTrue_MET150to200", "METResolution_GenMETTrue_MET150to200", 500,-500,500);
167  mMETDifference_GenMETTrue_MET200to300 = ibooker.book1D("METResolution_GenMETTrue_MET200to300", "METResolution_GenMETTrue_MET200to300", 500,-500,500);
168  mMETDifference_GenMETTrue_MET300to400 = ibooker.book1D("METResolution_GenMETTrue_MET300to400", "METResolution_GenMETTrue_MET300to400", 500,-500,500);
169  mMETDifference_GenMETTrue_MET400to500 = ibooker.book1D("METResolution_GenMETTrue_MET400to500", "METResolution_GenMETTrue_MET400to500", 500,-500,500);
170  //this will be filled at the end of the job using info from above hists
171  int nBins = 10;
172  float bins[] = {0.,20.,40.,60.,80.,100.,150.,200.,300.,400.,500.};
173  mMETDifference_GenMETTrue_METResolution = ibooker.book1D("METResolution_GenMETTrue_InMETBins","METResolution_GenMETTrue_InMETBins",nBins, bins);
174 
175  if ( isCaloMET) {
176  mCaloMaxEtInEmTowers = ibooker.book1D("CaloMaxEtInEmTowers","CaloMaxEtInEmTowers",300,0,1500); //5GeV
177  mCaloMaxEtInHadTowers = ibooker.book1D("CaloMaxEtInHadTowers","CaloMaxEtInHadTowers",300,0,1500); //5GeV
178  mCaloEtFractionHadronic = ibooker.book1D("CaloEtFractionHadronic","CaloEtFractionHadronic",100,0,1);
179  mCaloEmEtFraction = ibooker.book1D("CaloEmEtFraction","CaloEmEtFraction",100,0,1);
180  mCaloHadEtInHB = ibooker.book1D("CaloHadEtInHB","CaloHadEtInHB", 200, 0, 2000); //5GeV
181  mCaloHadEtInHE = ibooker.book1D("CaloHadEtInHE","CaloHadEtInHE", 100, 0, 500); //5GeV
182  mCaloHadEtInHO = ibooker.book1D("CaloHadEtInHO","CaloHadEtInHO", 100, 0, 200); //5GeV
183  mCaloHadEtInHF = ibooker.book1D("CaloHadEtInHF","CaloHadEtInHF", 100, 0, 200); //5GeV
184  mCaloSETInpHF = ibooker.book1D("CaloSETInpHF","CaloSETInpHF",100, 0, 500);
185  mCaloSETInmHF = ibooker.book1D("CaloSETInmHF","CaloSETInmHF",100, 0, 500);
186  mCaloEmEtInEE = ibooker.book1D("CaloEmEtInEE","CaloEmEtInEE",100, 0, 500); //5GeV
187  mCaloEmEtInEB = ibooker.book1D("CaloEmEtInEB","CaloEmEtInEB",100, 0, 500); //5GeV
188  mCaloEmEtInHF = ibooker.book1D("CaloEmEtInHF","CaloEmEtInHF",100, 0, 500); //5GeV
189  }
190 
191  if(isGenMET){
192  mNeutralEMEtFraction = ibooker.book1D("GenNeutralEMEtFraction", "GenNeutralEMEtFraction", 120, 0.0, 1.2 );
193  mNeutralHadEtFraction = ibooker.book1D("GenNeutralHadEtFraction", "GenNeutralHadEtFraction", 120, 0.0, 1.2 );
194  mChargedEMEtFraction = ibooker.book1D("GenChargedEMEtFraction", "GenChargedEMEtFraction", 120, 0.0, 1.2);
195  mChargedHadEtFraction = ibooker.book1D("GenChargedHadEtFraction", "GenChargedHadEtFraction", 120, 0.0,1.2);
196  mMuonEtFraction = ibooker.book1D("GenMuonEtFraction", "GenMuonEtFraction", 120, 0.0, 1.2 );
197  mInvisibleEtFraction = ibooker.book1D("GenInvisibleEtFraction", "GenInvisibleEtFraction", 120, 0.0, 1.2 );
198  }
199 
200  if (isPFMET){
201  mPFphotonEtFraction = ibooker.book1D("photonEtFraction", "photonEtFraction", 100, 0, 1);
202  mPFphotonEt = ibooker.book1D("photonEt", "photonEt", 100, 0, 1000);
203  mPFneutralHadronEtFraction = ibooker.book1D("neutralHadronEtFraction", "neutralHadronEtFraction", 100, 0, 1);
204  mPFneutralHadronEt = ibooker.book1D("neutralHadronEt", "neutralHadronEt", 100, 0, 1000);
205  mPFelectronEtFraction = ibooker.book1D("electronEtFraction", "electronEtFraction", 100, 0, 1);
206  mPFelectronEt = ibooker.book1D("electronEt", "electronEt", 100, 0, 1000);
207  mPFchargedHadronEtFraction = ibooker.book1D("chargedHadronEtFraction", "chargedHadronEtFraction", 100, 0, 1);
208  mPFchargedHadronEt = ibooker.book1D("chargedHadronEt", "chargedHadronEt", 100, 0, 1000);
209  mPFmuonEtFraction = ibooker.book1D("muonEtFraction", "muonEtFraction", 100, 0, 1);
210  mPFmuonEt = ibooker.book1D("muonEt", "muonEt", 100, 0, 1000);
211  mPFHFHadronEtFraction = ibooker.book1D("HFHadronEtFraction", "HFHadronEtFraction", 100, 0, 1);
212  mPFHFHadronEt = ibooker.book1D("HFHadronEt", "HFHadronEt", 100, 0, 500);
213  mPFHFEMEtFraction = ibooker.book1D("HFEMEtFraction", "HFEMEtFraction", 100, 0, 1);
214  mPFHFEMEt = ibooker.book1D("HFEMEt", "HFEMEt", 100, 0, 300);
215 
216  }
217  }
MonitorElement * mChargedEMEtFraction
Definition: METTester.h:144
MonitorElement * mMETDifference_GenMETTrue_METResolution
Definition: METTester.h:177
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
MonitorElement * mMETDifference_GenMETTrue_MET400to500
Definition: METTester.h:176
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:155
MonitorElement * mPFelectronEtFraction
Definition: METTester.h:156
MonitorElement * mMETSig
Definition: METTester.h:113
MonitorElement * mCaloMaxEtInEmTowers
Definition: METTester.h:125
MonitorElement * mMEy
Definition: METTester.h:112
MonitorElement * mCaloSETInpHF
Definition: METTester.h:136
MonitorElement * mCaloHadEtInHF
Definition: METTester.h:132
MonitorElement * mPFphotonEtFraction
Definition: METTester.h:152
MonitorElement * mPFHFEMEt
Definition: METTester.h:165
MonitorElement * mMETDifference_GenMETTrue_MET40to60
Definition: METTester.h:169
bool isPFMET
Definition: METTester.h:217
MonitorElement * mCaloEmEtFraction
Definition: METTester.h:128
MonitorElement * mCaloEmEtInEE
Definition: METTester.h:138
MonitorElement * mCaloSETInmHF
Definition: METTester.h:137
MonitorElement * mNeutralEMEtFraction
Definition: METTester.h:142
MonitorElement * mMETDifference_GenMETTrue_MET20to40
Definition: METTester.h:168
MonitorElement * mMETDifference_GenMETTrue_MET60to80
Definition: METTester.h:170
MonitorElement * mCaloMaxEtInHadTowers
Definition: METTester.h:126
MonitorElement * mInvisibleEtFraction
Definition: METTester.h:147
MonitorElement * mCaloEtFractionHadronic
Definition: METTester.h:127
MonitorElement * mPFmuonEt
Definition: METTester.h:161
MonitorElement * mPFelectronEt
Definition: METTester.h:157
MonitorElement * mPFphotonEt
Definition: METTester.h:153
MonitorElement * mCaloEmEtInEB
Definition: METTester.h:139
MonitorElement * mCaloHadEtInHE
Definition: METTester.h:131
MonitorElement * mPFneutralHadronEtFraction
Definition: METTester.h:154
MonitorElement * mPFHFHadronEt
Definition: METTester.h:163
bool isGenMET
Definition: METTester.h:218
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:113
MonitorElement * mMETDifference_GenMETTrue_MET150to200
Definition: METTester.h:173
bool isCaloMET
Definition: METTester.h:214
MonitorElement * mMETDeltaPhi_GenMETCalo
Definition: METTester.h:122
MonitorElement * mMETDifference_GenMETTrue_MET100to150
Definition: METTester.h:172
MonitorElement * mCaloHadEtInHB
Definition: METTester.h:129
MonitorElement * mMETDifference_GenMETTrue_MET300to400
Definition: METTester.h:175
MonitorElement * mMETDifference_GenMETCalo
Definition: METTester.h:121
MonitorElement * mCaloHadEtInHO
Definition: METTester.h:130
MonitorElement * mPFchargedHadronEt
Definition: METTester.h:159
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
MonitorElement * mMEx
Definition: METTester.h:111
MonitorElement * mChargedHadEtFraction
Definition: METTester.h:145
MonitorElement * mMETDeltaPhi_GenMETTrue
Definition: METTester.h:120
MonitorElement * mPFneutralHadronEt
Definition: METTester.h:155
MonitorElement * mPFmuonEtFraction
Definition: METTester.h:160
std::string const & label() const
Definition: InputTag.h:42
MonitorElement * mMETFine
Definition: METTester.h:115
MonitorElement * mNeutralHadEtFraction
Definition: METTester.h:143
MonitorElement * mPFHFEMEtFraction
Definition: METTester.h:164
MonitorElement * mNvertex
Definition: METTester.h:108
MonitorElement * mMET_Nvtx
Definition: METTester.h:116
MonitorElement * mPFchargedHadronEtFraction
Definition: METTester.h:158
MonitorElement * mMETDifference_GenMETTrue_MET0to20
Definition: METTester.h:167
MonitorElement * mSumET
Definition: METTester.h:118
edm::InputTag inputMETLabel_
Definition: METTester.h:71
MonitorElement * mMETDifference_GenMETTrue_MET200to300
Definition: METTester.h:174
MonitorElement * mMETDifference_GenMETTrue_MET80to100
Definition: METTester.h:171
MonitorElement * mCaloEmEtInHF
Definition: METTester.h:135
MonitorElement * mPFHFHadronEtFraction
Definition: METTester.h:162
void METTester::FillMETRes ( )

Definition at line 383 of file METTester.cc.

384 {
395 
396  //the error computation should be done in a postProcessor in the harvesting step otherwise the histograms will be just summed
407 
408 }
MonitorElement * mMETDifference_GenMETTrue_METResolution
Definition: METTester.h:177
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * mMETDifference_GenMETTrue_MET400to500
Definition: METTester.h:176
MonitorElement * mMETDifference_GenMETTrue_MET40to60
Definition: METTester.h:169
double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * mMETDifference_GenMETTrue_MET20to40
Definition: METTester.h:168
MonitorElement * mMETDifference_GenMETTrue_MET60to80
Definition: METTester.h:170
MonitorElement * mMETDifference_GenMETTrue_MET150to200
Definition: METTester.h:173
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
MonitorElement * mMETDifference_GenMETTrue_MET100to150
Definition: METTester.h:172
MonitorElement * mMETDifference_GenMETTrue_MET300to400
Definition: METTester.h:175
double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * mMETDifference_GenMETTrue_MET0to20
Definition: METTester.h:167
MonitorElement * mMETDifference_GenMETTrue_MET200to300
Definition: METTester.h:174
MonitorElement * mMETDifference_GenMETTrue_MET80to100
Definition: METTester.h:171
bool METTester::isGoodTrack ( const reco::TrackRef  track,
float  d0corr 
)
private

Definition at line 411 of file METTester.cc.

References GOODCOLL_filter_cfg::cut, and i.

411  {
412 
413  if( fabs( d0corr ) > maxd0_ ) return false;
414  if( track->numberOfValidHits() < minhits_ ) return false;
415  if( track->normalizedChi2() > maxchi2_ ) return false;
416  if( fabs( track->eta() ) > maxeta_ ) return false;
417  if( track->pt() > maxpt_ ) return false;
418  if( (track->ptError() / track->pt()) > maxPtErr_ ) return false;
419 
420  int cut = 0;
421  for( unsigned int i = 0; i < trkQuality_.size(); i++ ) {
422 
423  cut |= (1 << trkQuality_.at(i));
424  }
425 
426  if( !( ( track->qualityMask() & cut ) == cut ) ) return false;
427 
428  bool isGoodAlgo = false;
429  if( trkAlgos_.size() == 0 ) isGoodAlgo = true;
430  for( unsigned int i = 0; i < trkAlgos_.size(); i++ ) {
431 
432  if( track->algo() == trkAlgos_.at(i) ) isGoodAlgo = true;
433  }
434 
435  if( !isGoodAlgo ) return false;
436 
437  return true;
438  }
int i
Definition: DBlmapReader.cc:9
double maxchi2_
Definition: METTester.h:100
std::vector< int > trkQuality_
Definition: METTester.h:104
std::vector< int > trkAlgos_
Definition: METTester.h:105
double maxPtErr_
Definition: METTester.h:103
double maxpt_
Definition: METTester.h:102
int minhits_
Definition: METTester.h:98
double maxeta_
Definition: METTester.h:101
double maxd0_
Definition: METTester.h:99

Member Data Documentation

edm::EDGetTokenT<reco::BeamSpot> METTester::beamSpotToken_
private

Definition at line 92 of file METTester.h.

edm::EDGetTokenT<reco::CaloMETCollection> METTester::caloMETsToken_
private

Definition at line 82 of file METTester.h.

edm::EDGetTokenT<edm::View<reco::GsfElectron > > METTester::electronToken_
private

Definition at line 91 of file METTester.h.

edm::EDGetTokenT<reco::GenMETCollection> METTester::genMETsCaloToken_
private

Definition at line 87 of file METTester.h.

edm::EDGetTokenT<reco::GenMETCollection> METTester::genMETsToken_
private

Definition at line 85 of file METTester.h.

edm::EDGetTokenT<reco::GenMETCollection> METTester::genMETsTrueToken_
private

Definition at line 86 of file METTester.h.

edm::InputTag METTester::inputBeamSpotLabel_
private

Definition at line 78 of file METTester.h.

edm::InputTag METTester::inputCaloMETLabel_
private

Definition at line 74 of file METTester.h.

edm::InputTag METTester::inputElectronLabel_
private

Definition at line 77 of file METTester.h.

edm::InputTag METTester::inputMETLabel_
private

Definition at line 71 of file METTester.h.

edm::InputTag METTester::inputMuonLabel_
private

Definition at line 76 of file METTester.h.

edm::InputTag METTester::inputTrackLabel_
private

Definition at line 75 of file METTester.h.

bool METTester::isCaloMET
private

Definition at line 214 of file METTester.h.

bool METTester::isGenMET
private

Definition at line 218 of file METTester.h.

bool METTester::isPFMET
private

Definition at line 217 of file METTester.h.

double METTester::maxchi2_
private

Definition at line 100 of file METTester.h.

double METTester::maxd0_
private

Definition at line 99 of file METTester.h.

double METTester::maxeta_
private

Definition at line 101 of file METTester.h.

double METTester::maxpt_
private

Definition at line 102 of file METTester.h.

double METTester::maxPtErr_
private

Definition at line 103 of file METTester.h.

MonitorElement* METTester::mCaloEmEtFraction
private

Definition at line 128 of file METTester.h.

MonitorElement* METTester::mCaloEmEtInEB
private

Definition at line 139 of file METTester.h.

MonitorElement* METTester::mCaloEmEtInEE
private

Definition at line 138 of file METTester.h.

MonitorElement* METTester::mCaloEmEtInHF
private

Definition at line 135 of file METTester.h.

MonitorElement* METTester::mCaloEtFractionHadronic
private

Definition at line 127 of file METTester.h.

MonitorElement* METTester::mCaloHadEtInEB
private

Definition at line 133 of file METTester.h.

MonitorElement* METTester::mCaloHadEtInEE
private

Definition at line 134 of file METTester.h.

MonitorElement* METTester::mCaloHadEtInHB
private

Definition at line 129 of file METTester.h.

MonitorElement* METTester::mCaloHadEtInHE
private

Definition at line 131 of file METTester.h.

MonitorElement* METTester::mCaloHadEtInHF
private

Definition at line 132 of file METTester.h.

MonitorElement* METTester::mCaloHadEtInHO
private

Definition at line 130 of file METTester.h.

MonitorElement* METTester::mCaloMaxEtInEmTowers
private

Definition at line 125 of file METTester.h.

MonitorElement* METTester::mCaloMaxEtInHadTowers
private

Definition at line 126 of file METTester.h.

MonitorElement* METTester::mCaloSETInmHF
private

Definition at line 137 of file METTester.h.

MonitorElement* METTester::mCaloSETInpHF
private

Definition at line 136 of file METTester.h.

MonitorElement* METTester::mChargedEMEtFraction
private

Definition at line 144 of file METTester.h.

MonitorElement* METTester::mChargedHadEtFraction
private

Definition at line 145 of file METTester.h.

MonitorElement* METTester::mdMET
private

Definition at line 207 of file METTester.h.

MonitorElement* METTester::mdMETx
private

Definition at line 208 of file METTester.h.

MonitorElement* METTester::mdMETy
private

Definition at line 209 of file METTester.h.

MonitorElement* METTester::mdMEy
private

Definition at line 210 of file METTester.h.

MonitorElement* METTester::mdMUx
private

Definition at line 211 of file METTester.h.

MonitorElement* METTester::mdMUy
private

Definition at line 212 of file METTester.h.

std::map<std::string, MonitorElement*> METTester::me
private

Definition at line 64 of file METTester.h.

MonitorElement* METTester::meleEta
private

Definition at line 193 of file METTester.h.

MonitorElement* METTester::meleHoE
private

Definition at line 194 of file METTester.h.

MonitorElement* METTester::melePt
private

Definition at line 192 of file METTester.h.

edm::EDGetTokenT<edm::ValueMap<reco::MuonMETCorrectionData> > METTester::met_ValueMap_Token_
private

Definition at line 94 of file METTester.h.

std::string METTester::METType_
private

Definition at line 72 of file METTester.h.

MonitorElement* METTester::mfracTrks
private

Definition at line 206 of file METTester.h.

int METTester::minhits_
private

Definition at line 98 of file METTester.h.

edm::InputTag METTester::mInputCollection_
private

Definition at line 68 of file METTester.h.

MonitorElement* METTester::mInvisibleEtFraction
private

Definition at line 147 of file METTester.h.

MonitorElement* METTester::mMET
private

Definition at line 114 of file METTester.h.

MonitorElement* METTester::mMET_Nvtx
private

Definition at line 116 of file METTester.h.

MonitorElement* METTester::mMETDeltaPhi_GenMETCalo
private

Definition at line 122 of file METTester.h.

MonitorElement* METTester::mMETDeltaPhi_GenMETTrue
private

Definition at line 120 of file METTester.h.

MonitorElement* METTester::mMETDifference_GenMETCalo
private

Definition at line 121 of file METTester.h.

MonitorElement* METTester::mMETDifference_GenMETTrue
private

Definition at line 119 of file METTester.h.

MonitorElement* METTester::mMETDifference_GenMETTrue_MET0to20
private

Definition at line 167 of file METTester.h.

MonitorElement* METTester::mMETDifference_GenMETTrue_MET100to150
private

Definition at line 172 of file METTester.h.

MonitorElement* METTester::mMETDifference_GenMETTrue_MET150to200
private

Definition at line 173 of file METTester.h.

MonitorElement* METTester::mMETDifference_GenMETTrue_MET200to300
private

Definition at line 174 of file METTester.h.

MonitorElement* METTester::mMETDifference_GenMETTrue_MET20to40
private

Definition at line 168 of file METTester.h.

MonitorElement* METTester::mMETDifference_GenMETTrue_MET300to400
private

Definition at line 175 of file METTester.h.

MonitorElement* METTester::mMETDifference_GenMETTrue_MET400to500
private

Definition at line 176 of file METTester.h.

MonitorElement* METTester::mMETDifference_GenMETTrue_MET40to60
private

Definition at line 169 of file METTester.h.

MonitorElement* METTester::mMETDifference_GenMETTrue_MET60to80
private

Definition at line 170 of file METTester.h.

MonitorElement* METTester::mMETDifference_GenMETTrue_MET80to100
private

Definition at line 171 of file METTester.h.

MonitorElement* METTester::mMETDifference_GenMETTrue_METResolution
private

Definition at line 177 of file METTester.h.

MonitorElement* METTester::mMETFine
private

Definition at line 115 of file METTester.h.

MonitorElement* METTester::mMETPhi
private

Definition at line 117 of file METTester.h.

MonitorElement* METTester::mMETSig
private

Definition at line 113 of file METTester.h.

MonitorElement* METTester::mMEx
private

Definition at line 111 of file METTester.h.

MonitorElement* METTester::mMExCorrection
private

Definition at line 181 of file METTester.h.

MonitorElement* METTester::mMEy
private

Definition at line 112 of file METTester.h.

MonitorElement* METTester::mMEyCorrection
private

Definition at line 182 of file METTester.h.

MonitorElement* METTester::mmuChi2
private

Definition at line 199 of file METTester.h.

MonitorElement* METTester::mmuD0
private

Definition at line 200 of file METTester.h.

MonitorElement* METTester::mmuEta
private

Definition at line 197 of file METTester.h.

MonitorElement* METTester::mmuNhits
private

Definition at line 198 of file METTester.h.

MonitorElement* METTester::mMuonCorrectionFlag
private

Definition at line 183 of file METTester.h.

MonitorElement* METTester::mMuonEtFraction
private

Definition at line 146 of file METTester.h.

MonitorElement* METTester::mmuPt
private

Definition at line 196 of file METTester.h.

MonitorElement* METTester::mmuSAhits
private

Definition at line 203 of file METTester.h.

MonitorElement* METTester::mmuTesthits
private

Definition at line 204 of file METTester.h.

MonitorElement* METTester::mnEls
private

Definition at line 205 of file METTester.h.

MonitorElement* METTester::mNeutralEMEtFraction
private

Definition at line 142 of file METTester.h.

MonitorElement* METTester::mNeutralHadEtFraction
private

Definition at line 143 of file METTester.h.

MonitorElement* METTester::mnMus
private

Definition at line 201 of file METTester.h.

MonitorElement* METTester::mnMusPis
private

Definition at line 202 of file METTester.h.

MonitorElement* METTester::mNvertex
private

Definition at line 108 of file METTester.h.

std::string METTester::mOutputFile
private

Definition at line 69 of file METTester.h.

MonitorElement* METTester::mPFchargedHadronEt
private

Definition at line 159 of file METTester.h.

MonitorElement* METTester::mPFchargedHadronEtFraction
private

Definition at line 158 of file METTester.h.

MonitorElement* METTester::mPFelectronEt
private

Definition at line 157 of file METTester.h.

MonitorElement* METTester::mPFelectronEtFraction
private

Definition at line 156 of file METTester.h.

MonitorElement* METTester::mPFHFEMEt
private

Definition at line 165 of file METTester.h.

MonitorElement* METTester::mPFHFEMEtFraction
private

Definition at line 164 of file METTester.h.

MonitorElement* METTester::mPFHFHadronEt
private

Definition at line 163 of file METTester.h.

MonitorElement* METTester::mPFHFHadronEtFraction
private

Definition at line 162 of file METTester.h.

MonitorElement* METTester::mPFmuonEt
private

Definition at line 161 of file METTester.h.

MonitorElement* METTester::mPFmuonEtFraction
private

Definition at line 160 of file METTester.h.

MonitorElement* METTester::mPFneutralHadronEt
private

Definition at line 155 of file METTester.h.

MonitorElement* METTester::mPFneutralHadronEtFraction
private

Definition at line 154 of file METTester.h.

MonitorElement* METTester::mPFphotonEt
private

Definition at line 153 of file METTester.h.

MonitorElement* METTester::mPFphotonEtFraction
private

Definition at line 152 of file METTester.h.

MonitorElement* METTester::mSumET
private

Definition at line 118 of file METTester.h.

MonitorElement* METTester::mtrkAlgo
private

Definition at line 190 of file METTester.h.

MonitorElement* METTester::mtrkChi2
private

Definition at line 187 of file METTester.h.

MonitorElement* METTester::mtrkD0
private

Definition at line 188 of file METTester.h.

MonitorElement* METTester::mtrkEta
private

Definition at line 185 of file METTester.h.

MonitorElement* METTester::mtrkNhits
private

Definition at line 186 of file METTester.h.

MonitorElement* METTester::mtrkPt
private

Definition at line 184 of file METTester.h.

MonitorElement* METTester::mtrkPtErr
private

Definition at line 191 of file METTester.h.

MonitorElement* METTester::mtrkQuality
private

Definition at line 189 of file METTester.h.

edm::EDGetTokenT<reco::MuonCollection> METTester::muonToken_
private

Definition at line 89 of file METTester.h.

edm::EDGetTokenT<reco::PFMETCollection> METTester::pfMETsToken_
private

Definition at line 83 of file METTester.h.

edm::EDGetTokenT<std::vector<reco::Vertex> > METTester::pvToken_
private

Definition at line 81 of file METTester.h.

std::string METTester::sample_
private

Definition at line 70 of file METTester.h.

edm::EDGetTokenT<edm::ValueMap<reco::MuonMETCorrectionData> > METTester::tcMet_ValueMap_Token_
private

Definition at line 93 of file METTester.h.

edm::EDGetTokenT<reco::METCollection> METTester::tcMETsToken_
private

Definition at line 84 of file METTester.h.

edm::EDGetTokenT<reco::TrackCollection> METTester::trackToken_
private

Definition at line 90 of file METTester.h.

std::vector<int> METTester::trkAlgos_
private

Definition at line 105 of file METTester.h.

std::vector<int> METTester::trkQuality_
private

Definition at line 104 of file METTester.h.