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>
24 
26 
27 class DQMStore;
28 class SiStripDCSStatus;
29 class SiStripDetCabling;
30 
31 class EventWithHistory;
34 
35 class SiStripMonitorDigi : public one::DQMEDAnalyzer<edm::one::WatchLuminosityBlocks> {
36  public:
37  explicit SiStripMonitorDigi(const edm::ParameterSet&);
38  ~SiStripMonitorDigi() override;
39  void analyze(const edm::Event&, const edm::EventSetup&) override;
40  void endRun(const edm::Run&, const edm::EventSetup&) override;
41  void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) override;
42  void endLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) override;
43  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
44  void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) override;
45 
47 
48  struct ModMEs{
49 
56  };
57 
58  struct LayerMEs{
59 
72 
73  };
74 
75  struct SubDetMEs{
76 
77  int totNDigis;
81 
82  //int totApvShots;
83  std::vector<APVShot> SubDetApvShots;
89  };
90 
94  };
95 
97 
98  private:
99  void createMEs(DQMStore::IBooker & ibooker , const edm::EventSetup& es );
100  void ResetModuleMEs(uint32_t idet);
101  void bookLayer( DQMStore::IBooker & ibooker );
102  MonitorElement* bookMETrend( DQMStore::IBooker & ibooker , const char* ParameterSetLabel, const char* HistoName);
103  MonitorElement* bookME1D( DQMStore::IBooker & ibooker , const char* ParameterSetLabel, const char* HistoName);
104  void bookTrendMEs( DQMStore::IBooker & ibooker , const TString& name,int32_t layer,uint32_t id,std::string flag);
106  void fillTrend(MonitorElement* me ,float value, float timeinorbit);
107  inline void fillME(MonitorElement* ME,float value1){if (ME!=nullptr)ME->Fill(value1);}
108  inline void fillME(MonitorElement* ME,float value1,float value2){if (ME!=nullptr)ME->Fill(value1,value2);}
109  inline void fillME(MonitorElement* ME,float value1,float value2,float value3){if (ME!=nullptr)ME->Fill(value1,value2,value3);}
110  inline void fillME(MonitorElement* ME,float value1,float value2,float value3,float value4){if (ME!=nullptr)ME->Fill(value1,value2,value3,value4);}
111  bool AllDigis( const edm::EventSetup& es);
112 
113  void createModuleMEs( DQMStore::IBooker & ibooker , ModMEs& mod_single, uint32_t detid);
114  void createLayerMEs( DQMStore::IBooker & ibooker , std::string label, int ndet);
115  void createSubDetMEs( DQMStore::IBooker & ibooker , std::string label);
116  void createSubDetTH2( DQMStore::IBooker & ibooker , std::string label);
117  int getDigiSourceIndex(uint32_t id);
118  void AddApvShotsToSubDet(const std::vector<APVShot> &, std::vector<APVShot> &);
119  void FillApvShotsMap(TkHistoMap*, const std::vector<APVShot> &, uint32_t id ,int);
120 
121  private:
122 
124  std::vector<edm::EDGetTokenT<edm::DetSetVector<SiStripDigi> > > digiProducerTokenList;
125  std::vector<edm::InputTag> digiProducerList;
126  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.
128 
129  std::map<std::string, std::vector< uint32_t > > LayerDetMap;
130  std::map<std::string, LayerMEs> LayerMEsMap;
131  std::map<std::string, SubDetMEs> SubDetMEsMap;
132  std::map<std::string, std::string> SubDetPhasePartMap;
134 
135  TString name;
137  std::map<std::pair<std::string,int32_t>,bool> DetectedLayers;
138  std::vector<const edm::DetSetVector<SiStripDigi> *> digi_detset_handles;
139 
140  unsigned long long m_cacheID_;
142  std::vector<uint32_t> ModulesToBeExcluded_;
143 
144  //Global MEs to monitor APV Shots properties
146 
148 
152 
154 
163 
170 
174 
176 
182 
189 
190  // int xLumiProf;
196  int nFedTIB;
197  int nFedTIDp;
198  int nFedTIDm;
199  int nFedTECp;
200  int nFedTECm;
201  int nFedTOB;
202  // int nFEDConnected;
203 
204  bool Mod_On_;
205 
210 
212 
214 
217 
221 
223 };
224 #endif
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
std::unique_ptr< TkHistoMap > tkmapNstripApvshot
MonitorElement * NApvShotsGlobalProf
std::map< uint32_t, ModMEs > DigiMEs
std::map< std::string, std::string > SubDetPhasePartMap
MonitorElement * MedianChargeApvShotsGlobal
MonitorElement * StripMultiplicityApvShotsGlobal
std::unique_ptr< TkHistoMap > tkmapMedianChargeApvshots
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
char const * label
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
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)
void analyze(const edm::Event &, const edm::EventSetup &) override
SiStripMonitorDigi(const edm::ParameterSet &)
edm::InputTag apvPhaseProducer_
std::unique_ptr< TkHistoMap > tkmapNApvshots
std::map< std::string, std::vector< uint32_t > > LayerDetMap
void fillME(MonitorElement *ME, float value1, float value2)
MonitorElement * SubDetChargeMedianApvShotsTH1
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
std::string topFolderName_
void bookLayer(DQMStore::IBooker &ibooker)
edm::ParameterSet conf_
std::string HistoName
std::unique_ptr< TkHistoMap > tkmapdigi
std::vector< edm::InputTag > digiProducerList
edm::EDGetTokenT< APVCyclePhaseCollection > apvPhaseProducerToken_
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)
MonitorElement * NumberOfFEDDigis
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:44
void endRun(const edm::Run &, const edm::EventSetup &) override