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;
89  void checkBookAPVColls(const TrackerGeometry *bareTkGeomPtr,
90  const TrackerTopology *bareTkTopoPtr,
92 
93  std::vector<std::string> dqm_tag_;
94 
95  int statCollectionFromMode(const char *tag) const;
96 
99  double MinTrackEta;
100  double MaxTrackEta;
101  unsigned int MaxNrStrips;
102  unsigned int MinTrackHits;
114  std::vector<std::string> VChargeHisto;
118 
123 
124  // maps histograms index to topology
125  std::map<unsigned int, APVloc> theTopologyMap;
126 };
127 
128 inline int SiStripGainsPCLWorker::statCollectionFromMode(const char *tag) const {
129  std::vector<std::string>::const_iterator it = dqm_tag_.begin();
130  while (it != dqm_tag_.end()) {
131  if (*it == std::string(tag))
132  return it - dqm_tag_.begin();
133  it++;
134  }
135 
136  if (std::string(tag).empty())
137  return 0; // return StdBunch calibration mode for backward compatibility
138 
139  return None;
140 }
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
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomTokenBR_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
std::map< unsigned int, APVloc > theTopologyMap
void checkBookAPVColls(const TrackerGeometry *bareTkGeomPtr, const TrackerTopology *bareTkTopoPtr, APVGain::APVGainHistograms &histograms) const
edm::ESGetToken< SiStripGain, SiStripGainRcd > gainToken_
std::vector< std::string > VChargeHisto
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoTokenBR_
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