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
METAnalyzer Class Reference

#include <METAnalyzer.h>

Inheritance diagram for METAnalyzer:
thread_unsafe::DQMEDAnalyzer edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &)
 Get the analysis. More...
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 Inizialize parameters for histo binning. More...
 
void dqmBeginRun (const edm::Run &, const edm::EventSetup &)
 Initialize run-based parameters. More...
 
void endRun (const edm::Run &iRun, const edm::EventSetup &iSetup)
 Finish up a run. More...
 
void fillMESet (const edm::Event &, std::string, const reco::MET &, const reco::PFMET &, const reco::CaloMET &, std::map< std::string, MonitorElement * > &)
 
void fillMonitorElement (const edm::Event &, std::string, std::string, const reco::MET &, const reco::PFMET &, const reco::CaloMET &, std::map< std::string, MonitorElement * > &, bool)
 
void makeRatePlot (std::string, double)
 
 METAnalyzer (const edm::ParameterSet &)
 Constructor. More...
 
virtual ~METAnalyzer ()
 Destructor. More...
 
- Public Member Functions inherited from thread_unsafe::DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
 DQMEDAnalyzer (void)
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- 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

void bookMESet (std::string, DQMStore::IBooker &, std::map< std::string, MonitorElement * > &)
 
void bookMonitorElement (std::string, DQMStore::IBooker &, std::map< std::string, MonitorElement * > &, bool)
 

Private Attributes

std::vector< int > allTriggerDecisions_
 
std::vector< std::string > allTriggerNames_
 
edm::InputTag beamHaloSummaryTag_
 
edm::EDGetTokenT
< reco::BeamHaloSummary
beamHaloSummaryToken_
 
math::XYZPoint beamSpot_
 
bool bypassAllDCSChecks_
 
bool bypassAllPVChecks_
 
edm::EDGetTokenT
< reco::CaloJetCollection
caloJetsToken_
 
edm::EDGetTokenT
< reco::CaloMETCollection
caloMetToken_
 
edm::ParameterSet cleaningParameters_
 
JetMETDQMDCSFilterDCSFilter_
 
bool fill_met_high_level_histo
 
std::string FolderName_
 
std::vector< std::string > folderNames_
 
edm::InputTag gtTag_
 
edm::EDGetTokenT
< L1GlobalTriggerReadoutRecord
gtToken_
 
edm::InputTag hbheNoiseFilterResultTag_
 
edm::EDGetTokenT< bool > hbheNoiseFilterResultToken_
 
edm::InputTag hcalNoiseRBXCollectionTag_
 
edm::EDGetTokenT
< reco::HcalNoiseRBXCollection
HcalNoiseRBXToken_
 
MonitorElementhCaloEmEtFraction
 
MonitorElementhCaloEmEtFraction020
 
MonitorElementhCaloEmEtInEB
 
MonitorElementhCaloEmEtInEE
 
MonitorElementhCaloEmEtInHF
 
MonitorElementhCaloEmMET
 
MonitorElementhCaloEmMETPhi
 
MonitorElementhCaloEmMEx
 
MonitorElementhCaloEmMEy
 
MonitorElementhCaloEtFractionHadronic
 
MonitorElementhCaloHadEtInHB
 
MonitorElementhCaloHadEtInHE
 
MonitorElementhCaloHadEtInHF
 
MonitorElementhCaloHadEtInHO
 
MonitorElementhCaloHaMET
 
MonitorElementhCaloHaMETPhi
 
MonitorElementhCaloHaMEx
 
MonitorElementhCaloHaMEy
 
MonitorElementhCaloMaxEtInEmTowers
 
MonitorElementhCaloMaxEtInHadTowers
 
MonitorElementhCaloMETPhi020
 
double hfCalibFactor_
 
HLTConfigProvider hltConfig_
 
std::string hltPhysDec_
 
MonitorElementhMET
 
MonitorElementhMET_logx
 
MonitorElementhMETPhi
 
MonitorElementhMETRate
 
MonitorElementhMETSig
 
MonitorElementhMEx
 
MonitorElementhMExLS
 
MonitorElementhMEy
 
MonitorElementhMEyLS
 
MonitorElementhSumET
 
MonitorElementhSumET_logx
 
MonitorElementhTrigger
 
bool hTriggerLabelsIsSet_
 
edm::InputTag inputJetIDValueMap
 
bool isCaloMet_
 
bool isPFMet_
 
edm::InputTag jetCollectionLabel_
 
std::string jetCorrectionService_
 
edm::EDGetTokenT
< edm::ValueMap< reco::JetID > > 
jetID_ValueMapToken_
 
JetIDSelectionFunctor jetIDFunctorLoose
 
int LSBegin_
 
int LSEnd_
 
MonitorElementlumisecME
 
std::map< std::string,
MonitorElement * > 
map_dijet_MEs
 
MonitorElementmeChargedHadronEt
 
MonitorElementmeChargedHadronEt_profile
 
MonitorElementmeChargedHadronEtFraction
 
MonitorElementmeChargedHadronEtFraction_profile
 
MonitorElementmeElectronEt
 
MonitorElementmeElectronEt_profile
 
MonitorElementmeElectronEtFraction
 
MonitorElementmeElectronEtFraction_profile
 
MonitorElementmeHFEMEt
 
MonitorElementmeHFEMEt_profile
 
MonitorElementmeHFEMEtFraction
 
MonitorElementmeHFEMEtFraction_profile
 
MonitorElementmeHFHadronEt
 
MonitorElementmeHFHadronEt_profile
 
MonitorElementmeHFHadronEtFraction
 
MonitorElementmeHFHadronEtFraction_profile
 
MonitorElementmeMET_profile
 
MonitorElementmeMEx_profile
 
MonitorElementmeMEy_profile
 
MonitorElementmeMuonEt
 
MonitorElementmeMuonEt_profile
 
MonitorElementmeMuonEtFraction
 
MonitorElementmeMuonEtFraction_profile
 
MonitorElementmeNeutralHadronEt
 
MonitorElementmeNeutralHadronEt_profile
 
MonitorElementmeNeutralHadronEtFraction
 
MonitorElementmeNeutralHadronEtFraction_profile
 
MonitorElementmePhotonEt
 
MonitorElementmePhotonEt_profile
 
MonitorElementmePhotonEtFraction
 
MonitorElementmePhotonEtFraction_profile
 
MonitorElementmeSumET_profile
 
edm::InputTag metCollectionLabel_
 
std::string MetType_
 
std::string mOutputFile_
 
int nbinsPV_
 
double nPVMax_
 
double nPVMin_
 
int numPV_
 
bool outputMEsInRootFile
 
edm::ParameterSet parameters
 
PFJetIDSelectionFunctor pfjetIDFunctorLoose
 
edm::EDGetTokenT
< reco::PFJetCollection
pfJetsToken_
 
edm::EDGetTokenT
< reco::PFMETCollection
pfMetToken_
 
double ptThreshold_
 
bool runcosmics_
 
std::vector< int > triggerFolderDecisions_
 
std::vector
< GenericTriggerEventFlag * > 
triggerFolderEventFlag_
 
std::vector< std::vector
< std::string > > 
triggerFolderExpr_
 
std::vector< std::string > triggerFolderLabels_
 
edm::InputTag triggerResultsLabel_
 
edm::EDGetTokenT
< edm::TriggerResults
triggerResultsToken_
 
edm::VParameterSet triggerSelectedSubFolders_
 
int verbose_
 
edm::InputTag vertexTag_
 
edm::EDGetTokenT< std::vector
< reco::Vertex > > 
vertexToken_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- 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 81 of file METAnalyzer.h.

Constructor & Destructor Documentation

METAnalyzer::METAnalyzer ( const edm::ParameterSet pSet)

Constructor.

Definition at line 41 of file METAnalyzer.cc.

References PFJetIDSelectionFunctor::FIRSTDATA, edm::ParameterSet::getParameter(), PFJetIDSelectionFunctor::LOOSE, JetIDSelectionFunctor::LOOSE, Parameters::parameters, JetIDSelectionFunctor::PURE09, AlCaHLTBitMon_QueryRunRegistry::string, and triggerResultsToken_().

41  {
42  parameters = pSet;
43 
44  outputMEsInRootFile = parameters.getParameter<bool>("OutputMEsInRootFile");
46 
47  LSBegin_ = pSet.getParameter<int>("LSBegin");
48  LSEnd_ = pSet.getParameter<int>("LSEnd");
49 
51 
53  triggerResultsToken_= consumes<edm::TriggerResults>(edm::InputTag(triggerResultsLabel_));
54  jetCorrectionService_ = pSet.getParameter<std::string> ("JetCorrections");
55 
56  isCaloMet_ = (std::string("calo")==MetType_);
57  //isTCMet_ = (std::string("tc") ==MetType_);
58  isPFMet_ = (std::string("pf") ==MetType_);
59 
60  // MET information
62 
63  if(/*isTCMet_ || */isCaloMet_){
64  inputJetIDValueMap = pSet.getParameter<edm::InputTag>("InputJetIDValueMap");
65  jetID_ValueMapToken_= consumes< edm::ValueMap<reco::JetID> >(inputJetIDValueMap);
67  }
68  if(isPFMet_){
70  }
71  ptThreshold_ = parameters.getParameter<double>("ptThreshold");
72 
73 
74  if(isPFMet_){
75  pfMetToken_= consumes<reco::PFMETCollection>(edm::InputTag(metCollectionLabel_));
76  }
77  if(isCaloMet_){
78  caloMetToken_= consumes<reco::CaloMETCollection>(edm::InputTag(metCollectionLabel_));
79  }
80  //if(isTCMet_){
81  // tcMetToken_= consumes<reco::METCollection>(edm::InputTag(metCollectionLabel_));
82  //}
83 
84  fill_met_high_level_histo = parameters.getParameter<bool>("fillMetHighLevel");
85 
86  hTriggerLabelsIsSet_ = false;
87  //jet cleanup parameters
88  cleaningParameters_ = pSet.getParameter<ParameterSet>("CleaningParameters");
89 
91  //DCS
93 
94  //Vertex requirements
95  bypassAllPVChecks_ = cleaningParameters_.getParameter<bool>("bypassAllPVChecks");
96  bypassAllDCSChecks_ = cleaningParameters_.getParameter<bool>("bypassAllDCSChecks");
97  runcosmics_ = parameters.getUntrackedParameter<bool>("runcosmics");
99  vertexToken_ = consumes<std::vector<reco::Vertex> >(edm::InputTag(vertexTag_));
100 
101  //Trigger parameters
103  gtToken_= consumes<L1GlobalTriggerReadoutRecord>(edm::InputTag(gtTag_));
104 
105  //inputTrackLabel_ = parameters.getParameter<edm::InputTag>("InputTrackLabel");
106  //inputMuonLabel_ = parameters.getParameter<edm::InputTag>("InputMuonLabel");
107  //inputElectronLabel_ = parameters.getParameter<edm::InputTag>("InputElectronLabel");
108  //inputBeamSpotLabel_ = parameters.getParameter<edm::InputTag>("InputBeamSpotLabel");
109  //inputTCMETValueMap_ = parameters.getParameter<edm::InputTag>("InputTCMETValueMap");
110  //TrackToken_= consumes<edm::View <reco::Track> >(inputTrackLabel_);
111  //MuonToken_= consumes<reco::MuonCollection>(inputMuonLabel_);
112  //ElectronToken_= consumes<edm::View<reco::GsfElectron> >(inputElectronLabel_);
113  //BeamspotToken_= consumes<reco::BeamSpot>(inputBeamSpotLabel_);
114  //tcMETValueMapToken_= consumes< edm::ValueMap<reco::MuonMETCorrectionData> >(inputTCMETValueMap_);
115 
116  // Other data collections
117  jetCollectionLabel_ = parameters.getParameter<edm::InputTag>("JetCollectionLabel");
118  if (isCaloMet_) caloJetsToken_ = consumes<reco::CaloJetCollection>(jetCollectionLabel_);
119  //if (isTCMet_) jptJetsToken_ = consumes<reco::JPTJetCollection>(jetCollectionLabel_);
120  if (isPFMet_) pfJetsToken_ = consumes<reco::PFJetCollection>(jetCollectionLabel_);
121 
123  HcalNoiseRBXToken_ = consumes<reco::HcalNoiseRBXCollection>(hcalNoiseRBXCollectionTag_);
124 
125  beamHaloSummaryTag_ = parameters.getParameter<edm::InputTag>("BeamHaloSummaryLabel");
126  beamHaloSummaryToken_ = consumes<BeamHaloSummary>(beamHaloSummaryTag_);
127  hbheNoiseFilterResultTag_ = parameters.getParameter<edm::InputTag>("HBHENoiseFilterResultLabel");
129 
130  //
131  nbinsPV_ = parameters.getParameter<int>("pVBin");
132  nPVMin_ = parameters.getParameter<double>("pVMin");
133  nPVMax_ = parameters.getParameter<double>("pVMax");
134 
136  for (edm::VParameterSet::const_iterator it = triggerSelectedSubFolders_.begin(); it!= triggerSelectedSubFolders_.end(); it++) {
138  triggerFolderExpr_.push_back(it->getParameter<std::vector<std::string> >("hltPaths"));
139  triggerFolderLabels_.push_back(it->getParameter<std::string>("label"));
140  }
141 
142  cleaningParameters_ = parameters.getParameter<ParameterSet>("CleaningParameters");
143 
144  verbose_ = parameters.getParameter<int>("verbose");
145 
147 
148 }
edm::EDGetTokenT< reco::CaloMETCollection > caloMetToken_
Definition: METAnalyzer.h:154
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::InputTag gtTag_
Definition: METAnalyzer.h:141
edm::EDGetTokenT< reco::CaloJetCollection > caloJetsToken_
Definition: METAnalyzer.h:145
bool bypassAllDCSChecks_
Definition: METAnalyzer.h:240
double ptThreshold_
Definition: METAnalyzer.h:176
bool runcosmics_
Definition: METAnalyzer.h:241
bool isCaloMet_
Definition: METAnalyzer.h:403
std::vector< ParameterSet > VParameterSet
Definition: ParameterSet.h:33
std::string MetType_
Definition: METAnalyzer.h:130
edm::InputTag hbheNoiseFilterResultTag_
Definition: METAnalyzer.h:139
edm::EDGetTokenT< reco::PFMETCollection > pfMetToken_
Definition: METAnalyzer.h:153
bool outputMEsInRootFile
Definition: METAnalyzer.h:131
double nPVMin_
Definition: METAnalyzer.h:232
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
std::string FolderName_
Definition: METAnalyzer.h:133
std::vector< GenericTriggerEventFlag * > triggerFolderEventFlag_
Definition: METAnalyzer.h:198
edm::InputTag beamHaloSummaryTag_
Definition: METAnalyzer.h:138
std::vector< std::vector< std::string > > triggerFolderExpr_
Definition: METAnalyzer.h:199
std::string mOutputFile_
Definition: METAnalyzer.h:132
edm::InputTag vertexTag_
Definition: METAnalyzer.h:140
edm::EDGetTokenT< std::vector< reco::Vertex > > vertexToken_
Definition: METAnalyzer.h:143
bool fill_met_high_level_histo
Definition: METAnalyzer.h:407
edm::InputTag metCollectionLabel_
Definition: METAnalyzer.h:135
std::string jetCorrectionService_
Definition: METAnalyzer.h:174
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
edm::ParameterSet cleaningParameters_
Definition: METAnalyzer.h:228
edm::EDGetTokenT< bool > hbheNoiseFilterResultToken_
Definition: METAnalyzer.h:149
edm::EDGetTokenT< reco::HcalNoiseRBXCollection > HcalNoiseRBXToken_
Definition: METAnalyzer.h:155
PF Jet selector for pat::Jets.
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
Definition: METAnalyzer.h:190
edm::EDGetTokenT< reco::PFJetCollection > pfJetsToken_
Definition: METAnalyzer.h:146
JetMETDQMDCSFilter * DCSFilter_
Definition: METAnalyzer.h:267
Jet selector for pat::Jets and for CaloJets.
PFJetIDSelectionFunctor pfjetIDFunctorLoose
Definition: METAnalyzer.h:172
double nPVMax_
Definition: METAnalyzer.h:233
edm::InputTag triggerResultsLabel_
Definition: METAnalyzer.h:189
edm::ParameterSet parameters
Definition: METAnalyzer.h:125
edm::VParameterSet triggerSelectedSubFolders_
Definition: METAnalyzer.h:197
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > gtToken_
Definition: METAnalyzer.h:144
bool bypassAllPVChecks_
Definition: METAnalyzer.h:239
edm::EDGetTokenT< edm::ValueMap< reco::JetID > > jetID_ValueMapToken_
Definition: METAnalyzer.h:169
edm::InputTag inputJetIDValueMap
Definition: METAnalyzer.h:168
edm::InputTag hcalNoiseRBXCollectionTag_
Definition: METAnalyzer.h:136
JetIDSelectionFunctor jetIDFunctorLoose
Definition: METAnalyzer.h:171
edm::EDGetTokenT< reco::BeamHaloSummary > beamHaloSummaryToken_
Definition: METAnalyzer.h:150
edm::InputTag jetCollectionLabel_
Definition: METAnalyzer.h:137
bool hTriggerLabelsIsSet_
Definition: METAnalyzer.h:277
std::vector< std::string > triggerFolderLabels_
Definition: METAnalyzer.h:200
METAnalyzer::~METAnalyzer ( )
virtual

