Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:44:10

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   std::string HBHENoiseStringMiniAOD;
0218   std::string HBHEIsoNoiseStringMiniAOD;
0219 
0220   edm::EDGetTokenT<reco::JetCorrector> jetCorrectorToken_;
0221 
0222   edm::VParameterSet triggerSelectedSubFolders_;
0223   std::vector<GenericTriggerEventFlag*> triggerFolderEventFlag_;
0224   std::vector<std::vector<std::string>> triggerFolderExpr_;
0225   std::vector<std::string> triggerFolderLabels_;
0226   std::vector<int> triggerFolderDecisions_;
0227   //  std::vector<MonitorElement* >           triggerFolderME_;
0228 
0229   //  GenericTriggerEventFlag * highPtJetEventFlag_;
0230   //  GenericTriggerEventFlag * lowPtJetEventFlag_;
0231   //  GenericTriggerEventFlag * minBiasEventFlag_;
0232   //  GenericTriggerEventFlag * highMETEventFlag_;
0233   ////GenericTriggerEventFlag * lowMETEventFlag_;
0234   //  GenericTriggerEventFlag * eleEventFlag_;
0235   //  GenericTriggerEventFlag * muonEventFlag_;
0236   //
0237   //  std::vector<std::string> highPtJetExpr_;
0238   //  std::vector<std::string> lowPtJetExpr_;
0239   //  std::vector<std::string> highMETExpr_;
0240   //  //  std::vector<std::string> lowMETExpr_;
0241   //  std::vector<std::string> muonExpr_;
0242   //  std::vector<std::string> elecExpr_;
0243   //  std::vector<std::string> minbiasExpr_;
0244   //  MonitorElement* hTriggerName_HighPtJet;
0245   //  MonitorElement* hTriggerName_LowPtJet;
0246   //  MonitorElement* hTriggerName_MinBias;
0247   //  MonitorElement* hTriggerName_HighMET;
0248   //  //  MonitorElement* hTriggerName_LowMET;
0249   //  MonitorElement* hTriggerName_Ele;
0250   //  MonitorElement* hTriggerName_Muon;
0251   MonitorElement* hMETRate;
0252 
0253   edm::ParameterSet cleaningParameters_;
0254   std::vector<edm::ParameterSet> diagnosticsParameters_;
0255 
0256   std::string hltPhysDec_;
0257 
0258   int nbinsPV_;
0259   double nPVMin_;
0260   double nPVMax_;
0261 
0262   int LSBegin_;
0263   int LSEnd_;
0264 
0265   bool bypassAllPVChecks_;
0266   bool bypassAllDCSChecks_;
0267   bool runcosmics_;
0268   bool onlyCleaned_;
0269 
0270   //  int trigJetMB_;
0271   //  int trigHighPtJet_;
0272   //  int trigLowPtJet_;
0273   //  int trigMinBias_;
0274   //  int trigHighMET_;
0275   ////int trigLowMET_;
0276   //  int trigEle_;
0277   //  int trigMuon_;
0278   //  int trigPhysDec_;
0279 
0280   //  double highPtJetThreshold_;
0281   //  double lowPtJetThreshold_;
0282   //  double highMETThreshold_;
0283 
0284   int numPV_;
0285   // Et threshold for MET plots
0286   //  double etThreshold_;
0287 
0288   // HF calibration factor (in 31X applied by TcProducer)
0289   //delete altogether not used anymore
0290   double hfCalibFactor_;  //
0291 
0292   // DCS filter
0293   JetMETDQMDCSFilter* DCSFilter_;
0294 
0295   std::vector<std::string> folderNames_;
0296   //
0297   math::XYZPoint beamSpot_;
0298 
0299   //trigger histos
0300   // lines commented out have been removed to improve the bin usage of JetMET DQM
0301 
0302   //for all MET types
0303 
0304   MonitorElement* lumisecME;
0305   //MonitorElement* hNevents;
0306   MonitorElement* hMEx;
0307   MonitorElement* hMEy;
0308   //MonitorElement* hEz;
0309   MonitorElement* hMETSig;
0310   MonitorElement* hMET;
0311   MonitorElement* hMET_2;
0312 
0313   MonitorElement* hMET_HBHENoiseFilter;
0314   MonitorElement* hMET_CSCTightHaloFilter;
0315   MonitorElement* hMET_eeBadScFilter;
0316   MonitorElement* hMET_EcalDeadCellTriggerFilter;
0317   MonitorElement* hMET_EcalDeadCellBoundaryFilter;
0318   MonitorElement* hMET_HBHEIsoNoiseFilter;
0319   MonitorElement* hMET_CSCTightHalo2015Filter;
0320   MonitorElement* hMET_HcalStripHaloFilter;
0321 
0322   MonitorElement* hMETPhi;
0323   MonitorElement* hSumET;
0324 
0325   MonitorElement* hMExLS;
0326   MonitorElement* hMEyLS;
0327 
0328   MonitorElement* hMET_logx;
0329   MonitorElement* hSumET_logx;
0330 
0331   //CaloMET specific stuff
0332   MonitorElement* hCaloMETPhi020;
0333   MonitorElement* hCaloEtFractionHadronic;
0334   MonitorElement* hCaloEmEtFraction;
0335 
0336   //MonitorElement* hCaloEmEtFraction002;
0337   //MonitorElement* hCaloEmEtFraction010;
0338   MonitorElement* hCaloEmEtFraction020;
0339 
0340   MonitorElement* hCaloHadEtInHB;
0341   MonitorElement* hCaloHadEtInHO;
0342   MonitorElement* hCaloHadEtInHE;
0343   MonitorElement* hCaloHadEtInHF;
0344   MonitorElement* hCaloEmEtInHF;
0345   MonitorElement* hCaloEmEtInEE;
0346   MonitorElement* hCaloEmEtInEB;
0347 
0348   MonitorElement* hCaloEmMEx;
0349   MonitorElement* hCaloEmMEy;
0350   //MonitorElement* hCaloEmEz;
0351   MonitorElement* hCaloEmMET;
0352   MonitorElement* hCaloEmMETPhi;
0353   //MonitorElement* hCaloEmSumET;
0354 
0355   MonitorElement* hCaloHaMEx;
0356   MonitorElement* hCaloHaMEy;
0357   //MonitorElement* hCaloHaEz;
0358   MonitorElement* hCaloHaMET;
0359   MonitorElement* hCaloHaMETPhi;
0360   //MonitorElement* hCaloHaSumET;
0361 
0362   //now PF only things
0363   MonitorElement* mePhotonEtFraction;
0364   MonitorElement* mePhotonEt;
0365   MonitorElement* meNeutralHadronEtFraction;
0366   MonitorElement* meNeutralHadronEt;
0367   MonitorElement* meElectronEt;
0368   MonitorElement* meChargedHadronEtFraction;
0369   MonitorElement* meChargedHadronEt;
0370   MonitorElement* meMuonEt;
0371   MonitorElement* meHFHadronEtFraction;
0372   MonitorElement* meHFHadronEt;
0373   MonitorElement* meHFEMEtFraction;
0374   MonitorElement* meHFEMEt;
0375   //MEs where we fill if the previous two bunches are empty (25 ns bunch spacing)
0376   /*
0377   MonitorElement* mePhotonEtFraction_BXm2BXm1Empty;
0378   MonitorElement* meNeutralHadronEtFraction_BXm2BXm1Empty;
0379   MonitorElement* meChargedHadronEtFraction_BXm2BXm1Empty;
0380   MonitorElement* meMET_BXm2BXm1Empty;
0381   MonitorElement* meSumET_BXm2BXm1Empty;
0382 
0383   MonitorElement* meMETPhiChargedHadronsBarrel_BXm2BXm1Empty;
0384   MonitorElement* meMETPhiChargedHadronsEndcapPlus_BXm2BXm1Empty;
0385   MonitorElement* meMETPhiChargedHadronsEndcapMinus_BXm2BXm1Empty;
0386   MonitorElement* meMETPhiNeutralHadronsBarrel_BXm2BXm1Empty;
0387   MonitorElement* meMETPhiNeutralHadronsEndcapPlus_BXm2BXm1Empty;
0388   MonitorElement* meMETPhiNeutralHadronsEndcapMinus_BXm2BXm1Empty;
0389   MonitorElement* meMETPhiPhotonsBarrel_BXm2BXm1Empty;
0390   MonitorElement* meMETPhiPhotonsEndcapPlus_BXm2BXm1Empty;
0391   MonitorElement* meMETPhiPhotonsEndcapMinus_BXm2BXm1Empty;
0392   MonitorElement* meMETPhiHFHadronsPlus_BXm2BXm1Empty;
0393   MonitorElement* meMETPhiHFHadronsMinus_BXm2BXm1Empty;
0394   MonitorElement* meMETPhiHFEGammasPlus_BXm2BXm1Empty;
0395   MonitorElement* meMETPhiHFEGammasMinus_BXm2BXm1Empty;
0396   */
0397   //MEs where we fill if the previous bunch is empty (25 ns bunch spacing)
0398   MonitorElement* mePhotonEtFraction_BXm1Empty;
0399   MonitorElement* meNeutralHadronEtFraction_BXm1Empty;
0400   MonitorElement* meChargedHadronEtFraction_BXm1Empty;
0401   MonitorElement* meMET_BXm1Empty;
0402   MonitorElement* meSumET_BXm1Empty;
0403 
0404   MonitorElement* meMETPhiChargedHadronsBarrel_BXm1Empty;
0405   MonitorElement* meMETPhiChargedHadronsEndcapPlus_BXm1Empty;
0406   MonitorElement* meMETPhiChargedHadronsEndcapMinus_BXm1Empty;
0407   MonitorElement* meMETPhiNeutralHadronsBarrel_BXm1Empty;
0408   MonitorElement* meMETPhiNeutralHadronsEndcapPlus_BXm1Empty;
0409   MonitorElement* meMETPhiNeutralHadronsEndcapMinus_BXm1Empty;
0410   MonitorElement* meMETPhiPhotonsBarrel_BXm1Empty;
0411   MonitorElement* meMETPhiPhotonsEndcapPlus_BXm1Empty;
0412   MonitorElement* meMETPhiPhotonsEndcapMinus_BXm1Empty;
0413   MonitorElement* meMETPhiHFHadronsPlus_BXm1Empty;
0414   MonitorElement* meMETPhiHFHadronsMinus_BXm1Empty;
0415   MonitorElement* meMETPhiHFEGammasPlus_BXm1Empty;
0416   MonitorElement* meMETPhiHFEGammasMinus_BXm1Empty;
0417 
0418   //MEs where we fill if the previous bunch is filled (25 ns bunch spacing)
0419   MonitorElement* mePhotonEtFraction_BXm1Filled;
0420   MonitorElement* meNeutralHadronEtFraction_BXm1Filled;
0421   MonitorElement* meChargedHadronEtFraction_BXm1Filled;
0422   MonitorElement* meMET_BXm1Filled;
0423   MonitorElement* meSumET_BXm1Filled;
0424 
0425   MonitorElement* meMETPhiChargedHadronsBarrel_BXm1Filled;
0426   MonitorElement* meMETPhiChargedHadronsEndcapPlus_BXm1Filled;
0427   MonitorElement* meMETPhiChargedHadronsEndcapMinus_BXm1Filled;
0428   MonitorElement* meMETPhiNeutralHadronsBarrel_BXm1Filled;
0429   MonitorElement* meMETPhiNeutralHadronsEndcapPlus_BXm1Filled;
0430   MonitorElement* meMETPhiNeutralHadronsEndcapMinus_BXm1Filled;
0431   MonitorElement* meMETPhiPhotonsBarrel_BXm1Filled;
0432   MonitorElement* meMETPhiPhotonsEndcapPlus_BXm1Filled;
0433   MonitorElement* meMETPhiPhotonsEndcapMinus_BXm1Filled;
0434   MonitorElement* meMETPhiHFHadronsPlus_BXm1Filled;
0435   MonitorElement* meMETPhiHFHadronsMinus_BXm1Filled;
0436   MonitorElement* meMETPhiHFEGammasPlus_BXm1Filled;
0437   MonitorElement* meMETPhiHFEGammasMinus_BXm1Filled;
0438 
0439   //MEs where we fill if two previous bunches are filled (25 ns bunch spacing)
0440   /*
0441   MonitorElement* meChargedHadronEtFraction_BXm2BXm1Filled;
0442   MonitorElement* mePhotonEtFraction_BXm2BXm1Filled;
0443   MonitorElement* meNeutralHadronEtFraction_BXm2BXm1Filled;
0444   MonitorElement* meMET_BXm2BXm1Filled;
0445   MonitorElement* meSumET_BXm2BXm1Filled;
0446   */
0447   MonitorElement* meCHF_Barrel;
0448   MonitorElement* meCHF_EndcapPlus;
0449   MonitorElement* meCHF_EndcapMinus;
0450   MonitorElement* meCHF_Barrel_BXm1Empty;
0451   MonitorElement* meCHF_EndcapPlus_BXm1Empty;
0452   MonitorElement* meCHF_EndcapMinus_BXm1Empty;
0453   //MonitorElement* meCHF_Barrel_BXm2BXm1Empty;
0454   //MonitorElement* meCHF_EndcapPlus_BXm2BXm1Empty;
0455   //MonitorElement* meCHF_EndcapMinus_BXm2BXm1Empty;
0456   MonitorElement* meCHF_Barrel_BXm1Filled;
0457   MonitorElement* meCHF_EndcapPlus_BXm1Filled;
0458   MonitorElement* meCHF_EndcapMinus_BXm1Filled;
0459   //MonitorElement* meCHF_Barrel_BXm2BXm1Filled;
0460   //MonitorElement* meCHF_EndcapPlus_BXm2BXm1Filled;
0461   //MonitorElement* meCHF_EndcapMinus_BXm2BXm1Filled;
0462 
0463   MonitorElement* meNHF_Barrel;
0464   MonitorElement* meNHF_EndcapPlus;
0465   MonitorElement* meNHF_EndcapMinus;
0466   MonitorElement* meNHF_Barrel_BXm1Empty;
0467   MonitorElement* meNHF_EndcapPlus_BXm1Empty;
0468   MonitorElement* meNHF_EndcapMinus_BXm1Empty;
0469   //MonitorElement* meNHF_Barrel_BXm2BXm1Empty;
0470   //MonitorElement* meNHF_EndcapPlus_BXm2BXm1Empty;
0471   //MonitorElement* meNHF_EndcapMinus_BXm2BXm1Empty;
0472   MonitorElement* meNHF_Barrel_BXm1Filled;
0473   MonitorElement* meNHF_EndcapPlus_BXm1Filled;
0474   MonitorElement* meNHF_EndcapMinus_BXm1Filled;
0475   //MonitorElement* meNHF_Barrel_BXm2BXm1Filled;
0476   //MonitorElement* meNHF_EndcapPlus_BXm2BXm1Filled;
0477   //MonitorElement* meNHF_EndcapMinus_BXm2BXm1Filled;
0478 
0479   MonitorElement* mePhF_Barrel;
0480   MonitorElement* mePhF_EndcapPlus;
0481   MonitorElement* mePhF_EndcapMinus;
0482   MonitorElement* mePhF_Barrel_BXm1Empty;
0483   MonitorElement* mePhF_EndcapPlus_BXm1Empty;
0484   MonitorElement* mePhF_EndcapMinus_BXm1Empty;
0485   //MonitorElement* mePhF_Barrel_BXm2BXm1Empty;
0486   //MonitorElement* mePhF_EndcapPlus_BXm2BXm1Empty;
0487   //MonitorElement* mePhF_EndcapMinus_BXm2BXm1Empty;
0488   MonitorElement* mePhF_Barrel_BXm1Filled;
0489   MonitorElement* mePhF_EndcapPlus_BXm1Filled;
0490   MonitorElement* mePhF_EndcapMinus_BXm1Filled;
0491   //MonitorElement* mePhF_Barrel_BXm2BXm1Filled;
0492   //MonitorElement* mePhF_EndcapPlus_BXm2BXm1Filled;
0493   //MonitorElement* mePhF_EndcapMinus_BXm2BXm1Filled;
0494 
0495   MonitorElement* meHFHadF_Plus;
0496   MonitorElement* meHFHadF_Minus;
0497   MonitorElement* meHFHadF_Plus_BXm1Empty;
0498   MonitorElement* meHFHadF_Minus_BXm1Empty;
0499   //MonitorElement* meHFHadF_Plus_BXm2BXm1Empty;
0500   //MonitorElement* meHFHadF_Minus_BXm2BXm1Empty;
0501   MonitorElement* meHFHadF_Plus_BXm1Filled;
0502   MonitorElement* meHFHadF_Minus_BXm1Filled;
0503   //MonitorElement* meHFHadF_Plus_BXm2BXm1Filled;
0504   //MonitorElement* meHFHadF_Minus_BXm2BXm1Filled;
0505 
0506   MonitorElement* meHFEMF_Plus;
0507   MonitorElement* meHFEMF_Minus;
0508   MonitorElement* meHFEMF_Plus_BXm1Empty;
0509   MonitorElement* meHFEMF_Minus_BXm1Empty;
0510   //MonitorElement* meHFEMF_Plus_BXm2BXm1Empty;
0511   //MonitorElement* meHFEMF_Minus_BXm2BXm1Empty;
0512   MonitorElement* meHFEMF_Plus_BXm1Filled;
0513   MonitorElement* meHFEMF_Minus_BXm1Filled;
0514   //MonitorElement* meHFEMF_Plus_BXm2BXm1Filled;
0515   //MonitorElement* meHFEMF_Minus_BXm2BXm1Filled;
0516   /*
0517   MonitorElement* meMETPhiChargedHadronsBarrel_BXm2BXm1Filled;
0518   MonitorElement* meMETPhiChargedHadronsEndcapPlus_BXm2BXm1Filled;
0519   MonitorElement* meMETPhiChargedHadronsEndcapMinus_BXm2BXm1Filled;
0520   MonitorElement* meMETPhiNeutralHadronsBarrel_BXm2BXm1Filled;
0521   MonitorElement* meMETPhiNeutralHadronsEndcapPlus_BXm2BXm1Filled;
0522   MonitorElement* meMETPhiNeutralHadronsEndcapMinus_BXm2BXm1Filled;
0523   MonitorElement* meMETPhiPhotonsBarrel_BXm2BXm1Filled;
0524   MonitorElement* meMETPhiPhotonsEndcapPlus_BXm2BXm1Filled;
0525   MonitorElement* meMETPhiPhotonsEndcapMinus_BXm2BXm1Filled;
0526   MonitorElement* meMETPhiHFHadronsPlus_BXm2BXm1Filled;
0527   MonitorElement* meMETPhiHFHadronsMinus_BXm2BXm1Filled;
0528   MonitorElement* meMETPhiHFEGammasPlus_BXm2BXm1Filled;
0529   MonitorElement* meMETPhiHFEGammasMinus_BXm2BXm1Filled;
0530   */
0531   double ptMinCand_;
0532 
0533   //PFcandidate maps
0534   std::vector<MonitorElement*> profilePFCand_x_, profilePFCand_y_;
0535   std::vector<std::string> profilePFCand_x_name_, profilePFCand_y_name_;
0536   std::vector<double> etaMinPFCand_, etaMaxPFCand_, MExPFCand_, MEyPFCand_;
0537   std::vector<int> typePFCand_, countsPFCand_, etaNBinsPFCand_;
0538 
0539   MonitorElement* meMETPhiChargedHadronsBarrel;
0540   MonitorElement* meMETPhiChargedHadronsEndcapPlus;
0541   MonitorElement* meMETPhiChargedHadronsEndcapMinus;
0542   MonitorElement* meMETPhiNeutralHadronsBarrel;
0543   MonitorElement* meMETPhiNeutralHadronsEndcapPlus;
0544   MonitorElement* meMETPhiNeutralHadronsEndcapMinus;
0545   MonitorElement* meMETPhiPhotonsBarrel;
0546   MonitorElement* meMETPhiPhotonsEndcapPlus;
0547   MonitorElement* meMETPhiPhotonsEndcapMinus;
0548   MonitorElement* meMETPhiHFHadronsPlus;
0549   MonitorElement* meMETPhiHFHadronsMinus;
0550   MonitorElement* meMETPhiHFEGammasPlus;
0551   MonitorElement* meMETPhiHFEGammasMinus;
0552 
0553   edm::EDGetTokenT<std::vector<reco::PFCandidate>> pflowToken_;
0554   edm::EDGetTokenT<std::vector<pat::PackedCandidate>> pflowPackedToken_;
0555 
0556   // NPV profiles -->
0557   //----------------------------------------------------------------------------
0558   MonitorElement* meMEx_profile;
0559   MonitorElement* meMEy_profile;
0560   MonitorElement* meMET_profile;
0561   MonitorElement* meSumET_profile;
0562 
0563   MonitorElement* mePhotonEtFraction_profile;
0564   MonitorElement* mePhotonEt_profile;
0565   MonitorElement* meNeutralHadronEtFraction_profile;
0566   MonitorElement* meNeutralHadronEt_profile;
0567   MonitorElement* meChargedHadronEtFraction_profile;
0568   MonitorElement* meChargedHadronEt_profile;
0569   MonitorElement* meHFHadronEtFraction_profile;
0570   MonitorElement* meHFHadronEt_profile;
0571   MonitorElement* meHFEMEtFraction_profile;
0572   MonitorElement* meHFEMEt_profile;
0573 
0574   MonitorElement* meZJets_u_par;
0575   MonitorElement* meZJets_u_par_ZPt_0_15;
0576   MonitorElement* meZJets_u_par_ZPt_15_30;
0577   MonitorElement* meZJets_u_par_ZPt_30_55;
0578   MonitorElement* meZJets_u_par_ZPt_55_75;
0579   MonitorElement* meZJets_u_par_ZPt_75_150;
0580   MonitorElement* meZJets_u_par_ZPt_150_290;
0581   MonitorElement* meZJets_u_par_ZPt_290;
0582 
0583   MonitorElement* meZJets_u_perp;
0584   MonitorElement* meZJets_u_perp_ZPt_0_15;
0585   MonitorElement* meZJets_u_perp_ZPt_15_30;
0586   MonitorElement* meZJets_u_perp_ZPt_30_55;
0587   MonitorElement* meZJets_u_perp_ZPt_55_75;
0588   MonitorElement* meZJets_u_perp_ZPt_75_150;
0589   MonitorElement* meZJets_u_perp_ZPt_150_290;
0590   MonitorElement* meZJets_u_perp_ZPt_290;
0591 
0592   std::map<std::string, MonitorElement*> map_dijet_MEs;
0593 
0594   bool isCaloMet_;
0595   bool isPFMet_;
0596   bool isMiniAODMet_;
0597 
0598   bool fill_met_high_level_histo;
0599   bool fillCandidateMap_histos;
0600 };
0601 #endif