57 bool isHalfModule =
false;
67 std::string twodtitle =
"Number of Digis (1bin=four pixels)";
68 std::string pxtitle =
"Number of Digis (1bin=two columns)";
69 std::string pytitle =
"Number of Digis (1bin=two rows)";
70 std::string twodroctitle =
"ROC Occupancy (1bin=one ROC)";
71 std::string twodzeroOccroctitle =
"Zero Occupancy ROC Map (1bin=one ROC) for ";
75 twodtitle =
"Number of Digis (1bin=one pixel)";
76 pxtitle =
"Number of Digis (1bin=one column)";
77 pytitle =
"Number of Digis (1bin=one row)";
87 meADC_ = iBooker.
book1D(hid,
"Digi charge", 128, 0., 256.);
108 delete theHistogramId;
111 if (type == 1 && barrel) {
115 sprintf(sladder,
"Ladder_%02i", DBladder);
116 hid = src.
label() +
"_" + sladder;
125 meADCLad_ = iBooker.
book1D(
"adc_" + hid,
"Digi charge", 128, 0., 256.);
143 if (type == 2 && barrel) {
147 sprintf(slayer,
"Layer_%i", DBlayer);
148 hid = src.
label() +
"_" + slayer;
154 meADCLay_ = iBooker.
book1D(
"adc_" + hid,
"Digi charge", 128, 0., 256.);
158 if (twoD || additInfo) {
162 iBooker.
book2D(
"hitmap_" + hid, twodtitle, nbinx, 0.,
float(
ncols_), 2 * nbiny, 0.,
float(2 *
nrows_));
165 iBooker.
book2D(
"hitmap_" + hid, twodtitle, nbinx, 0.,
float(
ncols_), nbiny, 0.,
float(
nrows_));
171 int yROCbins[3] = {18, 30, 42};
177 yROCbins[DBlayer - 1],
179 1.5 +
float(yROCbins[DBlayer - 1] / 2));
183 twodzeroOccroctitle + hid,
187 yROCbins[DBlayer - 1],
189 1.5 +
float(yROCbins[DBlayer - 1] / 2));
193 if (!twoD && !additInfo) {
206 if (type == 3 && barrel) {
210 sprintf(smodule,
"Ring_%i", DBmodule);
211 hid = src.
label() +
"_" + smodule;
216 meADCPhi_ = iBooker.
book1D(
"adc_" + hid,
"Digi charge", 128, 0., 256.);
223 iBooker.
book2D(
"hitmap_" + hid, twodtitle, nbinx, 0.,
float(
ncols_), 2 * nbiny, 0.,
float(2 *
nrows_));
226 iBooker.
book2D(
"hitmap_" + hid, twodtitle, nbinx, 0.,
float(
ncols_), nbiny, 0.,
float(
nrows_));
244 if (type == 4 && endcap) {
249 sprintf(sblade,
"Blade_%02i", blade);
250 hid = src.
label() +
"_" + sblade;
258 if (type == 5 && endcap) {
263 sprintf(sdisk,
"Disk_%i", disk);
264 hid = src.
label() +
"_" + sdisk;
286 if (type == 6 && endcap) {
293 sprintf(slab,
"Panel_%i_Ring_%i", panel, module);
294 hid = src.
label() +
"_" + slab;
305 iBooker.
book2D(
"hitmap_" + hid, twodtitle, nbinx, 0.,
float(
ncols_), nbiny, 0.,
float(
nrows_));
327 std::vector<MonitorElement*>& chanBarrelL,
349 bool isHalfModule =
false;
350 uint32_t DBladder = 0;
358 unsigned int numberOfDigisMod = 0;
365 int numberOfDigis[msize];
366 for (
int i = 0;
i != msize;
i++)
367 numberOfDigis[
i] = 0;
370 if (isearch != input.
end()) {
374 for (di = isearch->data.
begin(); di != isearch->data.
end(); di++) {
376 int col = di->column();
431 }
else if (isUpgrade) {
473 if (ladon && barrel) {
484 if ((layon || twoDimOnlyLayDisk) &&
barrel) {
485 if (!twoDimOnlyLayDisk)
490 float rocx = (
float)col / 52. + 8.0 *
float(DBmodule - 1);
491 float rocy = (
float)row / 160. +
float(DBladder);
497 if (isHalfModule && DBladder == 1) {
502 if ((layon && !twoD) && !twoDimOnlyLayDisk) {
504 if (isHalfModule && DBladder == 1) {
511 if (phion && barrel) {
515 if (isHalfModule && DBladder == 1) {
521 if (isHalfModule && DBladder == 1) {
528 if (bladeon && endcap) {
532 if ((diskon || twoDimOnlyLayDisk) &&
endcap) {
533 if (!twoDimOnlyLayDisk)
535 if (twoDimOnlyLayDisk) {
544 for (
int i = DBpanel;
i < DBmodule; ++
i) {
545 offx = offx +
float(5 + DBpanel -
i);
547 float rocx = (
float)col / 52. + offx + 14.0 *
float(DBpanel - 1);
548 float rocy = (
float)row / 160. +
float(DBblade);
552 if (ringon && endcap) {
568 if (layon && barrel && !twoDimOnlyLayDisk)
572 if (bladeon && endcap)
574 if (diskon && endcap && !twoDimOnlyLayDisk)
576 if (ringon && endcap)
580 combBarrel->
Fill((
float)numberOfDigisMod);
582 if (numberOfDigis[0] > 0)
583 chanBarrel->
Fill((
float)numberOfDigis[0]);
584 if (numberOfDigis[1] > 0)
585 chanBarrel->
Fill((
float)numberOfDigis[1]);
588 for (std::vector<MonitorElement*>::iterator
i = chanBarrelL.begin();
i != chanBarrelL.end();
i++) {
589 if (numberOfDigis[j] > 0)
590 (*i)->Fill((
float)numberOfDigis[j]);
595 combEndcap->
Fill((
float)numberOfDigisMod);
600 return numberOfDigisMod;
632 return std::pair<int, int>(nZeroROC, nLoEffROC);
650 return std::pair<int, int>(nZeroROC, nLoEffROC);
652 return std::pair<int, int>(0, 0);
int plaquetteName() const
plaquetteId (in pannel)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX)
T getParameter(std::string const &) const
MonitorElement * meNDigisRing_
MonitorElement * mePixDigisLad_py_
MonitorElement * mePixDigis_
MonitorElement * mePixDigisPhi_py_
iterator find(det_id_type id)
virtual int getNbinsY() const
get # of bins in Y-axis
int moduleName() const
module id (index in z)
MonitorElement * meADCRing_
MonitorElement * meNDigis_
MonitorElement * mePixDigisRing_px_
MonitorElement * mePixDigis_py_
constexpr uint16_t localY(uint16_t py)
std::pair< int, int > getZeroLoEffROCs()
~SiPixelDigiModule()
Destructor.
MonitorElement * mePixDigisDisk_
static std::string const input
MonitorElement * meNDigisBlade_
virtual void Reset()
reset ME (ie. contents, errors, etc)
int bladeName() const
blade id
MonitorElement * meADCDisk_
MonitorElement * mePixDigisPhi_px_
bool isHalfModule() const
full or half module
virtual int getNbinsX() const
get # of bins in X-axis
MonitorElement * mePixDigisRing_py_
MonitorElement * mePixRocsDisk_
MonitorElement * mePixRocsLay_
MonitorElement * meZeroOccRocsLay_
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
virtual double getEntries() const
get # of entries
MonitorElement * mePixDigisLay_py_
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
MonitorElement * meADCLad_
MonitorElement * meADCBlade_
MonitorElement * meNDigisLay_
SiPixelDigiModule()
Default constructor.
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
MonitorElement * mePixDigisLad_
virtual double getBinContent(int binx) const
get content of bin (1-D)
iterator end()
Return the off-the-end iterator.
MonitorElement * meADCLay_
std::string setHistoId(std::string variable, uint32_t &rawId)
Set Histogram Id.
void book(const edm::ParameterSet &iConfig, const edm::EventSetup &iSetup, DQMStore::IBooker &iBooker, int type=0, bool twoD=true, bool hiRes=false, bool reducedSet=false, bool additInfo=false, bool isUpgrade=false)
Book histograms.
int ladderName() const
ladder id (index in phi)
MonitorElement * mePixDigis_px_
constexpr uint16_t localX(uint16_t px)
int layerName() const
layer id
MonitorElement * mePixDigisLad_px_
MonitorElement * mePixDigisLay_
MonitorElement * meNDigisPhi_
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
int pannelName() const
pannel id
MonitorElement * meZeroOccRocsDisk_
MonitorElement * mePixDigisRing_
MonitorElement * meADCPhi_
int diskName() const
disk id
iterator begin()
Return an iterator to the first DetSet.
int fill(const edm::DetSetVector< PixelDigi > &input, const edm::EventSetup &iSetup, MonitorElement *combBarrel, MonitorElement *chanBarrel, std::vector< MonitorElement * > &chanBarrelL, MonitorElement *combEndcap, const bool modon, const bool ladon, const bool layon, const bool phion, const bool bladeon, const bool diskon, const bool ringon, const bool twoD, const bool reducedSet, const bool twoDimModOn, const bool twoDimOnlyLayDisk, int &nDigisA, int &nDigisB, bool isUpgrade)
Fill histograms.
MonitorElement * mePixDigisPhi_
collection_type::const_iterator const_iterator
collection_type::const_iterator const_iterator
MonitorElement * meNDigisDisk_
T const * product() const
MonitorElement * meNDigisLad_
MonitorElement * mePixDigisLay_px_
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)