SiPixelRecHitModule

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 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
#ifndef SiPixelMonitorRecHits_SiPixelRecHitModule_h
#define SiPixelMonitorRecHits_SiPixelRecHitModule_h
// -*- C++ -*-
//
// Package:    SiPixelMonitorRecHits
// Class:      SiPixelRecHitModule
//
/**\class

 Description: RecHits monitoring elements for a single Pixel
detector segment (detID)

 Implementation:
//	This package was marginally adapted from
//	SiPixelDigiModule
     <Notes on implementation>
*/
//
// Original Author:  Vincenzo Chiochia
//         Created:
//
//  Adapted by: Keith Rose
//  for use in SiPixelMonitorRecHit package
//  Updated by: Lukas Wehrli
//  for pixel offline DQM

#include "DQMServices/Core/interface/DQMStore.h"
#include "DataFormats/Common/interface/DetSetVector.h"
#include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHit.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
#include "Geometry/Records/interface/TrackerTopologyRcd.h"
#include <cstdint>

class SiPixelRecHitModule {
public:
  typedef dqm::reco::DQMStore DQMStore;
  typedef dqm::reco::MonitorElement MonitorElement;

  /// Default constructor
  SiPixelRecHitModule();
  /// Constructor with raw DetId
  SiPixelRecHitModule(const uint32_t &id);
  /// Destructor
  ~SiPixelRecHitModule();

  // typedef edm::DetSet<PixelRecHit>::const_iterator  RecHitsIterator;

  /// Book histograms
  void book(const edm::ParameterSet &iConfig,
            DQMStore::IBooker &iBooker,
            const TrackerTopology *pTT,
            int type = 0,
            bool twoD = true,
            bool reducedSet = false,
            bool isUpgrade = false);
  /// Fill histograms
  void fill(const float &rechit_x,
            const float &rechit_y,
            const int &sizeX,
            const int &sizeY,
            const float &lerr_x,
            const float &lerr_y,
            bool modon = true,
            bool ladon = false,
            bool layon = false,
            bool phion = false,
            bool bladeon = false,
            bool diskon = false,
            bool ringon = false,
            bool twoD = true,
            bool reducedSet = false);
  void nfill(const int &nrec,
             bool modon = true,
             bool ladon = false,
             bool layon = false,
             bool phion = false,
             bool bladeon = false,
             bool diskon = false,
             bool ringon = false);

private:
  uint32_t id_;
  MonitorElement *meXYPos_;
  MonitorElement *meXYPos_px_;
  MonitorElement *meXYPos_py_;
  MonitorElement *meClustX_;
  MonitorElement *meClustY_;
  MonitorElement *meErrorX_;
  MonitorElement *meErrorY_;
  MonitorElement *menRecHits_;
  // barrel
  MonitorElement *meXYPosLad_;
  MonitorElement *meXYPosLad_px_;
  MonitorElement *meXYPosLad_py_;
  MonitorElement *meClustXLad_;
  MonitorElement *meClustYLad_;
  MonitorElement *meErrorXLad_;
  MonitorElement *meErrorYLad_;
  MonitorElement *menRecHitsLad_;

  MonitorElement *meXYPosLay_;
  MonitorElement *meXYPosLay_px_;
  MonitorElement *meXYPosLay_py_;
  MonitorElement *meClustXLay_;
  MonitorElement *meClustYLay_;
  MonitorElement *meErrorXLay_;
  MonitorElement *meErrorYLay_;
  MonitorElement *menRecHitsLay_;

  MonitorElement *meXYPosPhi_;
  MonitorElement *meXYPosPhi_px_;
  MonitorElement *meXYPosPhi_py_;
  MonitorElement *meClustXPhi_;
  MonitorElement *meClustYPhi_;
  MonitorElement *meErrorXPhi_;
  MonitorElement *meErrorYPhi_;
  MonitorElement *menRecHitsPhi_;

  // forward
  MonitorElement *meClustXBlade_;
  MonitorElement *meClustYBlade_;
  MonitorElement *meErrorXBlade_;
  MonitorElement *meErrorYBlade_;
  MonitorElement *menRecHitsBlade_;

  MonitorElement *meClustXDisk_;
  MonitorElement *meClustYDisk_;
  MonitorElement *meErrorXDisk_;
  MonitorElement *meErrorYDisk_;
  MonitorElement *menRecHitsDisk_;

  MonitorElement *meXYPosRing_;
  MonitorElement *meXYPosRing_px_;
  MonitorElement *meXYPosRing_py_;
  MonitorElement *meClustXRing_;
  MonitorElement *meClustYRing_;
  MonitorElement *meErrorXRing_;
  MonitorElement *meErrorYRing_;
  MonitorElement *menRecHitsRing_;
};
#endif