CMS 3D CMS Logo

List of all members | Public 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 &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 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
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

edm::EDGetTokenT< reco::CaloMETCollectioncaloMETsToken_
 
edm::EDGetTokenT< reco::GenMETCollectiongenMETsCaloToken_
 
edm::EDGetTokenT< reco::GenMETCollectiongenMETsToken_
 
edm::EDGetTokenT< reco::GenMETCollectiongenMETsTrueToken_
 
edm::InputTag inputCaloMETLabel_
 
edm::InputTag inputMETLabel_
 
bool isCaloMET
 
bool isGenMET
 
bool isMiniAODMET
 
bool isPFMET
 
MonitorElementmCaloEmEtFraction
 
MonitorElementmCaloEmEtInEB
 
MonitorElementmCaloEmEtInEE
 
MonitorElementmCaloEmEtInHF
 
MonitorElementmCaloEtFractionHadronic
 
MonitorElementmCaloHadEtInEB
 
MonitorElementmCaloHadEtInEE
 
MonitorElementmCaloHadEtInHB
 
MonitorElementmCaloHadEtInHE
 
MonitorElementmCaloHadEtInHF
 
MonitorElementmCaloHadEtInHO
 
MonitorElementmCaloMaxEtInEmTowers
 
MonitorElementmCaloMaxEtInHadTowers
 
MonitorElementmCaloSETInmHF
 
MonitorElementmCaloSETInpHF
 
MonitorElementmChargedEMEtFraction
 
MonitorElementmChargedHadEtFraction
 
std::map< std::string, MonitorElement * > me
 
std::string METType_
 
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_MET500
 
MonitorElementmMETDifference_GenMETTrue_MET60to80
 
MonitorElementmMETDifference_GenMETTrue_MET80to100
 
MonitorElementmMETFine
 
MonitorElementmMETPhi
 
MonitorElementmMETSig
 
MonitorElementmMETUnc_ElectronEnDown
 
MonitorElementmMETUnc_ElectronEnUp
 
MonitorElementmMETUnc_JetEnDown
 
MonitorElementmMETUnc_JetEnUp
 
MonitorElementmMETUnc_JetResDown
 
MonitorElementmMETUnc_JetResUp
 
MonitorElementmMETUnc_MuonEnDown
 
MonitorElementmMETUnc_MuonEnUp
 
MonitorElementmMETUnc_PhotonEnDown
 
MonitorElementmMETUnc_PhotonEnUp
 
MonitorElementmMETUnc_TauEnDown
 
MonitorElementmMETUnc_TauEnUp
 
MonitorElementmMETUnc_UnclusteredEnDown
 
MonitorElementmMETUnc_UnclusteredEnUp
 
MonitorElementmMEx
 
MonitorElementmMEy
 
MonitorElementmMuonEtFraction
 
MonitorElementmNeutralEMEtFraction
 
MonitorElementmNeutralHadEtFraction
 
MonitorElementmNvertex
 
MonitorElementmPFchargedHadronEt
 
MonitorElementmPFchargedHadronEtFraction
 
MonitorElementmPFelectronEt
 
MonitorElementmPFelectronEtFraction
 
MonitorElementmPFHFEMEt
 
MonitorElementmPFHFEMEtFraction
 
MonitorElementmPFHFHadronEt
 
MonitorElementmPFHFHadronEtFraction
 
MonitorElementmPFmuonEt
 
MonitorElementmPFmuonEtFraction
 
MonitorElementmPFneutralHadronEt
 
MonitorElementmPFneutralHadronEtFraction
 
MonitorElementmPFphotonEt
 
MonitorElementmPFphotonEtFraction
 
MonitorElementmSumET
 
edm::EDGetTokenT< pat::METCollectionpatMETToken_
 
edm::EDGetTokenT< reco::PFMETCollectionpfMETsToken_
 
