CMS 3D CMS Logo

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
31 
32 // user includes
34 
35 // ROOT includes
36 #include "TH1F.h"
37 #include "TH2S.h"
38 #include "TProfile.h"
39 #include "TF1.h"
40 
41 // System includes
42 #include <unordered_map>
43 
45  public:
46  explicit SiStripGainsPCLHarvester(const edm::ParameterSet& ps);
47  virtual void beginRun(edm::Run const& run, edm::EventSetup const & isetup);
48  virtual void endRun(edm::Run const& run, edm::EventSetup const & isetup);
49  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
50 
51  private:
52 
53  virtual void checkBookAPVColls(const edm::EventSetup& setup);
54  virtual void checkAndRetrieveTopology(const edm::EventSetup& setup);
55  virtual void dqmEndJob(DQMStore::IBooker& ibooker_, DQMStore::IGetter& igetter_);
56 
57  void gainQualityMonitor(DQMStore::IBooker& ibooker_, const MonitorElement* Charge_Vs_Index) const;
58 
59 
60  int statCollectionFromMode(const char* tag) const;
61 
62  void algoComputeMPVandGain(const MonitorElement* Charge_Vs_Index);
63  void getPeakOfLandau(TH1* InputHisto, double* FitResults, double LowRange=50, double HighRange=5400);
64  bool IsGoodLandauFit(double* FitResults);
65 
66  bool produceTagFilter(const MonitorElement* Charge_Vs_Index);
67  std::unique_ptr<SiStripApvGain> getNewObject(const MonitorElement* Charge_Vs_Index);
68 
71  unsigned int GOOD;
72  unsigned int BAD;
73  unsigned int MASKED;
74 
77 
80  double MinNrEntries;
81 
83 
86  std::vector<std::string> VChargeHisto;
88  std::vector<std::string> dqm_tag_;
89 
90 
91 
93 
95  const TrackerGeometry *bareTkGeomPtr_; // ugly hack to fill APV colls only once, but checks
97 
98  std::vector<std::shared_ptr<stAPVGain> > APVsCollOrdered;
99  std::unordered_map<unsigned int, std::shared_ptr<stAPVGain> > APVsColl;
100 
101 };
std::unique_ptr< SiStripApvGain > getNewObject(const MonitorElement *Charge_Vs_Index)
virtual void dqmEndJob(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_)
edm::ESHandle< TrackerGeometry > tkGeom_
int statCollectionFromMode(const char *tag) const
virtual void beginRun(edm::Run const &run, edm::EventSetup const &isetup)
const TrackerTopology * tTopo_
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
std::vector< std::string > dqm_tag_
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)
std::vector< std::string > VChargeHisto
virtual void endRun(edm::Run const &run, edm::EventSetup const &isetup)
virtual void checkAndRetrieveTopology(const edm::EventSetup &setup)
bool IsGoodLandauFit(double *FitResults)
void gainQualityMonitor(DQMStore::IBooker &ibooker_, const MonitorElement *Charge_Vs_Index) const
const TrackerGeometry * bareTkGeomPtr_
virtual void checkBookAPVColls(const edm::EventSetup &setup)
std::vector< std::shared_ptr< stAPVGain > > APVsCollOrdered
Definition: Run.h:42
std::unordered_map< unsigned int, std::shared_ptr< stAPVGain > > APVsColl