48 throw cms::Exception(
"") <<
"ERROR: Classes derived from SiPixelOfflineCalibAnalysisBase must call SiPixelOfflineCalibAnalysisBase::SiPixelOfflineCalibAnalysisBase(const edm::ParameterSet& iConfig) from their constructor." << std::endl;
81 bool foundnumber=
false;
82 for(
size_t iter=0; iter<
runnumbers_.size() && !foundnumber; ++ iter){
98 for(digiIter=thePlaquettes->begin(); digiIter!=thePlaquettes->end(); ++digiIter)
100 uint32_t detId = digiIter->id;
110 for(ipix=digiIter->
data.begin(); ipix!=digiIter->
end(); ++ipix)
113 this->
doFits(detId, ipix);
129 std::cout <<
"!!!! in beginRun" << std::endl;
156 const std::vector<short>*
165 std::map<uint32_t, std::string>::iterator detNameIter =
detIdNames_.find(detid);
167 return detNameIter->second;
169 std::string
output =
"DetID translation error";
171 uint32_t detSubId = detId.
subdetId();
172 if (detSubId > 2 || detSubId < 1)
174 edm::LogError(
"SiPixelOfflineCalibAnalysisBase") <<
"ERROR: Expected a pixel detector ID (1 - barrel, 2 - forward) but got " << detSubId << std::endl;
180 output = nameworker.
name();
184 output = nameworker.
name();
205 return daqBE_->
book2D(hid, title, nchX, lowX, highX, nchY, lowY, highY);
217 return daqBE_->
book2D(hid,title,maxcol,0,maxcol,maxrow,0,maxrow);
244 short row=ipix->row();
245 short col=ipix->col();
246 std::vector<uint8_t> nentries = ipix->getnentries();
247 std::vector<uint32_t> sum = ipix->getsum();
248 std::vector<uint32_t> sumquares = ipix->getsumsquares();
253 std::cout <<
"Row: " << row <<
" Col: " << col << std::endl;
254 for (
unsigned int i = 0;
i < sum.size();
i++)
277 edm::LogInfo(
"SiPixelOfflineCalibAnalysisBase") <<
"SiPixelOfflineCalibAnalysisBase - Found new DetID: " << detid <<
" Name: " <<
detIdNames_[
detid];
285 for(
int fedid=0; fedid<=40 && thefedid==-1; ++fedid)
288 if(converter.hasDetUnit(detid))
300 formatter.toCabling(cabling,detector);
308 short localrow = locpixel.
rocRow();
309 short localcol = locpixel.
rocCol();
312 std::vector<short> calibcols =
calib_->getColumnPattern();
313 std::vector<short> calibrows =
calib_->getRowPattern();
315 for(
size_t irow=0; irow<calibrows.size(); ++irow)
317 if(calibrows[irow]==localrow)
320 for(
size_t icol=0; icol<calibcols.size(); ++icol)
322 if(calibcols[icol]==localcol)
335 ele->
getTH1()->GetListOfFunctions()->Add(func);
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
SiPixelFolderOrganizer * folderMaker_
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
edm::ESHandle< SiPixelCalibConfiguration > calib_
virtual int ncolumns() const =0
std::string outputFileName_
virtual void beginRun(const edm::Run &, const edm::EventSetup &)
#define DEFINE_FWK_MODULE(type)
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
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_
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 const GeomDet * idToDet(DetId) const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual bool checkCorrectCalibrationType()
double collumn and pixel ID in double collumn representation
virtual void calibrationEnd()
bool dirExists(const std::string &path) const
true if directory exists
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
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
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)
void setCurrentFolder(const std::string &fullpath)
bool setModuleFolder(const uint32_t &rawdetid=0, int type=0)
Set folder name for a module or plaquette.