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  virtual void checkAndRetrieveTopology(const edm::EventSetup& setup);
60  void dqmEndJob(DQMStore::IBooker& ibooker_, DQMStore::IGetter& igetter_) override;
61 
62  void gainQualityMonitor(DQMStore::IBooker& ibooker_, const MonitorElement* Charge_Vs_Index) const;
63 
64  int statCollectionFromMode(const char* tag) const;
65 
66  void algoComputeMPVandGain(const MonitorElement* Charge_Vs_Index);
67  void getPeakOfLandau(TH1* InputHisto, double* FitResults, double LowRange = 50, double HighRange = 5400);
68  bool IsGoodLandauFit(double* FitResults);
69 
70  bool produceTagFilter(const MonitorElement* Charge_Vs_Index);
71  std::unique_ptr<SiStripApvGain> getNewObject(const MonitorElement* Charge_Vs_Index);
72 
75  unsigned int GOOD;
76  unsigned int BAD;
77  unsigned int MASKED;
78 
81 
84  double MinNrEntries;
85 
87 
90  std::vector<std::string> VChargeHisto;
92  std::vector<std::string> dqm_tag_;
93 
95 
96  const TrackerGeometry* bareTkGeomPtr_ = nullptr; // ugly hack to fill APV colls only once, but checks
97  const TrackerTopology* tTopo_ = nullptr;
98 
99  std::vector<std::shared_ptr<stAPVGain> > APVsCollOrdered;
100  std::unordered_map<unsigned int, std::shared_ptr<stAPVGain> > APVsColl;
101 
106 };
DQMEDHarvester.h
SiStripGainsPCLHarvester::gainQualityMonitor
void gainQualityMonitor(DQMStore::IBooker &ibooker_, const MonitorElement *Charge_Vs_Index) const
Definition: SiStripGainsPCLHarvester.cc:149
SiStripGainsPCLHarvester::tTopo_
const TrackerTopology * tTopo_
Definition: SiStripGainsPCLHarvester.h:97
SiStripGainsPCLHarvester::dqm_tag_
std::vector< std::string > dqm_tag_
Definition: SiStripGainsPCLHarvester.h:92
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:89
SiStripGainsPCLHarvester::produceTagFilter
bool produceTagFilter(const MonitorElement *Charge_Vs_Index)
Definition: SiStripGainsPCLHarvester.cc:623
edm::Run
Definition: Run.h:45
SiStripGainsPCLHarvester::MASKED
unsigned int MASKED
Definition: SiStripGainsPCLHarvester.h:77
TrackerTopology
Definition: TrackerTopology.h:16
SiStripGainsPCLHarvester::APVsColl
std::unordered_map< unsigned int, std::shared_ptr< stAPVGain > > APVsColl
Definition: SiStripGainsPCLHarvester.h:100
SiStripGainsPCLHarvester::bareTkGeomPtr_
const TrackerGeometry * bareTkGeomPtr_
Definition: SiStripGainsPCLHarvester.h:96
SiStripGainsPCLHarvester::endRun
void endRun(edm::Run const &run, edm::EventSetup const &isetup) override
Definition: SiStripGainsPCLHarvester.cc:705
SiStripGainsPCLHarvester::SiStripGainsPCLHarvester
SiStripGainsPCLHarvester(const edm::ParameterSet &ps)
Definition: SiStripGainsPCLHarvester.cc:29
SiStripGainsPCLHarvester::tkGeomToken_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
Definition: SiStripGainsPCLHarvester.h:103
SiStripGainsPCLHarvester::NStripAPVs
int NStripAPVs
Definition: SiStripGainsPCLHarvester.h:82
SiStripGainsPCLHarvester::APVsCollOrdered
std::vector< std::shared_ptr< stAPVGain > > APVsCollOrdered
Definition: SiStripGainsPCLHarvester.h:99
SiStripGainRcd.h
DQMStore.h
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
SiStripGainsPCLHarvester::tagCondition_NClusters
double tagCondition_NClusters
Definition: SiStripGainsPCLHarvester.h:79
SiStripGainsPCLHarvester::NPixelDets
int NPixelDets
Definition: SiStripGainsPCLHarvester.h:83
APVGainStruct.h
SiStripGainsPCLHarvester::qualityToken_
edm::ESGetToken< SiStripQuality, SiStripQualityRcd > qualityToken_
Definition: SiStripGainsPCLHarvester.h:105
SiStripGainsPCLHarvester::MinNrEntries
double MinNrEntries
Definition: SiStripGainsPCLHarvester.h:84
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:76
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
Service.h
SiStripGainsPCLHarvester::tTopoToken_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
Definition: SiStripGainsPCLHarvester.h:102
SiStripGainsPCLHarvester::VChargeHisto
std::vector< std::string > VChargeHisto
Definition: SiStripGainsPCLHarvester.h:90
SiStripGainsPCLHarvester::getPeakOfLandau
void getPeakOfLandau(TH1 *InputHisto, double *FitResults, double LowRange=50, double HighRange=5400)
Definition: SiStripGainsPCLHarvester.cc:471
SiStripGainsPCLHarvester::checkAndRetrieveTopology
virtual void checkAndRetrieveTopology(const edm::EventSetup &setup)
Definition: SiStripGainsPCLHarvester.cc:616
SiStripApvGain.h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TrackerDigiGeometryRecord.h
SiStripGainsPCLHarvester::getNewObject
std::unique_ptr< SiStripApvGain > getNewObject(const MonitorElement *Charge_Vs_Index)
Definition: SiStripGainsPCLHarvester.cc:652
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
SiStripGainsPCLHarvester::checkBookAPVColls
virtual void checkBookAPVColls(const edm::EventSetup &setup)
Definition: SiStripGainsPCLHarvester.cc:507
SiStripGainsPCLHarvester::CalibrationLevel
int CalibrationLevel
Definition: SiStripGainsPCLHarvester.h:94
SiStripGainsPCLHarvester::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: SiStripGainsPCLHarvester.cc:698
SiStripGainsPCLHarvester::gainToken_
edm::ESGetToken< SiStripGain, SiStripGainRcd > gainToken_
Definition: SiStripGainsPCLHarvester.h:104
edm::EventSetup
Definition: EventSetup.h:57
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd >
SiStripGainsPCLHarvester::doStoreOnDB
bool doStoreOnDB
Definition: SiStripGainsPCLHarvester.h:73
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:88
Frameworkfwd.h
dqm::implementation::IGetter
Definition: DQMStore.h:484
SiStripQuality.h
SiStripGainsPCLHarvester::IsGoodLandauFit
bool IsGoodLandauFit(double *FitResults)
Definition: SiStripGainsPCLHarvester.cc:497
SiStripQualityRcd.h
SiStripGainsPCLHarvester::algoComputeMPVandGain
void algoComputeMPVandGain(const MonitorElement *Charge_Vs_Index)
Definition: SiStripGainsPCLHarvester.cc:367
dqm::implementation::IBooker
Definition: DQMStore.h:43
SiStripGainsPCLHarvester::doChargeMonitorPerPlane
bool doChargeMonitorPerPlane
Definition: SiStripGainsPCLHarvester.h:74
SiStripGainsPCLHarvester::dqmEndJob
void dqmEndJob(DQMStore::IBooker &ibooker_, DQMStore::IGetter &igetter_) override
Definition: SiStripGainsPCLHarvester.cc:108
ParameterSet.h
SiStripGainsPCLHarvester::m_Record
std::string m_Record
Definition: SiStripGainsPCLHarvester.h:86
SiStripGainsPCLHarvester::tagCondition_GoodFrac
double tagCondition_GoodFrac
Definition: SiStripGainsPCLHarvester.h:80
SiStripGainsPCLHarvester::GOOD
unsigned int GOOD
Definition: SiStripGainsPCLHarvester.h:75
TrackerGeometry
Definition: TrackerGeometry.h:14