63 bool isHalfModule =
false;
73 std::string twodtitle =
"Number of Digis (1bin=four pixels)";
74 std::string pxtitle =
"Number of Digis (1bin=two columns)";
75 std::string pytitle =
"Number of Digis (1bin=two rows)";
76 std::string twodroctitle =
"ROC Occupancy (1bin=one ROC)";
77 std::string twodzeroOccroctitle =
"Zero Occupancy ROC Map (1bin=one ROC) for ";
81 twodtitle =
"Number of Digis (1bin=one pixel)";
82 pxtitle =
"Number of Digis (1bin=one column)";
83 pytitle =
"Number of Digis (1bin=one row)";
116 delete theHistogramId;
120 if(type==1 && barrel){
123 char sladder[80]; sprintf(sladder,
"Ladder_%02i",DBladder);
124 hid = src.
label() +
"_" + sladder;
125 if(isHalfModule) hid +=
"H";
151 if(type==2 && barrel){
154 char slayer[80]; sprintf(slayer,
"Layer_%i",DBlayer);
155 hid = src.
label() +
"_" + slayer;
165 if(twoD || additInfo){
178 int yROCbins[3] = {18,30,42};
179 mePixRocsLay_ = iBooker.
book2D(
"rocmap_"+hid,twodroctitle,32,0.,32.,yROCbins[DBlayer-1],1.5,1.5+
float(yROCbins[DBlayer-1]/2));
182 meZeroOccRocsLay_ = iBooker.
book2D(
"zeroOccROC_map",twodzeroOccroctitle+hid,32,0.,32.,yROCbins[DBlayer-1],1.5,1.5+
float(yROCbins[DBlayer-1]/2));
186 if(!twoD && !additInfo){
200 if(type==3 && barrel){
203 char smodule[80]; sprintf(smodule,
"Ring_%i",DBmodule);
204 hid = src.
label() +
"_" + smodule;
240 if(type==4 && endcap){
244 char sblade[80]; sprintf(sblade,
"Blade_%02i",blade);
245 hid = src.
label() +
"_" + sblade;
253 if(type==5 && endcap){
257 char sdisk[80]; sprintf(sdisk,
"Disk_%i",disk);
258 hid = src.
label() +
"_" + sdisk;
280 if(type==6 && endcap){
286 char slab[80]; sprintf(slab,
"Panel_%i_Ring_%i",panel, module);
287 hid = src.
label() +
"_" + slab;
320 bool modon,
bool ladon,
bool layon,
bool phion,
321 bool bladeon,
bool diskon,
bool ringon,
322 bool twoD,
bool reducedSet,
bool twoDimModOn,
bool twoDimOnlyLayDisk,
323 int &nDigisA,
int &nDigisB,
bool isUpgrade) {
330 bool isHalfModule =
false;
331 uint32_t DBladder = 0;
339 unsigned int numberOfDigisMod = 0;
341 if (isUpgrade) {msize=10;}
else {msize=8;}
342 int numberOfDigis[msize];
for(
int i=0;
i!=msize;
i++) numberOfDigis[
i]=0;
343 nDigisA=0; nDigisB=0;
344 if( isearch != input.
end() ) {
348 for(di = isearch->data.
begin(); di != isearch->data.
end(); di++) {
350 int col = di->column();
364 numberOfDigis[0]++; nDigisA++;
365 if(DBlayer==1) numberOfDigis[2]++;
366 if(DBlayer==2) numberOfDigis[3]++;
367 if(DBlayer==3) numberOfDigis[4]++;
370 numberOfDigis[1]++; nDigisB++;
371 if(DBlayer==1) numberOfDigis[5]++;
372 if(DBlayer==2) numberOfDigis[6]++;
373 if(DBlayer==3) numberOfDigis[7]++;
377 numberOfDigis[0]++; nDigisA++;
378 if(DBlayer==1) numberOfDigis[2]++;
379 if(DBlayer==2) numberOfDigis[3]++;
380 if(DBlayer==3) numberOfDigis[4]++;
382 numberOfDigis[1]++; nDigisB++;
383 if(DBlayer==1) numberOfDigis[5]++;
384 if(DBlayer==2) numberOfDigis[6]++;
385 if(DBlayer==3) numberOfDigis[7]++;
389 }
else if (isUpgrade) {
394 numberOfDigis[0]++; nDigisA++;
395 if(DBlayer==1) numberOfDigis[2]++;
396 if(DBlayer==2) numberOfDigis[3]++;
397 if(DBlayer==3) numberOfDigis[4]++;
398 if(DBlayer==4) numberOfDigis[5]++;
400 numberOfDigis[1]++; nDigisB++;
401 if(DBlayer==1) numberOfDigis[6]++;
402 if(DBlayer==2) numberOfDigis[7]++;
403 if(DBlayer==3) numberOfDigis[8]++;
404 if(DBlayer==4) numberOfDigis[9]++;
431 if((layon || twoDimOnlyLayDisk) &&
barrel){
434 if((layon && twoD) || twoDimOnlyLayDisk){
436 float rocx = (float)col/52. + 8.0*
float(DBmodule-1);
437 float rocy = (float)row/160.+
float(DBladder);
439 if(DBladder==1) rocy = rocy + 0.5;
442 if(isHalfModule && DBladder==1){
447 if((layon && !twoD) && !twoDimOnlyLayDisk){
449 if(isHalfModule && DBladder==1) {
461 if(isHalfModule && DBladder==1){
468 if(isHalfModule && DBladder==1) {
475 if(bladeon && endcap){
479 if((diskon || twoDimOnlyLayDisk) &&
endcap){
481 if(twoDimOnlyLayDisk){
490 for (
int i = DBpanel;
i < DBmodule; ++
i) {offx = offx + float(5+DBpanel-
i);}
491 float rocx = (float)col/52. + offx + 14.0*
float(DBpanel-1);
492 float rocy = (float)row/160.+
float(DBblade);
496 if(ringon && endcap){
510 if(layon && barrel && !twoDimOnlyLayDisk) (
meNDigisLay_)->
Fill((
float)numberOfDigisMod);
513 if(diskon && endcap && !twoDimOnlyLayDisk) (
meNDigisDisk_)->
Fill((
float)numberOfDigisMod);
516 if(combBarrel) combBarrel->
Fill((
float)numberOfDigisMod);
517 if(chanBarrel){
if(numberOfDigis[0]>0) chanBarrel->
Fill((
float)numberOfDigis[0]);
if(numberOfDigis[1]>0) chanBarrel->
Fill((
float)numberOfDigis[1]); }
519 for (std::vector<MonitorElement*>::iterator
i = chanBarrelL.begin();
i != chanBarrelL.end();
i++)
521 if(numberOfDigis[j]>0) (*i)->Fill((
float)numberOfDigis[j]);
525 if(combEndcap) combEndcap->
Fill((
float)numberOfDigisMod);
530 return numberOfDigisMod;
548 float localX = float(
i) - 0.5;
549 float localY = float(
j)/2.0 + 0.75;
554 return std::pair<int,int>(nZeroROC,nLoEffROC);
560 float localX = float(
i) - 0.5;
561 float localY = float(
j)/2.0 + 1.25;
566 return std::pair<int,int>(nZeroROC,nLoEffROC);
568 return std::pair<int,int>(0,0);
int adc(sample_type sample)
get the ADC sample (12 bits)
int plaquetteName() const
plaquetteId (in pannel)
T getParameter(std::string const &) const
MonitorElement * meNDigisRing_
MonitorElement * mePixDigisLad_py_
MonitorElement * mePixDigis_
MonitorElement * mePixDigisPhi_py_
iterator find(det_id_type id)
int moduleName() const
module id (index in z)
MonitorElement * meADCRing_
MonitorElement * meNDigis_
MonitorElement * mePixDigisRing_px_
MonitorElement * mePixDigis_py_
std::pair< int, int > getZeroLoEffROCs()
~SiPixelDigiModule()
Destructor.
double getEntries(void) const
get # of entries
MonitorElement * mePixDigisDisk_
static std::string const input
int getNbinsY(void) const
get # of bins in Y-axis
MonitorElement * meNDigisBlade_
int bladeName() const
blade id
MonitorElement * meADCDisk_
MonitorElement * mePixDigisPhi_px_
bool isHalfModule() const
full or half module
MonitorElement * mePixDigisRing_py_
MonitorElement * mePixRocsDisk_
MonitorElement * mePixRocsLay_
MonitorElement * meZeroOccRocsLay_
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * mePixDigisLay_py_
MonitorElement * book1D(Args &&...args)
MonitorElement * meADCLad_
MonitorElement * meADCBlade_
MonitorElement * meNDigisLay_
SiPixelDigiModule()
Default constructor.
MonitorElement * mePixDigisLad_
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
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 * book2D(Args &&...args)
MonitorElement * mePixDigis_px_
int layerName() const
layer id
T const * product() const
MonitorElement * mePixDigisLad_px_
MonitorElement * mePixDigisLay_
MonitorElement * meNDigisPhi_
double getBinContent(int binx) const
get content of bin (1-D)
int pannelName() const
pannel id
MonitorElement * meZeroOccRocsDisk_
int getNbinsX(void) const
get # of bins in X-axis
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_
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void Reset(void)
reset ME (ie. contents, errors, etc)
MonitorElement * meNDigisLad_
MonitorElement * mePixDigisLay_px_