CMS 3D CMS Logo

SiStripGainsPCLWorker.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: CalibTracker/SiStripChannelGain
4 // Class: SiStripGainsPCLWorker
5 //
10 //
11 // Original Author: L. Quertermont (calibration algorithm)
12 // Contributors: M. Verzetti (data access)
13 // A. Di Mattia (PCL multi stream processing and monitoring)
14 // M. Delcourt (monitoring)
15 // M. Musich (migration to thread-safe DQMStore access)
16 // P. David (merge ShallowGainCalibration with SiStripGainsPCLWorker)
17 //
18 // Created: Wed, 12 Apr 2017 14:46:48 GMT
19 //
20 
21 // CMSSW includes
63 
67 
68 // System includes
69 #include <unordered_map>
70 
71 //
72 // class declaration
73 //
74 
75 class SiStripGainsPCLWorker : public DQMGlobalEDAnalyzer<APVGain::APVGainHistograms> {
76 public:
77  explicit SiStripGainsPCLWorker(const edm::ParameterSet &);
78 
80  edm::Run const &,
81  edm::EventSetup const &,
82  APVGain::APVGainHistograms &) const override;
83  void dqmAnalyze(edm::Event const &, edm::EventSetup const &, APVGain::APVGainHistograms const &) const override;
84 
85  static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);
86 
87 private:
88  void dqmBeginRun(edm::Run const &, edm::EventSetup const &, APVGain::APVGainHistograms &) const override;
90 
91  std::vector<std::string> dqm_tag_;
92 
93  int statCollectionFromMode(const char *tag) const;
94 
97  double MinTrackEta;
98  double MaxTrackEta;
99  unsigned int MaxNrStrips;
100  unsigned int MinTrackHits;
112  std::vector<std::string> VChargeHisto;
116 
121 
122  // maps histograms index to topology
123  std::map<unsigned int, APVloc> theTopologyMap;
124 };
125 
126 inline int SiStripGainsPCLWorker::statCollectionFromMode(const char *tag) const {
127  std::vector<std::string>::const_iterator it = dqm_tag_.begin();
128  while (it != dqm_tag_.end()) {
129  if (*it == std::string(tag))
130  return it - dqm_tag_.begin();
131  it++;
132  }
133 
134  if (std::string(tag).empty())
135  return 0; // return StdBunch calibration mode for backward compatibility
136 
137  return None;
138 }
edm::ESGetToken< SiStripQuality, SiStripQualityRcd > qualityToken_
int statCollectionFromMode(const char *tag) const
void dqmBeginRun(edm::Run const &, edm::EventSetup const &, APVGain::APVGainHistograms &) const override
SiStripGainsPCLWorker(const edm::ParameterSet &)
edm::EDGetTokenT< edm::View< reco::Track > > m_tracks_token
edm::EDGetTokenT< TrajTrackAssociationCollection > m_association_token
std::vector< std::string > dqm_tag_
void dqmAnalyze(edm::Event const &, edm::EventSetup const &, APVGain::APVGainHistograms const &) const override
void checkBookAPVColls(const TrackerGeometry *bareTkGeomPtr, APVGain::APVGainHistograms &histograms) const
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomTokenBR_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
std::map< unsigned int, APVloc > theTopologyMap
edm::ESGetToken< SiStripGain, SiStripGainRcd > gainToken_
std::vector< std::string > VChargeHisto
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &, APVGain::APVGainHistograms &) const override
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: Run.h:45