62 bool isHalfModule =
false;
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){
122 char sladder[80]; sprintf(sladder,
"Ladder_%02i",DBladder);
123 hid = src.
label() +
"_" + sladder;
124 if(isHalfModule) hid +=
"H";
150 if(type==2 && barrel){
153 char slayer[80]; sprintf(slayer,
"Layer_%i",DBlayer);
154 hid = src.
label() +
"_" + slayer;
164 if(twoD || additInfo){
177 int yROCbins[3] = {18,30,42};
178 mePixRocsLay_ = iBooker.
book2D(
"rocmap_"+hid,twodroctitle,32,0.,32.,yROCbins[DBlayer-1],1.5,1.5+
float(yROCbins[DBlayer-1]/2));
181 meZeroOccRocsLay_ = iBooker.
book2D(
"zeroOccROC_map",twodzeroOccroctitle+hid,32,0.,32.,yROCbins[DBlayer-1],1.5,1.5+
float(yROCbins[DBlayer-1]/2));
185 if(!twoD && !additInfo){
199 if(type==3 && barrel){
202 char smodule[80]; sprintf(smodule,
"Ring_%i",DBmodule);
203 hid = src.
label() +
"_" + smodule;
239 if(type==4 && endcap){
243 char sblade[80]; sprintf(sblade,
"Blade_%02i",blade);
244 hid = src.
label() +
"_" + sblade;
252 if(type==5 && endcap){
256 char sdisk[80]; sprintf(sdisk,
"Disk_%i",disk);
257 hid = src.
label() +
"_" + sdisk;
279 if(type==6 && endcap){
285 char slab[80]; sprintf(slab,
"Panel_%i_Ring_%i",panel, module);
286 hid = src.
label() +
"_" + slab;
319 bool modon,
bool ladon,
bool layon,
bool phion,
320 bool bladeon,
bool diskon,
bool ringon,
321 bool twoD,
bool reducedSet,
bool twoDimModOn,
bool twoDimOnlyLayDisk,
322 int &nDigisA,
int &nDigisB,
bool isUpgrade) {
329 bool isHalfModule =
false;
330 uint32_t DBladder = 0;
338 unsigned int numberOfDigisMod = 0;
340 if (isUpgrade) {msize=10;}
else {msize=8;}
341 int numberOfDigis[msize];
for(
int i=0;
i!=msize;
i++) numberOfDigis[
i]=0;
342 nDigisA=0; nDigisB=0;
343 if( isearch != input.
end() ) {
347 for(di = isearch->data.
begin(); di != isearch->data.
end(); di++) {
349 int col = di->column();
363 numberOfDigis[0]++; nDigisA++;
364 if(DBlayer==1) numberOfDigis[2]++;
365 if(DBlayer==2) numberOfDigis[3]++;
366 if(DBlayer==3) numberOfDigis[4]++;
369 numberOfDigis[1]++; nDigisB++;
370 if(DBlayer==1) numberOfDigis[5]++;
371 if(DBlayer==2) numberOfDigis[6]++;
372 if(DBlayer==3) numberOfDigis[7]++;
376 numberOfDigis[0]++; nDigisA++;
377 if(DBlayer==1) numberOfDigis[2]++;
378 if(DBlayer==2) numberOfDigis[3]++;
379 if(DBlayer==3) numberOfDigis[4]++;
381 numberOfDigis[1]++; nDigisB++;
382 if(DBlayer==1) numberOfDigis[5]++;
383 if(DBlayer==2) numberOfDigis[6]++;
384 if(DBlayer==3) numberOfDigis[7]++;
388 }
else if (isUpgrade) {
393 numberOfDigis[0]++; nDigisA++;
394 if(DBlayer==1) numberOfDigis[2]++;
395 if(DBlayer==2) numberOfDigis[3]++;
396 if(DBlayer==3) numberOfDigis[4]++;
397 if(DBlayer==4) numberOfDigis[5]++;
399 numberOfDigis[1]++; nDigisB++;
400 if(DBlayer==1) numberOfDigis[6]++;
401 if(DBlayer==2) numberOfDigis[7]++;
402 if(DBlayer==3) numberOfDigis[8]++;
403 if(DBlayer==4) numberOfDigis[9]++;
430 if((layon || twoDimOnlyLayDisk) &&
barrel){
433 if((layon && twoD) || twoDimOnlyLayDisk){
435 float rocx = (float)col/52. + 8.0*
float(DBmodule-1);
436 float rocy = (float)row/160.+
float(DBladder);
438 if(DBladder==1) rocy = rocy + 0.5;
441 if(isHalfModule && DBladder==1){
446 if((layon && !twoD) && !twoDimOnlyLayDisk){
448 if(isHalfModule && DBladder==1) {
460 if(isHalfModule && DBladder==1){
467 if(isHalfModule && DBladder==1) {
474 if(bladeon && endcap){
478 if((diskon || twoDimOnlyLayDisk) &&
endcap){
480 if(twoDimOnlyLayDisk){
489 for (
int i = DBpanel;
i < DBmodule; ++
i) {offx = offx + float(5+DBpanel-
i);}
490 float rocx = (float)col/52. + offx + 14.0*
float(DBpanel-1);
491 float rocy = (float)row/160.+
float(DBblade);
495 if(ringon && endcap){
509 if(layon && barrel && !twoDimOnlyLayDisk) (
meNDigisLay_)->
Fill((
float)numberOfDigisMod);
512 if(diskon && endcap && !twoDimOnlyLayDisk) (
meNDigisDisk_)->
Fill((
float)numberOfDigisMod);
515 if(combBarrel) combBarrel->
Fill((
float)numberOfDigisMod);
516 if(chanBarrel){
if(numberOfDigis[0]>0) chanBarrel->
Fill((
float)numberOfDigis[0]);
if(numberOfDigis[1]>0) chanBarrel->
Fill((
float)numberOfDigis[1]); }
518 for (std::vector<MonitorElement*>::iterator
i = chanBarrelL.begin();
i != chanBarrelL.end();
i++)
520 if(numberOfDigis[j]>0) (*i)->Fill((
float)numberOfDigis[j]);
524 if(combEndcap) combEndcap->
Fill((
float)numberOfDigisMod);
529 return numberOfDigisMod;
547 float localX = float(
i) - 0.5;
548 float localY = float(
j)/2.0 + 0.75;
553 return std::pair<int,int>(nZeroROC,nLoEffROC);
559 float localX = float(
i) - 0.5;
560 float localY = float(
j)/2.0 + 1.25;
565 return std::pair<int,int>(nZeroROC,nLoEffROC);
567 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_