Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef SiPixelMonitorCluster_SiPixelClusterModule_h
0002 #define SiPixelMonitorCluster_SiPixelClusterModule_h
0003 // -*- C++ -*-
0004 //
0005 // Package:    SiPixelMonitorDigi
0006 // Class:      SiPixelClusterModule
0007 //
0008 /*
0009 
0010  Description: Cluster monitoring elements for a Pixel sensor
0011 
0012  Implementation:
0013      <Notes on implementation>
0014 */
0015 //
0016 // Original Author:  Vincenzo Chiochia & Andrew York
0017 //         Created:
0018 //
0019 //
0020 //  Updated by: Lukas Wehrli
0021 //  for pixel offline DQM
0022 #include "DQMServices/Core/interface/DQMStore.h"
0023 #include "DataFormats/Common/interface/DetSetVectorNew.h"
0024 #include "DataFormats/SiPixelCluster/interface/SiPixelCluster.h"
0025 #include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
0026 #include "Geometry/Records/interface/TrackerTopologyRcd.h"
0027 #include "Geometry/CommonDetUnit/interface/PixelGeomDetUnit.h"
0028 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0029 #include <cstdint>
0030 
0031 class SiPixelClusterModule {
0032 public:
0033   typedef dqm::reco::DQMStore DQMStore;
0034   typedef dqm::reco::MonitorElement MonitorElement;
0035 
0036   /// Default constructor
0037   SiPixelClusterModule();
0038   /// Constructor with raw DetId
0039   SiPixelClusterModule(const uint32_t &id);
0040   /// Constructor with raw DetId and sensor size
0041   SiPixelClusterModule(const uint32_t &id, const int &ncols, const int &nrows);
0042   /// Destructor
0043   ~SiPixelClusterModule();
0044 
0045   typedef edmNew::DetSet<SiPixelCluster>::const_iterator ClusterIterator;
0046 
0047   /// Book histograms
0048   void book(const edm::ParameterSet &iConfig,
0049             const TrackerTopology *pTT,
0050             DQMStore::IBooker &iBooker,
0051             int type = 0,
0052             bool twoD = true,
0053             bool reducedSet = false,
0054             bool isUpgrade = false);
0055   /// Fill histograms
0056   int fill(const edmNew::DetSetVector<SiPixelCluster> &input,
0057            const TrackerTopology *pTT,
0058            const TrackerGeometry *tracker,
0059            int *barrelClusterTotal,
0060            int *fpixPClusterTotal,
0061            int *fpixMClusterTotal,
0062            std::vector<MonitorElement *> &layers,
0063            std::vector<MonitorElement *> &diskspz,
0064            std::vector<MonitorElement *> &disksmz,
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            bool smileyon = false,
0075            bool isUpgrade = false);
0076 
0077 private:
0078   uint32_t id_;
0079   int ncols_;
0080   int nrows_;
0081   MonitorElement *meNClusters_;
0082   MonitorElement *meY_;
0083   MonitorElement *meX_;
0084   MonitorElement *meCharge_;
0085   MonitorElement *meSize_;
0086   MonitorElement *meSizeX_;
0087   MonitorElement *meSizeY_;
0088   MonitorElement *meMinRow_;
0089   MonitorElement *meMaxRow_;
0090   MonitorElement *meMinCol_;
0091   MonitorElement *meMaxCol_;
0092   MonitorElement *mePixClusters_;
0093   MonitorElement *mePixClusters_px_;
0094   MonitorElement *mePixClusters_py_;
0095   //  MonitorElement* meEdgeHitX_;
0096   //  MonitorElement* meEdgeHitY_;
0097   MonitorElement *meClPosLayer1;
0098   MonitorElement *meClPosLayer2;
0099   MonitorElement *meClPosLayer3;
0100   MonitorElement *meClPosLayer4;
0101   MonitorElement *meClPosDisk1pz;
0102   MonitorElement *meClPosDisk2pz;
0103   MonitorElement *meClPosDisk3pz;
0104   MonitorElement *meClPosDisk1mz;
0105   MonitorElement *meClPosDisk2mz;
0106   MonitorElement *meClPosDisk3mz;
0107 
0108   // barrel
0109   MonitorElement *meNClustersLad_;
0110   MonitorElement *meYLad_;
0111   MonitorElement *meXLad_;
0112   MonitorElement *meChargeLad_;
0113   MonitorElement *meSizeLad_;
0114   MonitorElement *meSizeXLad_;
0115   MonitorElement *meSizeYLad_;
0116   MonitorElement *meMinRowLad_;
0117   MonitorElement *meMaxRowLad_;
0118   MonitorElement *meMinColLad_;
0119   MonitorElement *meMaxColLad_;
0120   MonitorElement *mePixClustersLad_;
0121   MonitorElement *mePixClustersLad_px_;
0122   MonitorElement *mePixClustersLad_py_;
0123 
0124   MonitorElement *meSizeYvsEtaBarrel_;
0125 
0126   MonitorElement *meNClustersLay_;
0127   MonitorElement *meYLay_;
0128   MonitorElement *meXLay_;
0129   MonitorElement *meChargeLay_;
0130   MonitorElement *meSizeLay_;
0131   MonitorElement *meSizeXLay_;
0132   MonitorElement *meSizeYLay_;
0133   MonitorElement *meMinRowLay_;
0134   MonitorElement *meMaxRowLay_;
0135   MonitorElement *meMinColLay_;
0136   MonitorElement *meMaxColLay_;
0137   MonitorElement *mePixClustersLay_;
0138   MonitorElement *mePixClustersLay_px_;
0139   MonitorElement *mePixClustersLay_py_;
0140 
0141   MonitorElement *meNClustersPhi_;
0142   MonitorElement *meYPhi_;
0143   MonitorElement *meXPhi_;
0144   MonitorElement *meChargePhi_;
0145   MonitorElement *meSizePhi_;
0146   MonitorElement *meSizeXPhi_;
0147   MonitorElement *meSizeYPhi_;
0148   MonitorElement *meMinRowPhi_;
0149   MonitorElement *meMaxRowPhi_;
0150   MonitorElement *meMinColPhi_;
0151   MonitorElement *meMaxColPhi_;
0152   MonitorElement *mePixClustersPhi_;
0153   MonitorElement *mePixClustersPhi_px_;
0154   MonitorElement *mePixClustersPhi_py_;
0155 
0156   // forward
0157   MonitorElement *meNClustersBlade_;
0158   MonitorElement *meYBlade_;
0159   MonitorElement *meXBlade_;
0160   MonitorElement *meChargeBlade_;
0161   MonitorElement *meSizeBlade_;
0162   MonitorElement *meSizeXBlade_;
0163   MonitorElement *meSizeYBlade_;
0164   MonitorElement *meMinRowBlade_;
0165   MonitorElement *meMaxRowBlade_;
0166   MonitorElement *meMinColBlade_;
0167   MonitorElement *meMaxColBlade_;
0168 
0169   MonitorElement *meNClustersDisk_;
0170   MonitorElement *meYDisk_;
0171   MonitorElement *meXDisk_;
0172   MonitorElement *meChargeDisk_;
0173   MonitorElement *meSizeDisk_;
0174   MonitorElement *meSizeXDisk_;
0175   MonitorElement *meSizeYDisk_;
0176   MonitorElement *meMinRowDisk_;
0177   MonitorElement *meMaxRowDisk_;
0178   MonitorElement *meMinColDisk_;
0179   MonitorElement *meMaxColDisk_;
0180 
0181   MonitorElement *meNClustersRing_;
0182   MonitorElement *meYRing_;
0183   MonitorElement *meXRing_;
0184   MonitorElement *meChargeRing_;
0185   MonitorElement *meSizeRing_;
0186   MonitorElement *meSizeXRing_;
0187   MonitorElement *meSizeYRing_;
0188   MonitorElement *meMinRowRing_;
0189   MonitorElement *meMaxRowRing_;
0190   MonitorElement *meMinColRing_;
0191   MonitorElement *meMaxColRing_;
0192   MonitorElement *mePixClustersRing_;
0193   MonitorElement *mePixClustersRing_px_;
0194   MonitorElement *mePixClustersRing_py_;
0195 };
0196 #endif