Destructor.

Definition at line 151 of file METAnalyzer.cc.

151  {
152  for (std::vector<GenericTriggerEventFlag *>::const_iterator it = triggerFolderEventFlag_.begin(); it!= triggerFolderEventFlag_.end(); it++) {
153  delete *it;
154  }
155  delete DCSFilter_;
156 }
std::vector< GenericTriggerEventFlag * > triggerFolderEventFlag_
Definition: METAnalyzer.h:198
JetMETDQMDCSFilter * DCSFilter_
Definition: METAnalyzer.h:267

Member Function Documentation

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

Get the analysis.

  • if(isTCMet_){

Implements edm::EDAnalyzer.

Definition at line 595 of file METAnalyzer.cc.

References FamosSequences_cff::caloJets, JetCorrector::correction(), gather_cfg::cout, reco::BeamHaloSummary::CSCTightHaloId(), cmsPerfPublish::DirName, reco::BeamHaloSummary::EcalTightHaloId(), edm::Event::getByToken(), JetCorrector::getJetCorrector(), reco::BeamHaloSummary::GlobalTightHaloId(), reco::BeamHaloSummary::HcalTightHaloId(), i, edm::HandleBase::isValid(), bTagSequences_cff::jetID, LogDebug, LogTrace, edm::EventBase::luminosityBlock(), CaloMET_cfi::met, metname, NULL, pfJets_cff::pfJets, phi, edm::Handle< T >::product(), pileupReCalc_HLTpaths::scale, AlCaHLTBitMon_QueryRunRegistry::string, edm::triggerResults(), triggerResultsToken_(), and GoodVertex_cfg::vertexCollection.

595  {
596 
597 
598  // *** Fill lumisection ME
599  int myLuminosityBlock;
600  myLuminosityBlock = iEvent.luminosityBlock();
602  lumisecME=map_dijet_MEs["JetMET/lumisec"]; if(lumisecME && lumisecME->getRootObject()) lumisecME->Fill(myLuminosityBlock);
603  }
604 
605  if (myLuminosityBlock<LSBegin_) return;
606  if (myLuminosityBlock>LSEnd_ && LSEnd_>0) return;
607 
608  if (verbose_) std::cout << "METAnalyzer analyze" << std::endl;
609 
611 
612 
613 
614 
615  // ==========================================================
616  // Trigger information
617  //
618 // trigJetMB_=0;
619 // trigHighPtJet_=0;
620 // trigLowPtJet_=0;
621 // trigMinBias_=0;
622 // trigHighMET_=0;
623 // // _trig_LowMET=0;
624 // trigEle_=0;
625 // trigMuon_=0;
626 // trigPhysDec_=0;
627  std::vector<int> triggerFolderDecisions;
628  triggerFolderDecisions_ = std::vector<int> (triggerFolderEventFlag_.size(), 0);
629  // **** Get the TriggerResults container
631  iEvent.getByToken(triggerResultsToken_, triggerResults);
632 
633  if( triggerResults.isValid()) {
635  // Check how many HLT triggers are in triggerResults
636  int ntrigs = (*triggerResults).size();
637  if (verbose_) std::cout << "ntrigs=" << ntrigs << std::endl;
638  // If index=ntrigs, this HLT trigger doesn't exist in the HLT table for this data.
639  for (std::vector<GenericTriggerEventFlag *>::const_iterator it = triggerFolderEventFlag_.begin(); it!=triggerFolderEventFlag_.end();it++) {
640  unsigned pos = it - triggerFolderEventFlag_.begin();
641  bool fd = (*it)->accept(iEvent, iSetup);
642  triggerFolderDecisions_[pos] = fd;
643  }
644  allTriggerDecisions_.clear();
645  for (unsigned i=0;i<allTriggerNames_.size();++i) {
646  allTriggerDecisions_.push_back((*triggerResults).accept(i));
647 // std::cout<<"TR "<<(*triggerResults).size()<<" "<<(*triggerResults).accept(i)<<" "<<allTriggerNames_[i]<<std::endl;
648  }
649  }
650 
651  // ==========================================================
652  // MET information
653 
654  // **** Get the MET container
658 
659  //if(isTCMet_){
660  //iEvent.getByToken(tcMetToken_, tcmetcoll);
661  //if(!tcmetcoll.isValid()) return;
662  //}
663  if(isCaloMet_){
664  iEvent.getByToken(caloMetToken_, calometcoll);
665  if(!calometcoll.isValid()) return;
666  }
667  if(isPFMet_){
668  iEvent.getByToken(pfMetToken_, pfmetcoll);
669  if(!pfmetcoll.isValid()) return;
670  }
671 
672  const MET *met=NULL;
673  const PFMET *pfmet=NULL;
674  const CaloMET *calomet=NULL;
675  //if(isTCMet_){
676  //met=&(tcmetcoll->front());
677  //}
678  if(isPFMet_){
679  met=&(pfmetcoll->front());
680  pfmet=&(pfmetcoll->front());
681  }
682  if(isCaloMet_){
683  met=&(calometcoll->front());
684  calomet=&(calometcoll->front());
685  }
686 
687  LogTrace(metname)<<"[METAnalyzer] Call to the MET analyzer";
688 
689  // ==========================================================
690  // TCMET
691 
692  //if (/*isTCMet_ || */(isCaloMet_ && metCollectionLabel_.label() == "corMetGlobalMuons")) {
693 
694  //iEvent.getByToken(MuonToken_, muonHandle_);
695  //iEvent.getByToken(TrackToken_, trackHandle_);
696  //iEvent.getByToken(ElectronToken_, electronHandle_);
697  //iEvent.getByToken(BeamspotToken_, beamSpotHandle_);
698  //iEvent.getByToken(tcMETValueMapToken_,tcMetValueMapHandle_);
699 
700  //if(!muonHandle_.isValid()) edm::LogInfo("OutputInfo") << "falied to retrieve muon data require by MET Task";
701  //if(!trackHandle_.isValid()) edm::LogInfo("OutputInfo") << "falied to retrieve track data require by MET Task";
702  //if(!electronHandle_.isValid()) edm::LogInfo("OutputInfo") << "falied to retrieve electron data require by MET Task";
703  //if(!beamSpotHandle_.isValid()) edm::LogInfo("OutputInfo") << "falied to retrieve beam spot data require by MET Task";
704 
705  //beamSpot_ = ( beamSpotHandle_.isValid() ) ? beamSpotHandle_->position() : math::XYZPoint(0, 0, 0);
706  //}
707 
708  // ==========================================================
709  //
710 
712  iEvent.getByToken(HcalNoiseRBXToken_,HRBXCollection);
713  if (!HRBXCollection.isValid()) {
714  LogDebug("") << "METAnalyzer: Could not find HcalNoiseRBX Collection" << std::endl;
715  if (verbose_) std::cout << "METAnalyzer: Could not find HcalNoiseRBX Collection" << std::endl;
716  }
717 
718  edm::Handle<bool> HBHENoiseFilterResultHandle;
719  iEvent.getByToken(hbheNoiseFilterResultToken_, HBHENoiseFilterResultHandle);
720  bool HBHENoiseFilterResult = *HBHENoiseFilterResultHandle;
721  if (!HBHENoiseFilterResultHandle.isValid()) {
722  LogDebug("") << "METAnalyzer: Could not find HBHENoiseFilterResult" << std::endl;
723  if (verbose_) std::cout << "METAnalyzer: Could not find HBHENoiseFilterResult" << std::endl;
724  }
725 
726  // ==========================================================
727  bool bJetID = false;
728  bool bDiJetID = false;
729  // Jet ID -------------------------------------------------------
730  //
731 
735 
736  int collsize=-1;
737 
738  if (isCaloMet_){
739  iEvent.getByToken(caloJetsToken_, caloJets);
740  if (!caloJets.isValid()) {
741  LogDebug("") << "METAnalyzer: Could not find calojet product" << std::endl;
742  if (verbose_) std::cout << "METAnalyzer: Could not find calojet product" << std::endl;
743  }
744  collsize=caloJets->size();
745  }
747  //if (isTCMet_){
748  //iEvent.getByToken(jptJetsToken_, jptJets);
749  //if (!jptJets.isValid()) {
750  // LogDebug("") << "METAnalyzer: Could not find jptjet product" << std::endl;
751  // if (verbose_) std::cout << "METAnalyzer: Could not find jptjet product" << std::endl;
752  //}
753  //collsize=jptJets->size();
754  //}*/
755 
756  edm::Handle< edm::ValueMap<reco::JetID> >jetID_ValueMap_Handle;
757  if(/*isTCMet_ || */isCaloMet_){
758  if(!runcosmics_){
759  iEvent.getByToken(jetID_ValueMapToken_,jetID_ValueMap_Handle);
760  }
761  }
762 
763  if (isPFMet_){ iEvent.getByToken(pfJetsToken_, pfJets);
764  if (!pfJets.isValid()) {
765  LogDebug("") << "METAnalyzer: Could not find pfjet product" << std::endl;
766  if (verbose_) std::cout << "METAnalyzer: Could not find pfjet product" << std::endl;
767  }
768  collsize=pfJets->size();
769  }
770 
771  unsigned int ind1=-1;
772  double pt1=-1;
773  bool pass_jetID1=false;
774  unsigned int ind2=-1;
775  double pt2=-1;
776  bool pass_jetID2=false;
777 
778  //do loose jet ID-> check threshold on corrected jets
779  for (int ijet=0; ijet<collsize; ijet++) {
780  double pt_jet=-10;
781  double scale=1.;
782  bool iscleaned=false;
783  if (!jetCorrectionService_.empty()) {
785  if(isCaloMet_){
786  scale = corrector->correction((*caloJets)[ijet], iEvent, iSetup);
787  }
788  //if(isTCMet_){
789  //scale = corrector->correction((*jptJets)[ijet], iEvent, iSetup);
790  //}
791  if(isPFMet_){
792  scale = corrector->correction((*pfJets)[ijet], iEvent, iSetup);
793  }
794  }
795  if(isCaloMet_){
796  pt_jet=scale*(*caloJets)[ijet].pt();
797  if(pt_jet> ptThreshold_){
798  reco::CaloJetRef calojetref(caloJets, ijet);
799  if(!runcosmics_){
800  reco::JetID jetID = (*jetID_ValueMap_Handle)[calojetref];
801  iscleaned = jetIDFunctorLoose((*caloJets)[ijet], jetID);
802  }else{
803  iscleaned=true;
804  }
805  }
806  }
808  //if(isTCMet_){
809  //pt_jet=scale*(*jptJets)[ijet].pt();
810  //if(pt_jet> ptThreshold_){
811  // const edm::RefToBase<reco::Jet>& rawJet = (*jptJets)[ijet].getCaloJetRef();
812  // const reco::CaloJet *rawCaloJet = dynamic_cast<const reco::CaloJet*>(&*rawJet);
813  // reco::CaloJetRef const theCaloJetRef = (rawJet).castTo<reco::CaloJetRef>();
814  // if(!runcosmics_){
815  // reco::JetID jetID = (*jetID_ValueMap_Handle)[theCaloJetRef];
816  // iscleaned = jetIDFunctorLoose(*rawCaloJet, jetID);
817  // }else{
818  // iscleaned=true;
819  // }
820  //}
821  //}*/
822  if(isPFMet_){
823  pt_jet=scale*(*pfJets)[ijet].pt();
824  if(pt_jet> ptThreshold_){
825  iscleaned = pfjetIDFunctorLoose((*pfJets)[ijet]);
826  }
827  }
828  if(iscleaned){
829  bJetID=true;
830  }
831  if(pt_jet>pt1){
832  pt2=pt1;
833  ind2=ind1;
834  pass_jetID2=pass_jetID1;
835  pt1=pt_jet;
836  ind1=ijet;
837  pass_jetID1=iscleaned;
838  }else if (pt_jet>pt2){
839  pt2=pt_jet;
840  ind2=ijet;
841  pass_jetID2=iscleaned;
842  }
843  }
844  if(pass_jetID1 && pass_jetID2){
845  double dphi=-1.0;
846  if(isCaloMet_){
847  dphi=fabs((*caloJets)[ind1].phi()-(*caloJets)[ind2].phi());
848  }
850  //dphi=fabs((*jptJets)[ind1].phi()-(*jptJets)[ind2].phi());
851  //}*/
852  if(isPFMet_){
853  dphi=fabs((*pfJets)[ind1].phi()-(*pfJets)[ind2].phi());
854  }
855  if(dphi>acos(-1.)){
856  dphi=2*acos(-1.)-dphi;
857  }
858  if(dphi>2.7){
859  bDiJetID=true;
860  }
861  }
862 
863  // ==========================================================
864  // HCAL Noise filter
865 
866  bool bHBHENoiseFilter = HBHENoiseFilterResult;
867 
868  // ==========================================================
869  // Get BeamHaloSummary
870  edm::Handle<BeamHaloSummary> TheBeamHaloSummary ;
871  iEvent.getByToken(beamHaloSummaryToken_, TheBeamHaloSummary) ;
872 
873  if (!TheBeamHaloSummary.isValid()) {
874  if (verbose_) std::cout << "BeamHaloSummary doesn't exist" << std::endl;
875  }
876 
877  bool bBeamHaloID = true;
878 
879  if(!TheBeamHaloSummary.isValid()) {
880 
881  const BeamHaloSummary TheSummary = (*TheBeamHaloSummary.product() );
882 
883  if( !TheSummary.EcalTightHaloId() && !TheSummary.HcalTightHaloId() &&
884  !TheSummary.CSCTightHaloId() && !TheSummary.GlobalTightHaloId() )
885  bBeamHaloID = false;
886  }
887 
888  // ==========================================================
889  //Vertex information
890  Handle<VertexCollection> vertexHandle;
891  iEvent.getByToken(vertexToken_, vertexHandle);
892 
893  if (!vertexHandle.isValid()) {
894  LogDebug("") << "CaloMETAnalyzer: Could not find vertex collection" << std::endl;
895  if (verbose_) std::cout << "CaloMETAnalyzer: Could not find vertex collection" << std::endl;
896  }
897  numPV_ = 0;
898  if ( vertexHandle.isValid() ){
899  VertexCollection vertexCollection = *(vertexHandle.product());
900  numPV_ = vertexCollection.size();
901  }
902  bool bPrimaryVertex = (bypassAllPVChecks_ || (numPV_>0));
903  // ==========================================================
904 
906  iEvent.getByToken( gtToken_, gtReadoutRecord);
907 
908  if (!gtReadoutRecord.isValid()) {
909  LogDebug("") << "CaloMETAnalyzer: Could not find GT readout record" << std::endl;
910  if (verbose_) std::cout << "CaloMETAnalyzer: Could not find GT readout record product" << std::endl;
911  }
912  // DCS Filter
913  bool bDCSFilter = (bypassAllDCSChecks_ || DCSFilter_->filter(iEvent, iSetup));
914  // ==========================================================
915  // Reconstructed MET Information - fill MonitorElements
916 
917  for (std::vector<std::string>::const_iterator ic = folderNames_.begin();
918  ic != folderNames_.end(); ic++){
919  if ((*ic=="Uncleaned") &&(isCaloMet_ || bPrimaryVertex)) fillMESet(iEvent, DirName+"/"+*ic, *met,*pfmet,*calomet,map_dijet_MEs);
920  //take two lines out for first check
921  if ((*ic=="Cleaned") &&bDCSFilter&&bHBHENoiseFilter&&bPrimaryVertex&&bBeamHaloID&&bJetID) fillMESet(iEvent, DirName+"/"+*ic, *met,*pfmet,*calomet,map_dijet_MEs);
922  if ((*ic=="DiJet" ) &&bDCSFilter&&bHBHENoiseFilter&&bPrimaryVertex&&bBeamHaloID&&bDiJetID) fillMESet(iEvent, DirName+"/"+*ic, *met,*pfmet,*calomet,map_dijet_MEs);
923  }
924 }
#define LogDebug(id)
edm::EDGetTokenT< reco::CaloMETCollection > caloMetToken_
Definition: METAnalyzer.h:154
std::map< std::string, MonitorElement * > map_dijet_MEs
Definition: METAnalyzer.h:401
const bool EcalTightHaloId() const
int i
Definition: DBlmapReader.cc:9
edm::EDGetTokenT< reco::CaloJetCollection > caloJetsToken_
Definition: METAnalyzer.h:145
tuple met
____________________________________________________________________________||
Definition: CaloMET_cfi.py:4
void fillMESet(const edm::Event &, std::string, const reco::MET &, const reco::PFMET &, const reco::CaloMET &, std::map< std::string, MonitorElement * > &)
Definition: METAnalyzer.cc:928
std::vector< int > allTriggerDecisions_
Definition: METAnalyzer.h:195
bool bypassAllDCSChecks_
Definition: METAnalyzer.h:240
const bool HcalTightHaloId() const
std::vector< int > triggerFolderDecisions_
Definition: METAnalyzer.h:201
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
double ptThreshold_
Definition: METAnalyzer.h:176
const std::string metname
bool runcosmics_
Definition: METAnalyzer.h:241
virtual double correction(const LorentzVector &fJet) const =0
get correction using Jet information only
bool isCaloMet_
Definition: METAnalyzer.h:403
edm::EDGetTokenT< reco::PFMETCollection > pfMetToken_
Definition: METAnalyzer.h:153
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:59
#define NULL
Definition: scimark2.h:8
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
std::string FolderName_
Definition: METAnalyzer.h:133
const bool GlobalTightHaloId() const
std::vector< GenericTriggerEventFlag * > triggerFolderEventFlag_
Definition: METAnalyzer.h:198
Jet ID object.
Definition: JetID.h:16
tuple vertexCollection
void Fill(long long x)
const bool CSCTightHaloId() const
MonitorElement * lumisecME
Definition: METAnalyzer.h:281
edm::EDGetTokenT< std::vector< reco::Vertex > > vertexToken_
Definition: METAnalyzer.h:143
bool fill_met_high_level_histo
Definition: METAnalyzer.h:407
edm::InputTag metCollectionLabel_
Definition: METAnalyzer.h:135
std::string jetCorrectionService_
Definition: METAnalyzer.h:174
Definition: MET.h:39
edm::EDGetTokenT< bool > hbheNoiseFilterResultToken_
Definition: METAnalyzer.h:149
std::vector< std::string > folderNames_
Definition: METAnalyzer.h:269
static std::string const triggerResults
Definition: EdmProvDump.cc:41
edm::EDGetTokenT< reco::HcalNoiseRBXCollection > HcalNoiseRBXToken_
Definition: METAnalyzer.h:155
bool isValid() const
Definition: HandleBase.h:76
std::vector< std::string > allTriggerNames_
Definition: METAnalyzer.h:194
bool filter(const edm::Event &evt, const edm::EventSetup &es)
#define LogTrace(id)
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
Definition: METAnalyzer.h:190
edm::EDGetTokenT< reco::PFJetCollection > pfJetsToken_
Definition: METAnalyzer.h:146
JetMETDQMDCSFilter * DCSFilter_
Definition: METAnalyzer.h:267
TObject * getRootObject(void) const
PFJetIDSelectionFunctor pfjetIDFunctorLoose
Definition: METAnalyzer.h:172
static const JetCorrector * getJetCorrector(const std::string &fName, const edm::EventSetup &fSetup)
retrieve corrector from the event setup. troughs exception if something is missing ...
Definition: JetCorrector.cc:50
T const * product() const
Definition: Handle.h:81
std::string const & label() const
Definition: InputTag.h:42
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > gtToken_
Definition: METAnalyzer.h:144
bool bypassAllPVChecks_
Definition: METAnalyzer.h:239
tuple cout
Definition: gather_cfg.py:121
edm::EDGetTokenT< edm::ValueMap< reco::JetID > > jetID_ValueMapToken_
Definition: METAnalyzer.h:169
JetIDSelectionFunctor jetIDFunctorLoose
Definition: METAnalyzer.h:171
edm::EDGetTokenT< reco::BeamHaloSummary > beamHaloSummaryToken_
Definition: METAnalyzer.h:150
tuple pfJets
Definition: pfJets_cff.py:8
Definition: DDAxes.h:10
void METAnalyzer::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &   
)
overridevirtual

