CMS 3D CMS Logo

SiStripMonitorCluster.h
Go to the documentation of this file.
1 #ifndef SiStripMonitorCluster_SiStripMonitorCluster_h
2 #define SiStripMonitorCluster_SiStripMonitorCluster_h
3 // -*- C++ -*-
4 // Package: SiStripMonitorCluster
5 // Class : SiStripMonitorCluster
11 // Original Author: dkcira
12 // Created: Wed Feb 1 16:47:14 CET 2006
13 #include <memory>
24 
25 #include <vector>
26 
29 
31 
32 class DQMStore;
33 class SiStripDetCabling;
34 class SiStripCluster;
35 class SiPixelCluster;
36 class EventWithHistory;
38 class SiStripDCSStatus;
40 
42  public:
44  ~SiStripMonitorCluster() override;
45  void analyze(const edm::Event&, const edm::EventSetup&) override;
47  edm::EventSetup const&) override;
48  void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override;
49 
50  struct ModMEs { // MEs for one single detector module
51 
62  nullptr; // can be used at client level for occupancy calculations
64  };
65 
66  struct LayerMEs { // MEs for Layer Level
67  MonitorElement* LayerClusterStoN = nullptr;
68  MonitorElement* LayerClusterStoNTrend = nullptr;
69  MonitorElement* LayerClusterCharge = nullptr;
70  MonitorElement* LayerClusterChargeTrend = nullptr;
71  MonitorElement* LayerClusterNoise = nullptr;
72  MonitorElement* LayerClusterNoiseTrend = nullptr;
73  MonitorElement* LayerClusterWidth = nullptr;
74  MonitorElement* LayerClusterWidthTrend = nullptr;
75  MonitorElement* LayerLocalOccupancy = nullptr;
76  MonitorElement* LayerLocalOccupancyTrend = nullptr;
77  MonitorElement* LayerNumberOfClusterProfile = nullptr;
78  MonitorElement* LayerNumberOfClusterPerRingTrend = nullptr;
79  MonitorElement* LayerNumberOfClusterTrend = nullptr;
80  MonitorElement* LayerClusterWidthProfile = nullptr;
81  MonitorElement* LayerClusWidthVsAmpTH2 = nullptr;
82  MonitorElement* LayerClusterPosition = nullptr;
83  };
84 
85  struct SubDetMEs { // MEs for Subdetector Level
86  int totNClusters = 0;
87  MonitorElement* SubDetTotClusterTH1 = nullptr;
88  MonitorElement* SubDetTotClusterProf = nullptr;
89  MonitorElement* SubDetClusterApvProf = nullptr;
90  MonitorElement* SubDetClusterApvTH2 = nullptr;
91  MonitorElement* SubDetClusterDBxCycleProf = nullptr;
92  MonitorElement* SubDetApvDBxProf2 = nullptr;
93  MonitorElement* SubDetClusterChargeTH1 = nullptr;
94  MonitorElement* SubDetClusterWidthTH1 = nullptr;
95  MonitorElement* SubDetClusWidthVsAmpTH2 = nullptr;
96  MonitorElement* SubDetNumberOfClusterPerLayerTrend = nullptr;
97  };
98 
99  struct ClusterProperties { // Cluster Properties
100  float charge;
101  float position;
102  short start;
103  short width;
104  float noise;
105  };
106 
123  MonitorElement* NumberOfStripClus_vs_BX = nullptr; // plot n. 3
124  MonitorElement* NumberOfPixelClus_vs_BX = nullptr; // plot n. 4
126 
127  private:
128  void createMEs(const edm::EventSetup& es, DQMStore::IBooker& ibooker);
129  void createLayerMEs(std::string label, int ndets, DQMStore::IBooker& ibooker);
130  void createModuleMEs(ModMEs& mod_single, uint32_t detid,
131  DQMStore::IBooker& ibooker);
133  int FindRegion(int nstrip, int npixel);
134  void fillModuleMEs(ModMEs& mod_mes, ClusterProperties& cluster);
135  void fillLayerMEs(LayerMEs&, ClusterProperties& cluster);
136 
137  void ResetModuleMEs(uint32_t idet);
138 
139  inline void fillME(MonitorElement* ME, float value1) {
140  if (ME != nullptr) ME->Fill(value1);
141  }
142  inline void fillME(MonitorElement* ME, float value1, float value2) {
143  if (ME != nullptr) ME->Fill(value1, value2);
144  }
145  inline void fillME(MonitorElement* ME, float value1, float value2,
146  float value3) {
147  if (ME != nullptr) ME->Fill(value1, value2, value3);
148  }
149  inline void fillME(MonitorElement* ME, float value1, float value2,
150  float value3, float value4) {
151  if (ME != nullptr) ME->Fill(value1, value2, value3, value4);
152  }
153  MonitorElement* bookMETrend(const char*, DQMStore::IBooker& ibooker);
154  MonitorElement* bookME1D(const char* ParameterSetLabel, const char* HistoName,
155  DQMStore::IBooker& ibooker);
156  MonitorElement* bookME2D(const char* ParameterSetLabel, const char* HistoName,
157  DQMStore::IBooker& ibooker);
158 
160  std::map<uint32_t, ModMEs> ModuleMEsMap;
161  std::map<std::string, LayerMEs> LayerMEsMap;
162  std::map<std::string, std::vector<uint32_t> > LayerDetMap;
163  std::map<std::string, SubDetMEs> SubDetMEsMap;
164  std::map<std::string, std::string> SubDetPhasePartMap;
165 
166  // flags
169  unsigned long long m_cacheID_;
170 
172  std::vector<uint32_t> ModulesToBeExcluded_;
173 
175 
176  // TkHistoMap added
177  std::unique_ptr<TkHistoMap> tkmapcluster;
178  std::unique_ptr<TkHistoMap> tkmapclusterch;
179 
182  float trendVar;
183 
197 
202 
232 
233  bool Mod_On_;
235 
238 
239  /*
240  edm::InputTag clusterProducerStrip_;
241  edm::InputTag clusterProducerPix_;
242  edm::InputTag historyProducer_;
243  edm::InputTag apvPhaseProducer_;
244  */
245 
252 
258 
259  double k0;
260  double q0;
261  double dk0;
262  double maxClus;
263  double minPix;
264 
266 
267  // add for selecting on ZeroBias events in the MinimumBias PD
271 
275 };
276 #endif
MonitorElement * GlobalABXTH1_CSCP
void ResetModuleMEs(uint32_t idet)
MonitorElement * bookME1D(const char *ParameterSetLabel, const char *HistoName, DQMStore::IBooker &ibooker)
int FindRegion(int nstrip, int npixel)
MonitorElement * NumberOfPixelClus_vs_BX
MonitorElement * PixVsStripMultiplicityRegions
MonitorElement * GlobalTH2MainDiagonalPosition_vs_BX
MonitorElement * GlobalCStripVsCpix
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
MonitorElement * ClusterSignalOverNoiseVsPos
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
MonitorElement * StripNoise2Cycle
void createLayerMEs(std::string label, int ndets, DQMStore::IBooker &ibooker)
std::map< std::string, LayerMEs > LayerMEsMap
void analyze(const edm::Event &, const edm::EventSetup &) override
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
void Fill(long long x)
MonitorElement * NumberOfPixelClus
unsigned long long m_cacheID_
void createSubDetMEs(std::string label, DQMStore::IBooker &ibooker)
Definition: ME.h:11
std::map< uint32_t, ModMEs > ModuleMEsMap
void createMEs(const edm::EventSetup &es, DQMStore::IBooker &ibooker)
std::map< std::string, std::string > SubDetPhasePartMap
MonitorElement * GlobalApvCycleDBxTH2
edm::ParameterSet Parameters
GenericTriggerEventFlag * genTriggerEventFlagPixelDCSfilter_
MonitorElement * bookMETrend(const char *, DQMStore::IBooker &ibooker)
void fillME(MonitorElement *ME, float value1, float value2, float value3, float value4)
MonitorElement * NumberOfStripClus
MonitorElement * GlobalMainDiagonalPosition_vs_BX
MonitorElement * NumberOfStripClus_vs_BX
edm::EDGetTokenT< EventWithHistory > historyProducerToken_
MonitorElement * ClusWidthVsAmpTH2
MonitorElement * GlobalMainDiagonalPosition
std::vector< uint32_t > ModulesToBeExcluded_
MonitorElement * bookME2D(const char *ParameterSetLabel, const char *HistoName, DQMStore::IBooker &ibooker)
SiStripDCSStatus * dcsStatus_
GenericTriggerEventFlag * genTriggerEventFlagBPTXfilter_
void fillME(MonitorElement *ME, float value1)
SiStripMonitorCluster(const edm::ParameterSet &)
MonitorElement * NumberOfFEDClus
std::string HistoName
MonitorElement * StripNoise3Cycle
void createModuleMEs(ModMEs &mod_single, uint32_t detid, DQMStore::IBooker &ibooker)
void fillME(MonitorElement *ME, float value1, float value2)
Pixel cluster – collection of neighboring pixels above threshold.
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > clusterProducerPixToken_
std::map< std::string, SubDetMEs > SubDetMEsMap
void fillLayerMEs(LayerMEs &, ClusterProperties &cluster)
std::unique_ptr< TkHistoMap > tkmapcluster
void fillME(MonitorElement *ME, float value1, float value2, float value3)
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clusterProducerStripToken_
std::map< std::string, std::vector< uint32_t > > LayerDetMap
std::unique_ptr< TkHistoMap > tkmapclusterch
MonitorElement * GlobalDBxCycleTH1
edm::EDGetTokenT< APVCyclePhaseCollection > apvPhaseProducerToken_
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
GenericTriggerEventFlag * genTriggerEventFlagStripDCSfilter_
MonitorElement * NclusVsCycleTimeProf2D
MonitorElement * BPTXrateTrend
void fillModuleMEs(ModMEs &mod_mes, ClusterProperties &cluster)
Definition: Run.h:44