49 throw cms::Exception(
"") <<
"ERROR: Classes derived from SiPixelOfflineCalibAnalysisBase must call SiPixelOfflineCalibAnalysisBase::SiPixelOfflineCalibAnalysisBase(const edm::ParameterSet& iConfig) from their constructor." << std::endl;
82 bool foundnumber=
false;
83 for(
size_t iter=0; iter<
runnumbers_.size() && !foundnumber; ++ iter){
99 for(digiIter=thePlaquettes->begin(); digiIter!=thePlaquettes->end(); ++digiIter)
101 uint32_t detId = digiIter->id;
111 for(ipix=digiIter->data.
begin(); ipix!=digiIter->
end(); ++ipix)
114 this->
doFits(detId, ipix);
130 std::cout <<
"!!!! in beginRun" << std::endl;
157 const std::vector<short>*
166 std::map<uint32_t, std::string>::iterator detNameIter =
detIdNames_.find(detid);
168 return detNameIter->second;
172 uint32_t detSubId = detId.
subdetId();
173 if (detSubId > 2 || detSubId < 1)
175 edm::LogError(
"SiPixelOfflineCalibAnalysisBase") <<
"ERROR: Expected a pixel detector ID (1 - barrel, 2 - forward) but got " << detSubId << std::endl;
181 output = nameworker.
name();
185 output = nameworker.
name();
194 return daqBE_->book1D(hid, title, nchX, lowX, highX);
200 return daqBE_->book1D(hid, title, nchX, xbinsize);
206 return daqBE_->book2D(hid, title, nchX, lowX, highX, nchY, lowY, highY);
218 return daqBE_->book2D(hid,title,maxcol,0,maxcol,maxrow,0,maxrow);
224 daqBE_->setCurrentFolder(dirName);
225 return daqBE_->dirExists(dirName);
245 short row=ipix->row();
246 short col=ipix->col();
247 std::vector<uint8_t> nentries = ipix->getnentries();
248 std::vector<uint32_t> sum = ipix->getsum();
249 std::vector<uint32_t> sumquares = ipix->getsumsquares();
254 std::cout <<
"Row: " << row <<
" Col: " << col << std::endl;
255 for (
unsigned int i = 0;
i < sum.size();
i++)
278 edm::LogInfo(
"SiPixelOfflineCalibAnalysisBase") <<
"SiPixelOfflineCalibAnalysisBase - Found new DetID: " << detid <<
" Name: " <<
detIdNames_[detid];
286 for(
int fedid=0; fedid<=40 && thefedid==-1; ++fedid)
301 formatter.toCabling(cabling,detector);
309 short localrow = locpixel.
rocRow();
310 short localcol = locpixel.
rocCol();
316 for(
size_t irow=0; irow<calibrows.size(); ++irow)
318 if(calibrows[irow]==localrow)
321 for(
size_t icol=0; icol<calibcols.size(); ++icol)
323 if(calibcols[icol]==localcol)
336 ele->
getTH1()->GetListOfFunctions()->Add(func);
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void beginRun(const edm::Run &, const edm::EventSetup &) override
virtual int nrows() const =0
~SiPixelOfflineCalibAnalysisBase() override
SiPixelFolderOrganizer * folderMaker_
std::vector< short > getRowPattern() const
edm::ESHandle< SiPixelCalibConfiguration > calib_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::string outputFileName_
#define DEFINE_FWK_MODULE(type)
std::map< uint32_t, std::string > detIdNames_
std::string translateDetIdToString(uint32_t detid)
MonitorElement * bookDQMHistoPlaquetteSummary2D(uint32_t detid, std::string name, std::string title)
identify pixel inside single ROC
SiPixelOfflineCalibAnalysisBase()
std::string name() const override
from base class
edm::ESHandle< TrackerGeometry > geom_
virtual void calibrationSetup(const edm::EventSetup &iSetup)
static TF1 * fitFunction_
bool setModuleFolder(const uint32_t &rawdetid=0, int type=0, bool isUpgrade=false)
Set folder name for a module or plaquette.
MonitorElement * bookDQMHistogram1D(uint32_t detid, std::string name, std::string title, int nchX, double lowX, double highX)
edm::InputTag siPixelCalibDigiProducer_
std::string name() const override
from base class
static std::vector< short > vCalValues_
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
iterator end()
Return the off-the-end iterator.
virtual bool checkCorrectCalibrationType()
double collumn and pixel ID in double collumn representation
virtual void calibrationEnd()
std::string setHistoId(std::string variable, uint32_t &rawId)
Set Histogram Id.
std::vector< uint32_t > runnumbers_
std::map< uint32_t, int > detIdsEntered_
void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< short > getColumnPattern() const
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
std::string getCalibrationMode() const
virtual int ncolumns() const =0
virtual bool doFits(uint32_t detid, std::vector< SiPixelCalibDigi >::const_iterator ipix)
const std::vector< short > getVCalValues() const
const TrackerGeomDet * idToDet(DetId) const override
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)
void addTF1ToDQMMonitoringElement(MonitorElement *ele, TF1 *func)
collection_type::const_iterator const_iterator
collection_type::const_iterator const_iterator
short getNTriggers() const
virtual void newDetID(uint32_t detid)
edm::ESHandle< SiPixelFedCablingMap > theCablingMap_
T const * product() const
SiPixelHistogramId * theHistogramIdWorker_
MonitorElement * bookDQMHistogram2D(uint32_t detid, std::string name, std::string title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
edm::EDGetTokenT< edm::DetSetVector< SiPixelCalibDigi > > tPixelCalibDigi