Inizialize parameters for histo binning.

Implements thread_unsafe::DQMEDAnalyzer.

Definition at line 159 of file METAnalyzer.cc.

References cmsPerfPublish::DirName, DQMStore::IBooker::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

161  {
163  ibooker.setCurrentFolder(DirName);
164 
165  folderNames_.push_back("Uncleaned");
166  folderNames_.push_back("Cleaned");
167  folderNames_.push_back("DiJet");
168 
169  for (std::vector<std::string>::const_iterator ic = folderNames_.begin();
170  ic != folderNames_.end(); ic++){
171  bookMESet(DirName+"/"+*ic, ibooker,map_dijet_MEs);
172  }
173 }
std::map< std::string, MonitorElement * > map_dijet_MEs
Definition: METAnalyzer.h:401
std::string FolderName_
Definition: METAnalyzer.h:133
edm::InputTag metCollectionLabel_
Definition: METAnalyzer.h:135
void bookMESet(std::string, DQMStore::IBooker &, std::map< std::string, MonitorElement * > &)
Definition: METAnalyzer.cc:177
std::vector< std::string > folderNames_
Definition: METAnalyzer.h:269
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
std::string const & label() const
Definition: InputTag.h:42
void METAnalyzer::bookMESet ( std::string  DirName,
DQMStore::IBooker ibooker,
std::map< std::string, MonitorElement * > &  map_of_MEs 
)
private

Definition at line 177 of file METAnalyzer.cc.

References i.

178 {
179  bool bLumiSecPlot=fill_met_high_level_histo;
180  //if (DirName.find("Uncleaned")!=std::string::npos)bLumiSecPlot=true;//now defined on configlevel
181  bookMonitorElement(DirName,ibooker,map_of_MEs,bLumiSecPlot);
182 
183  if (DirName.find("Cleaned")!=std::string::npos) {
184  for (unsigned int i = 0; i<triggerFolderEventFlag_.size(); i++) {
185  if (triggerFolderEventFlag_[i]->on()) {
186  bookMonitorElement(DirName+"/"+triggerFolderLabels_[i],ibooker,map_of_MEs,false);
187  }
188  }
189  }
190 }
int i
Definition: DBlmapReader.cc:9
void bookMonitorElement(std::string, DQMStore::IBooker &, std::map< std::string, MonitorElement * > &, bool)
Definition: METAnalyzer.cc:193
std::vector< GenericTriggerEventFlag * > triggerFolderEventFlag_
Definition: METAnalyzer.h:198
bool fill_met_high_level_histo
Definition: METAnalyzer.h:407
std::vector< std::string > triggerFolderLabels_
Definition: METAnalyzer.h:200
void METAnalyzer::bookMonitorElement ( std::string  DirName,
DQMStore::IBooker ibooker,
std::map< std::string, MonitorElement * > &  map_of_MEs,
bool  bLumiSecPlot = false 
)
private

Definition at line 193 of file METAnalyzer.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), DQMStore::IBooker::bookProfile(), gather_cfg::cout, MonitorElement::setAxisTitle(), and DQMStore::IBooker::setCurrentFolder().

