GEMDigiSource

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
#ifndef DQM_GEM_INTERFACE_GEMDigiSource_h
#define DQM_GEM_INTERFACE_GEMDigiSource_h

#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/PluginManager/interface/ModuleDef.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Utilities/interface/InputTag.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"

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

#include "Validation/MuonGEMHits/interface/GEMValidationUtils.h"

#include "CondFormats/DataRecord/interface/GEMChMapRcd.h"
#include "CondFormats/GEMObjects/interface/GEMChMap.h"
#include "DataFormats/GEMDigi/interface/GEMDigiCollection.h"

#include "DataFormats/Scalers/interface/LumiScalers.h"

#include "DQM/GEM/interface/GEMDQMBase.h"

#include <string>

//----------------------------------------------------------------------------------------------------

class GEMDigiSource : public GEMDQMBase {
public:
  explicit GEMDigiSource(const edm::ParameterSet& cfg);
  ~GEMDigiSource() override {}
  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);

protected:
  void LoadROMap(edm::EventSetup const& iSetup);

  void dqmBeginRun(edm::Run const&, edm::EventSetup const&) override {}
  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
  void analyze(edm::Event const& e, edm::EventSetup const& eSetup) override;

private:
  int ProcessWithMEMap2WithEta(BookingHelper& bh, ME3IdsKey key) override;
  int ProcessWithMEMap2(BookingHelper& bh, ME2IdsKey key) override;
  int ProcessWithMEMap3(BookingHelper& bh, ME3IdsKey key) override;
  int ProcessWithMEMap4(BookingHelper& bh, ME4IdsKey key) override;
  int ProcessWithMEMap5WithChamber(BookingHelper& bh, ME5IdsKey key) override;

  const static int nNumBitDigiOcc_ = 16384;

  const edm::ESGetToken<GEMChMap, GEMChMapRcd> gemChMapToken_;

  edm::EDGetToken tagDigi_;

  edm::EDGetTokenT<LumiScalersCollection> lumiScalers_;

  std::map<ME4IdsKey, Int_t> mapChamberType_;
  std::map<ME3IdsKey, Int_t> mapStripToVFAT_;

  MEMap3Inf mapDigiWheel_layer_;

  MEMap4Inf mapTotalDigi_layer_;
  MEMap4Inf mapDigiOcc_ieta_;
  MEMap4Inf mapDigiOcc_phi_;
  MEMap4Inf mapTotalDigiPerEvtLayer_;
  MEMap3Inf mapTotalDigiPerEvtIEta_;
  MEMap2Inf mapBX_;

  MEMap5Inf mapDigiOccPerCh_;

  std::string strFolderMain_;

  Bool_t useDBEMap_;

  Int_t nBXMin_, nBXMax_;
  Float_t fRadiusMin_;
  Float_t fRadiusMax_;
};

#endif  // DQM_GEM_INTERFACE_GEMDigiSource_h