Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-04-29 23:10:24

0001 #ifndef METAnalyzer_H
0002 #define METAnalyzer_H
0003 
0004 /** \class JetMETAnalyzer
0005  *
0006  *  DQM jetMET analysis monitoring
0007  *
0008  *  \author F. Chlebana - Fermilab
0009  *          K. Hatakeyama - Rockefeller University
0010  *
0011  *          Jan. '14: modified by
0012  *
0013  *          M. Artur W2eber
0014  *          R. Schoefbeck
0015  *          V. Sordini
0016  */
0017 
0018 #include <memory>
0019 #include <fstream>
0020 #include "TMath.h"
0021 #include "FWCore/Framework/interface/Frameworkfwd.h"
0022 #include "FWCore/Framework/interface/ConsumesCollector.h"
0023 #include "FWCore/Framework/interface/Event.h"
0024 #include "FWCore/Framework/interface/MakerMacros.h"
0025 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0026 #include "DQMServices/Core/interface/DQMStore.h"
0027 //
0028 #include "CommonTools/TriggerUtils/interface/GenericTriggerEventFlag.h"
0029 //
0030 #include "DataFormats/JetReco/interface/Jet.h"
0031 #include "DataFormats/JetReco/interface/CaloJet.h"
0032 #include "DataFormats/JetReco/interface/JPTJet.h"
0033 #include "DataFormats/JetReco/interface/PFJet.h"
0034 #include "DataFormats/HLTReco/interface/TriggerObject.h"
0035 #include "DataFormats/Common/interface/TriggerResults.h"
0036 #include "DataFormats/HLTReco/interface/TriggerEvent.h"
0037 #include "DataFormats/HLTReco/interface/TriggerTypeDefs.h"
0038 
0039 #include "HLTrigger/HLTcore/interface/HLTConfigProvider.h"
0040 
0041 #include "RecoMET/METAlgorithms/interface/HcalNoiseRBXArray.h"
0042 #include "DataFormats/METReco/interface/BeamHaloSummary.h"
0043 #include "RecoJets/JetProducers/interface/JetIDHelper.h"
0044 
0045 #include "DataFormats/MuonReco/interface/MuonMETCorrectionData.h"
0046 #include "DataFormats/Common/interface/ValueMap.h"
0047 #include "DataFormats/MuonReco/interface/Muon.h"
0048 #include "DataFormats/MuonReco/interface/MuonFwd.h"
0049 #include "DataFormats/MuonReco/interface/MuonMETCorrectionData.h"
0050 #include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
0051 #include "DataFormats/BeamSpot/interface/BeamSpot.h"
0052 #include "DataFormats/TrackReco/interface/Track.h"
0053 #include "DataFormats/JetReco/interface/PFJet.h"
0054 #include "DataFormats/ParticleFlowReco/interface/PFBlock.h"
0055 #include "DataFormats/ParticleFlowReco/interface/PFBlockElementTrack.h"
0056 #include "DataFormats/ParticleFlowReco/interface/PFBlockElementCluster.h"
0057 #include "DataFormats/ParticleFlowReco/interface/PFCluster.h"
0058 
0059 #include "DataFormats/METReco/interface/MET.h"
0060 #include "DataFormats/METReco/interface/METFwd.h"
0061 #include "DataFormats/METReco/interface/PFMET.h"
0062 #include "DataFormats/METReco/interface/PFMETCollection.h"
0063 #include "DataFormats/METReco/interface/CaloMETCollection.h"
0064 #include "DataFormats/METReco/interface/METCollection.h"
0065 #include "DataFormats/PatCandidates/interface/MET.h"
0066 #include "DataFormats/PatCandidates/interface/Jet.h"
0067 
0068 #include "DataFormats/VertexReco/interface/Vertex.h"
0069 #include "DataFormats/VertexReco/interface/VertexFwd.h"
0070 
0071 #include "DQMOffline/JetMET/interface/JetMETDQMDCSFilter.h"
0072 #include "PhysicsTools/SelectorUtils/interface/JetIDSelectionFunctor.h"
0073 #include "PhysicsTools/SelectorUtils/interface/PFJetIDSelectionFunctor.h"
0074 #include "DQMServices/Core/interface/DQMOneEDAnalyzer.h"
0075 #include "DataFormats/MuonReco/interface/Muon.h"
0076 
0077 #include "CondFormats/L1TObjects/interface/L1GtTriggerMenuFwd.h"
0078 #include "CondFormats/L1TObjects/interface/L1GtTriggerMenu.h"
0079 #include "CondFormats/DataRecord/interface/L1GtTriggerMenuRcd.h"
0080 #include "FWCore/Framework/interface/ESHandle.h"
0081 #include "JetMETCorrections/JetCorrector/interface/JetCorrector.h"
0082 #include "DataFormats/PatCandidates/interface/PackedCandidate.h"
0083 
0084 #include <map>
0085 #include <string>
0086 
0087 class METAnalyzer : public DQMOneEDAnalyzer<> {
0088 public:
0089   /// Constructor
0090   METAnalyzer(const edm::ParameterSet&);
0091 
0092   /// Destructor
0093   ~METAnalyzer() override;
0094 
0095   /// Inizialize parameters for histo binning
0096   //  void beginJob(void);
0097   void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0098 
0099   // Book MonitorElements
0100   //void bookMESet(std::string);
0101   //void bookMonitorElement(std::string, bool);
0102 
0103   /// Get the analysis
0104   void analyze(const edm::Event&, const edm::EventSetup&) override;
0105 
0106   /// Initialize run-based parameters
0107   void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override;
0108 
0109   /// Finish up a run
0110   void dqmEndRun(const edm::Run& iRun, const edm::EventSetup& iSetup) override;
0111   //  void dqmEndRun(const edm::Run& iRun, const edm::EventSetup& iSetup);
0112   // Fill MonitorElements
0113   void fillMESet(const edm::Event&,
0114                  std::string,
0115                  const reco::MET&,
0116                  const pat::MET*,
0117                  const reco::PFMET*,
0118                  const reco::CaloMET*,
0119                  const reco::Candidate::PolarLorentzVector&,
0120                  std::map<std::string, MonitorElement*>&,
0121                  std::vector<bool>,
0122                  std::vector<bool>);
0123   void fillMonitorElement(const edm::Event&,
0124                           std::string,
0125                           std::string,
0126                           const reco::MET&,
0127                           const pat::MET*,
0128                           const reco::PFMET*,
0129                           const reco::CaloMET*,
0130                           const reco::Candidate::PolarLorentzVector&,
0131                           std::map<std::string, MonitorElement*>&,
0132                           bool,
0133                           bool,
0134                           std::vector<bool>,
0135                           std::vector<bool>);
0136   void makeRatePlot(std::string, double);
0137 
0138   //  bool selectHighPtJetEvent(const edm::Event&);
0139   //  bool selectLowPtJetEvent(const edm::Event&);
0140   //  bool selectWElectronEvent(const edm::Event&);
0141   //  bool selectWMuonEvent(const edm::Event&);
0142 
0143 private:
0144   // Book MonitorElements
0145   void bookMESet(std::string, DQMStore::IBooker&, std::map<std::string, MonitorElement*>&);
0146   // Book MonitorElements
0147   void bookMonitorElement(std::string, DQMStore::IBooker&, std::map<std::string, MonitorElement*>&, bool, bool, bool);
0148 
0149   // ----------member data ---------------------------
0150   edm::ParameterSet parameters;
0151   // Switch for verbosity
0152   int verbose_;
0153 
0154   std::string MetType_;
0155   std::string FolderName_;
0156 
0157   edm::InputTag metCollectionLabel_;
0158   edm::InputTag hcalNoiseRBXCollectionTag_;
0159   edm::InputTag jetCollectionLabel_;
0160   edm::InputTag vertexTag_;
0161   edm::InputTag gtTag_;
0162 
0163   edm::EDGetTokenT<std::vector<reco::Vertex>> vertexToken_;
0164   edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> gtToken_;
0165   edm::EDGetTokenT<reco::CaloJetCollection> caloJetsToken_;
0166   edm::EDGetTokenT<reco::PFJetCollection> pfJetsToken_;
0167   edm::EDGetTokenT<pat::JetCollection> patJetsToken_;
0168   edm::EDGetTokenT<reco::MuonCollection> MuonsToken_;
0169 
0170   edm::InputTag METFilterMiniAODLabel_;
0171   edm::EDGetTokenT<edm::TriggerResults> METFilterMiniAODToken_;
0172   edm::InputTag METFilterMiniAODLabel2_;  //needed for RECO and reRECO differntiation
0173   edm::EDGetTokenT<edm::TriggerResults> METFilterMiniAODToken2_;
0174 
0175   std::vector<int> miniaodFilterIndex_;
0176   int miniaodfilterdec;  //if RECO set to 0, if reRECO set to 1, else to -1
0177 
0178   edm::InputTag hbheNoiseFilterResultTag_;
0179   edm::EDGetTokenT<bool> hbheNoiseFilterResultToken_;
0180   edm::InputTag hbheNoiseIsoFilterResultTag_;
0181   edm::EDGetTokenT<bool> hbheIsoNoiseFilterResultToken_;
0182   edm::InputTag CSCHaloResultTag_;
0183   edm::EDGetTokenT<bool> CSCHaloResultToken_;
0184   edm::InputTag CSCHalo2015ResultTag_;
0185   edm::EDGetTokenT<bool> CSCHalo2015ResultToken_;
0186   edm::InputTag EcalDeadCellTriggerTag_;
0187   edm::EDGetTokenT<bool> EcalDeadCellTriggerToken_;
0188   edm::InputTag eeBadScFilterTag_;
0189   edm::EDGetTokenT<bool> eeBadScFilterToken_;
0190   edm::InputTag EcalDeadCellBoundaryTag_;
0191   edm::EDGetTokenT<bool> EcalDeadCellBoundaryToken_;
0192   edm::InputTag HcalStripHaloTag_;
0193   edm::EDGetTokenT<bool> HcalStripHaloToken_;
0194 
0195   edm::EDGetTokenT<pat::METCollection> patMetToken_;
0196   edm::EDGetTokenT<reco::PFMETCollection> pfMetToken_;
0197   edm::EDGetTokenT<reco::CaloMETCollection> caloMetToken_;
0198 
0199   edm::InputTag inputJetIDValueMap;
0200   edm::EDGetTokenT<edm::ValueMap<reco::JetID>> jetID_ValueMapToken_;
0201 
0202   edm::ESGetToken<L1GtTriggerMenu, L1GtTriggerMenuRcd> l1gtTrigMenuToken_;
0203 
0204   JetIDSelectionFunctor jetIDFunctorLoose;
0205   PFJetIDSelectionFunctor pfjetIDFunctorLoose;
0206 
0207   std::string m_l1algoname_;
0208   int m_bitAlgTechTrig_;
0209 
0210   double ptThreshold_;
0211 
0212   HLTConfigProvider hltConfig_;
0213   HLTConfigProvider FilterhltConfig_;
0214   edm::InputTag triggerResultsLabel_;
0215   edm::EDGetTokenT<edm::TriggerResults> triggerResultsToken_;
0216 
0217   // list of Jet or MB HLT triggers
0218   //  std::vector<std::string > HLTPathsJetMBByName_;
0219   std::vector<std::string> allTriggerNames_;
0220   std::vector<int> allTriggerDecisions_;
0221 
0222   std::string HBHENoiseStringMiniAOD;
0223   std::string HBHEIsoNoiseStringMiniAOD;
0224 
0225   edm::EDGetTokenT<reco::JetCorrector> jetCorrectorToken_;
0226 
0227   edm::VParameterSet triggerSelectedSubFolders_;
0228   std::vector<GenericTriggerEventFlag*> triggerFolderEventFlag_;
0229   std::vector<std::vector<std::string>> triggerFolderExpr_;
0230   std::vector<std::string> triggerFolderLabels_;
0231   std::vector<int> triggerFolderDecisions_;
0232   //  std::vector<MonitorElement* >           triggerFolderME_;
0233 
0234   //  GenericTriggerEventFlag * highPtJetEventFlag_;
0235   //  GenericTriggerEventFlag * lowPtJetEventFlag_;
0236   //  GenericTriggerEventFlag * minBiasEventFlag_;
0237   //  GenericTriggerEventFlag * highMETEventFlag_;
0238   ////GenericTriggerEventFlag * lowMETEventFlag_;
0239   //  GenericTriggerEventFlag * eleEventFlag_;
0240   //  GenericTriggerEventFlag * muonEventFlag_;
0241   //
0242   //  std::vector<std::string> highPtJetExpr_;
0243   //  std::vector<std::string> lowPtJetExpr_;
0244   //  std::vector<std::string> highMETExpr_;
0245   //  //  std::vector<std::string> lowMETExpr_;
0246   //  std::vector<std::string> muonExpr_;
0247   //  std::vector<std::string> elecExpr_;
0248   //  std::vector<std::string> minbiasExpr_;
0249   //  MonitorElement* hTriggerName_HighPtJet;
0250   //  MonitorElement* hTriggerName_LowPtJet;
0251   //  MonitorElement* hTriggerName_MinBias;
0252   //  MonitorElement* hTriggerName_HighMET;
0253   //  //  MonitorElement* hTriggerName_LowMET;
0254   //  MonitorElement* hTriggerName_Ele;
0255   //  MonitorElement* hTriggerName_Muon;
0256   MonitorElement* hMETRate;
0257 
0258   edm::ParameterSet cleaningParameters_;
0259   std::vector<edm::ParameterSet> diagnosticsParameters_;
0260 
0261   std::string hltPhysDec_;
0262 
0263   int nbinsPV_;
0264   double nPVMin_;
0265   double nPVMax_;
0266 
0267   int LSBegin_;
0268   int LSEnd_;
0269 
0270   bool bypassAllPVChecks_;
0271   bool bypassAllDCSChecks_;
0272   bool runcosmics_;
0273   bool onlyCleaned_;
0274 
0275   //  int trigJetMB_;
0276   //  int trigHighPtJet_;
0277   //  int trigLowPtJet_;
0278   //  int trigMinBias_;
0279   //  int trigHighMET_;
0280   ////int trigLowMET_;
0281   //  int trigEle_;
0282   //  int trigMuon_;
0283   //  int trigPhysDec_;
0284 
0285   //  double highPtJetThreshold_;
0286   //  double lowPtJetThreshold_;
0287   //  double highMETThreshold_;
0288 
0289   int numPV_;
0290   // Et threshold for MET plots
0291   //  double etThreshold_;
0292 
0293   // HF calibration factor (in 31X applied by TcProducer)
0294   //delete altogether not used anymore
0295   double hfCalibFactor_;  //
0296 
0297   // DCS filter
0298   JetMETDQMDCSFilter* DCSFilter_;
0299 
0300   std::vector<std::string> folderNames_;
0301   //
0302   math::XYZPoint beamSpot_;
0303 
0304   //trigger histos
0305   // lines commented out have been removed to improve the bin usage of JetMET DQM
0306 
0307   //for all MET types
0308   bool hTriggerLabelsIsSet_;
0309   //only in for PF
0310   //  MonitorElement* meTriggerName_PhysDec;
0311 
0312   MonitorElement* lumisecME;
0313   MonitorElement* hTrigger;
0314   //MonitorElement* hNevents;
0315   MonitorElement* hMEx;
0316   MonitorElement* hMEy;
0317   //MonitorElement* hEz;
0318   MonitorElement* hMETSig;
0319   MonitorElement* hMET;
0320   MonitorElement* hMET_2;
0321 
0322   MonitorElement* hMET_HBHENoiseFilter;
0323   MonitorElement* hMET_CSCTightHaloFilter;
0324   MonitorElement* hMET_eeBadScFilter;
0325   MonitorElement* hMET_EcalDeadCellTriggerFilter;
0326   MonitorElement* hMET_EcalDeadCellBoundaryFilter;
0327   MonitorElement* hMET_HBHEIsoNoiseFilter;
0328   MonitorElement* hMET_CSCTightHalo2015Filter;
0329   MonitorElement* hMET_HcalStripHaloFilter;
0330 
0331   MonitorElement* hMETPhi;
0332   MonitorElement* hSumET;
0333 
0334   MonitorElement* hMExLS;
0335   MonitorElement* hMEyLS;
0336 
0337   MonitorElement* hMET_logx;
0338   MonitorElement* hSumET_logx;
0339 
0340   //CaloMET specific stuff
0341   MonitorElement* hCaloMETPhi020;
0342   MonitorElement* hCaloEtFractionHadronic;
0343   MonitorElement* hCaloEmEtFraction;
0344 
0345   //MonitorElement* hCaloEmEtFraction002;
0346   //MonitorElement* hCaloEmEtFraction010;
0347   MonitorElement* hCaloEmEtFraction020;
0348 
0349   MonitorElement* hCaloHadEtInHB;
0350   MonitorElement* hCaloHadEtInHO;
0351   MonitorElement* hCaloHadEtInHE;
0352   MonitorElement* hCaloHadEtInHF;
0353   MonitorElement* hCaloEmEtInHF;
0354   MonitorElement* hCaloEmEtInEE;
0355   MonitorElement* hCaloEmEtInEB;
0356 
0357   MonitorElement* hCaloEmMEx;
0358   MonitorElement* hCaloEmMEy;
0359   //MonitorElement* hCaloEmEz;
0360   MonitorElement* hCaloEmMET;
0361   MonitorElement* hCaloEmMETPhi;
0362   //MonitorElement* hCaloEmSumET;
0363 
0364   MonitorElement* hCaloHaMEx;
0365   MonitorElement* hCaloHaMEy;
0366   //MonitorElement* hCaloHaEz;
0367   MonitorElement* hCaloHaMET;
0368   MonitorElement* hCaloHaMETPhi;
0369   //MonitorElement* hCaloHaSumET;
0370 
0371   //now PF only things
0372   MonitorElement* mePhotonEtFraction;
0373   MonitorElement* mePhotonEt;
0374   MonitorElement* meNeutralHadronEtFraction;
0375   MonitorElement* meNeutralHadronEt;
0376   MonitorElement* meElectronEt;
0377   MonitorElement* meChargedHadronEtFraction;
0378   MonitorElement* meChargedHadronEt;
0379   MonitorElement* meMuonEt;
0380   MonitorElement* meHFHadronEtFraction;
0381   MonitorElement* meHFHadronEt;
0382   MonitorElement* meHFEMEtFraction;
0383   MonitorElement* meHFEMEt;
0384   //MEs where we fill if the previous two bunches are empty (25 ns bunch spacing)
0385   /*
0386   MonitorElement* mePhotonEtFraction_BXm2BXm1Empty;
0387   MonitorElement* meNeutralHadronEtFraction_BXm2BXm1Empty;
0388   MonitorElement* meChargedHadronEtFraction_BXm2BXm1Empty;
0389   MonitorElement* meMET_BXm2BXm1Empty;
0390   MonitorElement* meSumET_BXm2BXm1Empty;
0391 
0392   MonitorElement* meMETPhiChargedHadronsBarrel_BXm2BXm1Empty;
0393   MonitorElement* meMETPhiChargedHadronsEndcapPlus_BXm2BXm1Empty;
0394   MonitorElement* meMETPhiChargedHadronsEndcapMinus_BXm2BXm1Empty;
0395   MonitorElement* meMETPhiNeutralHadronsBarrel_BXm2BXm1Empty;
0396   MonitorElement* meMETPhiNeutralHadronsEndcapPlus_BXm2BXm1Empty;
0397   MonitorElement* meMETPhiNeutralHadronsEndcapMinus_BXm2BXm1Empty;
0398   MonitorElement* meMETPhiPhotonsBarrel_BXm2BXm1Empty;
0399   MonitorElement* meMETPhiPhotonsEndcapPlus_BXm2BXm1Empty;
0400   MonitorElement* meMETPhiPhotonsEndcapMinus_BXm2BXm1Empty;
0401   MonitorElement* meMETPhiHFHadronsPlus_BXm2BXm1Empty;
0402   MonitorElement* meMETPhiHFHadronsMinus_BXm2BXm1Empty;
0403   MonitorElement* meMETPhiHFEGammasPlus_BXm2BXm1Empty;
0404   MonitorElement* meMETPhiHFEGammasMinus_BXm2BXm1Empty;
0405   */
0406   //MEs where we fill if the previous bunch is empty (25 ns bunch spacing)
0407   MonitorElement* mePhotonEtFraction_BXm1Empty;
0408   MonitorElement* meNeutralHadronEtFraction_BXm1Empty;
0409   MonitorElement* meChargedHadronEtFraction_BXm1Empty;
0410   MonitorElement* meMET_BXm1Empty;
0411   MonitorElement* meSumET_BXm1Empty;
0412 
0413   MonitorElement* meMETPhiChargedHadronsBarrel_BXm1Empty;
0414   MonitorElement* meMETPhiChargedHadronsEndcapPlus_BXm1Empty;
0415   MonitorElement* meMETPhiChargedHadronsEndcapMinus_BXm1Empty;
0416   MonitorElement* meMETPhiNeutralHadronsBarrel_BXm1Empty;
0417   MonitorElement* meMETPhiNeutralHadronsEndcapPlus_BXm1Empty;
0418   MonitorElement* meMETPhiNeutralHadronsEndcapMinus_BXm1Empty;
0419   MonitorElement* meMETPhiPhotonsBarrel_BXm1Empty;
0420   MonitorElement* meMETPhiPhotonsEndcapPlus_BXm1Empty;
0421   MonitorElement* meMETPhiPhotonsEndcapMinus_BXm1Empty;
0422   MonitorElement* meMETPhiHFHadronsPlus_BXm1Empty;
0423   MonitorElement* meMETPhiHFHadronsMinus_BXm1Empty;
0424   MonitorElement* meMETPhiHFEGammasPlus_BXm1Empty;
0425   MonitorElement* meMETPhiHFEGammasMinus_BXm1Empty;
0426 
0427   //MEs where we fill if the previous bunch is filled (25 ns bunch spacing)
0428   MonitorElement* mePhotonEtFraction_BXm1Filled;
0429   MonitorElement* meNeutralHadronEtFraction_BXm1Filled;
0430   MonitorElement* meChargedHadronEtFraction_BXm1Filled;
0431   MonitorElement* meMET_BXm1Filled;
0432   MonitorElement* meSumET_BXm1Filled;
0433 
0434   MonitorElement* meMETPhiChargedHadronsBarrel_BXm1Filled;
0435   MonitorElement* meMETPhiChargedHadronsEndcapPlus_BXm1Filled;
0436   MonitorElement* meMETPhiChargedHadronsEndcapMinus_BXm1Filled;
0437   MonitorElement* meMETPhiNeutralHadronsBarrel_BXm1Filled;
0438   MonitorElement* meMETPhiNeutralHadronsEndcapPlus_BXm1Filled;
0439   MonitorElement* meMETPhiNeutralHadronsEndcapMinus_BXm1Filled;
0440   MonitorElement* meMETPhiPhotonsBarrel_BXm1Filled;
0441   MonitorElement* meMETPhiPhotonsEndcapPlus_BXm1Filled;
0442   MonitorElement* meMETPhiPhotonsEndcapMinus_BXm1Filled;
0443   MonitorElement* meMETPhiHFHadronsPlus_BXm1Filled;
0444   MonitorElement* meMETPhiHFHadronsMinus_BXm1Filled;
0445   MonitorElement* meMETPhiHFEGammasPlus_BXm1Filled;
0446   MonitorElement* meMETPhiHFEGammasMinus_BXm1Filled;
0447 
0448   //MEs where we fill if two previous bunches are filled (25 ns bunch spacing)
0449   /*
0450   MonitorElement* meChargedHadronEtFraction_BXm2BXm1Filled;
0451   MonitorElement* mePhotonEtFraction_BXm2BXm1Filled;
0452   MonitorElement* meNeutralHadronEtFraction_BXm2BXm1Filled;
0453   MonitorElement* meMET_BXm2BXm1Filled;
0454   MonitorElement* meSumET_BXm2BXm1Filled;
0455   */
0456   MonitorElement* meCHF_Barrel;
0457   MonitorElement* meCHF_EndcapPlus;
0458   MonitorElement* meCHF_EndcapMinus;
0459   MonitorElement* meCHF_Barrel_BXm1Empty;
0460   MonitorElement* meCHF_EndcapPlus_BXm1Empty;
0461   MonitorElement* meCHF_EndcapMinus_BXm1Empty;
0462   //MonitorElement* meCHF_Barrel_BXm2BXm1Empty;
0463   //MonitorElement* meCHF_EndcapPlus_BXm2BXm1Empty;
0464   //MonitorElement* meCHF_EndcapMinus_BXm2BXm1Empty;
0465   MonitorElement* meCHF_Barrel_BXm1Filled;
0466   MonitorElement* meCHF_EndcapPlus_BXm1Filled;
0467   MonitorElement* meCHF_EndcapMinus_BXm1Filled;
0468   //MonitorElement* meCHF_Barrel_BXm2BXm1Filled;
0469   //MonitorElement* meCHF_EndcapPlus_BXm2BXm1Filled;
0470   //MonitorElement* meCHF_EndcapMinus_BXm2BXm1Filled;
0471 
0472   MonitorElement* meNHF_Barrel;
0473   MonitorElement* meNHF_EndcapPlus;
0474   MonitorElement* meNHF_EndcapMinus;
0475   MonitorElement* meNHF_Barrel_BXm1Empty;
0476   MonitorElement* meNHF_EndcapPlus_BXm1Empty;
0477   MonitorElement* meNHF_EndcapMinus_BXm1Empty;
0478   //MonitorElement* meNHF_Barrel_BXm2BXm1Empty;
0479   //MonitorElement* meNHF_EndcapPlus_BXm2BXm1Empty;
0480   //MonitorElement* meNHF_EndcapMinus_BXm2BXm1Empty;
0481   MonitorElement* meNHF_Barrel_BXm1Filled;
0482   MonitorElement* meNHF_EndcapPlus_BXm1Filled;
0483   MonitorElement* meNHF_EndcapMinus_BXm1Filled;
0484   //MonitorElement* meNHF_Barrel_BXm2BXm1Filled;
0485   //MonitorElement* meNHF_EndcapPlus_BXm2BXm1Filled;
0486   //MonitorElement* meNHF_EndcapMinus_BXm2BXm1Filled;
0487 
0488   MonitorElement* mePhF_Barrel;
0489   MonitorElement* mePhF_EndcapPlus;
0490   MonitorElement* mePhF_EndcapMinus;
0491   MonitorElement* mePhF_Barrel_BXm1Empty;
0492   MonitorElement* mePhF_EndcapPlus_BXm1Empty;
0493   MonitorElement* mePhF_EndcapMinus_BXm1Empty;
0494   //MonitorElement* mePhF_Barrel_BXm2BXm1Empty;
0495   //MonitorElement* mePhF_EndcapPlus_BXm2BXm1Empty;
0496   //MonitorElement* mePhF_EndcapMinus_BXm2BXm1Empty;
0497   MonitorElement* mePhF_Barrel_BXm1Filled;
0498   MonitorElement* mePhF_EndcapPlus_BXm1Filled;
0499   MonitorElement* mePhF_EndcapMinus_BXm1Filled;
0500   //MonitorElement* mePhF_Barrel_BXm2BXm1Filled;
0501   //MonitorElement* mePhF_EndcapPlus_BXm2BXm1Filled;
0502   //MonitorElement* mePhF_EndcapMinus_BXm2BXm1Filled;
0503 
0504   MonitorElement* meHFHadF_Plus;
0505   MonitorElement* meHFHadF_Minus;
0506   MonitorElement* meHFHadF_Plus_BXm1Empty;
0507   MonitorElement* meHFHadF_Minus_BXm1Empty;
0508   //MonitorElement* meHFHadF_Plus_BXm2BXm1Empty;
0509   //MonitorElement* meHFHadF_Minus_BXm2BXm1Empty;
0510   MonitorElement* meHFHadF_Plus_BXm1Filled;
0511   MonitorElement* meHFHadF_Minus_BXm1Filled;
0512   //MonitorElement* meHFHadF_Plus_BXm2BXm1Filled;
0513   //MonitorElement* meHFHadF_Minus_BXm2BXm1Filled;
0514 
0515   MonitorElement* meHFEMF_Plus;
0516   MonitorElement* meHFEMF_Minus;
0517   MonitorElement* meHFEMF_Plus_BXm1Empty;
0518   MonitorElement* meHFEMF_Minus_BXm1Empty;
0519   //MonitorElement* meHFEMF_Plus_BXm2BXm1Empty;
0520   //MonitorElement* meHFEMF_Minus_BXm2BXm1Empty;
0521   MonitorElement* meHFEMF_Plus_BXm1Filled;
0522   MonitorElement* meHFEMF_Minus_BXm1Filled;
0523   //MonitorElement* meHFEMF_Plus_BXm2BXm1Filled;
0524   //MonitorElement* meHFEMF_Minus_BXm2BXm1Filled;
0525   /*
0526   MonitorElement* meMETPhiChargedHadronsBarrel_BXm2BXm1Filled;
0527   MonitorElement* meMETPhiChargedHadronsEndcapPlus_BXm2BXm1Filled;
0528   MonitorElement* meMETPhiChargedHadronsEndcapMinus_BXm2BXm1Filled;
0529   MonitorElement* meMETPhiNeutralHadronsBarrel_BXm2BXm1Filled;
0530   MonitorElement* meMETPhiNeutralHadronsEndcapPlus_BXm2BXm1Filled;
0531   MonitorElement* meMETPhiNeutralHadronsEndcapMinus_BXm2BXm1Filled;
0532   MonitorElement* meMETPhiPhotonsBarrel_BXm2BXm1Filled;
0533   MonitorElement* meMETPhiPhotonsEndcapPlus_BXm2BXm1Filled;
0534   MonitorElement* meMETPhiPhotonsEndcapMinus_BXm2BXm1Filled;
0535   MonitorElement* meMETPhiHFHadronsPlus_BXm2BXm1Filled;
0536   MonitorElement* meMETPhiHFHadronsMinus_BXm2BXm1Filled;
0537   MonitorElement* meMETPhiHFEGammasPlus_BXm2BXm1Filled;
0538   MonitorElement* meMETPhiHFEGammasMinus_BXm2BXm1Filled;
0539   */
0540   double ptMinCand_;
0541 
0542   //PFcandidate maps
0543   std::vector<MonitorElement*> profilePFCand_x_, profilePFCand_y_;
0544   std::vector<std::string> profilePFCand_x_name_, profilePFCand_y_name_;
0545   std::vector<double> etaMinPFCand_, etaMaxPFCand_, MExPFCand_, MEyPFCand_;
0546   std::vector<int> typePFCand_, countsPFCand_, etaNBinsPFCand_;
0547 
0548   MonitorElement* meMETPhiChargedHadronsBarrel;
0549   MonitorElement* meMETPhiChargedHadronsEndcapPlus;
0550   MonitorElement* meMETPhiChargedHadronsEndcapMinus;
0551   MonitorElement* meMETPhiNeutralHadronsBarrel;
0552   MonitorElement* meMETPhiNeutralHadronsEndcapPlus;
0553   MonitorElement* meMETPhiNeutralHadronsEndcapMinus;
0554   MonitorElement* meMETPhiPhotonsBarrel;
0555   MonitorElement* meMETPhiPhotonsEndcapPlus;
0556   MonitorElement* meMETPhiPhotonsEndcapMinus;
0557   MonitorElement* meMETPhiHFHadronsPlus;
0558   MonitorElement* meMETPhiHFHadronsMinus;
0559   MonitorElement* meMETPhiHFEGammasPlus;
0560   MonitorElement* meMETPhiHFEGammasMinus;
0561 
0562   edm::EDGetTokenT<std::vector<reco::PFCandidate>> pflowToken_;
0563   edm::EDGetTokenT<std::vector<pat::PackedCandidate>> pflowPackedToken_;
0564 
0565   // NPV profiles -->
0566   //----------------------------------------------------------------------------
0567   MonitorElement* meMEx_profile;
0568   MonitorElement* meMEy_profile;
0569   MonitorElement* meMET_profile;
0570   MonitorElement* meSumET_profile;
0571 
0572   MonitorElement* mePhotonEtFraction_profile;
0573   MonitorElement* mePhotonEt_profile;
0574   MonitorElement* meNeutralHadronEtFraction_profile;
0575   MonitorElement* meNeutralHadronEt_profile;
0576   MonitorElement* meChargedHadronEtFraction_profile;
0577   MonitorElement* meChargedHadronEt_profile;
0578   MonitorElement* meHFHadronEtFraction_profile;
0579   MonitorElement* meHFHadronEt_profile;
0580   MonitorElement* meHFEMEtFraction_profile;
0581   MonitorElement* meHFEMEt_profile;
0582 
0583   MonitorElement* meZJets_u_par;
0584   MonitorElement* meZJets_u_par_ZPt_0_15;
0585   MonitorElement* meZJets_u_par_ZPt_15_30;
0586   MonitorElement* meZJets_u_par_ZPt_30_55;
0587   MonitorElement* meZJets_u_par_ZPt_55_75;
0588   MonitorElement* meZJets_u_par_ZPt_75_150;
0589   MonitorElement* meZJets_u_par_ZPt_150_290;
0590   MonitorElement* meZJets_u_par_ZPt_290;
0591 
0592   MonitorElement* meZJets_u_perp;
0593   MonitorElement* meZJets_u_perp_ZPt_0_15;
0594   MonitorElement* meZJets_u_perp_ZPt_15_30;
0595   MonitorElement* meZJets_u_perp_ZPt_30_55;
0596   MonitorElement* meZJets_u_perp_ZPt_55_75;
0597   MonitorElement* meZJets_u_perp_ZPt_75_150;
0598   MonitorElement* meZJets_u_perp_ZPt_150_290;
0599   MonitorElement* meZJets_u_perp_ZPt_290;
0600 
0601   std::map<std::string, MonitorElement*> map_dijet_MEs;
0602 
0603   bool isCaloMet_;
0604   bool isPFMet_;
0605   bool isMiniAODMet_;
0606 
0607   bool fill_met_high_level_histo;
0608   bool fillCandidateMap_histos;
0609 };
0610 #endif