53 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)";
83 meNDigis_ = theDMBE->book1D(hid,
"Number of Digis",25,0.,25.);
87 meADC_ = theDMBE->book1D(hid,
"Digi charge",128,0.,256.);
110 delete theHistogramId;
114 if(type==1 && barrel){
116 char sladder[80]; sprintf(sladder,
"Ladder_%02i",DBladder);
117 hid = src.
label() +
"_" + sladder;
118 if(isHalfModule) hid +=
"H";
121 meNDigisLad_ = theDMBE->book1D(
"ndigis_"+hid,
"Number of Digis",25,0.,25.);
124 meADCLad_ = theDMBE->book1D(
"adc_" + hid,
"Digi charge",128,0.,256.);
144 if(type==2 && barrel){
146 char slayer[80]; sprintf(slayer,
"Layer_%i",DBlayer);
147 hid = src.
label() +
"_" + slayer;
150 meNDigisLay_ = theDMBE->book1D(
"ndigis_"+hid,
"Number of Digis",25,0.,25.);
153 meADCLay_ = theDMBE->book1D(
"adc_" + hid,
"Digi charge",128,0.,256.);
157 if(twoD || additInfo){
170 int yROCbins[3] = {18,30,42};
171 mePixRocsLay_ = theDMBE->book2D(
"rocmap_"+hid,twodroctitle,32,0.,32.,yROCbins[DBlayer-1],1.5,1.5+
float(yROCbins[DBlayer-1]/2));
174 meZeroOccRocsLay_ = theDMBE->book2D(
"zeroOccROC_map",twodzeroOccroctitle+hid,32,0.,32.,yROCbins[DBlayer-1],1.5,1.5+
float(yROCbins[DBlayer-1]/2));
178 if(!twoD && !additInfo){
192 if(type==3 && barrel){
194 char smodule[80]; sprintf(smodule,
"Ring_%i",DBmodule);
195 hid = src.
label() +
"_" + smodule;
197 meNDigisPhi_ = theDMBE->book1D(
"ndigis_"+hid,
"Number of Digis",25,0.,25.);
200 meADCPhi_ = theDMBE->book1D(
"adc_" + hid,
"Digi charge",128,0.,256.);
231 if(type==4 && endcap){
234 char sblade[80]; sprintf(sblade,
"Blade_%02i",blade);
235 hid = src.
label() +
"_" + sblade;
237 meNDigisBlade_ = theDMBE->book1D(
"ndigis_"+hid,
"Number of Digis",25,0.,25.);
240 meADCBlade_ = theDMBE->book1D(
"adc_" + hid,
"Digi charge",128,0.,256.);
243 if(type==5 && endcap){
246 char sdisk[80]; sprintf(sdisk,
"Disk_%i",disk);
247 hid = src.
label() +
"_" + sdisk;
250 meNDigisDisk_ = theDMBE->book1D(
"ndigis_"+hid,
"Number of Digis",25,0.,25.);
253 meADCDisk_ = theDMBE->book1D(
"adc_" + hid,
"Digi charge",128,0.,256.);
257 mePixDigisDisk_ = theDMBE->book2D(
"hitmap_"+hid,twodtitle,260,0.,260.,160,0.,160.);
261 mePixRocsDisk_ = theDMBE->book2D(
"rocmap_"+hid,twodroctitle,26,0.,26.,24,1.,13.);
264 meZeroOccRocsDisk_ = theDMBE->book2D(
"zeroOccROC_map",twodzeroOccroctitle+hid,26,0.,26.,24,1.,13.);
269 if(type==6 && endcap){
272 char slab[80]; sprintf(slab,
"Panel_%i_Ring_%i",panel, module);
273 hid = src.
label() +
"_" + slab;
275 meNDigisRing_ = theDMBE->book1D(
"ndigis_"+hid,
"Number of Digis",25,0.,25.);
278 meADCRing_ = theDMBE->book1D(
"adc_" + hid,
"Digi charge",128,0.,256.);
305 bool ladon,
bool layon,
bool phion,
306 bool bladeon,
bool diskon,
bool ringon,
307 bool twoD,
bool reducedSet,
bool twoDimModOn,
bool twoDimOnlyLayDisk,
308 int &nDigisA,
int &nDigisB) {
311 bool isHalfModule =
false;
312 uint32_t DBladder = 0;
324 unsigned int numberOfDigisMod = 0;
325 int numberOfDigis[8];
for(
int i=0;
i!=8;
i++) numberOfDigis[
i]=0;
326 nDigisA=0; nDigisB=0;
327 if( isearch != input.
end() ) {
331 for(di = isearch->data.
begin(); di != isearch->data.
end(); di++) {
333 int col = di->column();
342 numberOfDigis[0]++; nDigisA++;
343 if(DBlayer==1) numberOfDigis[2]++;
344 if(DBlayer==2) numberOfDigis[3]++;
345 if(DBlayer==3) numberOfDigis[4]++;
348 numberOfDigis[1]++; nDigisB++;
349 if(DBlayer==1) numberOfDigis[5]++;
350 if(DBlayer==2) numberOfDigis[6]++;
351 if(DBlayer==3) numberOfDigis[7]++;
355 numberOfDigis[0]++; nDigisA++;
356 if(DBlayer==1) numberOfDigis[2]++;
357 if(DBlayer==2) numberOfDigis[3]++;
358 if(DBlayer==3) numberOfDigis[4]++;
360 numberOfDigis[1]++; nDigisB++;
361 if(DBlayer==1) numberOfDigis[5]++;
362 if(DBlayer==2) numberOfDigis[6]++;
363 if(DBlayer==3) numberOfDigis[7]++;
391 if((layon || twoDimOnlyLayDisk) &&
barrel){
394 if((layon && twoD) || twoDimOnlyLayDisk){
396 float rocx = (float)col/52. + 8.0*
float(DBmodule-1);
397 float rocy = (float)row/160.+
float(DBladder);
399 if(DBladder==1) rocy = rocy + 0.5;
405 if(isHalfModule && DBladder==1){
410 if((layon && !twoD) && !twoDimOnlyLayDisk){
412 if(isHalfModule && DBladder==1) {
424 if(isHalfModule && DBladder==1){
431 if(isHalfModule && DBladder==1) {
438 if(bladeon && endcap){
442 if((diskon || twoDimOnlyLayDisk) &&
endcap){
444 if(twoDimOnlyLayDisk){
451 for (
int i = DBpanel;
i < DBmodule; ++
i) {offx = offx + float(5+DBpanel-
i);}
452 float rocx = (float)col/52. + offx + 14.0*
float(DBpanel-1);
453 float rocy = (float)row/160.+
float(DBblade);
462 if(ringon && endcap){
476 if(layon && barrel && !twoDimOnlyLayDisk) (
meNDigisLay_)->
Fill((
float)numberOfDigisMod);
479 if(diskon && endcap && !twoDimOnlyLayDisk) (
meNDigisDisk_)->
Fill((
float)numberOfDigisMod);
483 if(me) me->
Fill((
float)numberOfDigisMod);
484 me=theDMBE->
get(
"Pixel/Barrel/ALLMODS_ndigisCHAN_Barrel");
485 if(me){
if(numberOfDigis[0]>0) me->
Fill((
float)numberOfDigis[0]);
if(numberOfDigis[1]>0) me->
Fill((
float)numberOfDigis[1]); }
486 me=theDMBE->
get(
"Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelL1");
487 if(me){
if(numberOfDigis[2]>0) me->
Fill((
float)numberOfDigis[2]); }
488 me=theDMBE->
get(
"Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelL2");
489 if(me){
if(numberOfDigis[3]>0) me->
Fill((
float)numberOfDigis[3]); }
490 me=theDMBE->
get(
"Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelL3");
491 if(me){
if(numberOfDigis[4]>0) me->
Fill((
float)numberOfDigis[4]); }
494 if(me) me->
Fill((
float)numberOfDigisMod);
499 return numberOfDigisMod;
int adc(sample_type sample)
get the ADC sample (12 bits)
int plaquetteName() const
plaquetteId (in pannel)
T getParameter(std::string const &) const
int fill(const edm::DetSetVector< PixelDigi > &input, 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)
Fill histograms.
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_
~SiPixelDigiModule()
Destructor.
MonitorElement * mePixDigisDisk_
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 * meADCLad_
MonitorElement * meADCBlade_
MonitorElement * meNDigisLay_
SiPixelDigiModule()
Default constructor.
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
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.
int ladderName() const
ladder id (index in phi)
MonitorElement * mePixDigis_px_
int layerName() const
layer id
MonitorElement * mePixDigisLad_px_
MonitorElement * mePixDigisLay_
MonitorElement * meNDigisPhi_
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.
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)
MonitorElement * meNDigisLad_
MonitorElement * mePixDigisLay_px_
void book(const edm::ParameterSet &iConfig, int type=0, bool twoD=true, bool hiRes=false, bool reducedSet=false, bool additInfo=false)
Book histograms.