Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:11:20

0001 #ifndef SiPixelMonitorRecHits_SiPixelRecHitModule_h
0002 #define SiPixelMonitorRecHits_SiPixelRecHitModule_h
0003 // -*- C++ -*-
0004 //
0005 // Package:    SiPixelMonitorRecHits
0006 // Class:      SiPixelRecHitModule
0007 //
0008 /**\class
0009 
0010  Description: RecHits monitoring elements for a single Pixel
0011 detector segment (detID)
0012 
0013  Implementation:
0014 //  This package was marginally adapted from
0015 //  SiPixelDigiModule
0016      <Notes on implementation>
0017 */
0018 //
0019 // Original Author:  Vincenzo Chiochia
0020 //         Created:
0021 //
0022 //  Adapted by: Keith Rose
0023 //  for use in SiPixelMonitorRecHit package
0024 //  Updated by: Lukas Wehrli
0025 //  for pixel offline DQM
0026 
0027 #include "DQMServices/Core/interface/DQMStore.h"
0028 #include "DataFormats/Common/interface/DetSetVector.h"
0029 #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHit.h"
0030 #include "FWCore/Framework/interface/EventSetup.h"
0031 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0032 #include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
0033 #include "Geometry/Records/interface/TrackerTopologyRcd.h"
0034 #include <cstdint>
0035 
0036 class SiPixelRecHitModule {
0037 public:
0038   typedef dqm::reco::DQMStore DQMStore;
0039   typedef dqm::reco::MonitorElement MonitorElement;
0040 
0041   /// Default constructor
0042   SiPixelRecHitModule();
0043   /// Constructor with raw DetId
0044   SiPixelRecHitModule(const uint32_t &id);
0045   /// Destructor
0046   ~SiPixelRecHitModule();
0047 
0048   // typedef edm::DetSet<PixelRecHit>::const_iterator  RecHitsIterator;
0049 
0050   /// Book histograms
0051   void book(const edm::ParameterSet &iConfig,
0052             DQMStore::IBooker &iBooker,
0053             const TrackerTopology *pTT,
0054             int type = 0,
0055             bool twoD = true,
0056             bool reducedSet = false,
0057             bool isUpgrade = false);
0058   /// Fill histograms
0059   void fill(const float &rechit_x,
0060             const float &rechit_y,
0061             const int &sizeX,
0062             const int &sizeY,
0063             const float &lerr_x,
0064             const float &lerr_y,
0065             bool modon = true,
0066             bool ladon = false,
0067             bool layon = false,
0068             bool phion = false,
0069             bool bladeon = false,
0070             bool diskon = false,
0071             bool ringon = false,
0072             bool twoD = true,
0073             bool reducedSet = false);
0074   void nfill(const int &nrec,
0075              bool modon = true,
0076              bool ladon = false,
0077              bool layon = false,
0078              bool phion = false,
0079              bool bladeon = false,
0080              bool diskon = false,
0081              bool ringon = false);
0082 
0083 private:
0084   uint32_t id_;
0085   MonitorElement *meXYPos_;
0086   MonitorElement *meXYPos_px_;
0087   MonitorElement *meXYPos_py_;
0088   MonitorElement *meClustX_;
0089   MonitorElement *meClustY_;
0090   MonitorElement *meErrorX_;
0091   MonitorElement *meErrorY_;
0092   MonitorElement *menRecHits_;
0093   // barrel
0094   MonitorElement *meXYPosLad_;
0095   MonitorElement *meXYPosLad_px_;
0096   MonitorElement *meXYPosLad_py_;
0097   MonitorElement *meClustXLad_;
0098   MonitorElement *meClustYLad_;
0099   MonitorElement *meErrorXLad_;
0100   MonitorElement *meErrorYLad_;
0101   MonitorElement *menRecHitsLad_;
0102 
0103   MonitorElement *meXYPosLay_;
0104   MonitorElement *meXYPosLay_px_;
0105   MonitorElement *meXYPosLay_py_;
0106   MonitorElement *meClustXLay_;
0107   MonitorElement *meClustYLay_;
0108   MonitorElement *meErrorXLay_;
0109   MonitorElement *meErrorYLay_;
0110   MonitorElement *menRecHitsLay_;
0111 
0112   MonitorElement *meXYPosPhi_;
0113   MonitorElement *meXYPosPhi_px_;
0114   MonitorElement *meXYPosPhi_py_;
0115   MonitorElement *meClustXPhi_;
0116   MonitorElement *meClustYPhi_;
0117   MonitorElement *meErrorXPhi_;
0118   MonitorElement *meErrorYPhi_;
0119   MonitorElement *menRecHitsPhi_;
0120 
0121   // forward
0122   MonitorElement *meClustXBlade_;
0123   MonitorElement *meClustYBlade_;
0124   MonitorElement *meErrorXBlade_;
0125   MonitorElement *meErrorYBlade_;
0126   MonitorElement *menRecHitsBlade_;
0127 
0128   MonitorElement *meClustXDisk_;
0129   MonitorElement *meClustYDisk_;
0130   MonitorElement *meErrorXDisk_;
0131   MonitorElement *meErrorYDisk_;
0132   MonitorElement *menRecHitsDisk_;
0133 
0134   MonitorElement *meXYPosRing_;
0135   MonitorElement *meXYPosRing_px_;
0136   MonitorElement *meXYPosRing_py_;
0137   MonitorElement *meClustXRing_;
0138   MonitorElement *meClustYRing_;
0139   MonitorElement *meErrorXRing_;
0140   MonitorElement *meErrorYRing_;
0141   MonitorElement *menRecHitsRing_;
0142 };
0143 #endif