194 {
195  if (verbose_) std::cout << "bookMonitorElement " << DirName << std::endl;
196 
197  ibooker.setCurrentFolder(DirName);
198 
199  hTrigger = ibooker.book1D("triggerResults", "triggerResults", 500, 0, 500);
200  hMEx = ibooker.book1D("MEx", "MEx", 200, -500, 500);
201  hMEy = ibooker.book1D("MEy", "MEy", 200, -500, 500);
202  hMET = ibooker.book1D("MET", "MET", 200, 0, 1000);
203  hSumET = ibooker.book1D("SumET", "SumET", 400, 0, 4000);
204  hMETSig = ibooker.book1D("METSig", "METSig", 51, 0, 51);
205  hMETPhi = ibooker.book1D("METPhi", "METPhi", 60, -3.2, 3.2);
206  hMET_logx = ibooker.book1D("MET_logx", "MET_logx", 40, -1, 7);
207  hSumET_logx = ibooker.book1D("SumET_logx", "SumET_logx", 40, -1, 7);
208 
209  hMEx ->setAxisTitle("MEx [GeV]", 1);
210  hMEy ->setAxisTitle("MEy [GeV]", 1);
211  hMET ->setAxisTitle("MET [GeV]", 1);
212  hSumET ->setAxisTitle("SumET [GeV]", 1);
213  hMETSig ->setAxisTitle("METSig", 1);
214  hMETPhi ->setAxisTitle("METPhi [rad]", 1);
215  hMET_logx ->setAxisTitle("log(MET) [GeV]", 1);
216  hSumET_logx->setAxisTitle("log(SumET) [GeV]", 1);
217 
218  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"triggerResults",hTrigger));
219  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MEx",hMEx));
220  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MEy",hMEy));
221  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MET",hMET));
222  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"SumET",hSumET));
223  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METSig",hMETSig));
224  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhi",hMETPhi));
225  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MET_logx",hMET_logx));
226  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"SumET_logx",hSumET_logx));
227 
228  // Book NPV profiles --> would some of these profiles be interesting for other MET types too
229  //----------------------------------------------------------------------------
230  meMEx_profile = ibooker.bookProfile("MEx_profile", "met.px()", nbinsPV_, nPVMin_, nPVMax_, 200, -500, 500);
231  meMEy_profile = ibooker.bookProfile("MEy_profile", "met.py()", nbinsPV_, nPVMin_, nPVMax_, 200, -500, 500);
232  meMET_profile = ibooker.bookProfile("MET_profile", "met.pt()", nbinsPV_, nPVMin_, nPVMax_, 200, 0, 1000);
233  meSumET_profile = ibooker.bookProfile("SumET_profile", "met.sumEt()", nbinsPV_, nPVMin_, nPVMax_, 400, 0, 4000);
234  // Set NPV profiles x-axis title
235  //----------------------------------------------------------------------------
236  meMEx_profile ->setAxisTitle("nvtx", 1);
237  meMEy_profile ->setAxisTitle("nvtx", 1);
238  meMET_profile ->setAxisTitle("nvtx", 1);
239  meSumET_profile->setAxisTitle("nvtx", 1);
240 
241  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MEx_profile",meMEx_profile));
242  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MEy_profile",meMEy_profile));
243  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MET_profile",meMET_profile));
244  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"SumET_profile",meSumET_profile));
245 
246 
247  if(isCaloMet_){
248  hCaloMaxEtInEmTowers = ibooker.book1D("CaloMaxEtInEmTowers", "CaloMaxEtInEmTowers" ,100,0,2000);
249  hCaloMaxEtInEmTowers->setAxisTitle("Et(Max) in EM Tower [GeV]",1);
250  hCaloMaxEtInHadTowers = ibooker.book1D("CaloMaxEtInHadTowers", "CaloMaxEtInHadTowers" ,100,0,2000);
251  hCaloMaxEtInHadTowers->setAxisTitle("Et(Max) in Had Tower [GeV]",1);
252 
253  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CaloMaxEtInEmTowers",hCaloMaxEtInEmTowers));
254  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CaloMaxEtInHadTowers",hCaloMaxEtInHadTowers));
255 
256  hCaloHadEtInHB = ibooker.book1D("CaloHadEtInHB","CaloHadEtInHB",100,0,2000);
257  hCaloHadEtInHB->setAxisTitle("Had Et [GeV]",1);
258  hCaloHadEtInHO = ibooker.book1D("CaloHadEtInHO","CaloHadEtInHO",25,0,500);
259  hCaloHadEtInHO->setAxisTitle("Had Et [GeV]",1);
260  hCaloHadEtInHE = ibooker.book1D("CaloHadEtInHE","CaloHadEtInHE",100,0,2000);
261  hCaloHadEtInHE->setAxisTitle("Had Et [GeV]",1);
262  hCaloHadEtInHF = ibooker.book1D("CaloHadEtInHF","CaloHadEtInHF",50,0,1000);
263  hCaloHadEtInHF->setAxisTitle("Had Et [GeV]",1);
264  hCaloEmEtInHF = ibooker.book1D("CaloEmEtInHF" ,"CaloEmEtInHF" ,25,0,500);
265  hCaloEmEtInHF->setAxisTitle("EM Et [GeV]",1);
266  hCaloEmEtInEE = ibooker.book1D("CaloEmEtInEE" ,"CaloEmEtInEE" ,50,0,1000);
267  hCaloEmEtInEE->setAxisTitle("EM Et [GeV]",1);
268  hCaloEmEtInEB = ibooker.book1D("CaloEmEtInEB" ,"CaloEmEtInEB" ,100,0,2000);
269  hCaloEmEtInEB->setAxisTitle("EM Et [GeV]",1);
270 
271  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CaloHadEtInHO",hCaloHadEtInHO));
272  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CaloHadEtInHF",hCaloHadEtInHF));
273  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CaloHadEtInHE",hCaloHadEtInHE));
274  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CaloHadEtInHB",hCaloHadEtInHB));
275  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CaloEmEtInHF",hCaloEmEtInHF));
276  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CaloEmEtInEE",hCaloEmEtInEE));
277  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CaloEmEtInEB",hCaloEmEtInEB));
278 
279  hCaloMETPhi020 = ibooker.book1D("CaloMETPhi020", "CaloMETPhi020", 60, -3.2, 3.2);
280  hCaloMETPhi020 ->setAxisTitle("METPhi [rad] (MET>20 GeV)", 1);
281 
282  //hCaloMaxEtInEmTowers = ibooker.book1D("CaloMaxEtInEmTowers", "CaloMaxEtInEmTowers" ,100,0,2000);
283  //hCaloMaxEtInEmTowers->setAxisTitle("Et(Max) in EM Tower [GeV]",1);
284  //hCaloMaxEtInHadTowers = ibooker.book1D("CaloMaxEtInHadTowers", "CaloMaxEtInHadTowers" ,100,0,2000);
285  //hCaloMaxEtInHadTowers->setAxisTitle("Et(Max) in Had Tower [GeV]",1);
286  hCaloEtFractionHadronic = ibooker.book1D("CaloEtFractionHadronic","CaloEtFractionHadronic",100,0,1);
287  hCaloEtFractionHadronic->setAxisTitle("Hadronic Et Fraction",1);
288  hCaloEmEtFraction = ibooker.book1D("CaloEmEtFraction", "CaloEmEtFraction" ,100,0,1);
289  hCaloEmEtFraction->setAxisTitle("EM Et Fraction",1);
290 
291  //hCaloEmEtFraction002 = ibooker.book1D("CaloEmEtFraction002", "CaloEmEtFraction002" ,100,0,1);
292  //hCaloEmEtFraction002->setAxisTitle("EM Et Fraction (MET>2 GeV)",1);
293  //hCaloEmEtFraction010 = ibooker.book1D("CaloEmEtFraction010", "CaloEmEtFraction010" ,100,0,1);
294  //hCaloEmEtFraction010->setAxisTitle("EM Et Fraction (MET>10 GeV)",1);
295  hCaloEmEtFraction020 = ibooker.book1D("CaloEmEtFraction020", "CaloEmEtFraction020" ,100,0,1);
296  hCaloEmEtFraction020->setAxisTitle("EM Et Fraction (MET>20 GeV)",1);
297 
298  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CaloMETPhi020",hCaloMETPhi020));
299  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CaloEtFractionHadronic",hCaloEtFractionHadronic));
300  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CaloEmEtFraction", hCaloEmEtFraction));
301  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CaloEmEtFraction020",hCaloEmEtFraction020));
302 
303 
304 
305  //if (metCollectionLabel_.label() == "corMetGlobalMuons" ) {
306  //hCalomuPt = ibooker.book1D("CalomuonPt", "CalomuonPt", 50, 0, 500);
307  //hCalomuEta = ibooker.book1D("CalomuonEta", "CalomuonEta", 60, -3.0, 3.0);
308  //hCalomuNhits = ibooker.book1D("CalomuonNhits", "CalomuonNhits", 50, 0, 50);
309  //hCalomuChi2 = ibooker.book1D("CalomuonNormalizedChi2", "CalomuonNormalizedChi2", 20, 0, 20);
310  //hCalomuD0 = ibooker.book1D("CalomuonD0", "CalomuonD0", 50, -1, 1);
311  //hCaloMExCorrection = ibooker.book1D("CaloMExCorrection", "CaloMExCorrection", 100, -500.0,500.0);
312  //hCaloMEyCorrection = ibooker.book1D("CaloMEyCorrection", "CaloMEyCorrection", 100, -500.0,500.0);
313  //hCaloMuonCorrectionFlag = ibooker.book1D("CaloCorrectionFlag","CaloCorrectionFlag", 5, -0.5, 4.5);
314 
315  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CalomuonPt",hCalomuPt));
316  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CalomuonEta",hCalomuEta));
317  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CalomuonNhit",hCalomuNhits));
318  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CalomuonNormalizedChi2",hCalomuChi2));
319  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CaloMExCorrection",hCaloMExCorrection));
320  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CaloMEyCorrection",hCaloMEyCorrection));
321  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CaloCorrectionFlag",hCaloMuonCorrectionFlag));
322  //}
323 
324  }
325 
326  if(isPFMet_){
327  mePhotonEtFraction = ibooker.book1D("PfPhotonEtFraction", "pfmet.photonEtFraction()", 50, 0, 1);
328  mePhotonEt = ibooker.book1D("PfPhotonEt", "pfmet.photonEt()", 100, 0, 1000);
329  meNeutralHadronEtFraction = ibooker.book1D("PfNeutralHadronEtFraction", "pfmet.neutralHadronEtFraction()", 50, 0, 1);
330  meNeutralHadronEt = ibooker.book1D("PfNeutralHadronEt", "pfmet.neutralHadronEt()", 100, 0, 1000);
331  meElectronEtFraction = ibooker.book1D("PfElectronEtFraction", "pfmet.electronEtFraction()", 50, 0, 1);
332  meElectronEt = ibooker.book1D("PfElectronEt", "pfmet.electronEt()", 100, 0, 1000);
333  meChargedHadronEtFraction = ibooker.book1D("PfChargedHadronEtFraction", "pfmet.chargedHadronEtFraction()", 50, 0, 1);
334  meChargedHadronEt = ibooker.book1D("PfChargedHadronEt", "pfmet.chargedHadronEt()", 100, 0, 1000);
335  meMuonEtFraction = ibooker.book1D("PfMuonEtFraction", "pfmet.muonEtFraction()", 50, 0, 1);
336  meMuonEt = ibooker.book1D("PfMuonEt", "pfmet.muonEt()", 100, 0, 1000);
337  meHFHadronEtFraction = ibooker.book1D("PfHFHadronEtFraction", "pfmet.HFHadronEtFraction()", 50, 0, 1);
338  meHFHadronEt = ibooker.book1D("PfHFHadronEt", "pfmet.HFHadronEt()", 100, 0, 1000);
339  meHFEMEtFraction = ibooker.book1D("PfHFEMEtFraction", "pfmet.HFEMEtFraction()", 50, 0, 1);
340  meHFEMEt = ibooker.book1D("PfHFEMEt", "pfmet.HFEMEt()", 100, 0, 1000);
341 
342  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfPhotonEtFraction" ,mePhotonEtFraction));
343  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfPhotonEt" ,mePhotonEt));
344  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfNeutralHadronEtFraction",meNeutralHadronEtFraction));
345  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfNeutralHadronEt" ,meNeutralHadronEt));
346  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfElectronEtFraction" ,meElectronEtFraction));
347  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfElectronEt" ,meElectronEt));
348  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfChargedHadronEtFraction",meChargedHadronEtFraction));
349  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfChargedHadronEt" ,meChargedHadronEt));
350  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfMuonEtFraction" ,meMuonEtFraction));
351  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfMuonEt" ,meMuonEt));
352  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFHadronEtFraction" ,meHFHadronEtFraction));
353  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFHadronEt" ,meHFHadronEt));
354  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFEMEtFraction" ,meHFEMEtFraction));
355  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFEMEt" ,meHFEMEt));
356 
357  mePhotonEtFraction_profile = ibooker.bookProfile("PfPhotonEtFraction_profile", "pfmet.photonEtFraction()", nbinsPV_, nPVMin_, nPVMax_, 50, 0, 1);
358  mePhotonEt_profile = ibooker.bookProfile("PfPhotonEt_profile", "pfmet.photonEt()", nbinsPV_, nPVMin_, nPVMax_, 100, 0, 1000);
359  meNeutralHadronEtFraction_profile = ibooker.bookProfile("PfNeutralHadronEtFraction_profile", "pfmet.neutralHadronEtFraction()", nbinsPV_, nPVMin_, nPVMax_, 50, 0, 1);
360  meNeutralHadronEt_profile = ibooker.bookProfile("PfNeutralHadronEt_profile", "pfmet.neutralHadronEt()", nbinsPV_, nPVMin_, nPVMax_, 100, 0, 1000);
361  meElectronEtFraction_profile = ibooker.bookProfile("PfElectronEtFraction_profile", "pfmet.electronEtFraction()", nbinsPV_, nPVMin_, nPVMax_, 50, 0, 1);
362  meElectronEt_profile = ibooker.bookProfile("PfElectronEt_profile", "pfmet.electronEt()", nbinsPV_, nPVMin_, nPVMax_, 100, 0, 1000);
363  meChargedHadronEtFraction_profile = ibooker.bookProfile("PfChargedHadronEtFraction_profile", "pfmet.chargedHadronEtFraction()", nbinsPV_, nPVMin_, nPVMax_, 50, 0, 1);
364  meChargedHadronEt_profile = ibooker.bookProfile("PfChargedHadronEt_profile", "pfmet.chargedHadronEt()", nbinsPV_, nPVMin_, nPVMax_, 100, 0, 1000);
365  meMuonEtFraction_profile = ibooker.bookProfile("PfMuonEtFraction_profile", "pfmet.muonEtFraction()", nbinsPV_, nPVMin_, nPVMax_, 50, 0, 1);
366  meMuonEt_profile = ibooker.bookProfile("PfMuonEt_profile", "pfmet.muonEt()", nbinsPV_, nPVMin_, nPVMax_, 100, 0, 1000);
367  meHFHadronEtFraction_profile = ibooker.bookProfile("PfHFHadronEtFraction_profile", "pfmet.HFHadronEtFraction()", nbinsPV_, nPVMin_, nPVMax_, 50, 0, 1);
368  meHFHadronEt_profile = ibooker.bookProfile("PfHFHadronEt_profile", "pfmet.HFHadronEt()", nbinsPV_, nPVMin_, nPVMax_, 100, 0, 1000);
369  meHFEMEtFraction_profile = ibooker.bookProfile("PfHFEMEtFraction_profile", "pfmet.HFEMEtFraction()", nbinsPV_, nPVMin_, nPVMax_, 50, 0, 1);
370  meHFEMEt_profile = ibooker.bookProfile("PfHFEMEt_profile", "pfmet.HFEMEt()", nbinsPV_, nPVMin_, nPVMax_, 100, 0, 1000);
371 
373  mePhotonEt_profile ->setAxisTitle("nvtx", 1);
377  meElectronEt_profile ->setAxisTitle("nvtx", 1);
381  meMuonEt_profile ->setAxisTitle("nvtx", 1);
383  meHFHadronEt_profile ->setAxisTitle("nvtx", 1);
385  meHFEMEt_profile ->setAxisTitle("nvtx", 1);
386 
387  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfPhotonEtFraction_profile" ,mePhotonEtFraction_profile));
388  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfPhotonEt_profile" ,mePhotonEt_profile));
389  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfNeutralHadronEtFraction_profile" ,meNeutralHadronEtFraction_profile));
390  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfNeutralHadronEt_profile" ,meNeutralHadronEt_profile));
391  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfElectronEtFraction_profile" ,meElectronEtFraction_profile));
392  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfElectronEt_profile" ,meElectronEt_profile));
393  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfChargedHadronEtFraction_profile" ,meChargedHadronEtFraction_profile));
394  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfChargedHadronEt_profile" ,meChargedHadronEt_profile));
395  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfMuonEtFraction_profile" ,meMuonEtFraction_profile));
396  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfMuonEt_profile" ,meMuonEt_profile));
397  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFHadronEtFraction_profile" ,meHFHadronEtFraction_profile));
398  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFHadronEt_profile" ,meHFHadronEt_profile));
399  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFEMEtFraction_profile" ,meHFEMEtFraction_profile));
400  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFEMEt_profile" ,meHFEMEt_profile));
401  }
402 
403  if (isCaloMet_){
404  if (fill_met_high_level_histo){//now configurable in python file
405  hMExLS = ibooker.book2D("MExLS","MEx_LS",200,-200,200,250,0.,2500.);
406  hMExLS->setAxisTitle("MEx [GeV]",1);
407  hMExLS->setAxisTitle("Lumi Section",2);
408  hMExLS->getTH2F()->SetOption("colz");
409  hMEyLS = ibooker.book2D("MEyLS","MEy_LS",200,-200,200,250,0.,2500.);
410  hMEyLS->setAxisTitle("MEy [GeV]",1);
411  hMEyLS->setAxisTitle("Lumi Section",2);
412  hMEyLS->getTH2F()->SetOption("colz");
413  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MExLS",hMExLS));
414  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MEyLS",hMEyLS));
415  }
416  }
417 
418  //if (isTCMet_) {
419  //htrkPt = ibooker.book1D("trackPt", "trackPt", 50, 0, 500);
420  //htrkEta = ibooker.book1D("trackEta", "trackEta", 60, -3.0, 3.0);
421  //htrkNhits = ibooker.book1D("trackNhits", "trackNhits", 50, 0, 50);
422  //htrkChi2 = ibooker.book1D("trackNormalizedChi2", "trackNormalizedChi2", 20, 0, 20);
423  //htrkD0 = ibooker.book1D("trackD0", "trackd0", 50, -1, 1);
424  //helePt = ibooker.book1D("electronPt", "electronPt", 50, 0, 500);
425  //heleEta = ibooker.book1D("electronEta", "electronEta", 60, -3.0, 3.0);
426  //heleHoE = ibooker.book1D("electronHoverE", "electronHoverE", 25, 0, 0.5);
427  //hmuPt = ibooker.book1D("muonPt", "muonPt", 50, 0, 500);
428  //hmuEta = ibooker.book1D("muonEta", "muonEta", 60, -3.0, 3.0);
429  //hmuNhits = ibooker.book1D("muonNhits", "muonNhits", 50, 0, 50);
430  //hmuChi2 = ibooker.book1D("muonNormalizedChi2", "muonNormalizedChi2", 20, 0, 20);
431  //hmuD0 = ibooker.book1D("muonD0", "muonD0", 50, -1, 1);
432 
433  //hMExCorrection = ibooker.book1D("MExCorrection", "MExCorrection", 100, -500.0,500.0);
434  //hMEyCorrection = ibooker.book1D("MEyCorrection", "MEyCorrection", 100, -500.0,500.0);
435  //hMuonCorrectionFlag = ibooker.book1D("CorrectionFlag","CorrectionFlag", 5, -0.5, 4.5);
436 
437  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"trackPt" ,htrkPt));
438  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"trackEta" ,htrkEta));
439  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"trackNhits",htrkNhits));
440  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"trackNormalizedChi2" ,htrkChi2));
441  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"trackD0" ,htrkD0));
442  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"electronPt" ,helePt));
443  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"electronEta" ,heleEta));
444  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"electronHoverE",heleHoE));
445  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"muonPt" ,hmuPt));
446  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"muonEta" ,hmuEta));
447  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"muonNhits",hmuNhits));
448  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"muonNormalizedChi2" ,hmuChi2));
449  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"muonD0" ,hmuD0));
450  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MExCorrection" ,hMExCorrection));
451  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MEyCorrection" ,hMEyCorrection));
452  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CorrectionFlag" ,hMuonCorrectionFlag));
453  //}
454 
455  hMETRate = ibooker.book1D("METRate", "METRate", 200, 0, 1000);
456  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METRate",hMETRate));
457 
458 
459  ibooker.setCurrentFolder("JetMET");
460  lumisecME = ibooker.book1D("lumisec", "lumisec", 2500, 0., 2500.);
461  map_of_MEs.insert(std::pair<std::string,MonitorElement*>("JetMET/lumisec",lumisecME));
462 
463 }
MonitorElement * meElectronEt_profile
Definition: METAnalyzer.h:391
MonitorElement * hMExLS
Definition: METAnalyzer.h:292
MonitorElement * hSumET
Definition: METAnalyzer.h:290
MonitorElement * meNeutralHadronEtFraction
Definition: METAnalyzer.h:365
MonitorElement * meNeutralHadronEtFraction_profile
Definition: METAnalyzer.h:388
MonitorElement * meElectronEtFraction_profile
Definition: METAnalyzer.h:390
MonitorElement * hMEy
Definition: METAnalyzer.h:285
MonitorElement * hCaloMETPhi020
Definition: METAnalyzer.h:299
MonitorElement * mePhotonEt
Definition: METAnalyzer.h:364
MonitorElement * meChargedHadronEtFraction_profile
Definition: METAnalyzer.h:392
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:155
MonitorElement * hCaloHadEtInHF
Definition: METAnalyzer.h:313
bool isCaloMet_
Definition: METAnalyzer.h:403
MonitorElement * hMEx
Definition: METAnalyzer.h:284
MonitorElement * hCaloHadEtInHE
Definition: METAnalyzer.h:312
MonitorElement * hCaloEtFractionHadronic
Definition: METAnalyzer.h:303
MonitorElement * hMEyLS
Definition: METAnalyzer.h:293
double nPVMin_
Definition: METAnalyzer.h:232
MonitorElement * meHFHadronEtFraction
Definition: METAnalyzer.h:373
MonitorElement * hMET_logx
Definition: METAnalyzer.h:295
MonitorElement * hCaloEmEtInHF
Definition: METAnalyzer.h:314
MonitorElement * meHFEMEtFraction_profile
Definition: METAnalyzer.h:398
MonitorElement * hCaloHadEtInHO
Definition: METAnalyzer.h:311
MonitorElement * meChargedHadronEtFraction
Definition: METAnalyzer.h:369
MonitorElement * meMEx_profile
Definition: METAnalyzer.h:381
MonitorElement * hMET
Definition: METAnalyzer.h:288
MonitorElement * hTrigger
Definition: METAnalyzer.h:282
MonitorElement * lumisecME
Definition: METAnalyzer.h:281
MonitorElement * hCaloMaxEtInHadTowers
Definition: METAnalyzer.h:302
bool fill_met_high_level_histo
Definition: METAnalyzer.h:407
MonitorElement * hMETPhi
Definition: METAnalyzer.h:289
MonitorElement * hCaloEmEtInEE
Definition: METAnalyzer.h:315
MonitorElement * meMuonEt
Definition: METAnalyzer.h:372
MonitorElement * meHFEMEt_profile
Definition: METAnalyzer.h:399
MonitorElement * hSumET_logx
Definition: METAnalyzer.h:296
MonitorElement * meMuonEt_profile
Definition: METAnalyzer.h:395
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:113
MonitorElement * hCaloEmEtFraction
Definition: METAnalyzer.h:304
MonitorElement * meChargedHadronEt
Definition: METAnalyzer.h:370
MonitorElement * hMETSig
Definition: METAnalyzer.h:287
MonitorElement * meChargedHadronEt_profile
Definition: METAnalyzer.h:393
MonitorElement * meMuonEtFraction
Definition: METAnalyzer.h:371
MonitorElement * mePhotonEtFraction
Definition: METAnalyzer.h:363
MonitorElement * hCaloMaxEtInEmTowers
Definition: METAnalyzer.h:301
MonitorElement * mePhotonEt_profile
Definition: METAnalyzer.h:387
MonitorElement * meElectronEt
Definition: METAnalyzer.h:368
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:131
MonitorElement * meMET_profile
Definition: METAnalyzer.h:383
MonitorElement * meHFHadronEt
Definition: METAnalyzer.h:374
MonitorElement * hCaloEmEtInEB
Definition: METAnalyzer.h:316
MonitorElement * hCaloHadEtInHB
Definition: METAnalyzer.h:310
double nPVMax_
Definition: METAnalyzer.h:233
MonitorElement * meHFHadronEtFraction_profile
Definition: METAnalyzer.h:396
MonitorElement * meHFEMEtFraction
Definition: METAnalyzer.h:375
MonitorElement * hCaloEmEtFraction020
Definition: METAnalyzer.h:308
MonitorElement * meHFEMEt
Definition: METAnalyzer.h:376
MonitorElement * meMEy_profile
Definition: METAnalyzer.h:382
tuple cout
Definition: gather_cfg.py:121
MonitorElement * meElectronEtFraction
Definition: METAnalyzer.h:367
MonitorElement * meSumET_profile
Definition: METAnalyzer.h:384
TH2F * getTH2F(void) const
MonitorElement * meHFHadronEt_profile
Definition: METAnalyzer.h:397
MonitorElement * hMETRate
Definition: METAnalyzer.h:226
MonitorElement * meNeutralHadronEt_profile
Definition: METAnalyzer.h:389
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * mePhotonEtFraction_profile
Definition: METAnalyzer.h:386
MonitorElement * meMuonEtFraction_profile
Definition: METAnalyzer.h:394
MonitorElement * meNeutralHadronEt
Definition: METAnalyzer.h:366
void METAnalyzer::dqmBeginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
virtual

