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)
289 if(converter.hasDetUnit(detid))
301 formatter.toCabling(cabling,detector);
309 short localrow = locpixel.
rocRow();
310 short localcol = locpixel.
rocCol();
313 std::vector<short> calibcols =
calib_->getColumnPattern();
314 std::vector<short> calibrows =
calib_->getRowPattern();
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
SiPixelFolderOrganizer * folderMaker_
edm::ESHandle< SiPixelCalibConfiguration > calib_
virtual int ncolumns() const =0
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::string outputFileName_
virtual void beginRun(const edm::Run &, const edm::EventSetup &)
#define DEFINE_FWK_MODULE(type)
virtual int nrows() const =0
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()
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_
static std::vector< short > vCalValues_
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
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_
virtual std::string name() const
from base class
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
T const * product() const
virtual std::string name() const
from base class
virtual bool doFits(uint32_t detid, std::vector< SiPixelCalibDigi >::const_iterator ipix)
void analyze(const edm::Event &, const edm::EventSetup &)
~SiPixelOfflineCalibAnalysisBase()
static const std::vector< short > * getVcalValues()
std::string calibrationMode_
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
virtual void newDetID(uint32_t detid)
edm::ESHandle< SiPixelFedCablingMap > theCablingMap_
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
const TrackerGeomDet * idToDet(DetId) const