HcalNoiseRates

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
#ifndef _DQMOFFLINE_HCAL_HCALNOISERATES_H_
#define _DQMOFFLINE_HCAL_HCALNOISERATES_H_

//
// NoiseRates.h
//
//    description: Makes plots to calculate the anomalous noise rates
//
//    author: K. Hatakeyama, H. Liu, Baylor
//
//

// system include files
#include <memory>
#include <string>
#include <vector>

// user include files
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"

#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"

#include "FWCore/ParameterSet/interface/ParameterSet.h"

#include "DQMServices/Core/interface/DQMEDAnalyzer.h"
#include "DQMServices/Core/interface/DQMStore.h"

#include "DataFormats/METReco/interface/HcalNoiseRBX.h"

// Hcal Hoise Summary
#include "DataFormats/METReco/interface/HcalNoiseSummary.h"

//
// class declaration
//

class HcalNoiseRates : public DQMEDAnalyzer {
public:
  explicit HcalNoiseRates(const edm::ParameterSet &);
  ~HcalNoiseRates() override;

private:
  void analyze(const edm::Event &, const edm::EventSetup &) override;
  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;

  std::string outputFile_;

  // parameters
  edm::InputTag rbxCollName_;  // label for the rbx collection
  edm::EDGetTokenT<reco::HcalNoiseRBXCollection> tok_rbx_;
  double minRBXEnergy_;  // RBX energy threshold
  double minHitEnergy_;  // RecHit energy threshold
  bool useAllHistos_;

  // Hcal Noise Summary Parameters
  edm::EDGetTokenT<HcalNoiseSummary> noisetoken_;

  MonitorElement *hLumiBlockCount_;
  MonitorElement *hRBXEnergy_;
  MonitorElement *hRBXEnergyType1_;
  MonitorElement *hRBXEnergyType2_;
  MonitorElement *hRBXEnergyType3_;
  MonitorElement *hRBXNHits_;

  // count lumi segments
  std::map<int, int> lumiCountMap_;

  // Hcal Noise Summary Plots

  MonitorElement *nNNumChannels_;
  MonitorElement *nNSumE_;
  MonitorElement *nNSumEt_;

  MonitorElement *sNNumChannels_;
  MonitorElement *sNSumE_;
  MonitorElement *sNSumEt_;

  MonitorElement *iNNumChannels_;
  MonitorElement *iNSumE_;
  MonitorElement *iNSumEt_;

  MonitorElement *hNoise_maxZeros_;
  MonitorElement *hNoise_maxHPDHits_;
  MonitorElement *hNoise_maxHPDNoOtherHits_;
};

#endif