Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:08:22

0001 #ifndef SiPixelMonitorDigi_SiPixelDigiModule_h
0002 #define SiPixelMonitorDigi_SiPixelDigiModule_h
0003 // -*- C++ -*-
0004 //
0005 // Package:    SiPixelMonitorDigi
0006 // Class:      SiPixelDigiModule
0007 //
0008 /**\class 
0009 
0010  Description: Digi monitoring elements for a Pixel sensor
0011 
0012  Implementation:
0013      <Notes on implementation>
0014 */
0015 //
0016 // Original Author:  Vincenzo Chiochia
0017 //         Created:
0018 //
0019 //
0020 //  Updated by: Lukas Wehrli
0021 //  for pixel offline DQM
0022 
0023 #include "DQMServices/Core/interface/DQMStore.h"
0024 #include "DataFormats/SiPixelDigi/interface/PixelDigi.h"
0025 #include "DataFormats/Common/interface/DetSetVector.h"
0026 #include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
0027 #include "Geometry/Records/interface/TrackerTopologyRcd.h"
0028 #include <cstdint>
0029 
0030 class SiPixelDigiModule {
0031 public:
0032   typedef dqm::reco::DQMStore DQMStore;
0033   typedef dqm::reco::MonitorElement MonitorElement;
0034 
0035   /// Default constructor
0036   SiPixelDigiModule();
0037   /// Constructor with raw DetId
0038   SiPixelDigiModule(const uint32_t& id);
0039   /// Constructor with raw DetId and sensor size
0040   SiPixelDigiModule(const uint32_t& id, const int& ncols, const int& nrows);
0041   /// Destructor
0042   ~SiPixelDigiModule();
0043 
0044   typedef edm::DetSet<PixelDigi>::const_iterator DigiIterator;
0045 
0046   /// Book histograms
0047   void book(const edm::ParameterSet& iConfig,
0048             const TrackerTopology* pTT,
0049             DQMStore::IBooker& iBooker,
0050             int type = 0,
0051             bool twoD = true,
0052             bool hiRes = false,
0053             bool reducedSet = false,
0054             bool additInfo = false,
0055             bool isUpgrade = false);
0056   /// Fill histograms
0057   //  int fill(const edm::DetSetVector<PixelDigi> & input, bool modon=true,
0058   //           bool ladon=false, bool layon=false, bool phion=false,
0059   //           bool bladeon=false, bool diskon=false, bool ringon=false,
0060   //           bool twoD=true, bool reducedSet=false, bool twoDimModOn = true, bool twoDimOnlyLayDisk = false,
0061   //           int &nDigisA, int &nDigisB);
0062   int fill(const edm::DetSetVector<PixelDigi>& input,
0063            const TrackerTopology* pTT,
0064            MonitorElement* combBarrel,
0065            MonitorElement* chanBarrel,
0066            std::vector<MonitorElement*>& chanBarrelL,
0067            MonitorElement* combEndcap,
0068            const bool modon,
0069            const bool ladon,
0070            const bool layon,
0071            const bool phion,
0072            const bool bladeon,
0073            const bool diskon,
0074            const bool ringon,
0075            const bool twoD,
0076            const bool reducedSet,
0077            const bool twoDimModOn,
0078            const bool twoDimOnlyLayDisk,
0079            int& nDigisA,
0080            int& nDigisB,
0081            bool isUpgrade);
0082   void
0083   resetRocMap();  // This is to move the rocmap reset from the Source to the Module where the map is booked. Necessary for multithread safety.
0084   std::pair<int, int> getZeroLoEffROCs();  // Moved from Souce.cc. Gets number of zero and low eff ROCs from each module.
0085 private:
0086   uint32_t id_;
0087   int ncols_;
0088   int nrows_;
0089   MonitorElement* meNDigis_;
0090   MonitorElement* meADC_;
0091   MonitorElement* mePixDigis_;
0092   MonitorElement* mePixDigis_px_;
0093   MonitorElement* mePixDigis_py_;
0094 
0095   //barrel:
0096   MonitorElement* meNDigisLad_;
0097   MonitorElement* meADCLad_;
0098   MonitorElement* mePixDigisLad_;
0099   MonitorElement* mePixDigisLad_px_;
0100   MonitorElement* mePixDigisLad_py_;
0101 
0102   MonitorElement* meNDigisLay_;
0103   MonitorElement* meADCLay_;
0104   MonitorElement* mePixDigisLay_;
0105   MonitorElement* mePixRocsLay_ = nullptr;
0106   MonitorElement* meZeroOccRocsLay_ = nullptr;
0107   MonitorElement* mePixDigisLay_px_;
0108   MonitorElement* mePixDigisLay_py_;
0109 
0110   MonitorElement* meNDigisPhi_;
0111   MonitorElement* meADCPhi_;
0112   MonitorElement* mePixDigisPhi_;
0113   MonitorElement* mePixDigisPhi_px_;
0114   MonitorElement* mePixDigisPhi_py_;
0115 
0116   //forward:
0117   MonitorElement* meNDigisBlade_;
0118   MonitorElement* meADCBlade_;
0119 
0120   MonitorElement* meNDigisDisk_;
0121   MonitorElement* meADCDisk_;
0122   MonitorElement* mePixDigisDisk_;
0123   MonitorElement* mePixRocsDisk_ = nullptr;
0124   MonitorElement* meZeroOccRocsDisk_ = nullptr;
0125 
0126   MonitorElement* meNDigisRing_;
0127   MonitorElement* meADCRing_;
0128   MonitorElement* mePixDigisRing_;
0129   MonitorElement* mePixDigisRing_px_;
0130   MonitorElement* mePixDigisRing_py_;
0131 
0132   //int nEventDigis_;
0133 };
0134 #endif