edm::EDGetTokenT< std::vector< reco::Vertex > > pvToken_
 

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, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr< dqmDetails::NoCacheglobalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr< dqmDetails::NoCacheglobalBeginRunSummary (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::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 53 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 
38  std::string inputMETCollectionLabel(inputMETLabel_.label());
39 
40  isCaloMET = (std::string("calo")==METType_);
41  isPFMET = (std::string("pf") ==METType_);
42  isGenMET = (std::string("gen") ==METType_);
43  isMiniAODMET = (std::string("miniaod") ==METType_);
44 
45  pvToken_ = consumes<std::vector<reco::Vertex> >(iConfig.getParameter<edm::InputTag>("PrimaryVertices"));
46  if (isCaloMET) caloMETsToken_ = consumes<reco::CaloMETCollection> (inputMETLabel_);
47  if (isPFMET) pfMETsToken_ = consumes<reco::PFMETCollection> (inputMETLabel_);
48  if(isMiniAODMET) patMETToken_ = consumes<pat::METCollection> (inputMETLabel_);
49  if (isGenMET) genMETsToken_ = consumes<reco::GenMETCollection> (inputMETLabel_);
50  if(!isMiniAODMET){
51  genMETsTrueToken_ = consumes<reco::GenMETCollection> (edm::InputTag("genMetTrue"));
52  genMETsCaloToken_ = consumes<reco::GenMETCollection> (edm::InputTag("genMetCalo"));
53  }
54 
55  //Events variables
56  mNvertex = 0;
57 
58  //Common variables
59  mMEx = 0;
60  mMEy = 0;
61  mMETSig = 0;
62  mMET = 0;
63  mMETFine = 0;
64  mMET_Nvtx = 0;
65  mMETPhi = 0;
66  mSumET = 0;
71 
72  // MET Uncertainities: Only for MiniAOD
73  mMETUnc_JetResUp = 0;
75  mMETUnc_JetEnUp = 0;
77  mMETUnc_MuonEnUp = 0;
81  mMETUnc_TauEnUp = 0;
87 
88 
89  //CaloMET variables
94  mCaloHadEtInHB = 0;
95  mCaloHadEtInHO = 0;
96  mCaloHadEtInHE = 0;
97  mCaloHadEtInHF = 0;
98  mCaloEmEtInHF = 0;
99  mCaloSETInpHF = 0;
100  mCaloSETInmHF = 0;
101  mCaloEmEtInEE = 0;
102  mCaloEmEtInEB = 0;
103 
104 
105  //GenMET variables
110  mMuonEtFraction=0;
112 
113  //MET variables
114 
115  //PFMET variables
127 
128 
129 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * mChargedEMEtFraction
Definition: METTester.h:140
MonitorElement * mMuonEtFraction
Definition: METTester.h:142
MonitorElement * mMETPhi
Definition: METTester.h:95
MonitorElement * mMET
Definition: METTester.h:92
MonitorElement * mMETDifference_GenMETTrue
Definition: METTester.h:97
MonitorElement * mMETUnc_MuonEnUp
Definition: METTester.h:107
MonitorElement * mMETUnc_ElectronEnDown
Definition: METTester.h:110
MonitorElement * mMETUnc_ElectronEnUp
Definition: METTester.h:109
MonitorElement * mMETDifference_GenMETTrue_MET400to500
Definition: METTester.h:172
MonitorElement * mMETUnc_TauEnDown
Definition: METTester.h:112
MonitorElement * mMETSig
Definition: METTester.h:91
MonitorElement * mCaloMaxEtInEmTowers
Definition: METTester.h:121
MonitorElement * mMEy
Definition: METTester.h:90
MonitorElement * mCaloSETInpHF
Definition: METTester.h:132
MonitorElement * mCaloHadEtInHF
Definition: METTester.h:128
MonitorElement * mMETDifference_GenMETTrue_MET40to60
Definition: METTester.h:165
bool isPFMET
Definition: METTester.h:181
MonitorElement * mCaloEmEtFraction
Definition: METTester.h:124
MonitorElement * mCaloEmEtInEE
Definition: METTester.h:134
std::string METType_
Definition: METTester.h:70
MonitorElement * mCaloSETInmHF
Definition: METTester.h:133
MonitorElement * mNeutralEMEtFraction
Definition: METTester.h:138
MonitorElement * mMETDifference_GenMETTrue_MET20to40
Definition: METTester.h:164
MonitorElement * mMETDifference_GenMETTrue_MET60to80
Definition: METTester.h:166
MonitorElement * mCaloMaxEtInHadTowers
Definition: METTester.h:122
MonitorElement * mInvisibleEtFraction
Definition: METTester.h:143
MonitorElement * mCaloEtFractionHadronic
Definition: METTester.h:123
bool isMiniAODMET
Definition: METTester.h:183
MonitorElement * mMETUnc_UnclusteredEnUp
Definition: METTester.h:113
MonitorElement * mCaloEmEtInEB
Definition: METTester.h:135
MonitorElement * mMETUnc_JetEnUp
Definition: METTester.h:105
MonitorElement * mCaloHadEtInHE
Definition: METTester.h:127
edm::EDGetTokenT< reco::PFMETCollection > pfMETsToken_
Definition: METTester.h:77
edm::EDGetTokenT< reco::CaloMETCollection > caloMETsToken_
Definition: METTester.h:76
MonitorElement * mMETUnc_JetResUp
Definition: METTester.h:103
bool isGenMET
Definition: METTester.h:182
edm::EDGetTokenT< std::vector< reco::Vertex > > pvToken_
Definition: METTester.h:75
edm::EDGetTokenT< reco::GenMETCollection > genMETsToken_
Definition: METTester.h:79
MonitorElement * mMETUnc_JetEnDown
Definition: METTester.h:106
MonitorElement * mMETDifference_GenMETTrue_MET150to200
Definition: METTester.h:169
bool isCaloMET
Definition: METTester.h:178
MonitorElement * mMETDeltaPhi_GenMETCalo
Definition: METTester.h:100
MonitorElement * mMETDifference_GenMETTrue_MET100to150
Definition: METTester.h:168
MonitorElement * mCaloHadEtInHB
Definition: METTester.h:125
MonitorElement * mMETUnc_PhotonEnDown
Definition: METTester.h:116
MonitorElement * mMETDifference_GenMETTrue_MET300to400
Definition: METTester.h:171
MonitorElement * mMETDifference_GenMETCalo
Definition: METTester.h:99
MonitorElement * mMETUnc_JetResDown
Definition: METTester.h:104
MonitorElement * mCaloHadEtInHO
Definition: METTester.h:126
MonitorElement * mMETDifference_GenMETTrue_MET500
Definition: METTester.h:173
MonitorElement * mMEx
Definition: METTester.h:89
MonitorElement * mChargedHadEtFraction
Definition: METTester.h:141
MonitorElement * mMETDeltaPhi_GenMETTrue
Definition: METTester.h:98
MonitorElement * mMETUnc_TauEnUp
Definition: METTester.h:111
edm::EDGetTokenT< reco::GenMETCollection > genMETsCaloToken_
Definition: METTester.h:81
edm::EDGetTokenT< reco::GenMETCollection > genMETsTrueToken_
Definition: METTester.h:80
std::string const & label() const
Definition: InputTag.h:36
MonitorElement * mMETFine
Definition: METTester.h:93
MonitorElement * mMETUnc_MuonEnDown
Definition: METTester.h:108
MonitorElement * mNeutralHadEtFraction
Definition: METTester.h:139
edm::EDGetTokenT< pat::METCollection > patMETToken_
Definition: METTester.h:82
MonitorElement * mMETUnc_UnclusteredEnDown
Definition: METTester.h:114
MonitorElement * mMETUnc_PhotonEnUp
Definition: METTester.h:115
MonitorElement * mNvertex
Definition: METTester.h:86
MonitorElement * mMET_Nvtx
Definition: METTester.h:94
MonitorElement * mMETDifference_GenMETTrue_MET0to20
Definition: METTester.h:163
MonitorElement * mSumET
Definition: METTester.h:96
edm::InputTag inputMETLabel_
Definition: METTester.h:69
MonitorElement * mMETDifference_GenMETTrue_MET200to300
Definition: METTester.h:170
MonitorElement * mMETDifference_GenMETTrue_MET80to100
Definition: METTester.h:167
MonitorElement * mCaloEmEtInHF
Definition: METTester.h:131

Member Function Documentation

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

Definition at line 230 of file METTester.cc.

References reco::CaloMET::CaloSETInmHF(), reco::CaloMET::CaloSETInpHF(), reco::GenMET::ChargedEMEtFraction(), pat::MET::ChargedEMEtFraction(), reco::GenMET::ChargedHadEtFraction(), pat::MET::ChargedHadEtFraction(), reco::PFMET::chargedHadronEt(), reco::PFMET::chargedHadronEtFraction(), gather_cfg::cout, pat::MET::ElectronEnDown, pat::MET::ElectronEnUp, reco::PFMET::electronEt(), reco::PFMET::electronEtFraction(), reco::CaloMET::emEtFraction(), reco::CaloMET::emEtInEB(), reco::CaloMET::emEtInEE(), reco::CaloMET::emEtInHF(), reco::CaloMET::etFractionHadronic(), RazorAnalyzer::genmet, genMetCalo_cfi::genMetCalo, genMetTrue_cfi::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(), pat::MET::isPFMET(), edm::HandleBase::isValid(), pat::MET::JetEnDown, pat::MET::JetEnUp, pat::MET::JetResDown, pat::MET::JetResUp, reco::CaloMET::maxEtInEmTowers(), reco::CaloMET::maxEtInHadTowers(), RazorAnalyzer::met, reco::MET::mEtSig(), pat::MET::MuonEnDown, pat::MET::MuonEnUp, reco::PFMET::muonEt(), reco::PFMET::muonEtFraction(), reco::GenMET::MuonEtFraction(), pat::MET::MuonEtFraction(), reco::GenMET::NeutralEMEtFraction(), pat::MET::NeutralEMFraction(), reco::GenMET::NeutralHadEtFraction(), pat::MET::NeutralHadEtFraction(), reco::PFMET::neutralHadronEt(), reco::PFMET::neutralHadronEtFraction(), NULL, reco::LeafCandidate::phi(), pat::MET::PhotonEnDown, pat::MET::PhotonEnUp, reco::PFMET::photonEt(), reco::PFMET::photonEtFraction(), edm::Handle< T >::product(), reco::LeafCandidate::pt(), reco::LeafCandidate::px(), reco::LeafCandidate::py(), pat::MET::shiftedPt(), reco::MET::sumEt(), pat::MET::TauEnDown, pat::MET::TauEnUp, pat::MET::Type6EtFraction(), pat::MET::Type7EtFraction(), pat::MET::UnclusteredEnDown, and pat::MET::UnclusteredEnUp.

231 { //int counter(0);
232 
234  iEvent.getByToken(pvToken_, pvHandle);
235  if (! pvHandle.isValid())
236  {
237  std::cout << __FUNCTION__ << ":" << __LINE__ << ":pvHandle handle not found!" << std::endl;
238  assert(false);
239  }
240  const int nvtx = pvHandle->size();
241  mNvertex->Fill(nvtx);
242  //Collections for all MET collections
243 
248 
249  if (isCaloMET) iEvent.getByToken(caloMETsToken_, caloMETs);
250  if (isPFMET) iEvent.getByToken(pfMETsToken_, pfMETs);
251  if (isGenMET) iEvent.getByToken(genMETsToken_, genMETs);
252  if (isMiniAODMET) iEvent.getByToken(patMETToken_, patMET);
253  if ((isCaloMET) and !caloMETs.isValid()) return;
254  if ((isPFMET) and !pfMETs.isValid()) return;
255  if ((isGenMET) and !genMETs.isValid()) return;
256  if ((isMiniAODMET) and !patMET.isValid()) return;
257 
258  reco::MET met;
259  if (isCaloMET) { met = caloMETs->front();}
260  if (isPFMET) { met = pfMETs->front() ;}
261  if (isGenMET) { met = genMETs->front() ;}
262  if (isMiniAODMET) { met = patMET->front() ;}
263 
264  const double SumET = met.sumEt();
265  const double METSig = met.mEtSig();
266  const double MET = met.pt();
267  const double MEx = met.px();
268  const double MEy = met.py();
269  const double METPhi = met.phi();
270  mMEx->Fill(MEx);
271  mMEy->Fill(MEy);
272  mMET->Fill(MET);
273  mMETFine->Fill(MET);
274  mMET_Nvtx->Fill((double)nvtx, MET);
275  mMETPhi->Fill(METPhi);
276  mSumET->Fill(SumET);
277  mMETSig->Fill(METSig);
278 
279 
280  // Get Generated MET for Resolution plots
282  bool isvalidgenmet=false;
283 
284  if(!isMiniAODMET){
286  iEvent.getByToken(genMETsTrueToken_, genTrue);
287  if (genTrue.isValid()) {
288  isvalidgenmet=true;
289  const GenMETCollection *genmetcol = genTrue.product();
290  genMetTrue = &(genmetcol->front());
291  }
292  }else{
293  genMetTrue=patMET->front().genMET();
294  isvalidgenmet=true;
295  }
296 
297  if(isvalidgenmet){
298  double genMET = genMetTrue->pt();
299  double genMETPhi = genMetTrue->phi();
300 
301  mMETDifference_GenMETTrue->Fill( MET - genMET );
302  mMETDeltaPhi_GenMETTrue->Fill( TMath::ACos( TMath::Cos( METPhi - genMETPhi ) ) );
303 
304  if(!isGenMET){
305  //pfMET resolution in pfMET bins : Sam, Feb, 2012
306  if (MET > 0 && MET < 20) mMETDifference_GenMETTrue_MET0to20->Fill( MET - genMET );
307  else if (MET > 20 && MET < 40) mMETDifference_GenMETTrue_MET20to40->Fill( MET - genMET );
308  else if (MET > 40 && MET < 60) mMETDifference_GenMETTrue_MET40to60->Fill( MET - genMET );
309  else if (MET > 60 && MET < 80) mMETDifference_GenMETTrue_MET60to80->Fill( MET - genMET );
310  else if (MET > 80 && MET <100) mMETDifference_GenMETTrue_MET80to100->Fill( MET - genMET );
311  else if (MET >100 && MET <150) mMETDifference_GenMETTrue_MET100to150->Fill( MET - genMET );
312  else if (MET >150 && MET <200) mMETDifference_GenMETTrue_MET150to200->Fill( MET - genMET );
313  else if (MET >200 && MET <300) mMETDifference_GenMETTrue_MET200to300->Fill( MET - genMET );
314  else if (MET >300 && MET <400) mMETDifference_GenMETTrue_MET300to400->Fill( MET - genMET );
315  else if (MET >400 && MET <500) mMETDifference_GenMETTrue_MET400to500->Fill( MET - genMET );
316  else if (MET >500) mMETDifference_GenMETTrue_MET500->Fill( MET - genMET );
317 
318  } else {
319  edm::LogInfo("OutputInfo") << " failed to retrieve data required by MET Task: genMetTrue";
320  }
321  }
322  if(!isMiniAODMET){
324  iEvent.getByToken(genMETsCaloToken_, genCalo);
325  if (genCalo.isValid()) {
326  const GenMETCollection *genmetcol = genCalo.product();
327  const GenMET *genMetCalo = &(genmetcol->front());
328  const double genMET = genMetCalo->pt();
329  const double genMETPhi = genMetCalo->phi();
330 
331  mMETDifference_GenMETCalo->Fill( MET - genMET );
332  mMETDeltaPhi_GenMETCalo->Fill( TMath::ACos( TMath::Cos( METPhi - genMETPhi ) ) );
333  } else {
334  edm::LogInfo("OutputInfo") << " failed to retrieve data required by MET Task: genMetCalo";
335  }
336  }
337  if ( isCaloMET) {
338  const reco::CaloMET * calomet = &(caloMETs->front());
339  // ==========================================================
340  // Reconstructed MET Information
341  const double caloMaxEtInEMTowers = calomet->maxEtInEmTowers();
342  const double caloMaxEtInHadTowers = calomet->maxEtInHadTowers();
343  const double caloEtFractionHadronic = calomet->etFractionHadronic();
344  const double caloEmEtFraction = calomet->emEtFraction();
345  const double caloHadEtInHB = calomet->hadEtInHB();
346  const double caloHadEtInHO = calomet->hadEtInHO();
347  const double caloHadEtInHE = calomet->hadEtInHE();
348  const double caloHadEtInHF = calomet->hadEtInHF();
349  const double caloEmEtInEB = calomet->emEtInEB();
350  const double caloEmEtInEE = calomet->emEtInEE();
351  const double caloEmEtInHF = calomet->emEtInHF();
352  const double caloSETInpHF = calomet->CaloSETInpHF();
353  const double caloSETInmHF = calomet->CaloSETInmHF();
354 
355  mCaloMaxEtInEmTowers->Fill(caloMaxEtInEMTowers);
356  mCaloMaxEtInHadTowers->Fill(caloMaxEtInHadTowers);
357  mCaloEtFractionHadronic->Fill(caloEtFractionHadronic);
358  mCaloEmEtFraction->Fill(caloEmEtFraction);
359  mCaloHadEtInHB->Fill(caloHadEtInHB);
360  mCaloHadEtInHO->Fill(caloHadEtInHO);
361  mCaloHadEtInHE->Fill(caloHadEtInHE);
362  mCaloHadEtInHF->Fill(caloHadEtInHF);
363  mCaloEmEtInEB->Fill(caloEmEtInEB);
364  mCaloEmEtInEE->Fill(caloEmEtInEE);
365  mCaloEmEtInHF->Fill(caloEmEtInHF);
366  mCaloSETInpHF->Fill(caloSETInpHF);
367  mCaloSETInmHF->Fill(caloSETInmHF);
368  }
369  if (isGenMET)
370  {
371  const GenMET *genmet;
372  // Get Generated MET
373  genmet = &(genMETs->front());
374 
375  const double NeutralEMEtFraction = genmet->NeutralEMEtFraction() ;
376  const double NeutralHadEtFraction = genmet->NeutralHadEtFraction() ;
377  const double ChargedEMEtFraction = genmet->ChargedEMEtFraction () ;
378  const double ChargedHadEtFraction = genmet->ChargedHadEtFraction();
379  const double MuonEtFraction = genmet->MuonEtFraction() ;
380  const double InvisibleEtFraction = genmet->InvisibleEtFraction() ;
381 
382  mNeutralEMEtFraction->Fill( NeutralEMEtFraction );
383  mNeutralHadEtFraction->Fill( NeutralHadEtFraction );
384  mChargedEMEtFraction->Fill( ChargedEMEtFraction );
385  mChargedHadEtFraction->Fill( ChargedHadEtFraction );
386  mMuonEtFraction->Fill( MuonEtFraction );
387  mInvisibleEtFraction->Fill( InvisibleEtFraction );
388  }
389  if(isPFMET)
390  {
391  const reco::PFMET * pfmet = &(pfMETs->front());
393  mPFphotonEt->Fill(pfmet->photonEt());
397  mPFelectronEt->Fill(pfmet->electronEt());
401  mPFmuonEt->Fill(pfmet->muonEt());
403  mPFHFHadronEt->Fill(pfmet->HFHadronEt());
405  mPFHFEMEt->Fill(pfmet->HFEMEt());
406  // Reconstructed MET Information
407 
408  }
409  if(isMiniAODMET){
410  const pat::MET *patmet = &(patMET->front());
425 
426 
427  if(patmet->isPFMET()){
433  mPFHFHadronEtFraction->Fill(patmet->Type6EtFraction());//HFHadrons
434  mPFHFEMEtFraction->Fill(patmet->Type7EtFraction());//HFEMEt
435  }
436  }
437 }
Analysis-level MET class.
Definition: MET.h:43
virtual double pt() const final
transverse momentum
MonitorElement * mChargedEMEtFraction
Definition: METTester.h:140
double hadEtInHE() const
Definition: CaloMET.h:51
Collection of Gen MET.
MonitorElement * mMuonEtFraction
Definition: METTester.h:142
double HFEMEtFraction() const
Definition: PFMET.h:47
double hadEtInHF() const
Definition: CaloMET.h:53
double ChargedHadEtFraction() const
Definition: MET.h:141
MonitorElement * mMETPhi
Definition: METTester.h:95
MonitorElement * mMET
Definition: METTester.h:92
MonitorElement * mMETDifference_GenMETTrue
Definition: METTester.h:97
MonitorElement * mMETUnc_MuonEnUp
Definition: METTester.h:107
double CaloSETInmHF() const
Definition: CaloMET.h:65
MonitorElement * mMETUnc_ElectronEnDown
Definition: METTester.h:110
double MuonEtFraction() const
Definition: MET.h:142
MonitorElement * mMETUnc_ElectronEnUp
Definition: METTester.h:109
MonitorElement * mMETDifference_GenMETTrue_MET400to500
Definition: METTester.h:172
MonitorElement * mMETUnc_TauEnDown
Definition: METTester.h:112
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
MonitorElement * mPFelectronEtFraction
Definition: METTester.h:152
double maxEtInHadTowers() const
Definition: CaloMET.h:40
MonitorElement * mMETSig
Definition: METTester.h:91
double neutralHadronEtFraction() const
Definition: PFMET.h:32
MonitorElement * mCaloMaxEtInEmTowers
Definition: METTester.h:121
MonitorElement * mMEy
Definition: METTester.h:90
MonitorElement * mCaloSETInpHF
Definition: METTester.h:132
genmet
do same things for GEN
MonitorElement * mCaloHadEtInHF
Definition: METTester.h:128
double muonEt() const
Definition: PFMET.h:42
double MuonEtFraction() const
Definition: GenMET.h:57
MonitorElement * mPFphotonEtFraction
Definition: METTester.h:148
#define NULL
Definition: scimark2.h:8
double NeutralEMFraction() const
Definition: MET.h:138
double ChargedEMEtFraction() const
Definition: MET.h:140
MonitorElement * mPFHFEMEt
Definition: METTester.h:161
genMetCalo
____________________________________________________________________________||
double maxEtInEmTowers() const
Definition: CaloMET.h:38
MonitorElement * mMETDifference_GenMETTrue_MET40to60
Definition: METTester.h:165
double Type6EtFraction() const
Definition: MET.h:143
double Type7EtFraction() const
Definition: MET.h:144
bool isPFMET
Definition: METTester.h:181
MonitorElement * mCaloEmEtFraction
Definition: METTester.h:124
MonitorElement * mCaloEmEtInEE
Definition: METTester.h:134
MonitorElement * mCaloSETInmHF
Definition: METTester.h:133
double NeutralHadEtFraction() const
Definition: MET.h:139
MonitorElement * mNeutralEMEtFraction
Definition: METTester.h:138
MonitorElement * mMETDifference_GenMETTrue_MET20to40
Definition: METTester.h:164
MonitorElement * mMETDifference_GenMETTrue_MET60to80
Definition: METTester.h:166
MonitorElement * mCaloMaxEtInHadTowers
Definition: METTester.h:122
bool isPFMET() const
True if this pat::MET was made from a reco::pfMET.
Definition: MET.h:90
MonitorElement * mInvisibleEtFraction
Definition: METTester.h:143
MonitorElement * mCaloEtFractionHadronic
Definition: METTester.h:123
bool isMiniAODMET
Definition: METTester.h:183
void Fill(long long x)
MonitorElement * mPFmuonEt
Definition: METTester.h:157
MonitorElement * mMETUnc_UnclusteredEnUp
Definition: METTester.h:113
virtual double phi() const final
momentum azimuthal angle
MonitorElement * mPFelectronEt
Definition: METTester.h:153
MonitorElement * mPFphotonEt
Definition: METTester.h:149
MonitorElement * mCaloEmEtInEB
Definition: METTester.h:135
MonitorElement * mMETUnc_JetEnUp
Definition: METTester.h:105
MonitorElement * mCaloHadEtInHE
Definition: METTester.h:127
double mEtSig() const
Definition: MET.h:58
double HFHadronEtFraction() const
Definition: PFMET.h:44
double sumEt() const
Definition: MET.h:56
edm::EDGetTokenT< reco::PFMETCollection > pfMETsToken_
Definition: METTester.h:77
edm::EDGetTokenT< reco::CaloMETCollection > caloMETsToken_
Definition: METTester.h:76
MonitorElement * mPFneutralHadronEtFraction
Definition: METTester.h:150
double muonEtFraction() const
Definition: PFMET.h:41
MonitorElement * mMETUnc_JetResUp
Definition: METTester.h:103
double HFHadronEt() const
Definition: PFMET.h:45
MonitorElement * mPFHFHadronEt
Definition: METTester.h:159
Definition: MET.h:42
bool isGenMET
Definition: METTester.h:182
virtual double px() const final
x coordinate of momentum vector
double photonEtFraction() const
Definition: PFMET.h:29
edm::EDGetTokenT< std::vector< reco::Vertex > > pvToken_
Definition: METTester.h:75
double ChargedEMEtFraction() const
Definition: GenMET.h:39
edm::EDGetTokenT< reco::GenMETCollection > genMETsToken_
Definition: METTester.h:79
MonitorElement * mMETUnc_JetEnDown
Definition: METTester.h:106
double emEtInEB() const
Definition: CaloMET.h:55
MonitorElement * mMETDifference_GenMETTrue_MET150to200
Definition: METTester.h:169
bool isCaloMET
Definition: METTester.h:178
MonitorElement * mMETDeltaPhi_GenMETCalo
Definition: METTester.h:100
MonitorElement * mMETDifference_GenMETTrue_MET100to150
Definition: METTester.h:168
MonitorElement * mCaloHadEtInHB
Definition: METTester.h:125
MonitorElement * mMETUnc_PhotonEnDown
Definition: METTester.h:116
bool isValid() const
Definition: HandleBase.h:74
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:171
MonitorElement * mMETDifference_GenMETCalo
Definition: METTester.h:99
MonitorElement * mMETUnc_JetResDown
Definition: METTester.h:104
double shiftedPt(METUncertainty shift, METCorrectionLevel level=Type1) const
Definition: MET.h:181
double hadEtInHO() const
Definition: CaloMET.h:49
MonitorElement * mCaloHadEtInHO
Definition: METTester.h:126
double electronEt() const
Definition: PFMET.h:36
MonitorElement * mMETDifference_GenMETTrue_MET500
Definition: METTester.h:173
MonitorElement * mPFchargedHadronEt
Definition: METTester.h:155
MonitorElement * mMEx
Definition: METTester.h:89
double etFractionHadronic() const
Definition: CaloMET.h:42
T const * product() const
Definition: Handle.h:81
MonitorElement * mChargedHadEtFraction
Definition: METTester.h:141
double photonEt() const
Definition: PFMET.h:30
met
===> hadronic RAZOR
MonitorElement * mMETDeltaPhi_GenMETTrue
Definition: METTester.h:98
MonitorElement * mPFneutralHadronEt
Definition: METTester.h:151
MonitorElement * mMETUnc_TauEnUp
Definition: METTester.h:111
edm::EDGetTokenT< reco::GenMETCollection > genMETsCaloToken_
Definition: METTester.h:81
edm::EDGetTokenT< reco::GenMETCollection > genMETsTrueToken_
Definition: METTester.h:80
MonitorElement * mPFmuonEtFraction
Definition: METTester.h:156
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:93
MonitorElement * mMETUnc_MuonEnDown
Definition: METTester.h:108
double chargedHadronEtFraction() const
Definition: PFMET.h:38
MonitorElement * mNeutralHadEtFraction
Definition: METTester.h:139
edm::EDGetTokenT< pat::METCollection > patMETToken_
Definition: METTester.h:82
MonitorElement * mPFHFEMEtFraction
Definition: METTester.h:160
MonitorElement * mMETUnc_UnclusteredEnDown
Definition: METTester.h:114
genMetTrue
____________________________________________________________________________||
double NeutralHadEtFraction() const
Definition: GenMET.h:45
MonitorElement * mMETUnc_PhotonEnUp
Definition: METTester.h:115
MonitorElement * mNvertex
Definition: METTester.h:86
MonitorElement * mMET_Nvtx
Definition: METTester.h:94
MonitorElement * mPFchargedHadronEtFraction
Definition: METTester.h:154
double emEtInHF() const
Definition: CaloMET.h:59
MonitorElement * mMETDifference_GenMETTrue_MET0to20
Definition: METTester.h:163
double neutralHadronEt() const
Definition: PFMET.h:33
MonitorElement * mSumET
Definition: METTester.h:96
double ChargedHadEtFraction() const
Definition: GenMET.h:51
MonitorElement * mMETDifference_GenMETTrue_MET200to300
Definition: METTester.h:170
MonitorElement * mMETDifference_GenMETTrue_MET80to100
Definition: METTester.h:167
double hadEtInHB() const
Definition: CaloMET.h:47
virtual double py() const final
y coordinate of momentum vector
double emEtFraction() const
Definition: CaloMET.h:45
double chargedHadronEt() const
Definition: PFMET.h:39
MonitorElement * mCaloEmEtInHF
Definition: METTester.h:131
MonitorElement * mPFHFHadronEtFraction
Definition: METTester.h:158
void METTester::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 130 of file METTester.cc.

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

133 {
134  ibooker.setCurrentFolder("JetMET/METValidation/"+inputMETLabel_.label()) ;
135 
136  mNvertex = ibooker.book1D("Nvertex","Nvertex",80,0,80);
137  mMEx = ibooker.book1D("MEx","MEx",160,-800,800);
138  mMEy = ibooker.book1D("MEy","MEy",160,-800,800);
139  mMETSig = ibooker.book1D("METSig","METSig",25,0,24.5);
140  mMET = ibooker.book1D("MET", "MET (20 GeV binning)" , 100,0,2000);
141  mMETFine = ibooker.book1D("METFine", "MET (2 GeV binning)" , 1000,0,2000);
142  mMET_Nvtx = ibooker.bookProfile("MET_Nvtx", "MET vs. nvtx", 60, 0., 60., 0., 2000., " ");
143  mMETPhi = ibooker.book1D("METPhi","METPhi",80,-4,4);
144  mSumET = ibooker.book1D("SumET" , "SumET" , 200,0,4000); //10GeV
145  mMETDifference_GenMETTrue = ibooker.book1D("METDifference_GenMETTrue","METDifference_GenMETTrue", 500,-500,500);
146  mMETDeltaPhi_GenMETTrue = ibooker.book1D("METDeltaPhi_GenMETTrue","METDeltaPhi_GenMETTrue", 80,0,4);
147 
148  if(isMiniAODMET){
149  mMETUnc_JetResUp = ibooker.book1D("METUnc_JetResUp", "METUnc_JetResUp", 200, -10, 10);
150  mMETUnc_JetResDown = ibooker.book1D("METUnc_JetResDown", "METUnc_JetResDown", 200, -10, 10);
151  mMETUnc_JetEnUp = ibooker.book1D("METUnc_JetEnUp", "METUnc_JetEnUp", 200, -10, 10);
152  mMETUnc_JetEnDown = ibooker.book1D("METUnc_JetEnDown", "METUnc_JetEnDown", 200, -10, 10);
153  mMETUnc_MuonEnUp = ibooker.book1D("METUnc_MuonEnUp", "METUnc_MuonEnUp", 200, -10, 10);
154  mMETUnc_MuonEnDown = ibooker.book1D("METUnc_MuonEnDown", "METUnc_MuonEnDown", 200, -10, 10);
155  mMETUnc_ElectronEnUp = ibooker.book1D("METUnc_ElectronEnUp", "METUnc_ElectronEnUp", 200, -10, 10);
156  mMETUnc_ElectronEnDown = ibooker.book1D("METUnc_ElectronEnDown", "METUnc_ElectronEnDown", 200, -10, 10);
157  mMETUnc_TauEnUp = ibooker.book1D("METUnc_TauEnUp", "METUnc_TauEnUp", 200, -10, 10);
158  mMETUnc_TauEnDown = ibooker.book1D("METUnc_TauEnDown", "METUnc_TauEnDown", 200, -10, 10);
159  mMETUnc_UnclusteredEnUp = ibooker.book1D("METUnc_UnclusteredEnUp", "METUnc_UnclusteredEnUp", 200, -10, 10);
160  mMETUnc_UnclusteredEnDown = ibooker.book1D("METUnc_UnclusteredEnDown", "METUnc_UnclusteredEnDown", 200, -10, 10);
161  mMETUnc_PhotonEnUp = ibooker.book1D("METUnc_UnclusteredEnDown", "METUnc_UnclusteredEnDown", 200, -10, 10);
162  mMETUnc_PhotonEnDown = ibooker.book1D("METUnc_PhotonEnDown", "METUnc_PhotonEnDown", 200, -10, 10);
163 
164  }
165  if(!isMiniAODMET){
166  mMETDifference_GenMETCalo = ibooker.book1D("METDifference_GenMETCalo","METDifference_GenMETCalo", 500,-500,500);
167  mMETDeltaPhi_GenMETCalo = ibooker.book1D("METDeltaPhi_GenMETCalo","METDeltaPhi_GenMETCalo", 80,0,4);
168  }
169  if(!isGenMET){
170  mMETDifference_GenMETTrue_MET0to20 = ibooker.book1D("METResolution_GenMETTrue_MET0to20" , "METResolution_GenMETTrue_MET0to20" , 500,-500,500);
171  mMETDifference_GenMETTrue_MET20to40 = ibooker.book1D("METResolution_GenMETTrue_MET20to40" , "METResolution_GenMETTrue_MET20to40" , 500,-500,500);
172  mMETDifference_GenMETTrue_MET40to60 = ibooker.book1D("METResolution_GenMETTrue_MET40to60" , "METResolution_GenMETTrue_MET40to60" , 500,-500,500);
173  mMETDifference_GenMETTrue_MET60to80 = ibooker.book1D("METResolution_GenMETTrue_MET60to80" , "METResolution_GenMETTrue_MET60to80" , 500,-500,500);
174  mMETDifference_GenMETTrue_MET80to100 = ibooker.book1D("METResolution_GenMETTrue_MET80to100" , "METResolution_GenMETTrue_MET80to100" , 500,-500,500);
175  mMETDifference_GenMETTrue_MET100to150 = ibooker.book1D("METResolution_GenMETTrue_MET100to150", "METResolution_GenMETTrue_MET100to150", 500,-500,500);
176  mMETDifference_GenMETTrue_MET150to200 = ibooker.book1D("METResolution_GenMETTrue_MET150to200", "METResolution_GenMETTrue_MET150to200", 500,-500,500);
177  mMETDifference_GenMETTrue_MET200to300 = ibooker.book1D("METResolution_GenMETTrue_MET200to300", "METResolution_GenMETTrue_MET200to300", 500,-500,500);
178  mMETDifference_GenMETTrue_MET300to400 = ibooker.book1D("METResolution_GenMETTrue_MET300to400", "METResolution_GenMETTrue_MET300to400", 500,-500,500);
179  mMETDifference_GenMETTrue_MET400to500 = ibooker.book1D("METResolution_GenMETTrue_MET400to500", "METResolution_GenMETTrue_MET400to500", 500,-500,500);
180  mMETDifference_GenMETTrue_MET500 = ibooker.book1D("METResolution_GenMETTrue_MET500", "METResolution_GenMETTrue_MET500", 500,-500,500);
181  }
182  if ( isCaloMET) {
183  mCaloMaxEtInEmTowers = ibooker.book1D("CaloMaxEtInEmTowers","CaloMaxEtInEmTowers",300,0,1500); //5GeV
184  mCaloMaxEtInHadTowers = ibooker.book1D("CaloMaxEtInHadTowers","CaloMaxEtInHadTowers",300,0,1500); //5GeV
185  mCaloEtFractionHadronic = ibooker.book1D("CaloEtFractionHadronic","CaloEtFractionHadronic",100,0,1);
186  mCaloEmEtFraction = ibooker.book1D("CaloEmEtFraction","CaloEmEtFraction",100,0,1);
187  mCaloHadEtInHB = ibooker.book1D("CaloHadEtInHB","CaloHadEtInHB", 200, 0, 2000); //5GeV
188  mCaloHadEtInHE = ibooker.book1D("CaloHadEtInHE","CaloHadEtInHE", 100, 0, 500); //5GeV
189  mCaloHadEtInHO = ibooker.book1D("CaloHadEtInHO","CaloHadEtInHO", 100, 0, 200); //5GeV
190  mCaloHadEtInHF = ibooker.book1D("CaloHadEtInHF","CaloHadEtInHF", 100, 0, 200); //5GeV
191  mCaloSETInpHF = ibooker.book1D("CaloSETInpHF","CaloSETInpHF",100, 0, 500);
192  mCaloSETInmHF = ibooker.book1D("CaloSETInmHF","CaloSETInmHF",100, 0, 500);
193  mCaloEmEtInEE = ibooker.book1D("CaloEmEtInEE","CaloEmEtInEE",100, 0, 500); //5GeV
194  mCaloEmEtInEB = ibooker.book1D("CaloEmEtInEB","CaloEmEtInEB",100, 0, 500); //5GeV
195  mCaloEmEtInHF = ibooker.book1D("CaloEmEtInHF","CaloEmEtInHF",100, 0, 500); //5GeV
196  }
197 
198  if(isGenMET){
199  mNeutralEMEtFraction = ibooker.book1D("GenNeutralEMEtFraction", "GenNeutralEMEtFraction", 120, 0.0, 1.2 );
200  mNeutralHadEtFraction = ibooker.book1D("GenNeutralHadEtFraction", "GenNeutralHadEtFraction", 120, 0.0, 1.2 );
201  mChargedEMEtFraction = ibooker.book1D("GenChargedEMEtFraction", "GenChargedEMEtFraction", 120, 0.0, 1.2);
202  mChargedHadEtFraction = ibooker.book1D("GenChargedHadEtFraction", "GenChargedHadEtFraction", 120, 0.0,1.2);
203  mMuonEtFraction = ibooker.book1D("GenMuonEtFraction", "GenMuonEtFraction", 120, 0.0, 1.2 );
204  mInvisibleEtFraction = ibooker.book1D("GenInvisibleEtFraction", "GenInvisibleEtFraction", 120, 0.0, 1.2 );
205  }
206 
207  if (isPFMET || isMiniAODMET){
208  mPFphotonEtFraction = ibooker.book1D("photonEtFraction", "photonEtFraction", 100, 0, 1);
209  mPFneutralHadronEtFraction = ibooker.book1D("neutralHadronEtFraction", "neutralHadronEtFraction", 100, 0, 1);
210  mPFelectronEtFraction = ibooker.book1D("electronEtFraction", "electronEtFraction", 100, 0, 1);
211  mPFchargedHadronEtFraction = ibooker.book1D("chargedHadronEtFraction", "chargedHadronEtFraction", 100, 0, 1);
212  mPFHFHadronEtFraction = ibooker.book1D("HFHadronEtFraction", "HFHadronEtFraction", 100, 0, 1);
213  mPFmuonEtFraction = ibooker.book1D("muonEtFraction", "muonEtFraction", 100, 0, 1);
214  mPFHFEMEtFraction = ibooker.book1D("HFEMEtFraction", "HFEMEtFraction", 100, 0, 1);
215 
216  if(!isMiniAODMET){
217  mPFphotonEt = ibooker.book1D("photonEt", "photonEt", 100, 0, 1000);
218  mPFneutralHadronEt = ibooker.book1D("neutralHadronEt", "neutralHadronEt", 100, 0, 1000);
219  mPFelectronEt = ibooker.book1D("electronEt", "electronEt", 100, 0, 1000);
220  mPFchargedHadronEt = ibooker.book1D("chargedHadronEt", "chargedHadronEt", 100, 0, 1000);
221  mPFmuonEt = ibooker.book1D("muonEt", "muonEt", 100, 0, 1000);
222  mPFHFHadronEt = ibooker.book1D("HFHadronEt", "HFHadronEt", 100, 0, 500);
223  mPFHFEMEt = ibooker.book1D("HFEMEt", "HFEMEt", 100, 0, 300);
224  }
225 
226  }
227 }
MonitorElement * mChargedEMEtFraction
Definition: METTester.h:140
MonitorElement * mMuonEtFraction
Definition: METTester.h:142
MonitorElement * mMETPhi
Definition: METTester.h:95
MonitorElement * mMET
Definition: METTester.h:92
MonitorElement * mMETDifference_GenMETTrue
Definition: METTester.h:97
MonitorElement * mMETUnc_MuonEnUp
Definition: METTester.h:107
MonitorElement * mMETUnc_ElectronEnDown
Definition: METTester.h:110
MonitorElement * mMETUnc_ElectronEnUp
Definition: METTester.h:109
MonitorElement * mMETDifference_GenMETTrue_MET400to500
Definition: METTester.h:172
MonitorElement * mMETUnc_TauEnDown
Definition: METTester.h:112
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:157
MonitorElement * mPFelectronEtFraction
Definition: METTester.h:152
MonitorElement * mMETSig
Definition: METTester.h:91
MonitorElement * mCaloMaxEtInEmTowers
Definition: METTester.h:121
MonitorElement * mMEy
Definition: METTester.h:90
MonitorElement * mCaloSETInpHF
Definition: METTester.h:132
MonitorElement * mCaloHadEtInHF
Definition: METTester.h:128
MonitorElement * mPFphotonEtFraction
Definition: METTester.h:148
MonitorElement * mPFHFEMEt
Definition: METTester.h:161
MonitorElement * mMETDifference_GenMETTrue_MET40to60
Definition: METTester.h:165
bool isPFMET
Definition: METTester.h:181
MonitorElement * mCaloEmEtFraction
Definition: METTester.h:124
MonitorElement * mCaloEmEtInEE
Definition: METTester.h:134
MonitorElement * mCaloSETInmHF
Definition: METTester.h:133
MonitorElement * mNeutralEMEtFraction
Definition: METTester.h:138
MonitorElement * mMETDifference_GenMETTrue_MET20to40
Definition: METTester.h:164
MonitorElement * mMETDifference_GenMETTrue_MET60to80
Definition: METTester.h:166
MonitorElement * mCaloMaxEtInHadTowers
Definition: METTester.h:122
MonitorElement * mInvisibleEtFraction
Definition: METTester.h:143
MonitorElement * mCaloEtFractionHadronic
Definition: METTester.h:123
bool isMiniAODMET
Definition: METTester.h:183
MonitorElement * mPFmuonEt
Definition: METTester.h:157
MonitorElement * mMETUnc_UnclusteredEnUp
Definition: METTester.h:113
MonitorElement * mPFelectronEt
Definition: METTester.h:153
MonitorElement * mPFphotonEt
Definition: METTester.h:149
MonitorElement * mCaloEmEtInEB
Definition: METTester.h:135
MonitorElement * mMETUnc_JetEnUp
Definition: METTester.h:105
MonitorElement * mCaloHadEtInHE
Definition: METTester.h:127
MonitorElement * mPFneutralHadronEtFraction
Definition: METTester.h:150
MonitorElement * mMETUnc_JetResUp
Definition: METTester.h:103
MonitorElement * mPFHFHadronEt
Definition: METTester.h:159
bool isGenMET
Definition: METTester.h:182
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
MonitorElement * mMETUnc_JetEnDown
Definition: METTester.h:106
MonitorElement * mMETDifference_GenMETTrue_MET150to200
Definition: METTester.h:169
bool isCaloMET
Definition: METTester.h:178
MonitorElement * mMETDeltaPhi_GenMETCalo
Definition: METTester.h:100
MonitorElement * mMETDifference_GenMETTrue_MET100to150
Definition: METTester.h:168
MonitorElement * mCaloHadEtInHB
Definition: METTester.h:125
MonitorElement * mMETUnc_PhotonEnDown
Definition: METTester.h:116
MonitorElement * mMETDifference_GenMETTrue_MET300to400
Definition: METTester.h:171
MonitorElement * mMETDifference_GenMETCalo
Definition: METTester.h:99
MonitorElement * mMETUnc_JetResDown
Definition: METTester.h:104
MonitorElement * mCaloHadEtInHO
Definition: METTester.h:126
MonitorElement * mMETDifference_GenMETTrue_MET500
Definition: METTester.h:173
MonitorElement * mPFchargedHadronEt
Definition: METTester.h:155
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
MonitorElement * mMEx
Definition: METTester.h:89
MonitorElement * mChargedHadEtFraction
Definition: METTester.h:141
MonitorElement * mMETDeltaPhi_GenMETTrue
Definition: METTester.h:98
MonitorElement * mPFneutralHadronEt
Definition: METTester.h:151
MonitorElement * mMETUnc_TauEnUp
Definition: METTester.h:111
MonitorElement * mPFmuonEtFraction
Definition: METTester.h:156
std::string const & label() const
Definition: InputTag.h:36
MonitorElement * mMETFine
Definition: METTester.h:93
MonitorElement * mMETUnc_MuonEnDown
Definition: METTester.h:108
MonitorElement * mNeutralHadEtFraction
Definition: METTester.h:139
MonitorElement * mPFHFEMEtFraction
Definition: METTester.h:160
MonitorElement * mMETUnc_UnclusteredEnDown
Definition: METTester.h:114
MonitorElement * mMETUnc_PhotonEnUp
Definition: METTester.h:115
MonitorElement * mNvertex
Definition: METTester.h:86
MonitorElement * mMET_Nvtx
Definition: METTester.h:94
MonitorElement * mPFchargedHadronEtFraction
Definition: METTester.h:154
MonitorElement * mMETDifference_GenMETTrue_MET0to20
Definition: METTester.h:163
MonitorElement * mSumET
Definition: METTester.h:96
edm::InputTag inputMETLabel_
Definition: METTester.h:69
MonitorElement * mMETDifference_GenMETTrue_MET200to300
Definition: METTester.h:170
MonitorElement * mMETDifference_GenMETTrue_MET80to100
Definition: METTester.h:167
MonitorElement * mCaloEmEtInHF
Definition: METTester.h:131
MonitorElement * mPFHFHadronEtFraction
Definition: METTester.h:158

Member Data Documentation

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

Definition at line 76 of file METTester.h.

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

Definition at line 81 of file METTester.h.

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

Definition at line 79 of file METTester.h.

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

Definition at line 80 of file METTester.h.

edm::InputTag METTester::inputCaloMETLabel_
private

Definition at line 72 of file METTester.h.

edm::InputTag METTester::inputMETLabel_
private

Definition at line 69 of file METTester.h.

bool METTester::isCaloMET
private

Definition at line 178 of file METTester.h.

bool METTester::isGenMET
private

Definition at line 182 of file METTester.h.

bool METTester::isMiniAODMET
private

Definition at line 183 of file METTester.h.

bool METTester::isPFMET
private

Definition at line 181 of file METTester.h.

MonitorElement* METTester::mCaloEmEtFraction
private

Definition at line 124 of file METTester.h.

MonitorElement* METTester::mCaloEmEtInEB
private

Definition at line 135 of file METTester.h.

MonitorElement* METTester::mCaloEmEtInEE
private

Definition at line 134 of file METTester.h.

MonitorElement* METTester::mCaloEmEtInHF
private

Definition at line 131 of file METTester.h.

MonitorElement* METTester::mCaloEtFractionHadronic
private

Definition at line 123 of file METTester.h.

MonitorElement* METTester::mCaloHadEtInEB
private

Definition at line 129 of file METTester.h.

MonitorElement* METTester::mCaloHadEtInEE
private

Definition at line 130 of file METTester.h.

MonitorElement* METTester::mCaloHadEtInHB
private

Definition at line 125 of file METTester.h.

MonitorElement* METTester::mCaloHadEtInHE
private

Definition at line 127 of file METTester.h.

MonitorElement* METTester::mCaloHadEtInHF
private

Definition at line 128 of file METTester.h.

MonitorElement* METTester::mCaloHadEtInHO
private

Definition at line 126 of file METTester.h.

MonitorElement* METTester::mCaloMaxEtInEmTowers
private

Definition at line 121 of file METTester.h.

MonitorElement* METTester::mCaloMaxEtInHadTowers
private

Definition at line 122 of file METTester.h.

MonitorElement* METTester::mCaloSETInmHF
private

Definition at line 133 of file METTester.h.

MonitorElement* METTester::mCaloSETInpHF
private

Definition at line 132 of file METTester.h.

MonitorElement* METTester::mChargedEMEtFraction
private

Definition at line 140 of file METTester.h.

MonitorElement* METTester::mChargedHadEtFraction
private

Definition at line 141 of file METTester.h.

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

Definition at line 64 of file METTester.h.

std::string METTester::METType_
private

Definition at line 70 of file METTester.h.

edm::InputTag METTester::mInputCollection_
private

Definition at line 68 of file METTester.h.

MonitorElement* METTester::mInvisibleEtFraction
private

Definition at line 143 of file METTester.h.

MonitorElement* METTester::mMET
private

Definition at line 92 of file METTester.h.

MonitorElement* METTester::mMET_Nvtx
private

Definition at line 94 of file METTester.h.

MonitorElement* METTester::mMETDeltaPhi_GenMETCalo
private

Definition at line 100 of file METTester.h.

MonitorElement* METTester::mMETDeltaPhi_GenMETTrue
private

Definition at line 98 of file METTester.h.

MonitorElement* METTester::mMETDifference_GenMETCalo
private

Definition at line 99 of file METTester.h.

MonitorElement* METTester::mMETDifference_GenMETTrue
private

Definition at line 97 of file METTester.h.

MonitorElement* METTester::mMETDifference_GenMETTrue_MET0to20
private

Definition at line 163 of file METTester.h.

MonitorElement* METTester::mMETDifference_GenMETTrue_MET100to150
private

Definition at line 168 of file METTester.h.

MonitorElement* METTester::mMETDifference_GenMETTrue_MET150to200
private

Definition at line 169 of file METTester.h.

MonitorElement* METTester::mMETDifference_GenMETTrue_MET200to300
private

Definition at line 170 of file METTester.h.

MonitorElement* METTester::mMETDifference_GenMETTrue_MET20to40
private

Definition at line 164 of file METTester.h.

MonitorElement* METTester::mMETDifference_GenMETTrue_MET300to400
private

Definition at line 171 of file METTester.h.

MonitorElement* METTester::mMETDifference_GenMETTrue_MET400to500
private

Definition at line 172 of file METTester.h.

MonitorElement* METTester::mMETDifference_GenMETTrue_MET40to60
private

Definition at line 165 of file METTester.h.

MonitorElement* METTester::mMETDifference_GenMETTrue_MET500
private

Definition at line 173 of file METTester.h.

MonitorElement* METTester::mMETDifference_GenMETTrue_MET60to80
private

Definition at line 166 of file METTester.h.

MonitorElement* METTester::mMETDifference_GenMETTrue_MET80to100
private

Definition at line 167 of file METTester.h.

MonitorElement* METTester::mMETFine
private

Definition at line 93 of file METTester.h.

MonitorElement* METTester::mMETPhi
private

Definition at line 95 of file METTester.h.

MonitorElement* METTester::mMETSig
private

Definition at line 91 of file METTester.h.

MonitorElement* METTester::mMETUnc_ElectronEnDown
private

Definition at line 110 of file METTester.h.

MonitorElement* METTester::mMETUnc_ElectronEnUp
private

Definition at line 109 of file METTester.h.

MonitorElement* METTester::mMETUnc_JetEnDown
private

Definition at line 106 of file METTester.h.

MonitorElement* METTester::mMETUnc_JetEnUp
private

Definition at line 105 of file METTester.h.

MonitorElement* METTester::mMETUnc_JetResDown
private

Definition at line 104 of file METTester.h.

MonitorElement* METTester::mMETUnc_JetResUp
private

Definition at line 103 of file METTester.h.

MonitorElement* METTester::mMETUnc_MuonEnDown
private

Definition at line 108 of file METTester.h.

MonitorElement* METTester::mMETUnc_MuonEnUp
private

Definition at line 107 of file METTester.h.

MonitorElement* METTester::mMETUnc_PhotonEnDown
private

Definition at line 116 of file METTester.h.

MonitorElement* METTester::mMETUnc_PhotonEnUp
private

Definition at line 115 of file METTester.h.

MonitorElement* METTester::mMETUnc_TauEnDown
private

Definition at line 112 of file METTester.h.

MonitorElement* METTester::mMETUnc_TauEnUp
private

Definition at line 111 of file METTester.h.

MonitorElement* METTester::mMETUnc_UnclusteredEnDown
private

Definition at line 114 of file METTester.h.

MonitorElement* METTester::mMETUnc_UnclusteredEnUp
private

Definition at line 113 of file METTester.h.

MonitorElement* METTester::mMEx
private

Definition at line 89 of file METTester.h.

MonitorElement* METTester::mMEy
private

Definition at line 90 of file METTester.h.

MonitorElement* METTester::mMuonEtFraction
private

Definition at line 142 of file METTester.h.

MonitorElement* METTester::mNeutralEMEtFraction
private

Definition at line 138 of file METTester.h.

MonitorElement* METTester::mNeutralHadEtFraction
private

Definition at line 139 of file METTester.h.

MonitorElement* METTester::mNvertex
private

Definition at line 86 of file METTester.h.

MonitorElement* METTester::mPFchargedHadronEt
private

Definition at line 155 of file METTester.h.

MonitorElement* METTester::mPFchargedHadronEtFraction
private

Definition at line 154 of file METTester.h.

MonitorElement* METTester::mPFelectronEt
private

Definition at line 153 of file METTester.h.

MonitorElement* METTester::mPFelectronEtFraction
private

Definition at line 152 of file METTester.h.

MonitorElement* METTester::mPFHFEMEt
private

Definition at line 161 of file METTester.h.

MonitorElement* METTester::mPFHFEMEtFraction
private

Definition at line 160 of file METTester.h.

MonitorElement* METTester::mPFHFHadronEt
private

Definition at line 159 of file METTester.h.

MonitorElement* METTester::mPFHFHadronEtFraction
private

Definition at line 158 of file METTester.h.

MonitorElement* METTester::mPFmuonEt
private

Definition at line 157 of file METTester.h.

MonitorElement* METTester::mPFmuonEtFraction
private

Definition at line 156 of file METTester.h.

MonitorElement* METTester::mPFneutralHadronEt
private

Definition at line 151 of file METTester.h.

MonitorElement* METTester::mPFneutralHadronEtFraction
private

Definition at line 150 of file METTester.h.

MonitorElement* METTester::mPFphotonEt
private

Definition at line 149 of file METTester.h.

MonitorElement* METTester::mPFphotonEtFraction
private

Definition at line 148 of file METTester.h.

MonitorElement* METTester::mSumET
private

Definition at line 96 of file METTester.h.

edm::EDGetTokenT<pat::METCollection> METTester::patMETToken_
private

Definition at line 82 of file METTester.h.

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

Definition at line 77 of file METTester.h.

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

Definition at line 75 of file METTester.h.