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 SiStripDetCabling;
33 class SiStripCluster;
34 class SiPixelCluster;
35 class EventWithHistory;
37 class SiStripDCSStatus;
39 
41 public:
43  ~SiStripMonitorCluster() override;
44  void analyze(const edm::Event&, const edm::EventSetup&) override;
45  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
46  void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override;
47 
48  struct ModMEs { // MEs for one single detector module
49 
59  MonitorElement* NrOfClusterizedStrips = nullptr; // can be used at client level for occupancy calculations
61  };
62 
63  struct LayerMEs { // MEs for Layer Level
64  MonitorElement* LayerClusterStoN = nullptr;
65  MonitorElement* LayerClusterStoNTrend = nullptr;
66  MonitorElement* LayerClusterCharge = nullptr;
67  MonitorElement* LayerClusterChargeTrend = nullptr;
68  MonitorElement* LayerClusterNoise = nullptr;
69  MonitorElement* LayerClusterNoiseTrend = nullptr;
70  MonitorElement* LayerClusterWidth = nullptr;
71  MonitorElement* LayerClusterWidthTrend = nullptr;
72  MonitorElement* LayerLocalOccupancy = nullptr;
73  MonitorElement* LayerLocalOccupancyTrend = nullptr;
74  MonitorElement* LayerNumberOfClusterProfile = nullptr;
75  MonitorElement* LayerNumberOfClusterPerRingTrend = nullptr;
76  MonitorElement* LayerNumberOfClusterTrend = nullptr;
77  MonitorElement* LayerClusterWidthProfile = nullptr;
78  MonitorElement* LayerClusWidthVsAmpTH2 = nullptr;
79  MonitorElement* LayerClusterPosition = nullptr;
80  };
81 
82  struct SubDetMEs { // MEs for Subdetector Level
83  int totNClusters = 0;
84  MonitorElement* SubDetTotClusterTH1 = nullptr;
85  MonitorElement* SubDetTotClusterProf = nullptr;
86  MonitorElement* SubDetClusterApvProf = nullptr;
87  MonitorElement* SubDetClusterApvTH2 = nullptr;
88  MonitorElement* SubDetClusterDBxCycleProf = nullptr;
89  MonitorElement* SubDetApvDBxProf2 = nullptr;
90  MonitorElement* SubDetClusterChargeTH1 = nullptr;
91  MonitorElement* SubDetClusterWidthTH1 = nullptr;
92  MonitorElement* SubDetClusWidthVsAmpTH2 = nullptr;
93  MonitorElement* SubDetNumberOfClusterPerLayerTrend = nullptr;
94  };
95 
96  struct ClusterProperties { // Cluster Properties
97  float charge;
98  float position;
99  short start;
100  short width;
101  float noise;
102  };
103 
120  MonitorElement* NumberOfStripClus_vs_BX = nullptr; // plot n. 3
121  MonitorElement* NumberOfPixelClus_vs_BX = nullptr; // plot n. 4
123 
124 private:
125  void createMEs(const edm::EventSetup& es, DQMStore::IBooker& ibooker);
126  void createLayerMEs(std::string label, int ndets, DQMStore::IBooker& ibooker);
127  void createModuleMEs(ModMEs& mod_single, uint32_t detid, DQMStore::IBooker& ibooker);
129  int FindRegion(int nstrip, int npixel);
130  void fillModuleMEs(ModMEs& mod_mes, ClusterProperties& cluster);
131  void fillLayerMEs(LayerMEs&, ClusterProperties& cluster);
132 
133  void ResetModuleMEs(uint32_t idet);
134 
135  inline void fillME(MonitorElement* ME, float value1) {
136  if (ME != nullptr)
137  ME->Fill(value1);
138  }
139  inline void fillME(MonitorElement* ME, float value1, float value2) {
140  if (ME != nullptr)
141  ME->Fill(value1, value2);
142  }
143  inline void fillME(MonitorElement* ME, float value1, float value2, float value3) {
144  if (ME != nullptr)
145  ME->Fill(value1, value2, value3);
146  }
147  inline void fillME(MonitorElement* ME, float value1, float value2, float value3, float value4) {
148  if (ME != nullptr)
149  ME->Fill(value1, value2, value3, value4);
150  }
151  MonitorElement* bookMETrend(const char*, DQMStore::IBooker& ibooker);
152  MonitorElement* bookME1D(const char* ParameterSetLabel, const char* HistoName, DQMStore::IBooker& ibooker);
153  MonitorElement* bookME2D(const char* ParameterSetLabel, const char* HistoName, DQMStore::IBooker& ibooker);
154 
156  std::map<uint32_t, ModMEs> ModuleMEsMap;
157  std::map<std::string, LayerMEs> LayerMEsMap;
158  std::map<std::string, std::vector<uint32_t> > LayerDetMap;
159  std::map<std::string, SubDetMEs> SubDetMEsMap;
160  std::map<std::string, std::string> SubDetPhasePartMap;
161 
162  // flags
164  unsigned long long m_cacheID_;
165 
167  std::vector<uint32_t> ModulesToBeExcluded_;
168 
170 
171  // TkHistoMap added
172  std::unique_ptr<TkHistoMap> tkmapcluster;
173  std::unique_ptr<TkHistoMap> tkmapclusterch;
174 
177  float trendVar;
178 
192 
197 
227 
228  bool Mod_On_;
230 
233 
234  /*
235  edm::InputTag clusterProducerStrip_;
236  edm::InputTag clusterProducerPix_;
237  edm::InputTag historyProducer_;
238  edm::InputTag apvPhaseProducer_;
239  */
240 
245 
251 
252  double k0;
253  double q0;
254  double dk0;
255  double maxClus;
256  double minPix;
257 
259 
260  // add for selecting on ZeroBias events in the MinimumBias PD
264 
268 };
269 #endif
MonitorElement * GlobalABXTH1_CSCP
void ResetModuleMEs(uint32_t idet)
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
MonitorElement * NumberOfPixelClus
unsigned long long m_cacheID_
void Fill(long long x)
void createSubDetMEs(std::string label, DQMStore::IBooker &ibooker)
Definition: ME.h:11
std::map< uint32_t, ModMEs > ModuleMEsMap
char const * label
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 * bookME2D(const char *ParameterSetLabel, const char *HistoName, DQMStore::IBooker &ibooker)
MonitorElement * ClusWidthVsAmpTH2
MonitorElement * GlobalMainDiagonalPosition
std::vector< uint32_t > ModulesToBeExcluded_
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
MonitorElement * bookME1D(const char *ParameterSetLabel, const char *HistoName, DQMStore::IBooker &ibooker)
void fillModuleMEs(ModMEs &mod_mes, ClusterProperties &cluster)
Definition: Run.h:45