37 : runnumbers_(0), eventCounter_(0) {
47 throw cms::Exception(
"") <<
"ERROR: Classes derived from SiPixelOfflineCalibAnalysisBase must call " 48 "SiPixelOfflineCalibAnalysisBase::SiPixelOfflineCalibAnalysisBase(const " 49 "edm::ParameterSet& iConfig) from their constructor." 78 bool foundnumber =
false;
79 for (
size_t iter = 0; iter <
runnumbers_.size() && !foundnumber; ++iter) {
95 for (digiIter = thePlaquettes->begin(); digiIter != thePlaquettes->end(); ++digiIter) {
96 uint32_t detId = digiIter->id;
105 for (ipix = digiIter->data.
begin(); ipix != digiIter->
end(); ++ipix) {
107 this->
doFits(detId, ipix);
121 std::cout <<
"!!!! in beginRun" << std::endl;
124 <<
" Vcal steps: " <<
vCalValues_.size() << std::endl;
147 std::map<uint32_t, std::string>::iterator detNameIter =
detIdNames_.find(detid);
149 return detNameIter->second;
153 uint32_t detSubId = detId.
subdetId();
154 if (detSubId > 2 || detSubId < 1) {
156 <<
"ERROR: Expected a pixel detector ID (1 - barrel, 2 - forward) but got " << detSubId << std::endl;
162 output = nameworker.
name();
166 output = nameworker.
name();
194 return daqBE_->
book2D(hid, title, nchX, lowX, highX, nchY, lowY, highY);
206 return daqBE_->
book2D(hid, title, maxcol, 0, maxcol, maxrow, 0, maxrow);
222 short row = ipix->row();
223 short col = ipix->col();
224 std::vector<uint8_t> nentries = ipix->getnentries();
225 std::vector<uint32_t> sum = ipix->getsum();
226 std::vector<uint32_t> sumquares = ipix->getsumsquares();
231 std::cout <<
"Row: " << row <<
" Col: " << col << std::endl;
232 for (
unsigned int i = 0;
i < sum.size();
i++) {
249 <<
"SiPixelOfflineCalibAnalysisBase - Found new DetID: " << detid <<
" Name: " <<
detIdNames_[detid];
268 formatter.toCabling(cabling, detector);
276 short localrow = locpixel.
rocRow();
277 short localcol = locpixel.
rocCol();
283 for (
size_t irow = 0; irow < calibrows.size(); ++irow) {
284 if (calibrows[irow] == localrow) {
286 for (
size_t icol = 0; icol < calibcols.size(); ++icol) {
287 if (calibcols[icol] == localcol)
299 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
MonitorElement * book2D(char_string const &name, char_string const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
edm::ESHandle< SiPixelCalibConfiguration > calib_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::string outputFileName_
std::map< uint32_t, std::string > detIdNames_
std::string translateDetIdToString(uint32_t detid)
identify pixel inside single ROC
SiPixelOfflineCalibAnalysisBase()
std::string name() const override
from base class
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)
static TF1 * fitFunction_
bool setModuleFolder(const uint32_t &rawdetid=0, int type=0, bool isUpgrade=false)
Set folder name for a module or plaquette.
edm::InputTag siPixelCalibDigiProducer_
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
std::string name() const override
from base class
static std::vector< short > vCalValues_
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.
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.
void setCurrentFolder(std::string const &fullpath)
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()
MonitorElement * book1D(char_string const &name, char_string const &title, int const nchX, double const lowX, double const highX)
Book 1D histogram.
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)
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_
virtual TH1 * getTH1() const
void save(std::string const &filename, std::string const &path="", std::string const &pattern="", std::string const &rewrite="", uint32_t run=0, uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, std::string const &fileupdate="RECREATE")
edm::EDGetTokenT< edm::DetSetVector< SiPixelCalibDigi > > tPixelCalibDigi
bool dirExists(std::string const &path) const
true if directory exists