Initialize run-based parameters.

Reimplemented from thread_unsafe::DQMEDAnalyzer.

Definition at line 466 of file METAnalyzer.cc.

References gather_cfg::cout, i, Parameters::parameters, and AlCaHLTBitMon_QueryRunRegistry::string.

467 {
468 
469 // std::cout << "Run " << iRun.run() << " hltconfig.init "
470 // << hltConfig_.init(iRun,iSetup,triggerResultsLabel_.process(),changed_) << " length: "<<hltConfig_.triggerNames().size()<<" changed "<<changed_<<std::endl;
471  bool changed(true);
472  if (hltConfig_.init(iRun,iSetup,triggerResultsLabel_.process(),changed)) {
473  if (changed) {
474  hltConfig_.dump("ProcessName");
475  hltConfig_.dump("GlobalTag");
476  hltConfig_.dump("TableName");
477 // hltConfig_.dump("Streams");
478 // hltConfig_.dump("Datasets");
479 // hltConfig_.dump("PrescaleTable");
480 // hltConfig_.dump("ProcessPSet");
481  }
482  } else {
483  if (verbose_) std::cout << "HLTEventAnalyzerAOD::analyze:"
484  << " config extraction failure with process name "
485  << triggerResultsLabel_.process() << std::endl;
486  }
487 
488  allTriggerNames_.clear();
489  for (unsigned i = 0; i<hltConfig_.size();i++) {
491  }
492 // std::cout<<"Length: "<<allTriggerNames_.size()<<std::endl;
493 
495  for ( std::vector<GenericTriggerEventFlag *>::const_iterator it = triggerFolderEventFlag_.begin(); it!= triggerFolderEventFlag_.end(); it++) {
496  int pos = it - triggerFolderEventFlag_.begin();
497  if ((*it)->on()) {
498  (*it)->initRun( iRun, iSetup );
499  if (triggerSelectedSubFolders_[pos].exists(std::string("hltDBKey"))) {
500 // std::cout<<"Looking for hltDBKey for"<<triggerFolderLabels_[pos]<<std::endl;
501  if ((*it)->expressionsFromDB((*it)->hltDBKey(), iSetup)[0] != "CONFIG_ERROR")
502  triggerFolderExpr_[pos] = (*it)->expressionsFromDB((*it)->hltDBKey(), iSetup);
503  }
504 // for (unsigned j = 0; j<triggerFolderExpr_[pos].size(); j++) std::cout<<"pos "<<pos<<" "<<triggerFolderLabels_[pos]<<" triggerFolderExpr_"<<triggerFolderExpr_[pos][j]<<std::endl;
505  }
506  }
507 }
unsigned int size() const
number of trigger paths in trigger table
void dump(const std::string &what) const
Dumping config info to cout.
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
HLTConfigProvider hltConfig_
Definition: METAnalyzer.h:188
const std::string & triggerName(unsigned int triggerIndex) const
std::vector< ParameterSet > VParameterSet
Definition: ParameterSet.h:33
std::vector< GenericTriggerEventFlag * > triggerFolderEventFlag_
Definition: METAnalyzer.h:198
std::vector< std::vector< std::string > > triggerFolderExpr_
Definition: METAnalyzer.h:199
std::vector< std::string > allTriggerNames_
Definition: METAnalyzer.h:194
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
edm::InputTag triggerResultsLabel_
Definition: METAnalyzer.h:189
edm::ParameterSet parameters
Definition: METAnalyzer.h:125
std::string const & process() const
Definition: InputTag.h:46
edm::VParameterSet triggerSelectedSubFolders_
Definition: METAnalyzer.h:197
tuple cout
Definition: gather_cfg.py:121
void METAnalyzer::endRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
virtual

Finish up a run.

Reimplemented from edm::EDAnalyzer.

Definition at line 510 of file METAnalyzer.cc.

References cmsPerfPublish::DirName, TrackerOfflineValidation_Dqm_cff::dirName, MonitorElement::getRootObject(), MonitorElement::getTH1F(), i, and AlCaHLTBitMon_QueryRunRegistry::string.

511 {
512 
513  //
514  //--- Check the time length of the Run from the lumi section plots
515 
516 
517  TH1F* tlumisec;
518 
519  MonitorElement *meLumiSec = map_dijet_MEs["aaa"];
520  meLumiSec = map_dijet_MEs["JetMET/lumisec"];
521 
522  int totlsec=0;
523  int totlssecsum=0;
524  double totltime=0.;
525  if (meLumiSec && meLumiSec->getRootObject() ) {
526  tlumisec = meLumiSec->getTH1F();
527  //check overflow bin (if we have more than 2500 LS in a run)
528  //lumisec is filled every time the analyze section is processed
529  //we know an LS is present only once in a run: normalize how many events we had on average
530  //if lumi fluctuates strongly might be unreliable for overflow bin though
531  for (int i=0; i< (tlumisec->GetNbinsX()); i++){
532  if (tlumisec->GetBinContent(i)!=0){
533  totlsec+=1;
534  totlssecsum+=tlumisec->GetBinContent(i);
535  }
536  }
537  int num_per_ls=(double)totlssecsum/(double)totlsec;
538  totlsec=totlsec+tlumisec->GetBinContent(tlumisec->GetNbinsX()+1)/(double)num_per_ls;
539  totltime = double(totlsec*90); // one lumi sec ~ 90 (sec)
540  }
541 
542  if (totltime==0.) totltime=1.;
543 
545  //dbe_->setCurrentFolder(dirName);
546 
547 
548 
549  //below is the original METAnalyzer formulation
550 
551  for (std::vector<std::string>::const_iterator ic = folderNames_.begin(); ic != folderNames_.end(); ic++) {
553  DirName = dirName+*ic;
554  makeRatePlot(DirName,totltime);
555  for ( std::vector<GenericTriggerEventFlag *>::const_iterator it = triggerFolderEventFlag_.begin(); it!= triggerFolderEventFlag_.end(); it++) {
556  int pos = it - triggerFolderEventFlag_.begin();
557  if ((*it)->on()) {
558  makeRatePlot(DirName+"/"+triggerFolderLabels_[pos],totltime);
559  }
560  }
561  }
562 
563 }
std::map< std::string, MonitorElement * > map_dijet_MEs
Definition: METAnalyzer.h:401
int i
Definition: DBlmapReader.cc:9
std::string FolderName_
Definition: METAnalyzer.h:133
std::vector< GenericTriggerEventFlag * > triggerFolderEventFlag_
Definition: METAnalyzer.h:198
void makeRatePlot(std::string, double)
Definition: METAnalyzer.cc:567
edm::InputTag metCollectionLabel_
Definition: METAnalyzer.h:135
std::vector< std::string > folderNames_
Definition: METAnalyzer.h:269
TObject * getRootObject(void) const
TH1F * getTH1F(void) const
std::string const & label() const
Definition: InputTag.h:42
std::vector< std::string > triggerFolderLabels_
Definition: METAnalyzer.h:200
void METAnalyzer::fillMESet ( const edm::Event iEvent,
std::string  DirName,
const reco::MET met,
const reco::PFMET pfmet,
const reco::CaloMET calomet,
std::map< std::string, MonitorElement * > &  map_of_MEs 
)

Definition at line 928 of file METAnalyzer.cc.

References i, and AlCaHLTBitMon_QueryRunRegistry::string.

