58 bool isHalfModule =
false;
62 }
else if (isUpgrade) {
72 std::string twodtitle =
"Number of Digis (1bin=four pixels)";
73 std::string pxtitle =
"Number of Digis (1bin=two columns)";
74 std::string pytitle =
"Number of Digis (1bin=two rows)";
75 std::string twodroctitle =
"ROC Occupancy (1bin=one ROC)";
76 std::string twodzeroOccroctitle =
"Zero Occupancy ROC Map (1bin=one ROC) for ";
80 twodtitle =
"Number of Digis (1bin=one pixel)";
81 pxtitle =
"Number of Digis (1bin=one column)";
82 pytitle =
"Number of Digis (1bin=one row)";
115 delete theHistogramId;
119 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){
155 char slayer[80]; sprintf(slayer,
"Layer_%i",DBlayer);
156 hid = src.
label() +
"_" + slayer;
166 if(twoD || additInfo){
179 int yROCbins[3] = {18,30,42};
180 mePixRocsLay_ = iBooker.
book2D(
"rocmap_"+hid,twodroctitle,32,0.,32.,yROCbins[DBlayer-1],1.5,1.5+
float(yROCbins[DBlayer-1]/2));
183 meZeroOccRocsLay_ = iBooker.
book2D(
"zeroOccROC_map",twodzeroOccroctitle+hid,32,0.,32.,yROCbins[DBlayer-1],1.5,1.5+
float(yROCbins[DBlayer-1]/2));
187 if(!twoD && !additInfo){
201 if(type==3 && barrel){
205 char smodule[80]; sprintf(smodule,
"Ring_%i",DBmodule);
206 hid = src.
label() +
"_" + smodule;
242 if(type==4 && endcap){
247 char sblade[80]; sprintf(sblade,
"Blade_%02i",blade);
248 hid = src.
label() +
"_" + sblade;
256 if(type==5 && endcap){
261 char sdisk[80]; sprintf(sdisk,
"Disk_%i",disk);
262 hid = src.
label() +
"_" + sdisk;
284 if(type==6 && endcap){
295 char slab[80]; sprintf(slab,
"Panel_%i_Ring_%i",panel, module);
296 hid = src.
label() +
"_" + slab;
329 bool modon,
bool ladon,
bool layon,
bool phion,
330 bool bladeon,
bool diskon,
bool ringon,
331 bool twoD,
bool reducedSet,
bool twoDimModOn,
bool twoDimOnlyLayDisk,
332 int &nDigisA,
int &nDigisB,
bool isUpgrade) {
335 bool isHalfModule =
false;
336 uint32_t DBladder = 0;
337 if(barrel && !isUpgrade){
340 }
else if (barrel && isUpgrade) {
347 unsigned int numberOfDigisMod = 0;
349 if (isUpgrade) {msize=10;}
else {msize=8;}
350 int numberOfDigis[msize];
for(
int i=0;
i!=msize;
i++) numberOfDigis[
i]=0;
351 nDigisA=0; nDigisB=0;
352 if( isearch != input.
end() ) {
356 for(di = isearch->data.
begin(); di != isearch->data.
end(); di++) {
358 int col = di->column();
372 numberOfDigis[0]++; nDigisA++;
373 if(DBlayer==1) numberOfDigis[2]++;
374 if(DBlayer==2) numberOfDigis[3]++;
375 if(DBlayer==3) numberOfDigis[4]++;
378 numberOfDigis[1]++; nDigisB++;
379 if(DBlayer==1) numberOfDigis[5]++;
380 if(DBlayer==2) numberOfDigis[6]++;
381 if(DBlayer==3) numberOfDigis[7]++;
385 numberOfDigis[0]++; nDigisA++;
386 if(DBlayer==1) numberOfDigis[2]++;
387 if(DBlayer==2) numberOfDigis[3]++;
388 if(DBlayer==3) numberOfDigis[4]++;
390 numberOfDigis[1]++; nDigisB++;
391 if(DBlayer==1) numberOfDigis[5]++;
392 if(DBlayer==2) numberOfDigis[6]++;
393 if(DBlayer==3) numberOfDigis[7]++;
397 }
else if (isUpgrade) {
403 numberOfDigis[0]++; nDigisA++;
404 if(DBlayer==1) numberOfDigis[2]++;
405 if(DBlayer==2) numberOfDigis[3]++;
406 if(DBlayer==3) numberOfDigis[4]++;
407 if(DBlayer==4) numberOfDigis[5]++;
409 numberOfDigis[1]++; nDigisB++;
410 if(DBlayer==1) numberOfDigis[6]++;
411 if(DBlayer==2) numberOfDigis[7]++;
412 if(DBlayer==3) numberOfDigis[8]++;
413 if(DBlayer==4) numberOfDigis[9]++;
440 if((layon || twoDimOnlyLayDisk) &&
barrel){
443 if((layon && twoD) || twoDimOnlyLayDisk){
445 float rocx = (float)col/52. + 8.0*
float(DBmodule-1);
446 float rocy = (float)row/160.+
float(DBladder);
448 if(DBladder==1) rocy = rocy + 0.5;
451 if(isHalfModule && DBladder==1){
456 if((layon && !twoD) && !twoDimOnlyLayDisk){
458 if(isHalfModule && DBladder==1) {
470 if(isHalfModule && DBladder==1){
477 if(isHalfModule && DBladder==1) {
484 if(bladeon && endcap){
488 if((diskon || twoDimOnlyLayDisk) &&
endcap){
490 if(twoDimOnlyLayDisk){
504 for (
int i = DBpanel;
i < DBmodule; ++
i) {offx = offx + float(5+DBpanel-
i);}
505 float rocx = (float)col/52. + offx + 14.0*
float(DBpanel-1);
506 float rocy = (float)row/160.+
float(DBblade);
510 if(ringon && endcap){
524 if(layon && barrel && !twoDimOnlyLayDisk) (
meNDigisLay_)->
Fill((
float)numberOfDigisMod);
527 if(diskon && endcap && !twoDimOnlyLayDisk) (
meNDigisDisk_)->
Fill((
float)numberOfDigisMod);
530 if(combBarrel) combBarrel->
Fill((
float)numberOfDigisMod);
531 if(chanBarrel){
if(numberOfDigis[0]>0) chanBarrel->
Fill((
float)numberOfDigis[0]);
if(numberOfDigis[1]>0) chanBarrel->
Fill((
float)numberOfDigis[1]); }
532 if(chanBarrelL1){
if(numberOfDigis[2]>0) chanBarrelL1->
Fill((
float)numberOfDigis[2]); }
533 if(chanBarrelL2){
if(numberOfDigis[3]>0) chanBarrelL2->
Fill((
float)numberOfDigis[3]); }
534 if(chanBarrelL3){
if(numberOfDigis[4]>0) chanBarrelL3->
Fill((
float)numberOfDigis[4]); }
535 if(chanBarrelL4){
if(numberOfDigis[5]>0) chanBarrelL4->
Fill((
float)numberOfDigis[5]); }
537 if(combEndcap) combEndcap->
Fill((
float)numberOfDigisMod);
542 return numberOfDigisMod;
560 float localX = float(
i) - 0.5;
561 float localY = float(
j)/2.0 + 0.75;
566 return std::pair<int,int>(nZeroROC,nLoEffROC);
572 float localX = float(
i) - 0.5;
573 float localY = float(
j)/2.0 + 1.25;
578 return std::pair<int,int>(nZeroROC,nLoEffROC);
580 return std::pair<int,int>(0,0);
int adc(sample_type sample)
get the ADC sample (12 bits)
int plaquetteName() const
plaquetteId (in pannel)
int fill(const edm::DetSetVector< PixelDigi > &input, MonitorElement *combBarrel, MonitorElement *chanBarrel, MonitorElement *chanBarrelL1, MonitorElement *chanBarrelL2, MonitorElement *chanBarrelL3, MonitorElement *chanBarrelL4, 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.
T getParameter(std::string const &) const
MonitorElement * meNDigisRing_
MonitorElement * mePixDigisLad_py_
MonitorElement * mePixDigis_
MonitorElement * mePixDigisPhi_py_
void book(const edm::ParameterSet &iConfig, DQMStore::IBooker &iBooker, int type=0, bool twoD=true, bool hiRes=false, bool reducedSet=false, bool additInfo=false, bool isUpgrade=false)
Book histograms.
iterator find(det_id_type id)
int moduleName() const
module id (index in z)
MonitorElement * meADCRing_
MonitorElement * meNDigis_
MonitorElement * mePixDigisRing_px_
MonitorElement * mePixDigis_py_
bool isHalfModule() const
full or half module
std::pair< int, int > getZeroLoEffROCs()
~SiPixelDigiModule()
Destructor.
double getEntries(void) const
get # of entries
MonitorElement * mePixDigisDisk_
int plaquetteName() const
plaquetteId (in pannel)
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.
int bladeName() const
blade id
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_
int diskName() const
disk id
std::string setHistoId(std::string variable, uint32_t &rawId)
Set Histogram Id.
int ladderName() const
ladder id (index in phi)
int ladderName() const
ladder id (index in phi)
MonitorElement * book2D(Args &&...args)
MonitorElement * mePixDigis_px_
int moduleName() const
module id (index in z)
int layerName() const
layer id
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.
MonitorElement * mePixDigisPhi_
collection_type::const_iterator const_iterator
collection_type::const_iterator const_iterator
MonitorElement * meNDigisDisk_
int pannelName() const
pannel id
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)
int layerName() const
layer id
MonitorElement * meNDigisLad_
MonitorElement * mePixDigisLay_px_