CMS 3D CMS Logo

SiStripMonitorDigi.h
Go to the documentation of this file.
1 #ifndef SiStripMonitorDigi_SiStripMonitorDigi_h
2 #define SiStripMonitorDigi_SiStripMonitorDigi_h
3 // -*- C++ -*-
4 // Package: SiStripMonitorDigi
5 // Class : SiStripMonitorDigi
9 // Original Author: dkcira
10 // Created: Sat Feb 4 20:49:51 CET 2006
11 #include <memory>
23 
25 
26 class DQMStore;
27 class SiStripDCSStatus;
28 class SiStripDetCabling;
29 
30 class EventWithHistory;
33 
35  public:
36  explicit SiStripMonitorDigi(const edm::ParameterSet&);
38  virtual void analyze(const edm::Event&, const edm::EventSetup&) override;
39  virtual void endRun(const edm::Run&, const edm::EventSetup&) override;
40  virtual void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) override;
41  virtual void endLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) override;
42  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
43  void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) override;
44 
46 
47  struct ModMEs{
48 
55  };
56 
57  struct LayerMEs{
58 
71 
72  };
73 
74  struct SubDetMEs{
75 
76  int totNDigis;
80 
81  //int totApvShots;
82  std::vector<APVShot> SubDetApvShots;
88  };
89 
93  };
94 
95  private:
96  void createMEs(DQMStore::IBooker & ibooker , const edm::EventSetup& es );
97  void ResetModuleMEs(uint32_t idet);
98  void bookLayer( DQMStore::IBooker & ibooker );
99  MonitorElement* bookMETrend( DQMStore::IBooker & ibooker , const char* ParameterSetLabel, const char* HistoName);
100  MonitorElement* bookME1D( DQMStore::IBooker & ibooker , const char* ParameterSetLabel, const char* HistoName);
101  void bookTrendMEs( DQMStore::IBooker & ibooker , const TString& name,int32_t layer,uint32_t id,std::string flag);
103  void fillTrend(MonitorElement* me ,float value, float timeinorbit);
104  inline void fillME(MonitorElement* ME,float value1){if (ME!=0)ME->Fill(value1);}
105  inline void fillME(MonitorElement* ME,float value1,float value2){if (ME!=0)ME->Fill(value1,value2);}
106  inline void fillME(MonitorElement* ME,float value1,float value2,float value3){if (ME!=0)ME->Fill(value1,value2,value3);}
107  inline void fillME(MonitorElement* ME,float value1,float value2,float value3,float value4){if (ME!=0)ME->Fill(value1,value2,value3,value4);}
108  bool AllDigis( const edm::EventSetup& es);
109 
110  void createModuleMEs( DQMStore::IBooker & ibooker , ModMEs& mod_single, uint32_t detid);
111  void createLayerMEs( DQMStore::IBooker & ibooker , std::string label, int ndet);
112  void createSubDetMEs( DQMStore::IBooker & ibooker , std::string label);
113  void createSubDetTH2( DQMStore::IBooker & ibooker , std::string label);
114  int getDigiSourceIndex(uint32_t id);
115  void AddApvShotsToSubDet(const std::vector<APVShot> &, std::vector<APVShot> &);
116  void FillApvShotsMap(TkHistoMap*, const std::vector<APVShot> &, uint32_t id ,int);
117 
118  private:
119 
120 
123  std::vector<edm::EDGetTokenT<edm::DetSetVector<SiStripDigi> > > digiProducerTokenList;
124  std::vector<edm::InputTag> digiProducerList;
125  std::map<uint32_t, ModMEs> DigiMEs; // uint32_t me_type: 1=#digis/module; 2=adcs of hottest strip/module; 3= adcs of coolest strips/module.
127 
128  std::map<std::string, std::vector< uint32_t > > LayerDetMap;
129  std::map<std::string, LayerMEs> LayerMEsMap;
130  std::map<std::string, SubDetMEs> SubDetMEsMap;
131  std::map<std::string, std::string> SubDetPhasePartMap;
133 
134  TString name;
136  std::map<std::pair<std::string,int32_t>,bool> DetectedLayers;
137  std::vector<const edm::DetSetVector<SiStripDigi> *> digi_detset_handles;
138 
139  unsigned long long m_cacheID_;
141  std::vector<uint32_t> ModulesToBeExcluded_;
142 
143  //Global MEs to monitor APV Shots properties
145 
147 
151 
153 
162 
169 
173 
175 
181 
187 
188 
189  // int xLumiProf;
195  int nFedTIB;
196  int nFedTIDp;
197  int nFedTIDm;
198  int nFedTECp;
199  int nFedTECm;
200  int nFedTOB;
201  // int nFEDConnected;
202 
203  bool Mod_On_;
204 
209 
212 
215 
219 
221 };
222 #endif
223 
bool AllDigis(const edm::EventSetup &es)
MonitorElement * bookME1D(DQMStore::IBooker &ibooker, const char *ParameterSetLabel, const char *HistoName)
void ResetModuleMEs(uint32_t idet)
std::map< std::string, LayerMEs > LayerMEsMap
void createMEs(DQMStore::IBooker &ibooker, const edm::EventSetup &es)
MonitorElement * LayerNumberOfDigisTrend
std::map< std::pair< std::string, int32_t >, bool > DetectedLayers
MonitorElement * LayerStripOccupancy
MonitorElement * LayerADCsHottestStrip
edm::InputTag historyProducer_
MonitorElement * LayerADCsHottestStripTrend
MonitorElement * NApvShotsGlobalProf
std::map< uint32_t, ModMEs > DigiMEs
std::map< std::string, std::string > SubDetPhasePartMap
MonitorElement * MedianChargeApvShotsGlobal
TkHistoMap * tkmapNstripApvshot
MonitorElement * StripMultiplicityApvShotsGlobal
MonitorElement * LayerNumberOfDigisProfile
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
void dqmBeginRun(const edm::Run &r, const edm::EventSetup &c) override
void Fill(long long x)
std::vector< APVShot > SubDetApvShots
unsigned long long m_cacheID_
MonitorElement * SubDetNApvShotsNApvTH1
void createSubDetMEs(DQMStore::IBooker &ibooker, std::string label)
Definition: ME.h:11
MonitorElement * NumberOfDigisPerStrip
MonitorElement * ADCsCoolestStrip
SiStripDCSStatus * dcsStatus_
edm::ESHandle< SiStripDetCabling > SiStripDetCabling_
MonitorElement * LayerADCsCoolestStripTrend
MonitorElement * SubDetNStripsApvShotsTH1
DigiFailureMEs digiFailureMEs
edm::EDGetTokenT< EventWithHistory > historyProducerToken_
void fillME(MonitorElement *ME, float value1)
void fillME(MonitorElement *ME, float value1, float value2, float value3, float value4)
MonitorElement * NApvApvShotsGlobal
std::vector< const edm::DetSetVector< SiStripDigi > * > digi_detset_handles
virtual void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
Definition: value.py:1
std::map< std::string, SubDetMEs > SubDetMEsMap
MonitorElement * ADCsHottestStrip
void createLayerMEs(DQMStore::IBooker &ibooker, std::string label, int ndet)
void fillTrend(MonitorElement *me, float value, float timeinorbit)
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecord > gtEvmToken_
MonitorElement * NApvShotsGlobal
std::vector< edm::EDGetTokenT< edm::DetSetVector< SiStripDigi > > > digiProducerTokenList
MonitorElement * LayerDigiADCProfile
int getDigiSourceIndex(uint32_t id)
void fillME(MonitorElement *ME, float value1, float value2, float value3)
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
SiStripMonitorDigi(const edm::ParameterSet &)
edm::InputTag apvPhaseProducer_
std::map< std::string, std::vector< uint32_t > > LayerDetMap
void fillME(MonitorElement *ME, float value1, float value2)
MonitorElement * SubDetChargeMedianApvShotsTH1
virtual void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
std::string topFolderName_
void bookLayer(DQMStore::IBooker &ibooker)
edm::ParameterSet conf_
std::string HistoName
std::vector< edm::InputTag > digiProducerList
TkHistoMap * tkmapMedianChargeApvshots
edm::EDGetTokenT< APVCyclePhaseCollection > apvPhaseProducerToken_
TkHistoMap * tkmapNApvshots
MonitorElement * LayerStripOccupancyTrend
MonitorElement * LayerADCsCoolestStrip
std::vector< uint32_t > ModulesToBeExcluded_
MonitorElement * bookMETrend(DQMStore::IBooker &ibooker, const char *ParameterSetLabel, const char *HistoName)
void AddApvShotsToSubDet(const std::vector< APVShot > &, std::vector< APVShot > &)
SiStripFolderOrganizer folder_organizer
MonitorElement * ShotsVsTimeApvShotsGlobal
void fillDigiADCsMEs(int value, std::string name)
void FillApvShotsMap(TkHistoMap *, const std::vector< APVShot > &, uint32_t id, int)
void createSubDetTH2(DQMStore::IBooker &ibooker, std::string label)
void bookTrendMEs(DQMStore::IBooker &ibooker, const TString &name, int32_t layer, uint32_t id, std::string flag)
void createModuleMEs(DQMStore::IBooker &ibooker, ModMEs &mod_single, uint32_t detid)
Definition: Run.h:42
virtual void endRun(const edm::Run &, const edm::EventSetup &) override