930 {
931 
932  //dbe_->setCurrentFolder(DirName);
933 
934  bool bLumiSecPlot=fill_met_high_level_histo;
935  //if (DirName.find("Uncleaned")) bLumiSecPlot=true; //now done on configlevel
936  fillMonitorElement(iEvent, DirName, std::string(""), met, pfmet, calomet, map_of_MEs,bLumiSecPlot);
937  if (DirName.find("Cleaned")) {
938  for (unsigned i = 0; i<triggerFolderLabels_.size(); i++) {
939  if (triggerFolderDecisions_[i]) fillMonitorElement(iEvent, DirName, triggerFolderLabels_[i], met, pfmet, calomet, map_of_MEs, false);
940  }
941  }
942 
943  if (DirName.find("DiJet")) {
944  for (unsigned i = 0; i<triggerFolderLabels_.size(); i++) {
945  if (triggerFolderDecisions_[i]) fillMonitorElement(iEvent, DirName, triggerFolderLabels_[i], met, pfmet, calomet, map_of_MEs, false);
946  }
947  }
948 
949 
950 
951 
952 
953 
954 
955 // if (trigJetMB_)
956 // fillMonitorElement(iEvent,DirName,"",met,pfmet,calomet, bLumiSecPlot);
957 // if (trigHighPtJet_)
958 // fillMonitorElement(iEvent,DirName,"HighPtJet",met,pfmet,calomet,false);
959 // if (trigLowPtJet_)
960 // fillMonitorElement(iEvent,DirName,"LowPtJet",met,pfmet,calomet,false);
961 // if (trigMinBias_)
962 // fillMonitorElement(iEvent,DirName,"MinBias",met,pfmet,calomet,false);
963 // if (trigHighMET_)
964 // fillMonitorElement(iEvent,DirName,"HighMET",met,pfmet,calomet,false);
965 // // if (_trig_LowMET)
966 // // fillMonitorElement(iEvent,DirName,"LowMET",met,pfmet,calomet,false);
967 // if (trigEle_)
968 // fillMonitorElement(iEvent,DirName,"Ele",met,pfmet,calomet,false);
969 // if (trigMuon_)
970 // fillMonitorElement(iEvent,DirName,"Muon",met,pfmet,calomet,false);
971 }
int i
Definition: DBlmapReader.cc:9
std::vector< int > triggerFolderDecisions_
Definition: METAnalyzer.h:201
bool fill_met_high_level_histo
Definition: METAnalyzer.h:407
void fillMonitorElement(const edm::Event &, std::string, std::string, const reco::MET &, const reco::PFMET &, const reco::CaloMET &, std::map< std::string, MonitorElement * > &, bool)
Definition: METAnalyzer.cc:974
std::vector< std::string > triggerFolderLabels_
Definition: METAnalyzer.h:200
void METAnalyzer::fillMonitorElement ( const edm::Event iEvent,
std::string  DirName,
std::string  subFolderName,
const reco::MET met,
const reco::PFMET pfmet,
const reco::CaloMET calomet,
std::map< std::string, MonitorElement * > &  map_of_MEs,
bool  bLumiSecPlot 
)
  • if (isTCMet_) {

Definition at line 974 of file METAnalyzer.cc.

References reco::PFMET::chargedHadronEt(), reco::PFMET::chargedHadronEtFraction(), reco::PFMET::electronEt(), reco::PFMET::electronEtFraction(), reco::CaloMET::emEtFraction(), reco::CaloMET::emEtInEB(), reco::CaloMET::emEtInEE(), reco::CaloMET::emEtInHF(), reco::CaloMET::etFractionHadronic(), HcalObjRepresent::Fill(), reco::CaloMET::hadEtInHB(), reco::CaloMET::hadEtInHE(), reco::CaloMET::hadEtInHF(), reco::CaloMET::hadEtInHO(), reco::PFMET::HFEMEt(), reco::PFMET::HFEMEtFraction(), reco::PFMET::HFHadronEt(), reco::PFMET::HFHadronEtFraction(), i, edm::EventBase::luminosityBlock(), reco::CaloMET::maxEtInEmTowers(), reco::CaloMET::maxEtInHadTowers(), reco::MET::mEtSig(), reco::PFMET::muonEt(), reco::PFMET::muonEtFraction(), reco::PFMET::neutralHadronEt(), reco::PFMET::neutralHadronEtFraction(), reco::LeafCandidate::phi(), reco::PFMET::photonEt(), reco::PFMET::photonEtFraction(), reco::LeafCandidate::pt(), reco::LeafCandidate::px(), reco::LeafCandidate::py(), and reco::MET::sumEt().

977 {
978 
979 // if (subFolderName=="HighPtJet") {
980 // if (!selectHighPtJetEvent(iEvent)) return;
981 // }
982 // else if (subFolderName=="LowPtJet") {
983 // if (!selectLowPtJetEvent(iEvent)) return;
984 // }
985 // else if (subFolderName=="HighMET") {
986 // if (met.pt()<highMETThreshold_) return;
987 // }
988 // // else if (subFolderName=="LowMET") {
989 // // if (met.pt()<_lowMETThreshold) return;
990 // // }
991 // else if (subFolderName=="Ele") {
992 // if (!selectWElectronEvent(iEvent)) return;
993 // }
994 // else if (subFolderName=="Muon") {
995 // if (!selectWMuonEvent(iEvent)) return;
996 // }
997 
998 // Reconstructed MET Information
999  double SumET = met.sumEt();
1000  double METSig = met.mEtSig();
1001  //double Ez = met.e_longitudinal();
1002  double MET = met.pt();
1003  double MEx = met.px();
1004  double MEy = met.py();
1005  double METPhi = met.phi();
1006  //
1007  int myLuminosityBlock;
1008  myLuminosityBlock = iEvent.luminosityBlock();
1009  //
1010 
1011  if (subFolderName!="") DirName = DirName +"/"+subFolderName;
1012 
1013 
1014  hTrigger = map_of_MEs[DirName+"/triggerResults"];
1015  // std::cout<<"Hello"<<c++<<":"<<hTrigger <<std::endl;//":"<< hTrigger->getRootObject()<<std::endl;
1016  if (hTrigger && hTrigger->getRootObject()) {
1017  // std::cout<<"Hello"<<c++<<std::endl;
1018  for (unsigned int i = 0; i<allTriggerDecisions_.size();i++){
1019  // std::cout<<"Hello"<<c++<<":"<<i<<":"<< allTriggerDecisions_[i]<<":"<<allTriggerDecisions_[i]<<std::endl;
1020  if(i<(unsigned int)hTrigger->getNbinsX()){
1022  if (!hTriggerLabelsIsSet_) {
1023  hTrigger->setBinLabel(i+1, allTriggerNames_[i]);//Can't be done in beginJob (no trigger list). Can't be done in beginRun (would have to anticipate folder structure).FIXME doesn't work
1024  }
1025  }
1026  }
1027  if (!hTriggerLabelsIsSet_) for (int i = allTriggerDecisions_.size(); i<hTrigger->getNbinsX();i++){
1028  hTrigger->setBinLabel(i+1, "");//Can't be done in beginJob (no trigger list). Can't be done in beginRun (would have to anticipate folder structure).
1029  }
1030  hTriggerLabelsIsSet_ = true;
1031  // std::cout<<"Filling decision "<<allTriggerNames_[i]<<" "<<allTriggerDecisions_[i]<<std::endl;
1032  }
1033 
1034 
1035  hMEx = map_of_MEs[DirName+"/"+"MEx"]; if (hMEx && hMEx->getRootObject()) hMEx ->Fill(MEx);
1036  hMEy = map_of_MEs[DirName+"/"+"MEy"]; if (hMEy && hMEy->getRootObject()) hMEy ->Fill(MEy);
1037  hMET = map_of_MEs[DirName+"/"+"MET"]; if (hMET && hMET->getRootObject()) hMET ->Fill(MET);
1038  hMETPhi = map_of_MEs[DirName+"/"+"METPhi"]; if (hMETPhi && hMETPhi->getRootObject()) hMETPhi ->Fill(METPhi);
1039  hSumET = map_of_MEs[DirName+"/"+"SumET"]; if (hSumET && hSumET->getRootObject()) hSumET ->Fill(SumET);
1040  hMETSig = map_of_MEs[DirName+"/"+"METSig"]; if (hMETSig && hMETSig->getRootObject()) hMETSig ->Fill(METSig);
1041  hMET_logx = map_of_MEs[DirName+"/"+"MET_logx"]; if (hMET_logx && hMET_logx->getRootObject()) hMET_logx->Fill(log10(MET));
1042  hSumET_logx = map_of_MEs[DirName+"/"+"SumET_logx"]; if (hSumET_logx && hSumET_logx->getRootObject()) hSumET_logx->Fill(log10(SumET));
1043 
1044  // Fill NPV profiles
1045  //--------------------------------------------------------------------------
1046  meMEx_profile = map_of_MEs[DirName + "/MEx_profile"];
1047  meMEy_profile = map_of_MEs[DirName + "/MEy_profile"];
1048  meMET_profile = map_of_MEs[DirName + "/MET_profile"];
1049  meSumET_profile = map_of_MEs[DirName + "/SumET_profile"];
1050 
1051  if (meMEx_profile && meMEx_profile ->getRootObject()) meMEx_profile ->Fill(numPV_, MEx);
1052  if (meMEy_profile && meMEy_profile ->getRootObject()) meMEy_profile ->Fill(numPV_, MEy);
1053  if (meMET_profile && meMET_profile ->getRootObject()) meMET_profile ->Fill(numPV_, MET);
1055 
1056  if(isCaloMet_){
1057  //const reco::CaloMETCollection *calometcol = calometcoll.product();
1058  //const reco::CaloMET *calomet;
1059  //calomet = &(calometcol->front());
1060 
1061  double caloEtFractionHadronic = calomet.etFractionHadronic();
1062  double caloEmEtFraction = calomet.emEtFraction();
1063 
1064  double caloMaxEtInEMTowers = calomet.maxEtInEmTowers();
1065  double caloMaxEtInHadTowers = calomet.maxEtInHadTowers();
1066 
1067  double caloHadEtInHB = calomet.hadEtInHB();
1068  double caloHadEtInHO = calomet.hadEtInHO();
1069  double caloHadEtInHE = calomet.hadEtInHE();
1070  double caloHadEtInHF = calomet.hadEtInHF();
1071  double caloEmEtInEB = calomet.emEtInEB();
1072  double caloEmEtInEE = calomet.emEtInEE();
1073  double caloEmEtInHF = calomet.emEtInHF();
1074 
1075  hCaloMaxEtInEmTowers = map_of_MEs[DirName+"/"+"CaloMaxEtInEmTowers"]; if (hCaloMaxEtInEmTowers && hCaloMaxEtInEmTowers->getRootObject()) hCaloMaxEtInEmTowers->Fill(caloMaxEtInEMTowers);
1076  hCaloMaxEtInHadTowers = map_of_MEs[DirName+"/"+"CaloMaxEtInHadTowers"]; if (hCaloMaxEtInHadTowers && hCaloMaxEtInHadTowers->getRootObject()) hCaloMaxEtInHadTowers->Fill(caloMaxEtInHadTowers);
1077 
1078  hCaloHadEtInHB = map_of_MEs[DirName+"/"+"CaloHadEtInHB"]; if (hCaloHadEtInHB && hCaloHadEtInHB->getRootObject()) hCaloHadEtInHB->Fill(caloHadEtInHB);
1079  hCaloHadEtInHO = map_of_MEs[DirName+"/"+"CaloHadEtInHO"]; if (hCaloHadEtInHO && hCaloHadEtInHO->getRootObject()) hCaloHadEtInHO->Fill(caloHadEtInHO);
1080  hCaloHadEtInHE = map_of_MEs[DirName+"/"+"CaloHadEtInHE"]; if (hCaloHadEtInHE && hCaloHadEtInHE->getRootObject()) hCaloHadEtInHE->Fill(caloHadEtInHE);
1081  hCaloHadEtInHF = map_of_MEs[DirName+"/"+"CaloHadEtInHF"]; if (hCaloHadEtInHF && hCaloHadEtInHF->getRootObject()) hCaloHadEtInHF->Fill(caloHadEtInHF);
1082  hCaloEmEtInEB = map_of_MEs[DirName+"/"+"CaloEmEtInEB"]; if (hCaloEmEtInEB && hCaloEmEtInEB->getRootObject()) hCaloEmEtInEB->Fill(caloEmEtInEB);
1083  hCaloEmEtInEE = map_of_MEs[DirName+"/"+"CaloEmEtInEE"]; if (hCaloEmEtInEE && hCaloEmEtInEE->getRootObject()) hCaloEmEtInEE->Fill(caloEmEtInEE);
1084  hCaloEmEtInHF = map_of_MEs[DirName+"/"+"CaloEmEtInHF"]; if (hCaloEmEtInHF && hCaloEmEtInHF->getRootObject()) hCaloEmEtInHF->Fill(caloEmEtInHF);
1085 
1086  hCaloMETPhi020 = map_of_MEs[DirName+"/"+"CaloMETPhi020"]; if (MET> 20. && hCaloMETPhi020 && hCaloMETPhi020->getRootObject()) { hCaloMETPhi020->Fill(METPhi);}
1087 
1088 
1089  hCaloEtFractionHadronic = map_of_MEs[DirName+"/"+"CaloEtFractionHadronic"]; if (hCaloEtFractionHadronic && hCaloEtFractionHadronic->getRootObject()) hCaloEtFractionHadronic->Fill(caloEtFractionHadronic);
1090  hCaloEmEtFraction = map_of_MEs[DirName+"/"+"CaloEmEtFraction"]; if (hCaloEmEtFraction && hCaloEmEtFraction->getRootObject()) hCaloEmEtFraction->Fill(caloEmEtFraction);
1091  hCaloEmEtFraction020 = map_of_MEs[DirName+"/"+"CaloEmEtFraction020"]; if (MET> 20. && hCaloEmEtFraction020 && hCaloEmEtFraction020->getRootObject()) hCaloEmEtFraction020->Fill(caloEmEtFraction);
1092  //if (metCollectionLabel_.label() == "corMetGlobalMuons" ) {
1093 
1094  //for( reco::MuonCollection::const_iterator muonit = muonHandle_->begin(); muonit != muonHandle_->end(); muonit++ ) {
1095  // const reco::TrackRef siTrack = muonit->innerTrack();
1096  // hCalomuPt = map_of_MEs[DirName+"/"+"CalomuonPt"];
1097  // if (hCalomuPt && hCalomuPt->getRootObject()) hCalomuPt->Fill( muonit->p4().pt() );
1098  // hCalomuEta = map_of_MEs[DirName+"/"+"CalomuonEta"]; if (hCalomuEta && hCalomuEta->getRootObject()) hCalomuEta->Fill( muonit->p4().eta() );
1099  // hCalomuNhits = map_of_MEs[DirName+"/"+"CalomuonNhits"]; if (hCalomuNhits && hCalomuNhits->getRootObject()) hCalomuNhits->Fill( siTrack.isNonnull() ? siTrack->numberOfValidHits() : -999 );
1100  // hCalomuChi2 = map_of_MEs[DirName+"/"+"CalomuonNormalizedChi2"]; if (hCalomuChi2 && hCalomuChi2->getRootObject()) hCalomuChi2->Fill( siTrack.isNonnull() ? siTrack->chi2()/siTrack->ndof() : -999 );
1101  // double d0 = siTrack.isNonnull() ? -1 * siTrack->dxy( beamSpot_) : -999;
1102  // hCalomuD0 = map_of_MEs[DirName+"/"+"CalomuonD0"]; if (hCalomuD0 && hCalomuD0->getRootObject()) hCalomuD0->Fill( d0 );
1103  //}
1104 
1105  //const unsigned int nMuons = muonHandle_->size();
1106  //for( unsigned int mus = 0; mus < nMuons; mus++ ) {
1107  // reco::MuonRef muref( muonHandle_, mus);
1108  // reco::MuonMETCorrectionData muCorrData = (*tcMetValueMapHandle_)[muref];
1109  // hCaloMExCorrection = map_of_MEs[DirName+"/"+"CaloMExCorrection"]; if (hCaloMExCorrection && hCaloMExCorrection->getRootObject()) hCaloMExCorrection-> Fill(muCorrData.corrY());
1110  // hCaloMEyCorrection = map_of_MEs[DirName+"/"+"CaloMEyCorrection"]; if (hCaloMEyCorrection && hCaloMEyCorrection->getRootObject()) hCaloMEyCorrection-> Fill(muCorrData.corrX());
1111  // hCaloMuonCorrectionFlag = map_of_MEs[DirName+"/"+"CaloMuonCorrectionFlag"]; if (hCaloMuonCorrectionFlag && hCaloMuonCorrectionFlag->getRootObject()) hCaloMuonCorrectionFlag-> Fill(muCorrData.type());
1112  //}
1113  //}
1114  }
1115 
1116  if(isPFMet_){
1117  // **** Get the MET container
1118  //const PFMETCollection *pfmetcol = pfmetcoll.product();
1119  //const PFMET *pfmet;
1120  //pfmet = &(pfmetcol->front());
1121 
1122  // PFMET getters
1123  //----------------------------------------------------------------------------
1124  double pfPhotonEtFraction = pfmet.photonEtFraction();
1125  double pfPhotonEt = pfmet.photonEt();
1126  double pfNeutralHadronEtFraction = pfmet.neutralHadronEtFraction();
1127  double pfNeutralHadronEt = pfmet.neutralHadronEt();
1128  double pfElectronEtFraction = pfmet.electronEtFraction();
1129  double pfElectronEt = pfmet.electronEt();
1130  double pfChargedHadronEtFraction = pfmet.chargedHadronEtFraction();
1131  double pfChargedHadronEt = pfmet.chargedHadronEt();
1132  double pfMuonEtFraction = pfmet.muonEtFraction();
1133  double pfMuonEt = pfmet.muonEt();
1134  double pfHFHadronEtFraction = pfmet.HFHadronEtFraction();
1135  double pfHFHadronEt = pfmet.HFHadronEt();
1136  double pfHFEMEtFraction = pfmet.HFEMEtFraction();
1137  double pfHFEMEt = pfmet.HFEMEt();
1138 
1139  mePhotonEtFraction = map_of_MEs[DirName + "/PfPhotonEtFraction"];
1140  mePhotonEt = map_of_MEs[DirName + "/PfPhotonEt"];
1141  meNeutralHadronEtFraction = map_of_MEs[DirName + "/PfNeutralHadronEtFraction"];
1142  meNeutralHadronEt = map_of_MEs[DirName + "/PfNeutralHadronEt"];
1143  meElectronEtFraction = map_of_MEs[DirName + "/PfElectronEtFraction"];
1144  meElectronEt = map_of_MEs[DirName + "/PfElectronEt"];
1145  meChargedHadronEtFraction = map_of_MEs[DirName + "/PfChargedHadronEtFraction"];
1146  meChargedHadronEt = map_of_MEs[DirName + "/PfChargedHadronEt"];
1147  meMuonEtFraction = map_of_MEs[DirName + "/PfMuonEtFraction"];
1148  meMuonEt = map_of_MEs[DirName + "/PfMuonEt"];
1149  meHFHadronEtFraction = map_of_MEs[DirName + "/PfHFHadronEtFraction"];
1150  meHFHadronEt = map_of_MEs[DirName + "/PfHFHadronEt"];
1151  meHFEMEtFraction = map_of_MEs[DirName + "/PfHFEMEtFraction"];
1152  meHFEMEt = map_of_MEs[DirName + "/PfHFEMEt"];
1153 
1154  if (mePhotonEtFraction && mePhotonEtFraction ->getRootObject()) mePhotonEtFraction ->Fill(pfPhotonEtFraction);
1155  if (mePhotonEt && mePhotonEt ->getRootObject()) mePhotonEt ->Fill(pfPhotonEt);
1157  if (meNeutralHadronEt && meNeutralHadronEt ->getRootObject()) meNeutralHadronEt ->Fill(pfNeutralHadronEt);
1158  if (meElectronEtFraction && meElectronEtFraction ->getRootObject()) meElectronEtFraction ->Fill(pfElectronEtFraction);
1159  if (meElectronEt && meElectronEt ->getRootObject()) meElectronEt ->Fill(pfElectronEt);
1161  if (meChargedHadronEt && meChargedHadronEt ->getRootObject()) meChargedHadronEt ->Fill(pfChargedHadronEt);
1162  if (meMuonEtFraction && meMuonEtFraction ->getRootObject()) meMuonEtFraction ->Fill(pfMuonEtFraction);
1163  if (meMuonEt && meMuonEt ->getRootObject()) meMuonEt ->Fill(pfMuonEt);
1164  if (meHFHadronEtFraction && meHFHadronEtFraction ->getRootObject()) meHFHadronEtFraction ->Fill(pfHFHadronEtFraction);
1165  if (meHFHadronEt && meHFHadronEt ->getRootObject()) meHFHadronEt ->Fill(pfHFHadronEt);
1166  if (meHFEMEtFraction && meHFEMEtFraction ->getRootObject()) meHFEMEtFraction ->Fill(pfHFEMEtFraction);
1167  if (meHFEMEt && meHFEMEt ->getRootObject()) meHFEMEt ->Fill(pfHFEMEt);
1168 
1169  //NPV profiles
1170 
1171  mePhotonEtFraction_profile = map_of_MEs[DirName + "/PfPhotonEtFraction_profile"];
1172  mePhotonEt_profile = map_of_MEs[DirName + "/PfPhotonEt_profile"];
1173  meNeutralHadronEtFraction_profile = map_of_MEs[DirName + "/PfNeutralHadronEtFraction_profile"];
1174  meNeutralHadronEt_profile = map_of_MEs[DirName + "/PfNeutralHadronEt_profile"];
1175  meElectronEtFraction_profile = map_of_MEs[DirName + "/PfElectronEtFraction_profile"];
1176  meElectronEt_profile = map_of_MEs[DirName + "/PfElectronEt_profile"];
1177  meChargedHadronEtFraction_profile = map_of_MEs[DirName + "/PfChargedHadronEtFraction_profile"];
1178  meChargedHadronEt_profile = map_of_MEs[DirName + "/PfChargedHadronEt_profile"];
1179  meMuonEtFraction_profile = map_of_MEs[DirName + "/PfMuonEtFraction_profile"];
1180  meMuonEt_profile = map_of_MEs[DirName + "/PfMuonEt_profile"];
1181  meHFHadronEtFraction_profile = map_of_MEs[DirName + "/PfHFHadronEtFraction_profile"];
1182  meHFHadronEt_profile = map_of_MEs[DirName + "/PfHFHadronEt_profile"];
1183  meHFEMEtFraction_profile = map_of_MEs[DirName + "/PfHFEMEtFraction_profile"];
1184  meHFEMEt_profile = map_of_MEs[DirName + "/PfHFEMEt_profile"];
1185 
1186  if (mePhotonEtFraction_profile && mePhotonEtFraction_profile ->getRootObject()) mePhotonEtFraction_profile ->Fill(numPV_, pfPhotonEtFraction);
1187  if (mePhotonEt_profile && mePhotonEt_profile ->getRootObject()) mePhotonEt_profile ->Fill(numPV_, pfPhotonEt);
1189  if (meNeutralHadronEt_profile && meNeutralHadronEt_profile ->getRootObject()) meNeutralHadronEt_profile ->Fill(numPV_, pfNeutralHadronEt);
1190  if (meElectronEtFraction_profile && meElectronEtFraction_profile ->getRootObject()) meElectronEtFraction_profile ->Fill(numPV_, pfElectronEtFraction);
1191  if (meElectronEt_profile && meElectronEt_profile ->getRootObject()) meElectronEt_profile ->Fill(numPV_, pfElectronEt);
1193  if (meChargedHadronEt_profile && meChargedHadronEt_profile ->getRootObject()) meChargedHadronEt_profile ->Fill(numPV_, pfChargedHadronEt);
1194  if (meMuonEtFraction_profile && meMuonEtFraction_profile ->getRootObject()) meMuonEtFraction_profile ->Fill(numPV_, pfMuonEtFraction);
1195  if (meMuonEt_profile && meMuonEt_profile ->getRootObject()) meMuonEt_profile ->Fill(numPV_, pfMuonEt);
1196  if (meHFHadronEtFraction_profile && meHFHadronEtFraction_profile ->getRootObject()) meHFHadronEtFraction_profile ->Fill(numPV_, pfHFHadronEtFraction);
1197  if (meHFHadronEt_profile && meHFHadronEt_profile ->getRootObject()) meHFHadronEt_profile ->Fill(numPV_, pfHFHadronEt);
1198  if (meHFEMEtFraction_profile && meHFEMEtFraction_profile ->getRootObject()) meHFEMEtFraction_profile ->Fill(numPV_, pfHFEMEtFraction);
1199  if (meHFEMEt_profile && meHFEMEt_profile ->getRootObject()) meHFEMEt_profile ->Fill(numPV_, pfHFEMEt);
1200  }
1201 
1202  if (isCaloMet_){
1203  //if (bLumiSecPlot){//get from config level
1205  hMExLS = map_of_MEs[DirName+"/"+"MExLS"]; if (hMExLS && hMExLS->getRootObject()) hMExLS->Fill(MEx,myLuminosityBlock);
1206  hMEyLS = map_of_MEs[DirName+"/"+"MEyLS"]; if (hMEyLS && hMEyLS->getRootObject()) hMEyLS->Fill(MEy,myLuminosityBlock);
1207  }
1208  }
1209 
1212 
1213  //if(trackHandle_.isValid()) {
1214  // for( edm::View<reco::Track>::const_iterator trkit = trackHandle_->begin(); trkit != trackHandle_->end(); trkit++ ) {
1215  // htrkPt = map_of_MEs[DirName+"/"+"trackPt"]; if (htrkPt && htrkPt->getRootObject()) htrkPt->Fill( trkit->pt() );
1216  // htrkEta = map_of_MEs[DirName+"/"+"trackEta"]; if (htrkEta && htrkEta->getRootObject()) htrkEta->Fill( trkit->eta() );
1217  // htrkNhits = map_of_MEs[DirName+"/"+"trackNhits"]; if (htrkNhits && htrkNhits->getRootObject()) htrkNhits->Fill( trkit->numberOfValidHits() );
1218  // htrkChi2 = map_of_MEs[DirName+"/"+"trackNormalizedChi2"];
1219  // if (htrkChi2 && htrkChi2->getRootObject()) htrkChi2->Fill( trkit->chi2() / trkit->ndof() );
1220  // double d0 = -1 * trkit->dxy( beamSpot_ );
1221  // htrkD0 = map_of_MEs[DirName+"/"+"trackD0"]; if (htrkD0 && htrkD0->getRootObject()) htrkD0->Fill( d0 );
1222  // }
1223  //}else{if (verbose_) std::cout<<"tracks not valid"<<std::endl;}
1224 
1225  //if(electronHandle_.isValid()) {
1226  // for( edm::View<reco::GsfElectron>::const_iterator eleit = electronHandle_->begin(); eleit != electronHandle_->end(); eleit++ ) {
1227  // helePt = map_of_MEs[DirName+"/"+"electronPt"]; if (helePt && helePt->getRootObject()) helePt->Fill( eleit->p4().pt() );
1228  // heleEta = map_of_MEs[DirName+"/"+"electronEta"]; if (heleEta && heleEta->getRootObject()) heleEta->Fill( eleit->p4().eta() );
1229  // heleHoE = map_of_MEs[DirName+"/"+"electronHoverE"]; if (heleHoE && heleHoE->getRootObject()) heleHoE->Fill( eleit->hadronicOverEm() );
1230  // }
1231  //}else{
1232  // if (verbose_) std::cout<<"electrons not valid"<<std::endl;
1233  //}
1234 
1235  //if(muonHandle_.isValid()) {
1236  // for( reco::MuonCollection::const_iterator muonit = muonHandle_->begin(); muonit != muonHandle_->end(); muonit++ ) {
1237  // const reco::TrackRef siTrack = muonit->innerTrack();
1238  // hmuPt = map_of_MEs[DirName+"/"+"muonPt"]; if (hmuPt && hmuPt->getRootObject()) hmuPt ->Fill( muonit->p4().pt() );
1239  // hmuEta = map_of_MEs[DirName+"/"+"muonEta"]; if (hmuEta && hmuEta->getRootObject()) hmuEta ->Fill( muonit->p4().eta() );
1240  // hmuNhits = map_of_MEs[DirName+"/"+"muonNhits"]; if (hmuNhits && hmuNhits->getRootObject()) hmuNhits->Fill( siTrack.isNonnull() ? siTrack->numberOfValidHits() : -999 );
1241  // hmuChi2 = map_of_MEs[DirName+"/"+"muonNormalizedChi2"]; if (hmuChi2 && hmuChi2->getRootObject()) hmuChi2 ->Fill( siTrack.isNonnull() ? siTrack->chi2()/siTrack->ndof() : -999 );
1242  // double d0 = siTrack.isNonnull() ? -1 * siTrack->dxy( beamSpot_) : -999;
1243  // hmuD0 = map_of_MEs[DirName+"/"+"muonD0"]; if (hmuD0 && hmuD0->getRootObject()) hmuD0->Fill( d0 );
1244  // }
1245  // const unsigned int nMuons = muonHandle_->size();
1246  // for( unsigned int mus = 0; mus < nMuons; mus++ ) {
1247  // reco::MuonRef muref( muonHandle_, mus);
1248  // reco::MuonMETCorrectionData muCorrData = (*tcMetValueMapHandle_)[muref];
1249  // hMExCorrection = map_of_MEs[DirName+"/"+"MExCorrection"]; if (hMExCorrection && hMExCorrection->getRootObject()) hMExCorrection-> Fill(muCorrData.corrY());
1250  // hMEyCorrection = map_of_MEs[DirName+"/"+"MEyCorrection"]; if (hMEyCorrection && hMEyCorrection->getRootObject()) hMEyCorrection-> Fill(muCorrData.corrX());
1251  //hMuonCorrectionFlag = map_of_MEs[DirName+"/"+"CorrectionFlag"]; if (hMuonCorrectionFlag && hMuonCorrectionFlag->getRootObject()) hMuonCorrectionFlag-> Fill(muCorrData.type());
1252  // }
1253  // }else{
1254  //if (verbose_) std::cout<<"muons not valid"<<std::endl;
1255  // }
1256  // }*/
1257 }
MonitorElement * meElectronEt_profile
Definition: METAnalyzer.h:391
MonitorElement * hMExLS
Definition: METAnalyzer.h:292
int i
Definition: DBlmapReader.cc:9
double hadEtInHE() const
Definition: CaloMET.h:51
MonitorElement * hSumET
Definition: METAnalyzer.h:290
MonitorElement * meNeutralHadronEtFraction
Definition: METAnalyzer.h:365
MonitorElement * meNeutralHadronEtFraction_profile
Definition: METAnalyzer.h:388
MonitorElement * meElectronEtFraction_profile
Definition: METAnalyzer.h:390
std::vector< int > allTriggerDecisions_
Definition: METAnalyzer.h:195
double HFEMEtFraction() const
Definition: PFMET.h:47
double hadEtInHF() const
Definition: CaloMET.h:53
MonitorElement * hMEy
Definition: METAnalyzer.h:285
MonitorElement * hCaloMETPhi020
Definition: METAnalyzer.h:299
MonitorElement * mePhotonEt
Definition: METAnalyzer.h:364
MonitorElement * meChargedHadronEtFraction_profile
Definition: METAnalyzer.h:392
MonitorElement * hCaloHadEtInHF
Definition: METAnalyzer.h:313
bool isCaloMet_
Definition: METAnalyzer.h:403
double maxEtInHadTowers() const
Definition: CaloMET.h:40
double neutralHadronEtFraction() const
Definition: PFMET.h:32
MonitorElement * hMEx
Definition: METAnalyzer.h:284
double muonEt() const
Definition: PFMET.h:42
MonitorElement * hCaloHadEtInHE
Definition: METAnalyzer.h:312
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:59
MonitorElement * hCaloEtFractionHadronic
Definition: METAnalyzer.h:303
MonitorElement * hMEyLS
Definition: METAnalyzer.h:293
MonitorElement * meHFHadronEtFraction
Definition: METAnalyzer.h:373
MonitorElement * hMET_logx
Definition: METAnalyzer.h:295
MonitorElement * hCaloEmEtInHF
Definition: METAnalyzer.h:314
double maxEtInEmTowers() const
Definition: CaloMET.h:38
MonitorElement * meHFEMEtFraction_profile
Definition: METAnalyzer.h:398
MonitorElement * hCaloHadEtInHO
Definition: METAnalyzer.h:311
virtual double py() const GCC11_FINAL
y coordinate of momentum vector
MonitorElement * meChargedHadronEtFraction
Definition: METAnalyzer.h:369
MonitorElement * meMEx_profile
Definition: METAnalyzer.h:381
MonitorElement * hMET
Definition: METAnalyzer.h:288
MonitorElement * hTrigger
Definition: METAnalyzer.h:282
void Fill(long long x)
MonitorElement * hCaloMaxEtInHadTowers
Definition: METAnalyzer.h:302
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
double muonEtFraction() const
Definition: PFMET.h:41
bool fill_met_high_level_histo
Definition: METAnalyzer.h:407
MonitorElement * hMETPhi
Definition: METAnalyzer.h:289
MonitorElement * hCaloEmEtInEE
Definition: METAnalyzer.h:315
MonitorElement * meMuonEt
Definition: METAnalyzer.h:372
double HFHadronEt() const
Definition: PFMET.h:45
MonitorElement * meHFEMEt_profile
Definition: METAnalyzer.h:399
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
Definition: MET.h:39
MonitorElement * hSumET_logx
Definition: METAnalyzer.h:296
double photonEtFraction() const
Definition: PFMET.h:29
MonitorElement * meMuonEt_profile
Definition: METAnalyzer.h:395
virtual double px() const GCC11_FINAL
x coordinate of momentum vector
MonitorElement * hCaloEmEtFraction
Definition: METAnalyzer.h:304
double emEtInEB() const
Definition: CaloMET.h:55
MonitorElement * meChargedHadronEt
Definition: METAnalyzer.h:370
MonitorElement * hMETSig
Definition: METAnalyzer.h:287
MonitorElement * meChargedHadronEt_profile
Definition: METAnalyzer.h:393
MonitorElement * meMuonEtFraction
Definition: METAnalyzer.h:371
std::vector< std::string > allTriggerNames_
Definition: METAnalyzer.h:194
double HFEMEt() const
Definition: PFMET.h:48
MonitorElement * mePhotonEtFraction
Definition: METAnalyzer.h:363
double hadEtInHO() const
Definition: CaloMET.h:49
MonitorElement * hCaloMaxEtInEmTowers
Definition: METAnalyzer.h:301
MonitorElement * mePhotonEt_profile
Definition: METAnalyzer.h:387
double electronEt() const
Definition: PFMET.h:36
TObject * getRootObject(void) const
MonitorElement * meElectronEt
Definition: METAnalyzer.h:368
double etFractionHadronic() const
Definition: CaloMET.h:42
MonitorElement * meMET_profile
Definition: METAnalyzer.h:383
double photonEt() const
Definition: PFMET.h:30
MonitorElement * meHFHadronEt
Definition: METAnalyzer.h:374
MonitorElement * hCaloEmEtInEB
Definition: METAnalyzer.h:316
MonitorElement * hCaloHadEtInHB
Definition: METAnalyzer.h:310
MonitorElement * meHFHadronEtFraction_profile
Definition: METAnalyzer.h:396
MonitorElement * meHFEMEtFraction
Definition: METAnalyzer.h:375
double emEtInEE() const
Definition: CaloMET.h:57
double electronEtFraction() const
Definition: PFMET.h:35
double chargedHadronEtFraction() const
Definition: PFMET.h:38
MonitorElement * hCaloEmEtFraction020
Definition: METAnalyzer.h:308
int getNbinsX(void) const
get # of bins in X-axis
MonitorElement * meHFEMEt
Definition: METAnalyzer.h:376
double emEtInHF() const
Definition: CaloMET.h:59
MonitorElement * meMEy_profile
Definition: METAnalyzer.h:382
double neutralHadronEt() const
Definition: PFMET.h:33
MonitorElement * meElectronEtFraction
Definition: METAnalyzer.h:367
MonitorElement * meSumET_profile
Definition: METAnalyzer.h:384
bool hTriggerLabelsIsSet_
Definition: METAnalyzer.h:277
MonitorElement * meHFHadronEt_profile
Definition: METAnalyzer.h:397
virtual float pt() const GCC11_FINAL
transverse momentum
MonitorElement * meNeutralHadronEt_profile
Definition: METAnalyzer.h:389
MonitorElement * mePhotonEtFraction_profile
Definition: METAnalyzer.h:386
MonitorElement * meMuonEtFraction_profile
Definition: METAnalyzer.h:394
double hadEtInHB() const
Definition: CaloMET.h:47
double emEtFraction() const
Definition: CaloMET.h:45
double chargedHadronEt() const
Definition: PFMET.h:39
MonitorElement * meNeutralHadronEt
Definition: METAnalyzer.h:366
void METAnalyzer::makeRatePlot ( std::string  DirName,
double  totltime 
)

