CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 beginJob() override;
89  void dqmBeginRun(edm::Run const &, edm::EventSetup const &, APVGain::APVGainHistograms &) const override;
91 
92  std::vector<std::string> dqm_tag_;
93 
94  int statCollectionFromMode(const char *tag) const;
95 
98  double MinTrackEta;
99  double MaxTrackEta;
100  unsigned int MaxNrStrips;
101  unsigned int MinTrackHits;
113  std::vector<std::string> VChargeHisto;
117 
122 
123  // maps histograms index to topology
124  std::map<unsigned int, APVloc> theTopologyMap;
125 };
126 
127 inline int SiStripGainsPCLWorker::statCollectionFromMode(const char *tag) const {
128  std::vector<std::string>::const_iterator it = dqm_tag_.begin();
129  while (it != dqm_tag_.end()) {
130  if (*it == std::string(tag))
131  return it - dqm_tag_.begin();
132  it++;
133  }
134 
135  if (std::string(tag).empty())
136  return 0; // return StdBunch calibration mode for backward compatibility
137 
138  return None;
139 }
edm::ESGetToken< SiStripQuality, SiStripQualityRcd > qualityToken_
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
edm::ESGetToken< SiStripGain, SiStripGainRcd > gainToken_
void checkBookAPVColls(const TrackerGeometry *bareTkGeomPtr, APVGain::APVGainHistograms &histograms) const
std::vector< std::string > VChargeHisto
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &, APVGain::APVGainHistograms &) const override
int statCollectionFromMode(const char *tag) const
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: Run.h:45