CMS 3D CMS Logo

SiPixelGainCalibrationAnalysis.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: SiPixelGainCalibrationAnalysis
4 // Class: SiPixelGainCalibrationAnalysis
5 //
13 //
14 // Original Author: Freya Blekman
15 // Created: Wed Nov 14 15:02:06 CET 2007
16 //
17 //
18 
19 // system include files
20 #include <memory>
21 
22 // user include files
26 
29 
31 
33 //#include "CondFormats/SiPixelObjects/interface/SiPixelGainCalibration.h"
34 //#include "CondFormats/SiPixelObjects/interface/SiPixelGainCalibrationOffline.h"
35 //#include "CondFormats/SiPixelObjects/interface/SiPixelGainCalibrationForHLT.h"
36 
37 //#include "CalibTracker/SiPixelESProducers/interface/SiPixelGainCalibrationService.h"
38 
40 #include "TLinearFitter.h"
41 #include "TGraphErrors.h"
42 #include <fstream>
43 //
44 // class decleration
45 //
46 
48 public:
49  explicit SiPixelGainCalibrationAnalysis(const edm::ParameterSet &iConfig);
51 
52  void doSetup(const edm::ParameterSet &);
53  bool doFits(uint32_t detid, std::vector<SiPixelCalibDigi>::const_iterator ipix) override;
54 
55  bool checkCorrectCalibrationType() override;
56 
57 private:
58  void calibrationSetup(const edm::EventSetup &iSetup) override;
59 
60  void calibrationEnd() override;
61  void newDetID(uint32_t detid) override;
62  void fillDatabase();
63  void printSummary();
64  std::vector<float> CalculateAveragePerColumn(uint32_t detid, std::string label);
65  // ----------member data ---------------------------
67  // more class members used to keep track of the histograms
68  std::map<uint32_t, std::map<std::string, MonitorElement *> > bookkeeper_;
69  std::map<uint32_t, std::map<std::string, MonitorElement *> > bookkeeper_pixels_;
70 
71  // fitter
75  TGraphErrors *graph_;
76 
77  std::vector<uint32_t> listofdetids_;
79  // flags
80 
96  bool filldb_;
98 
99  // parameters for database output
102  /*SiPixelGainCalibration *theGainCalibrationDbInput_;
103  SiPixelGainCalibrationOffline *theGainCalibrationDbInputOffline_;
104  SiPixelGainCalibrationForHLT *theGainCalibrationDbInputHLT_;
105  SiPixelGainCalibrationService theGainCalibrationDbInputService_;*/
106 
107  // keep track of lowest and highest vals for range
108  float gainlow_;
109  float gainhi_;
110  float pedlow_;
111  float pedhi_;
112  uint16_t min_nentries_;
115 
116  //Summary
117  std::ofstream summary_;
118  uint32_t currentDetID_;
120 };
SiPixelGainCalibrationAnalysis::fillDatabase
void fillDatabase()
Definition: SiPixelGainCalibrationAnalysis.cc:176
SiPixelGainCalibrationAnalysis::printSummary
void printSummary()
Definition: SiPixelGainCalibrationAnalysis.cc:127
SiPixelGainCalibrationAnalysis::saveALLHistograms_
bool saveALLHistograms_
Definition: SiPixelGainCalibrationAnalysis.h:93
SiPixelGainCalibrationAnalysis::sum_ped_cols_
bool sum_ped_cols_
Definition: SiPixelGainCalibrationAnalysis.h:94
SiPixelGainCalibrationAnalysis::maxGainInHist_
double maxGainInHist_
Definition: SiPixelGainCalibrationAnalysis.h:91
SiPixelGainCalibrationAnalysis::SiPixelGainCalibrationAnalysis
SiPixelGainCalibrationAnalysis(const edm::ParameterSet &iConfig)
Definition: SiPixelGainCalibrationAnalysis.cc:34
SiPixelGainCalibrationAnalysis::appendMode_
bool appendMode_
Definition: SiPixelGainCalibrationAnalysis.h:101
SiPixelGainCalibrationAnalysis::bookBIGCalibPayload_
bool bookBIGCalibPayload_
Definition: SiPixelGainCalibrationAnalysis.h:87
SiPixelGainCalibrationAnalysis::writeSummary_
bool writeSummary_
Definition: SiPixelGainCalibrationAnalysis.h:97
DQMStore.h
SiPixelGainCalibrationAnalysis::newDetID
void newDetID(uint32_t detid) override
Definition: SiPixelGainCalibrationAnalysis.cc:469
SiPixelGainCalibrationAnalysis::useVcalHigh_
bool useVcalHigh_
Definition: SiPixelGainCalibrationAnalysis.h:113
EDAnalyzer.h
SiPixelGainCalibrationAnalysis::bookkeeper_pixels_
std::map< uint32_t, std::map< std::string, MonitorElement * > > bookkeeper_pixels_
Definition: SiPixelGainCalibrationAnalysis.h:69
SiPixelGainCalibrationAnalysis::reject_plateaupoints_
bool reject_plateaupoints_
Definition: SiPixelGainCalibrationAnalysis.h:82
SiPixelGainCalibrationAnalysis::pedlow_
float pedlow_
Definition: SiPixelGainCalibrationAnalysis.h:110
tools.TF1
TF1
Definition: tools.py:23
SiPixelGainCalibrationAnalysis::plateau_max_slope_
double plateau_max_slope_
Definition: SiPixelGainCalibrationAnalysis.h:84
SiPixelGainCalibrationAnalysis::bookkeeper_
std::map< uint32_t, std::map< std::string, MonitorElement * > > bookkeeper_
Definition: SiPixelGainCalibrationAnalysis.h:68
SiPixelGainCalibrationAnalysis::conf_
edm::ParameterSet conf_
Definition: SiPixelGainCalibrationAnalysis.h:66
SiPixelCalibConfiguration.h
SiPixelGainCalibrationAnalysis::recordName_
std::string recordName_
Definition: SiPixelGainCalibrationAnalysis.h:100
SiPixelGainCalibrationAnalysis::func_
TF1 * func_
Definition: SiPixelGainCalibrationAnalysis.h:74
SiPixelGainCalibrationAnalysis::summary_
std::ofstream summary_
Definition: SiPixelGainCalibrationAnalysis.h:117
MakerMacros.h
SiPixelGainCalibrationAnalysis::graph_
TGraphErrors * graph_
Definition: SiPixelGainCalibrationAnalysis.h:75
SiPixelGainCalibrationAnalysis::nfitparameters_
int nfitparameters_
Definition: SiPixelGainCalibrationAnalysis.h:72
SiPixelGainCalibrationAnalysis::statusNumbers_
int * statusNumbers_
Definition: SiPixelGainCalibrationAnalysis.h:119
SiPixelGainCalibrationAnalysis
Definition: SiPixelGainCalibrationAnalysis.h:47
SiPixelOfflineCalibAnalysisBase.h
SiPixelGainCalibrationAnalysis::min_nentries_
uint16_t min_nentries_
Definition: SiPixelGainCalibrationAnalysis.h:112
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
SiPixelGainCalibrationAnalysis::scalarVcalHigh_VcalLow_
double scalarVcalHigh_VcalLow_
Definition: SiPixelGainCalibrationAnalysis.h:114
Event.h
SiPixelGainCalibrationAnalysis::chi2Threshold_
double chi2Threshold_
Definition: SiPixelGainCalibrationAnalysis.h:89
SiPixelGainCalibrationAnalysis::reject_single_entries_
bool reject_single_entries_
Definition: SiPixelGainCalibrationAnalysis.h:83
SiPixelGainCalibrationAnalysis::savePixelHists_
bool savePixelHists_
Definition: SiPixelGainCalibrationAnalysis.h:88
SiPixelGainCalibrationAnalysis::calibrationEnd
void calibrationEnd() override
Definition: SiPixelGainCalibrationAnalysis.cc:167
edm::EventSetup
Definition: EventSetup.h:57
SiPixelGainCalibrationAnalysis::listofdetids_
std::vector< uint32_t > listofdetids_
Definition: SiPixelGainCalibrationAnalysis.h:77
SiPixelGainCalibrationAnalysis::checkCorrectCalibrationType
bool checkCorrectCalibrationType() override
Definition: SiPixelGainCalibrationAnalysis.cc:110
SiPixelGainCalibrationAnalysis::gainhi_
float gainhi_
Definition: SiPixelGainCalibrationAnalysis.h:109
SiPixelGainCalibrationAnalysis::fitfunction_
std::string fitfunction_
Definition: SiPixelGainCalibrationAnalysis.h:73
SiPixelGainCalibrationAnalysis::gainlow_
float gainlow_
Definition: SiPixelGainCalibrationAnalysis.h:108
SiPixelGainCalibrationAnalysis::doSetup
void doSetup(const edm::ParameterSet &)
Frameworkfwd.h
SiPixelGainCalibrationAnalysis::reject_badpoints_frac_
double reject_badpoints_frac_
Definition: SiPixelGainCalibrationAnalysis.h:86
SiPixelOfflineCalibAnalysisBase
Definition: SiPixelOfflineCalibAnalysisBase.h:65
SiPixelGainCalibrationAnalysis::filldb_
bool filldb_
Definition: SiPixelGainCalibrationAnalysis.h:96
SiPixelGainCalibrationAnalysis::~SiPixelGainCalibrationAnalysis
~SiPixelGainCalibrationAnalysis() override
Definition: SiPixelGainCalibrationAnalysis.cc:88
SiPixelGainCalibrationAnalysis::ignoreMode_
bool ignoreMode_
Definition: SiPixelGainCalibrationAnalysis.h:78
SiPixelGainCalibrationAnalysis::reject_first_point_
bool reject_first_point_
Definition: SiPixelGainCalibrationAnalysis.h:85
SiPixelGainCalibrationAnalysis::currentDetID_
uint32_t currentDetID_
Definition: SiPixelGainCalibrationAnalysis.h:118
ParameterSet.h
SiPixelGainCalibrationAnalysis::chi2ProbThreshold_
double chi2ProbThreshold_
Definition: SiPixelGainCalibrationAnalysis.h:90
SiPixelGainCalibrationAnalysis::CalculateAveragePerColumn
std::vector< float > CalculateAveragePerColumn(uint32_t detid, std::string label)
Definition: SiPixelGainCalibrationAnalysis.cc:93
SiPixelGainCalibrationAnalysis::reject_badpoints_
bool reject_badpoints_
Definition: SiPixelGainCalibrationAnalysis.h:81
SiPixelGainCalibrationAnalysis::calibrationSetup
void calibrationSetup(const edm::EventSetup &iSetup) override
Definition: SiPixelGainCalibrationAnalysis.cc:125
label
const char * label
Definition: PFTauDecayModeTools.cc:11
SiPixelGainCalibrationAnalysis::pedhi_
float pedhi_
Definition: SiPixelGainCalibrationAnalysis.h:111
SiPixelGainCalibrationAnalysis::sum_gain_cols_
bool sum_gain_cols_
Definition: SiPixelGainCalibrationAnalysis.h:95
SiPixelGainCalibrationAnalysis::doFits
bool doFits(uint32_t detid, std::vector< SiPixelCalibDigi >::const_iterator ipix) override
Definition: SiPixelGainCalibrationAnalysis.cc:185
SiPixelGainCalibrationAnalysis::maxChi2InHist_
double maxChi2InHist_
Definition: SiPixelGainCalibrationAnalysis.h:92