38 : runnumbers_(0), eventCounter_(0) {
47 esConsumes<SiPixelCalibConfiguration, SiPixelCalibConfigurationRcd, edm::Transition::BeginRun>();
48 calibToken_ = esConsumes<SiPixelCalibConfiguration, SiPixelCalibConfigurationRcd>();
50 cablingMapToken_ = esConsumes<SiPixelFedCablingMap, SiPixelFedCablingMapRcd>();
54 throw cms::Exception(
"") <<
"ERROR: Classes derived from SiPixelOfflineCalibAnalysisBase must call " 55 "SiPixelOfflineCalibAnalysisBase::SiPixelOfflineCalibAnalysisBase(const " 56 "edm::ParameterSet& iConfig) from their constructor." 85 bool foundnumber =
false;
86 for (
size_t iter = 0; iter <
runnumbers_.size() && !foundnumber; ++iter) {
102 for (digiIter = thePlaquettes->begin(); digiIter != thePlaquettes->end(); ++digiIter) {
103 uint32_t detId = digiIter->id;
112 for (ipix = digiIter->data.
begin(); ipix != digiIter->
end(); ++ipix) {
114 this->
doFits(detId, ipix);
126 std::cout <<
"!!!! in beginRun" << std::endl;
129 <<
" Vcal steps: " <<
vCalValues_.size() << std::endl;
155 std::map<uint32_t, std::string>::iterator detNameIter =
detIdNames_.find(detid);
157 return detNameIter->second;
161 uint32_t detSubId = detId.
subdetId();
162 if (detSubId > 2 || detSubId < 1) {
164 <<
"ERROR: Expected a pixel detector ID (1 - barrel, 2 - forward) but got " << detSubId << std::endl;
230 short row = ipix->row();
231 short col = ipix->col();
232 std::vector<uint8_t> nentries = ipix->getnentries();
233 std::vector<uint32_t> sum = ipix->getsum();
234 std::vector<uint32_t> sumquares = ipix->getsumsquares();
239 std::cout <<
"Row: " << row <<
" Col: " <<
col << std::endl;
240 for (
unsigned int i = 0;
i < sum.size();
i++) {
257 <<
"SiPixelOfflineCalibAnalysisBase - Found new DetID: " << detid <<
" Name: " <<
detIdNames_[detid];
284 short localrow = locpixel.
rocRow();
285 short localcol = locpixel.
rocCol();
291 for (
size_t irow = 0; irow < calibrows.size(); ++irow) {
292 if (calibrows[irow] == localrow) {
294 for (
size_t icol = 0; icol < calibcols.size(); ++icol) {
295 if (calibcols[icol] == localcol)
307 ele->
getTH1()->GetListOfFunctions()->Add(
func);
void beginRun(const edm::Run &, const edm::EventSetup &) override
~SiPixelOfflineCalibAnalysisBase() override
T getParameter(std::string const &) const
SiPixelFolderOrganizer * folderMaker_
void endRun(const edm::Run &, const edm::EventSetup &) override
edm::ESHandle< SiPixelCalibConfiguration > calib_
virtual int ncolumns() const =0
std::vector< short > getColumnPattern() const
std::string outputFileName_
void setCurrentFolder(std::string const &fullpath) override
virtual bool dirExists(std::string const &path) const
virtual int nrows() const =0
std::vector< short > getRowPattern() const
std::map< uint32_t, std::string > detIdNames_
std::string translateDetIdToString(uint32_t detid)
Log< level::Error, false > LogError
identify pixel inside single ROC
SiPixelOfflineCalibAnalysisBase()
edm::ESGetToken< SiPixelCalibConfiguration, SiPixelCalibConfigurationRcd > calibToken_
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * bookDQMHistogram1D(uint32_t detid, std::string name, std::string title, int nchX, double lowX, double highX)
edm::ESHandle< TrackerGeometry > geom_
virtual void calibrationSetup(const edm::EventSetup &iSetup)
T const * product() const
static TF1 * fitFunction_
std::string name() const override
from base class
bool setModuleFolder(const uint32_t &rawdetid=0, int type=0, bool isUpgrade=false)
Set folder name for a module or plaquette.
edm::InputTag siPixelCalibDigiProducer_
static std::vector< short > vCalValues_
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeomToken_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
const TrackerGeomDet * idToDet(DetId) const override
iterator end()
Return the off-the-end iterator.
virtual bool checkCorrectCalibrationType()
double collumn and pixel ID in double collumn representation
virtual void calibrationEnd()
MonitorElement * bookDQMHistoPlaquetteSummary2D(uint32_t detid, std::string name, std::string title)
std::string setHistoId(std::string variable, uint32_t &rawId)
Set Histogram Id.
Log< level::Info, false > LogInfo
std::vector< uint32_t > runnumbers_
std::map< uint32_t, int > detIdsEntered_
void analyze(const edm::Event &, const edm::EventSetup &) override
std::string name() const override
from base class
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcd > cablingMapToken_
edm::ESGetToken< SiPixelCalibConfiguration, SiPixelCalibConfigurationRcd > calibTokenBeginRun_
virtual TH1 * getTH1() const
DQM_DEPRECATED void save(std::string const &filename, std::string const &path="")
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
virtual bool doFits(uint32_t detid, std::vector< SiPixelCalibDigi >::const_iterator ipix)
static const std::vector< short > * getVcalValues()
std::string calibrationMode_
iterator begin()
Return an iterator to the first DetSet.
bool setDQMDirectory(std::string dirName)
bool checkPixel(uint32_t detid, short row, short column)
MonitorElement * bookDQMHistogram2D(uint32_t detid, std::string name, std::string title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
void addTF1ToDQMMonitoringElement(MonitorElement *ele, TF1 *func)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
collection_type::const_iterator const_iterator
collection_type::const_iterator const_iterator
virtual void newDetID(uint32_t detid)
edm::ESHandle< SiPixelFedCablingMap > theCablingMap_
SiPixelHistogramId * theHistogramIdWorker_
edm::EDGetTokenT< edm::DetSetVector< SiPixelCalibDigi > > tPixelCalibDigi