HcalRecHitsDQMClient

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

// -*- C++ -*-
//
//
/*
 Description: This is a RecHits client meant to plot rechits quantities
*/

//
// Originally create by: Hongxuan Liu
//                        May 2010
//

#include "DQMServices/Core/interface/DQMEDAnalyzer.h"
#include "DQMServices/Core/interface/DQMEDHarvester.h"
#include "DQMServices/Core/interface/DQMStore.h"
#include "DataFormats/Common/interface/Handle.h"
#include "DataFormats/Math/interface/LorentzVector.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Utilities/interface/ESGetToken.h"
#include <memory>
#include <unistd.h>

#include "DataFormats/DetId/interface/DetId.h"
#include "DataFormats/HcalDetId/interface/HcalDetId.h"
#include "DataFormats/HcalDigi/interface/HcalDigiCollections.h"
#include "Geometry/CaloGeometry/interface/CaloCellGeometry.h"
#include "Geometry/CaloGeometry/interface/CaloGeometry.h"
#include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
#include "Geometry/CaloTopology/interface/HcalTopology.h"
#include "Geometry/Records/interface/CaloGeometryRecord.h"
#include "Geometry/Records/interface/HcalRecNumberingRecord.h"
#include "Geometry/HcalCommonData/interface/HcalDDDRecConstants.h"

#include <fstream>
#include <iostream>
#include <vector>

class HcalRecHitsDQMClient : public DQMEDHarvester {
private:
  std::string outputFile_;
  edm::ParameterSet conf_;

  bool verbose_;
  bool debug_;

  std::string dirName_;
  std::string dirNameJet_;
  std::string dirNameMET_;

  edm::ESGetToken<HcalDDDRecConstants, HcalRecNumberingRecord> hcalDDDRecConstantsToken_;
  edm::ESGetToken<CaloGeometry, CaloGeometryRecord> caloGeometryRunToken_;
  int maxDepthHB_, maxDepthHE_, maxDepthHO_, maxDepthHF_, maxDepthAll_;

  int nChannels_[5];  // 0:any, 1:HB, 2:HE, 3:HO, 4: HF

public:
  explicit HcalRecHitsDQMClient(const edm::ParameterSet &);
  ~HcalRecHitsDQMClient() override;

  void beginJob(void) override;
  void beginRun(edm::Run const &, edm::EventSetup const &) override;
  void dqmEndJob(DQMStore::IBooker &,
                 DQMStore::IGetter &) override;  // performed in the endJob

  int HcalRecHitsEndjob(const std::vector<MonitorElement *> &hcalMEs);

  float phifactor(int ieta);
};

#endif  // _DQMOFFLINE_HCAL_HCALRECHITSDQMCLIENT_H_