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
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 };
DQMEDHarvester.h
SiStripGainsPCLHarvester::gainQualityMonitor
void gainQualityMonitor(DQMStore::IBooker &ibooker_, const MonitorElement *Charge_Vs_Index) const
Definition: SiStripGainsPCLHarvester.cc:148
SiStripGainsPCLHarvester::dqm_tag_
std::vector< std::string > dqm_tag_
Definition: SiStripGainsPCLHarvester.h:91
TrackerGeometry.h
SiStripGainsPCLHarvester::beginRun
void beginRun(edm::Run const &run, edm::EventSetup const &isetup) override
Definition: SiStripGainsPCLHarvester.cc:60
SiStripGain.h
SiStripGainsPCLHarvester::m_calibrationMode
std::string m_calibrationMode
Definition: SiStripGainsPCLHarvester.h:88
SiStripGainsPCLHarvester::produceTagFilter
bool produceTagFilter(const MonitorElement *Charge_Vs_Index)
Definition: SiStripGainsPCLHarvester.cc:619
edm::Run
Definition: Run.h:45
SiStripGainsPCLHarvester::MASKED
unsigned int MASKED
Definition: SiStripGainsPCLHarvester.h:76
SiStripGainsPCLHarvester::APVsColl
std::unordered_map< unsigned int, std::shared_ptr< stAPVGain > > APVsColl
Definition: SiStripGainsPCLHarvester.h:99
SiStripGainsPCLHarvester::bareTkGeomPtr_
const TrackerGeometry * bareTkGeomPtr_
Definition: SiStripGainsPCLHarvester.h:95
SiStripGainsPCLHarvester::endRun
void endRun(edm::Run const &run, edm::EventSetup const &isetup) override
Definition: SiStripGainsPCLHarvester.cc:701
SiStripGainsPCLHarvester::SiStripGainsPCLHarvester
SiStripGainsPCLHarvester(const edm::ParameterSet &ps)
Definition: SiStripGainsPCLHarvester.cc:29
SiStripGainsPCLHarvester::tkGeomToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
Definition: SiStripGainsPCLHarvester.h:102
SiStripGainsPCLHarvester::NStripAPVs
int NStripAPVs
Definition: SiStripGainsPCLHarvester.h:81
SiStripGainsPCLHarvester::APVsCollOrdered
std::vector< std::shared_ptr< stAPVGain > > APVsCollOrdered
Definition: SiStripGainsPCLHarvester.h:98
SiStripGainRcd.h
DQMStore.h
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
SiStripGainsPCLHarvester::tagCondition_NClusters
double tagCondition_NClusters
Definition: SiStripGainsPCLHarvester.h:78
SiStripGainsPCLHarvester::NPixelDets
int NPixelDets
Definition: SiStripGainsPCLHarvester.h:82
APVGainStruct.h
SiStripGainsPCLHarvester::qualityToken_
edm::ESGetToken< SiStripQuality, SiStripQualityRcd > qualityToken_
Definition: SiStripGainsPCLHarvester.h:104
SiStripGainsPCLHarvester::MinNrEntries
double MinNrEntries
Definition: SiStripGainsPCLHarvester.h:83
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
SiStripGainsPCLHarvester
Definition: SiStripGainsPCLHarvester.h:50
MakerMacros.h
TrackerTopology.h
TrackerTopologyRcd.h
SiStripGainsPCLHarvester::BAD
unsigned int BAD
Definition: SiStripGainsPCLHarvester.h:75
Service.h
SiStripGainsPCLHarvester::tTopoToken_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
Definition: SiStripGainsPCLHarvester.h:101
SiStripGainsPCLHarvester::VChargeHisto
std::vector< std::string > VChargeHisto
Definition: SiStripGainsPCLHarvester.h:89
SiStripGainsPCLHarvester::getPeakOfLandau
void getPeakOfLandau(TH1 *InputHisto, double *FitResults, double LowRange=50, double HighRange=5400)
Definition: SiStripGainsPCLHarvester.cc:473
SiStripApvGain.h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
TrackerDigiGeometryRecord.h
SiStripGainsPCLHarvester::getNewObject
std::unique_ptr< SiStripApvGain > getNewObject(const MonitorElement *Charge_Vs_Index)
Definition: SiStripGainsPCLHarvester.cc:648
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
SiStripGainsPCLHarvester::checkBookAPVColls
virtual void checkBookAPVColls(const edm::EventSetup &setup)
Definition: SiStripGainsPCLHarvester.cc:509
makeGlobalPositionRcd_cfg.tag
tag
Definition: makeGlobalPositionRcd_cfg.py:6
SiStripGainsPCLHarvester::CalibrationLevel
int CalibrationLevel
Definition: SiStripGainsPCLHarvester.h:93
SiStripGainsPCLHarvester::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: SiStripGainsPCLHarvester.cc:694
SiStripGainsPCLHarvester::gainToken_
edm::ESGetToken< SiStripGain, SiStripGainRcd > gainToken_
Definition: SiStripGainsPCLHarvester.h:103
edm::EventSetup
Definition: EventSetup.h:58
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd >
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiStripGainsPCLHarvester::doStoreOnDB
bool doStoreOnDB
Definition: SiStripGainsPCLHarvester.h:72
SiStripGainsPCLHarvester::statCollectionFromMode
int statCollectionFromMode(const char *tag) const
DQMEDHarvester
Definition: DQMEDHarvester.py:1
SiStripGainsPCLHarvester::tTopo_
std::unique_ptr< TrackerTopology > tTopo_
Definition: SiStripGainsPCLHarvester.h:96
writedatasetfile.run
run
Definition: writedatasetfile.py:27
SiStripGainsPCLHarvester::m_DQMdir
std::string m_DQMdir
Definition: SiStripGainsPCLHarvester.h:87
Frameworkfwd.h
dqm::implementation::IGetter
Definition: DQMStore.h:484
SiStripQuality.h
SiStripGainsPCLHarvester::IsGoodLandauFit
bool IsGoodLandauFit(double *FitResults)
Definition: SiStripGainsPCLHarvester.cc:499
SiStripQualityRcd.h
SiStripGainsPCLHarvester::algoComputeMPVandGain
void algoComputeMPVandGain(const MonitorElement *Charge_Vs_Index)
Definition: SiStripGainsPCLHarvester.cc:369
dqm::implementation::IBooker
Definition: DQMStore.h:43
SiStripGainsPCLHarvester::doChargeMonitorPerPlane
bool doChargeMonitorPerPlane
Definition: SiStripGainsPCLHarvester.h:73
SiStripGainsPCLHarvester::dqmEndJob
void dqmEndJob(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_) override
Definition: SiStripGainsPCLHarvester.cc:107
ParameterSet.h
SiStripGainsPCLHarvester::m_Record
std::string m_Record
Definition: SiStripGainsPCLHarvester.h:85
SiStripGainsPCLHarvester::tagCondition_GoodFrac
double tagCondition_GoodFrac
Definition: SiStripGainsPCLHarvester.h:79
SiStripGainsPCLHarvester::GOOD
unsigned int GOOD
Definition: SiStripGainsPCLHarvester.h:74
TrackerGeometry
Definition: TrackerGeometry.h:14