Definition at line 567 of file METAnalyzer.cc.

References MonitorElement::getRootObject(), MonitorElement::getTH1F(), i, and MonitorElement::setBinContent().

568 {
569 
570  //dbe_->setCurrentFolder(DirName);
571  MonitorElement *meMET = map_dijet_MEs[DirName+"/"+"MET"];
572  MonitorElement *mMETRate = map_dijet_MEs[DirName+"/"+"METRate"];
573 
574  TH1F* tMET;
575  TH1F* tMETRate;
576 
577  if ( meMET && mMETRate){
578  if ( meMET->getRootObject() && mMETRate->getRootObject()) {
579  tMET = meMET->getTH1F();
580 
581  // Integral plot & convert number of events to rate (hz)
582  tMETRate = (TH1F*) tMET->Clone("METRateHist");
583  for (int i = tMETRate->GetNbinsX()-1; i>=0; i--){
584  mMETRate->setBinContent(i+1,tMETRate->GetBinContent(i+2)+tMET->GetBinContent(i+1));
585  }
586  for (int i = 0; i<tMETRate->GetNbinsX(); i++){
587  mMETRate->setBinContent(i+1,tMETRate->GetBinContent(i+1)/double(totltime));
588  }
589  }
590  }
591 
592 }
std::map< std::string, MonitorElement * > map_dijet_MEs
Definition: METAnalyzer.h:401
int i
Definition: DBlmapReader.cc:9
void setBinContent(int binx, double content)
set content of bin (1-D)
TObject * getRootObject(void) const
TH1F * getTH1F(void) const

