CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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&);
39  virtual void beginJob();
40  virtual void endJob();
41  virtual void endRun(const edm::Run&, const edm::EventSetup&);
42  virtual void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&);
43  virtual void endLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&);
44  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
45  void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c);
46 
48 
49  struct ModMEs{
50 
57  };
58 
59  struct LayerMEs{
60 
73 
74  };
75 
76  struct SubDetMEs{
77 
78  int totNDigis;
82 
83  //int totApvShots;
84  std::vector<APVShot> SubDetApvShots;
90  };
91 
95  };
96 
97  private:
98  void createMEs(DQMStore::IBooker & ibooker , const edm::EventSetup& es );
99  void ResetModuleMEs(uint32_t idet);
100  void bookLayer( DQMStore::IBooker & ibooker );
101  MonitorElement* bookMETrend( DQMStore::IBooker & ibooker , const char* ParameterSetLabel, const char* HistoName);
102  MonitorElement* bookME1D( DQMStore::IBooker & ibooker , const char* ParameterSetLabel, const char* HistoName);
103  void bookTrendMEs( DQMStore::IBooker & ibooker , const TString& name,int32_t layer,uint32_t id,std::string flag);
105  void fillTrend(MonitorElement* me ,float value, float timeinorbit);
106  inline void fillME(MonitorElement* ME,float value1){if (ME!=0)ME->Fill(value1);}
107  inline void fillME(MonitorElement* ME,float value1,float value2){if (ME!=0)ME->Fill(value1,value2);}
108  inline void fillME(MonitorElement* ME,float value1,float value2,float value3){if (ME!=0)ME->Fill(value1,value2,value3);}
109  inline void fillME(MonitorElement* ME,float value1,float value2,float value3,float value4){if (ME!=0)ME->Fill(value1,value2,value3,value4);}
110  bool AllDigis( const edm::EventSetup& es);
111 
112  void createModuleMEs( DQMStore::IBooker & ibooker , ModMEs& mod_single, uint32_t detid);
113  void createLayerMEs( DQMStore::IBooker & ibooker , std::string label, int ndet);
116  int getDigiSourceIndex(uint32_t id);
117  void AddApvShotsToSubDet(const std::vector<APVShot> &, std::vector<APVShot> &);
118  void FillApvShotsMap(TkHistoMap*, const std::vector<APVShot> &, uint32_t id ,int);
119 
120  private:
121 
122 
125  std::vector<edm::EDGetTokenT<edm::DetSetVector<SiStripDigi> > > digiProducerTokenList;
126  std::vector<edm::InputTag> digiProducerList;
127  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.
129 
130  std::map<std::string, std::vector< uint32_t > > LayerDetMap;
131  std::map<std::string, LayerMEs> LayerMEsMap;
132  std::map<std::string, SubDetMEs> SubDetMEsMap;
133  std::map<std::string, std::string> SubDetPhasePartMap;
135 
136  TString name;
138  std::map<std::pair<std::string,int32_t>,bool> DetectedLayers;
139  std::vector<const edm::DetSetVector<SiStripDigi> *> digi_detset_handles;
140 
141  unsigned long long m_cacheID_;
143  std::vector<uint32_t> ModulesToBeExcluded_;
144 
145  //Global MEs to monitor APV Shots properties
147 
149 
153 
155 
164 
171 
175 
178 
184 
190 
191 
192  // int xLumiProf;
198  int nFedTIB;
199  int nFedTIDp;
200  int nFedTIDm;
201  int nFedTECp;
202  int nFedTECm;
203  int nFedTOB;
204  // int nFEDConnected;
205 
206  bool Mod_On_;
207 
212 
214 
217 
221 
223 };
224 #endif
225 
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
void dqmBeginRun(const edm::Run &r, const edm::EventSetup &c)
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 Fill(long long x)
std::vector< APVShot > SubDetApvShots
virtual void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
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 analyze(const edm::Event &, const edm::EventSetup &)
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)
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
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
virtual void endRun(const edm::Run &, const edm::EventSetup &)
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 > &)
virtual void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
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:41