|
|
Go to the documentation of this file.
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;
152 std::map<uint32_t, std::string>::iterator detNameIter =
detIdNames_.find(detid);
154 return detNameIter->second;
158 uint32_t detSubId = detId.
subdetId();
159 if (detSubId > 2 || detSubId < 1) {
161 <<
"ERROR: Expected a pixel detector ID (1 - barrel, 2 - forward) but got " << detSubId << std::endl;
227 short row = ipix->row();
228 short col = ipix->col();
229 std::vector<uint8_t> nentries = ipix->getnentries();
230 std::vector<uint32_t> sum = ipix->getsum();
231 std::vector<uint32_t> sumquares = ipix->getsumsquares();
236 std::cout <<
"Row: " << row <<
" Col: " <<
col << std::endl;
237 for (
unsigned int i = 0;
i < sum.size();
i++) {
254 <<
"SiPixelOfflineCalibAnalysisBase - Found new DetID: " << detid <<
" Name: " <<
detIdNames_[detid];
273 formatter.toCabling(cabling,
detector);
281 short localrow = locpixel.
rocRow();
282 short localcol = locpixel.
rocCol();
288 for (
size_t irow = 0; irow < calibrows.size(); ++irow) {
289 if (calibrows[irow] == localrow) {
291 for (
size_t icol = 0; icol < calibcols.size(); ++icol) {
292 if (calibcols[icol] == localcol)
304 ele->
getTH1()->GetListOfFunctions()->Add(
func);
const TrackerGeomDet * idToDet(DetId) const override
edm::EDGetTokenT< edm::DetSetVector< SiPixelCalibDigi > > tPixelCalibDigi
T const * product() const
std::string outputFileName_
void addTF1ToDQMMonitoringElement(MonitorElement *ele, TF1 *func)
std::string translateDetIdToString(uint32_t detid)
virtual bool doFits(uint32_t detid, std::vector< SiPixelCalibDigi >::const_iterator ipix)
edm::ESHandle< SiPixelCalibConfiguration > calib_
std::string calibrationMode_
iterator end()
Return the off-the-end iterator.
bool setModuleFolder(const uint32_t &rawdetid=0, int type=0, bool isUpgrade=false)
Set folder name for a module or plaquette.
static TF1 * fitFunction_
std::map< uint32_t, std::string > detIdNames_
SiPixelOfflineCalibAnalysisBase()
iterator begin()
Return an iterator to the first DetSet.
MonitorElement * bookDQMHistogram1D(uint32_t detid, std::string name, std::string title, int nchX, double lowX, double highX)
T getUntrackedParameter(std::string const &, T const &) const
Log< level::Info, false > LogInfo
virtual void calibrationSetup(const edm::EventSetup &iSetup)
SiPixelFolderOrganizer * folderMaker_
static std::vector< short > vCalValues_
identify pixel inside single ROC
std::string name() const override
from base class
std::string setHistoId(std::string variable, uint32_t &rawId)
Set Histogram Id.
virtual int ncolumns() const =0
edm::ESHandle< TrackerGeometry > geom_
void setCurrentFolder(std::string const &fullpath) override
DQM_DEPRECATED void save(std::string const &filename, std::string const &path="")
MonitorElement * bookDQMHistoPlaquetteSummary2D(uint32_t detid, std::string name, std::string title)
virtual TH1 * getTH1() const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > trackerGeomToken_
double collumn and pixel ID in double collumn representation
virtual void calibrationEnd()
collection_type::const_iterator const_iterator
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
edm::ESGetToken< SiPixelCalibConfiguration, SiPixelCalibConfigurationRcd > calibToken_
bool setDQMDirectory(std::string dirName)
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
void analyze(const edm::Event &, const edm::EventSetup &) override
edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcd > cablingMapToken_
Log< level::Error, false > LogError
std::vector< uint32_t > runnumbers_
edm::InputTag siPixelCalibDigiProducer_
virtual void newDetID(uint32_t detid)
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
std::vector< short > getColumnPattern() const
virtual bool checkCorrectCalibrationType()
T getParameter(std::string const &) const
edm::ESHandle< SiPixelFedCablingMap > theCablingMap_
static const std::vector< short > * getVcalValues()
bool checkPixel(uint32_t detid, short row, short column)
std::vector< short > getRowPattern() const
std::string name() const override
from base class
std::map< uint32_t, int > detIdsEntered_
virtual int nrows() const =0
MonitorElement * bookDQMHistogram2D(uint32_t detid, std::string name, std::string title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
virtual bool dirExists(std::string const &path) const
edm::ESGetToken< SiPixelCalibConfiguration, SiPixelCalibConfigurationRcd > calibTokenBeginRun_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
void beginRun(const edm::Run &, const edm::EventSetup &) override
SiPixelHistogramId * theHistogramIdWorker_
~SiPixelOfflineCalibAnalysisBase() override
collection_type::const_iterator const_iterator