Member Data Documentation

std::vector< int > METAnalyzer::allTriggerDecisions_
private

Definition at line 195 of file METAnalyzer.h.

std::vector<std::string > METAnalyzer::allTriggerNames_
private

Definition at line 194 of file METAnalyzer.h.

edm::InputTag METAnalyzer::beamHaloSummaryTag_
private

Definition at line 138 of file METAnalyzer.h.

edm::EDGetTokenT<reco::BeamHaloSummary> METAnalyzer::beamHaloSummaryToken_
private

Definition at line 150 of file METAnalyzer.h.

math::XYZPoint METAnalyzer::beamSpot_
private

Definition at line 271 of file METAnalyzer.h.

bool METAnalyzer::bypassAllDCSChecks_
private

Definition at line 240 of file METAnalyzer.h.

bool METAnalyzer::bypassAllPVChecks_
private

Definition at line 239 of file METAnalyzer.h.

edm::EDGetTokenT<reco::CaloJetCollection> METAnalyzer::caloJetsToken_
private

Definition at line 145 of file METAnalyzer.h.

edm::EDGetTokenT<reco::CaloMETCollection> METAnalyzer::caloMetToken_
private

Definition at line 154 of file METAnalyzer.h.

edm::ParameterSet METAnalyzer::cleaningParameters_
private

Definition at line 228 of file METAnalyzer.h.

JetMETDQMDCSFilter* METAnalyzer::DCSFilter_
private

Definition at line 267 of file METAnalyzer.h.

bool METAnalyzer::fill_met_high_level_histo
private

Definition at line 407 of file METAnalyzer.h.

std::string METAnalyzer::FolderName_
private

Definition at line 133 of file METAnalyzer.h.

std::vector<std::string> METAnalyzer::folderNames_
private

Definition at line 269 of file METAnalyzer.h.

edm::InputTag METAnalyzer::gtTag_
private

Definition at line 141 of file METAnalyzer.h.

edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> METAnalyzer::gtToken_
private

Definition at line 144 of file METAnalyzer.h.

edm::InputTag METAnalyzer::hbheNoiseFilterResultTag_
private

Definition at line 139 of file METAnalyzer.h.

edm::EDGetTokenT<bool> METAnalyzer::hbheNoiseFilterResultToken_
private

Definition at line 149 of file METAnalyzer.h.

edm::InputTag METAnalyzer::hcalNoiseRBXCollectionTag_
private

Definition at line 136 of file METAnalyzer.h.

edm::EDGetTokenT<reco::HcalNoiseRBXCollection> METAnalyzer::HcalNoiseRBXToken_
private

Definition at line 155 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloEmEtFraction
private

Definition at line 304 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloEmEtFraction020
private

Definition at line 308 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloEmEtInEB
private

Definition at line 316 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloEmEtInEE
private

Definition at line 315 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloEmEtInHF
private

Definition at line 314 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloEmMET
private

Definition at line 321 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloEmMETPhi
private

Definition at line 322 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloEmMEx
private

Definition at line 318 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloEmMEy
private

Definition at line 319 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloEtFractionHadronic
private

Definition at line 303 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloHadEtInHB
private

Definition at line 310 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloHadEtInHE
private

Definition at line 312 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloHadEtInHF
private

Definition at line 313 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloHadEtInHO
private

Definition at line 311 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloHaMET
private

Definition at line 328 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloHaMETPhi
private

Definition at line 329 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloHaMEx
private

Definition at line 325 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloHaMEy
private

Definition at line 326 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloMaxEtInEmTowers
private

Definition at line 301 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloMaxEtInHadTowers
private

Definition at line 302 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloMETPhi020
private

Definition at line 299 of file METAnalyzer.h.

double METAnalyzer::hfCalibFactor_
private

Definition at line 264 of file METAnalyzer.h.

HLTConfigProvider METAnalyzer::hltConfig_
private

Definition at line 188 of file METAnalyzer.h.

std::string METAnalyzer::hltPhysDec_
private

Definition at line 229 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hMET
private

Definition at line 288 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hMET_logx
private

Definition at line 295 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hMETPhi
private

Definition at line 289 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hMETRate
private

Definition at line 226 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hMETSig
private

Definition at line 287 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hMEx
private

Definition at line 284 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hMExLS
private

Definition at line 292 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hMEy
private

Definition at line 285 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hMEyLS
private

Definition at line 293 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hSumET
private

Definition at line 290 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hSumET_logx
private

Definition at line 296 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hTrigger
private

Definition at line 282 of file METAnalyzer.h.

bool METAnalyzer::hTriggerLabelsIsSet_
private

Definition at line 277 of file METAnalyzer.h.

edm::InputTag METAnalyzer::inputJetIDValueMap
private

Definition at line 168 of file METAnalyzer.h.

bool METAnalyzer::isCaloMet_
private

Definition at line 403 of file METAnalyzer.h.

bool METAnalyzer::isPFMet_
private

Definition at line 405 of file METAnalyzer.h.

edm::InputTag METAnalyzer::jetCollectionLabel_
private

Definition at line 137 of file METAnalyzer.h.

std::string METAnalyzer::jetCorrectionService_
private

Definition at line 174 of file METAnalyzer.h.

edm::EDGetTokenT<edm::ValueMap <reco::JetID> > METAnalyzer::jetID_ValueMapToken_
private

Definition at line 169 of file METAnalyzer.h.

JetIDSelectionFunctor METAnalyzer::jetIDFunctorLoose
private

Definition at line 171 of file METAnalyzer.h.

int METAnalyzer::LSBegin_
private

Definition at line 236 of file METAnalyzer.h.

int METAnalyzer::LSEnd_
private

Definition at line 237 of file METAnalyzer.h.

MonitorElement* METAnalyzer::lumisecME
private

Definition at line 281 of file METAnalyzer.h.

std::map< std::string,MonitorElement* > METAnalyzer::map_dijet_MEs
private

Definition at line 401 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meChargedHadronEt
private

Definition at line 370 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meChargedHadronEt_profile
private

Definition at line 393 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meChargedHadronEtFraction
private

Definition at line 369 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meChargedHadronEtFraction_profile
private

Definition at line 392 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meElectronEt
private

Definition at line 368 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meElectronEt_profile
private

Definition at line 391 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meElectronEtFraction
private

Definition at line 367 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meElectronEtFraction_profile
private

Definition at line 390 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meHFEMEt
private

Definition at line 376 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meHFEMEt_profile
private

Definition at line 399 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meHFEMEtFraction
private

Definition at line 375 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meHFEMEtFraction_profile
private

Definition at line 398 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meHFHadronEt
private

Definition at line 374 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meHFHadronEt_profile
private

Definition at line 397 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meHFHadronEtFraction
private

Definition at line 373 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meHFHadronEtFraction_profile
private

Definition at line 396 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMET_profile
private

Definition at line 383 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMEx_profile
private

Definition at line 381 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMEy_profile
private

Definition at line 382 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMuonEt
private

Definition at line 372 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMuonEt_profile
private

Definition at line 395 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMuonEtFraction
private

Definition at line 371 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMuonEtFraction_profile
private

Definition at line 394 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meNeutralHadronEt
private

Definition at line 366 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meNeutralHadronEt_profile
private

Definition at line 389 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meNeutralHadronEtFraction
private

Definition at line 365 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meNeutralHadronEtFraction_profile
private

Definition at line 388 of file METAnalyzer.h.

MonitorElement* METAnalyzer::mePhotonEt
private

Definition at line 364 of file METAnalyzer.h.

MonitorElement* METAnalyzer::mePhotonEt_profile
private

Definition at line 387 of file METAnalyzer.h.

MonitorElement* METAnalyzer::mePhotonEtFraction
private

Definition at line 363 of file METAnalyzer.h.

MonitorElement* METAnalyzer::mePhotonEtFraction_profile
private

Definition at line 386 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meSumET_profile
private

Definition at line 384 of file METAnalyzer.h.

edm::InputTag METAnalyzer::metCollectionLabel_
private

Definition at line 135 of file METAnalyzer.h.

std::string METAnalyzer::MetType_
private

Definition at line 130 of file METAnalyzer.h.

std::string METAnalyzer::mOutputFile_
private

Definition at line 132 of file METAnalyzer.h.

int METAnalyzer::nbinsPV_
private

Definition at line 231 of file METAnalyzer.h.

double METAnalyzer::nPVMax_
private

Definition at line 233 of file METAnalyzer.h.

double METAnalyzer::nPVMin_
private

Definition at line 232 of file METAnalyzer.h.

int METAnalyzer::numPV_
private

Definition at line 258 of file METAnalyzer.h.

bool METAnalyzer::outputMEsInRootFile
private

Definition at line 131 of file METAnalyzer.h.

edm::ParameterSet METAnalyzer::parameters
private
PFJetIDSelectionFunctor METAnalyzer::pfjetIDFunctorLoose
private

Definition at line 172 of file METAnalyzer.h.

edm::EDGetTokenT<reco::PFJetCollection> METAnalyzer::pfJetsToken_
private

Definition at line 146 of file METAnalyzer.h.

edm::EDGetTokenT<reco::PFMETCollection> METAnalyzer::pfMetToken_
private

Definition at line 153 of file METAnalyzer.h.

double METAnalyzer::ptThreshold_
private

Definition at line 176 of file METAnalyzer.h.

bool METAnalyzer::runcosmics_
private

Definition at line 241 of file METAnalyzer.h.

std::vector<int> METAnalyzer::triggerFolderDecisions_
private

Definition at line 201 of file METAnalyzer.h.

std::vector<GenericTriggerEventFlag *> METAnalyzer::triggerFolderEventFlag_
private

Definition at line 198 of file METAnalyzer.h.

std::vector<std::vector<std::string> > METAnalyzer::triggerFolderExpr_
private

Definition at line 199 of file METAnalyzer.h.

std::vector<std::string > METAnalyzer::triggerFolderLabels_
private

Definition at line 200 of file METAnalyzer.h.

edm::InputTag METAnalyzer::triggerResultsLabel_
private

Definition at line 189 of file METAnalyzer.h.

edm::EDGetTokenT<edm::TriggerResults> METAnalyzer::triggerResultsToken_
private

Definition at line 190 of file METAnalyzer.h.

edm::VParameterSet METAnalyzer::triggerSelectedSubFolders_
private

Definition at line 197 of file METAnalyzer.h.

int METAnalyzer::verbose_
private

Definition at line 127 of file METAnalyzer.h.

edm::InputTag METAnalyzer::vertexTag_
private

Definition at line 140 of file METAnalyzer.h.

edm::EDGetTokenT<std::vector<reco::Vertex> > METAnalyzer::vertexToken_
private

Definition at line 143 of file METAnalyzer.h.