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
32 
33 // user includes
35 
36 // ROOT includes
37 #include "TH1F.h"
38 #include "TH2S.h"
39 #include "TProfile.h"
40 #include "TF1.h"
41 
42 // System includes
43 #include <unordered_map>
44 
46  public:
47  explicit SiStripGainsPCLHarvester(const edm::ParameterSet& ps);
48  void beginRun(edm::Run const& run, edm::EventSetup const & isetup) override;
49  void endRun(edm::Run const& run, edm::EventSetup const & isetup) override;
50  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
51 
52  private:
53 
54  virtual void checkBookAPVColls(const edm::EventSetup& setup);
55  virtual void checkAndRetrieveTopology(const edm::EventSetup& setup);
56  void dqmEndJob(DQMStore::IBooker& ibooker_, DQMStore::IGetter& igetter_) override;
57 
58  void gainQualityMonitor(DQMStore::IBooker& ibooker_, const MonitorElement* Charge_Vs_Index) const;
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 
91 
93  const TrackerGeometry *bareTkGeomPtr_; // ugly hack to fill APV colls only once, but checks
95 
96  std::vector<std::shared_ptr<stAPVGain> > APVsCollOrdered;
97  std::unordered_map<unsigned int, std::shared_ptr<stAPVGain> > APVsColl;
98 
99 };
std::unique_ptr< SiStripApvGain > getNewObject(const MonitorElement *Charge_Vs_Index)
edm::ESHandle< TrackerGeometry > tkGeom_
void dqmEndJob(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_) override
int statCollectionFromMode(const char *tag) const
const TrackerTopology * tTopo_
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:2
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)
std::vector< std::string > VChargeHisto
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_
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
Definition: Run.h:45
std::unordered_map< unsigned int, std::shared_ptr< stAPVGain > > APVsColl