BPhysicsOniaDQM

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

/** \class BPhysicsOniaDQM
 *
 *  DQM offline for quarkonia
 *
 *  \author S. Bolognesi, Eric - CERN
 */

#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Utilities/interface/InputTag.h"
#include "FWCore/Framework/interface/LuminosityBlock.h"
#include "DataFormats/MuonReco/interface/MuonFwd.h"
#include "DataFormats/Luminosity/interface/LumiSummary.h"
#include "DataFormats/VertexReco/interface/VertexFwd.h"
#include "DataFormats/VertexReco/interface/Vertex.h"
#include "DQMServices/Core/interface/DQMEDAnalyzer.h"
#include "DQMServices/Core/interface/DQMStore.h"

#include <string>
#include <cmath>
#include <map>

class BPhysicsOniaDQM : public DQMEDAnalyzer {
public:
  /// Constructor
  BPhysicsOniaDQM(const edm::ParameterSet&);

  /// Destructor
  ~BPhysicsOniaDQM() override;

  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
  /// Get the analysis
  void analyze(const edm::Event&, const edm::EventSetup&) override;

private:
  float computeMass(const math::XYZVector& vec1, const math::XYZVector& vec2);
  bool isMuonInAccept(const reco::Muon& recoMu);
  bool selGlobalMuon(const reco::Muon& recoMu);
  bool selTrackerMuon(const reco::Muon& recoMu);

  // ----------member data ---------------------------
  edm::EDGetTokenT<reco::VertexCollection> vertex_;
  // Muon Label
  edm::EDGetTokenT<reco::MuonCollection> theMuonCollectionLabel_;
  edm::EDGetTokenT<LumiSummary> lumiSummaryToken_;

  // Switch for verbosity
  std::string metname;

  // The histos
  MonitorElement* diMuonMass_global;
  MonitorElement* diMuonMass_tracker;
  MonitorElement* diMuonMass_standalone;
  MonitorElement* global_background;
  MonitorElement* tracker_background;
  MonitorElement* standalone_background;

  MonitorElement* glbSigCut;
  MonitorElement* glbSigNoCut;
  MonitorElement* glbBkgNoCut;
  MonitorElement* staSigCut;
  MonitorElement* staSigNoCut;
  MonitorElement* staBkgNoCut;
  MonitorElement* trkSigCut;
  MonitorElement* trkSigNoCut;
  MonitorElement* trkBkgNoCut;

  math::XYZPoint RefVtx;
};
#endif