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  virtual void checkBookAPVColls(const edm::EventSetup& setup);
54  virtual void checkAndRetrieveTopology(const edm::EventSetup& setup);
55  void dqmEndJob(DQMStore::IBooker& ibooker_, DQMStore::IGetter& igetter_) override;
56 
57  void gainQualityMonitor(DQMStore::IBooker& ibooker_, const MonitorElement* Charge_Vs_Index) const;
58 
59  int statCollectionFromMode(const char* tag) const;
60 
61  void algoComputeMPVandGain(const MonitorElement* Charge_Vs_Index);
62  void getPeakOfLandau(TH1* InputHisto, double* FitResults, double LowRange = 50, double HighRange = 5400);
63  bool IsGoodLandauFit(double* FitResults);
64 
65  bool produceTagFilter(const MonitorElement* Charge_Vs_Index);
66  std::unique_ptr<SiStripApvGain> getNewObject(const MonitorElement* Charge_Vs_Index);
67 
70  unsigned int GOOD;
71  unsigned int BAD;
72  unsigned int MASKED;
73 
76 
79  double MinNrEntries;
80 
82 
85  std::vector<std::string> VChargeHisto;
87  std::vector<std::string> dqm_tag_;
88 
90 
92  const TrackerGeometry* bareTkGeomPtr_; // ugly hack to fill APV colls only once, but checks
94 
95  std::vector<std::shared_ptr<stAPVGain> > APVsCollOrdered;
96  std::unordered_map<unsigned int, std::shared_ptr<stAPVGain> > APVsColl;
97 };
DQMEDHarvester.h
SiStripGainsPCLHarvester::gainQualityMonitor
void gainQualityMonitor(DQMStore::IBooker &ibooker_, const MonitorElement *Charge_Vs_Index) const
Definition: SiStripGainsPCLHarvester.cc:161
SiStripGainsPCLHarvester::tTopo_
const TrackerTopology * tTopo_
Definition: SiStripGainsPCLHarvester.h:93
SiStripGainsPCLHarvester::dqm_tag_
std::vector< std::string > dqm_tag_
Definition: SiStripGainsPCLHarvester.h:87
TrackerGeometry.h
ESHandle.h
SiStripGainsPCLHarvester::beginRun
void beginRun(edm::Run const &run, edm::EventSetup const &isetup) override
Definition: SiStripGainsPCLHarvester.cc:70
SiStripGainsPCLHarvester::m_calibrationMode
std::string m_calibrationMode
Definition: SiStripGainsPCLHarvester.h:84
SiStripGainsPCLHarvester::produceTagFilter
bool produceTagFilter(const MonitorElement *Charge_Vs_Index)
Definition: SiStripGainsPCLHarvester.cc:637
edm::Run
Definition: Run.h:45
SiStripGainsPCLHarvester::MASKED
unsigned int MASKED
Definition: SiStripGainsPCLHarvester.h:72
TrackerTopology
Definition: TrackerTopology.h:16
SiStripGainsPCLHarvester::APVsColl
std::unordered_map< unsigned int, std::shared_ptr< stAPVGain > > APVsColl
Definition: SiStripGainsPCLHarvester.h:96
SiStripGainsPCLHarvester::bareTkGeomPtr_
const TrackerGeometry * bareTkGeomPtr_
Definition: SiStripGainsPCLHarvester.h:92
SiStripGainsPCLHarvester::endRun
void endRun(edm::Run const &run, edm::EventSetup const &isetup) override
Definition: SiStripGainsPCLHarvester.cc:719
SiStripGainsPCLHarvester::SiStripGainsPCLHarvester
SiStripGainsPCLHarvester(const edm::ParameterSet &ps)
Definition: SiStripGainsPCLHarvester.cc:37
SiStripGainsPCLHarvester::NStripAPVs
int NStripAPVs
Definition: SiStripGainsPCLHarvester.h:77
SiStripGainsPCLHarvester::APVsCollOrdered
std::vector< std::shared_ptr< stAPVGain > > APVsCollOrdered
Definition: SiStripGainsPCLHarvester.h:95
DQMStore.h
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
SiStripGainsPCLHarvester::tkGeom_
edm::ESHandle< TrackerGeometry > tkGeom_
Definition: SiStripGainsPCLHarvester.h:91
SiStripGainsPCLHarvester::tagCondition_NClusters
double tagCondition_NClusters
Definition: SiStripGainsPCLHarvester.h:74
SiStripGainsPCLHarvester::NPixelDets
int NPixelDets
Definition: SiStripGainsPCLHarvester.h:78
APVGainStruct.h
SiStripGainsPCLHarvester::MinNrEntries
double MinNrEntries
Definition: SiStripGainsPCLHarvester.h:79
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
SiStripGainsPCLHarvester
Definition: SiStripGainsPCLHarvester.h:45
MakerMacros.h
TrackerTopology.h
SiStripGainsPCLHarvester::BAD
unsigned int BAD
Definition: SiStripGainsPCLHarvester.h:71
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
Service.h
SiStripGainsPCLHarvester::VChargeHisto
std::vector< std::string > VChargeHisto
Definition: SiStripGainsPCLHarvester.h:85
edm::ESHandle< TrackerGeometry >
SiStripGainsPCLHarvester::getPeakOfLandau
void getPeakOfLandau(TH1 *InputHisto, double *FitResults, double LowRange=50, double HighRange=5400)
Definition: SiStripGainsPCLHarvester.cc:482
SiStripGainsPCLHarvester::checkAndRetrieveTopology
virtual void checkAndRetrieveTopology(const edm::EventSetup &setup)
Definition: SiStripGainsPCLHarvester.cc:628
SiStripApvGain.h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiStripGainsPCLHarvester::getNewObject
std::unique_ptr< SiStripApvGain > getNewObject(const MonitorElement *Charge_Vs_Index)
Definition: SiStripGainsPCLHarvester.cc:666
edm::ParameterSet
Definition: ParameterSet.h:36
Event.h
SiStripGainsPCLHarvester::checkBookAPVColls
virtual void checkBookAPVColls(const edm::EventSetup &setup)
Definition: SiStripGainsPCLHarvester.cc:518
SiStripGainsPCLHarvester::CalibrationLevel
int CalibrationLevel
Definition: SiStripGainsPCLHarvester.h:89
SiStripGainsPCLHarvester::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: SiStripGainsPCLHarvester.cc:712
edm::EventSetup
Definition: EventSetup.h:57
SiStripGainsPCLHarvester::doStoreOnDB
bool doStoreOnDB
Definition: SiStripGainsPCLHarvester.h:68
SiStripGainsPCLHarvester::statCollectionFromMode
int statCollectionFromMode(const char *tag) const
DQMEDHarvester
Definition: DQMEDHarvester.py:1
writedatasetfile.run
run
Definition: writedatasetfile.py:27
SiStripGainsPCLHarvester::m_DQMdir
std::string m_DQMdir
Definition: SiStripGainsPCLHarvester.h:83
Frameworkfwd.h
dqm::implementation::IGetter
Definition: DQMStore.h:484
SiStripGainsPCLHarvester::IsGoodLandauFit
bool IsGoodLandauFit(double *FitResults)
Definition: SiStripGainsPCLHarvester.cc:508
SiStripGainsPCLHarvester::algoComputeMPVandGain
void algoComputeMPVandGain(const MonitorElement *Charge_Vs_Index)
Definition: SiStripGainsPCLHarvester.cc:378
dqm::implementation::IBooker
Definition: DQMStore.h:43
SiStripGainsPCLHarvester::doChargeMonitorPerPlane
bool doChargeMonitorPerPlane
Definition: SiStripGainsPCLHarvester.h:69
SiStripGainsPCLHarvester::dqmEndJob
void dqmEndJob(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_) override
Definition: SiStripGainsPCLHarvester.cc:120
ParameterSet.h
SiStripGainsPCLHarvester::m_Record
std::string m_Record
Definition: SiStripGainsPCLHarvester.h:81
SiStripGainsPCLHarvester::tagCondition_GoodFrac
double tagCondition_GoodFrac
Definition: SiStripGainsPCLHarvester.h:75
SiStripGainsPCLHarvester::GOOD
unsigned int GOOD
Definition: SiStripGainsPCLHarvester.h:70
TrackerGeometry
Definition: TrackerGeometry.h:14