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 dqmEndJob(DQMStore::IBooker& ibooker_, DQMStore::IGetter& igetter_);
55 
56  int statCollectionFromMode(const char* tag) const;
57 
58  void algoComputeMPVandGain(const MonitorElement* Charge_Vs_Index);
59  void getPeakOfLandau(TH1* InputHisto, double* FitResults, double LowRange=50, double HighRange=5400);
60  bool IsGoodLandauFit(double* FitResults);
61 
62  bool produceTagFilter(const MonitorElement* Charge_Vs_Index);
63  std::unique_ptr<SiStripApvGain> getNewObject(const MonitorElement* Charge_Vs_Index);
64 
66  unsigned int GOOD;
67  unsigned int BAD;
68  unsigned int MASKED;
69 
72 
75  double MinNrEntries;
76 
80  std::vector<std::string> dqm_tag_;
81 
83 
85  const TrackerGeometry *bareTkGeomPtr_; // ugly hack to fill APV colls only once, but checks
86 
87  std::vector<std::shared_ptr<stAPVGain> > APVsCollOrdered;
88  std::unordered_map<unsigned int, std::shared_ptr<stAPVGain> > APVsColl;
89 
90 };
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)
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)
virtual void endRun(edm::Run const &run, edm::EventSetup const &isetup)
bool IsGoodLandauFit(double *FitResults)
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