CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SiStripGainsPCLHarvester.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: CalibTracker/SiStripChannelGain
4 // Class: SiStripGainsPCLHarvester
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 //
17 // Created: Wed, 12 Apr 2017 14:46:48 GMT
18 //
19 
20 // CMSSW includes
37 
38 // user includes
40 
41 // ROOT includes
42 #include "TH1F.h"
43 #include "TH2S.h"
44 #include "TProfile.h"
45 #include "TF1.h"
46 
47 // System includes
48 #include <unordered_map>
49 
51 public:
52  explicit SiStripGainsPCLHarvester(const edm::ParameterSet& ps);
53  void beginRun(edm::Run const& run, edm::EventSetup const& isetup) override;
54  void endRun(edm::Run const& run, edm::EventSetup const& isetup) override;
55  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
56 
57 private:
58  virtual void checkBookAPVColls(const edm::EventSetup& setup);
59  void dqmEndJob(DQMStore::IBooker& ibooker_, DQMStore::IGetter& igetter_) override;
60 
61  void gainQualityMonitor(DQMStore::IBooker& ibooker_, const MonitorElement* Charge_Vs_Index) const;
62 
63  int statCollectionFromMode(const char* tag) const;
64 
65  void algoComputeMPVandGain(const MonitorElement* Charge_Vs_Index);
66  void getPeakOfLandau(TH1* InputHisto, double* FitResults, double LowRange = 50, double HighRange = 5400);
67  bool IsGoodLandauFit(double* FitResults);
68 
69  bool produceTagFilter(const MonitorElement* Charge_Vs_Index);
70  std::unique_ptr<SiStripApvGain> getNewObject(const MonitorElement* Charge_Vs_Index);
71 
74  unsigned int GOOD;
75  unsigned int BAD;
76  unsigned int MASKED;
77 
80 
83  double MinNrEntries;
84 
86 
89  std::vector<std::string> VChargeHisto;
91  std::vector<std::string> dqm_tag_;
92 
94 
95  const TrackerGeometry* bareTkGeomPtr_ = nullptr; // ugly hack to fill APV colls only once, but checks
96  std::unique_ptr<TrackerTopology> tTopo_;
97 
98  std::vector<std::shared_ptr<stAPVGain> > APVsCollOrdered;
99  std::unordered_map<unsigned int, std::shared_ptr<stAPVGain> > APVsColl;
100 
105 };
std::unique_ptr< SiStripApvGain > getNewObject(const MonitorElement *Charge_Vs_Index)
void dqmEndJob(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_) override
int statCollectionFromMode(const char *tag) const
std::vector< std::string > dqm_tag_
void beginRun(edm::Run const &run, edm::EventSetup const &isetup) override
bool produceTagFilter(const MonitorElement *Charge_Vs_Index)
void getPeakOfLandau(TH1 *InputHisto, double *FitResults, double LowRange=50, double HighRange=5400)
void algoComputeMPVandGain(const MonitorElement *Charge_Vs_Index)
SiStripGainsPCLHarvester(const edm::ParameterSet &ps)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::ESGetToken< SiStripQuality, SiStripQualityRcd > qualityToken_
std::vector< std::string > VChargeHisto
std::unique_ptr< TrackerTopology > tTopo_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
bool IsGoodLandauFit(double *FitResults)
void gainQualityMonitor(DQMStore::IBooker &ibooker_, const MonitorElement *Charge_Vs_Index) const
const TrackerGeometry * bareTkGeomPtr_
void endRun(edm::Run const &run, edm::EventSetup const &isetup) override
virtual void checkBookAPVColls(const edm::EventSetup &setup)
std::vector< std::shared_ptr< stAPVGain > > APVsCollOrdered
edm::ESGetToken< SiStripGain, SiStripGainRcd > gainToken_
Definition: Run.h:45
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
std::unordered_map< unsigned int, std::shared_ptr< stAPVGain > > APVsColl