CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiPixelDigiSource.cc
Go to the documentation of this file.
1 
2 // -*- C++ -*-
3 //
4 // Package: SiPixelMonitorDigi
5 // Class: SiPixelDigiSource
6 //
14 //
15 // Original Author: Vincenzo Chiochia
16 // Created:
17 //
18 //
20 // Framework
24 // DQM Framework
27 // Geometry
32 // DataFormats
37 //
38 #include <string>
39 #include <stdlib.h>
40 #include <iostream>
41 #include <fstream>
42 
43 using namespace std;
44 using namespace edm;
45 
47  conf_(iConfig),
48  src_( conf_.getParameter<edm::InputTag>( "src" ) ),
49  saveFile( conf_.getUntrackedParameter<bool>("saveFile",false) ),
50  isPIB( conf_.getUntrackedParameter<bool>("isPIB",false) ),
51  slowDown( conf_.getUntrackedParameter<bool>("slowDown",false) ),
52  modOn( conf_.getUntrackedParameter<bool>("modOn",true) ),
53  twoDimOn( conf_.getUntrackedParameter<bool>("twoDimOn",true) ),
54  twoDimModOn( conf_.getUntrackedParameter<bool>("twoDimModOn",true) ),
55  twoDimOnlyLayDisk( conf_.getUntrackedParameter<bool>("twoDimOnlyLayDisk",false) ),
56  hiRes( conf_.getUntrackedParameter<bool>("hiRes",false) ),
57  reducedSet( conf_.getUntrackedParameter<bool>("reducedSet",false) ),
58  ladOn( conf_.getUntrackedParameter<bool>("ladOn",false) ),
59  layOn( conf_.getUntrackedParameter<bool>("layOn",false) ),
60  phiOn( conf_.getUntrackedParameter<bool>("phiOn",false) ),
61  ringOn( conf_.getUntrackedParameter<bool>("ringOn",false) ),
62  bladeOn( conf_.getUntrackedParameter<bool>("bladeOn",false) ),
63  diskOn( conf_.getUntrackedParameter<bool>("diskOn",false) ),
64  bigEventSize( conf_.getUntrackedParameter<int>("bigEventSize",1000) )
65 {
66  //set Token(-s)
67  srcToken_ = consumes<edm::DetSetVector<PixelDigi> >(conf_.getParameter<edm::InputTag>( "src" ));
68 
70  LogInfo ("PixelDQM") << "SiPixelDigiSource::SiPixelDigiSource: Got DQM BackEnd interface"<<endl;
71 }
72 
73 
75 {
76  // do anything here that needs to be done at desctruction time
77  // (e.g. close files, deallocate resources etc.)
78  LogInfo ("PixelDQM") << "SiPixelDigiSource::~SiPixelDigiSource: Destructor"<<endl;
79 }
80 
81 
83  firstRun = true;
84  // find a FED# for the current detId:
85  ifstream infile(edm::FileInPath("DQM/SiPixelMonitorClient/test/detId.dat").fullPath().c_str(),ios::in);
86  int nModsInFile=0;
87  assert(!infile.fail());
88  while(!infile.eof()&&nModsInFile<1440) {
89  infile >> I_name[nModsInFile] >> I_detId[nModsInFile] >> I_fedId[nModsInFile] >> I_linkId1[nModsInFile] >> I_linkId2[nModsInFile];
90  //cout<<nModsInFile<<" , "<<I_name[nModsInFile]<<" , "<<I_detId[nModsInFile]<<" , "<<I_fedId[nModsInFile]<<" , "<<I_linkId[nModsInFile]<<endl; ;
91  nModsInFile++;
92  }
93  infile.close();
94 }
95 
97  LogInfo ("PixelDQM") << " SiPixelDigiSource::beginJob - Initialisation ... " << std::endl;
98  LogInfo ("PixelDQM") << "Mod/Lad/Lay/Phi " << modOn << "/" << ladOn << "/"
99  << layOn << "/" << phiOn << std::endl;
100  LogInfo ("PixelDQM") << "Blade/Disk/Ring" << bladeOn << "/" << diskOn << "/"
101  << ringOn << std::endl;
102 
103  LogInfo ("PixelDQM") << "2DIM IS " << twoDimOn << " and set to high resolution? " << hiRes << "\n";
104 
105  if(firstRun){
106  eventNo = 0;
107  lumSec = 0;
108  nLumiSecs = 0;
109  nBigEvents = 0;
110  nBPIXDigis = 0;
111  nFPIXDigis = 0;
112  for(int i=0; i!=40; i++) nDigisPerFed[i]=0;
113  for(int i=0; i!=4; i++) nDigisPerDisk[i]=0;
114  nDP1P1M1 = 0;
115  nDP1P1M2 = 0;
116  nDP1P1M3 = 0;
117  nDP1P1M4 = 0;
118  nDP1P2M1 = 0;
119  nDP1P2M2 = 0;
120  nDP1P2M3 = 0;
121  nDP2P1M1 = 0;
122  nDP2P1M2 = 0;
123  nDP2P1M3 = 0;
124  nDP2P1M4 = 0;
125  nDP2P2M1 = 0;
126  nDP2P2M2 = 0;
127  nDP2P2M3 = 0;
128  nDM1P1M1 = 0;
129  nDM1P1M2 = 0;
130  nDM1P1M3 = 0;
131  nDM1P1M4 = 0;
132  nDM1P2M1 = 0;
133  nDM1P2M2 = 0;
134  nDM1P2M3 = 0;
135  nDM2P1M1 = 0;
136  nDM2P1M2 = 0;
137  nDM2P1M3 = 0;
138  nDM2P1M4 = 0;
139  nDM2P2M1 = 0;
140  nDM2P2M2 = 0;
141  nDM2P2M3 = 0;
142  nL1M1 = 0;
143  nL1M2 = 0;
144  nL1M3 = 0;
145  nL1M4 = 0;
146  nL2M1 = 0;
147  nL2M2 = 0;
148  nL2M3 = 0;
149  nL2M4 = 0;
150  nL3M1 = 0;
151  nL3M2 = 0;
152  nL3M3 = 0;
153  nL3M4 = 0;
154 
155 
156  // Build map
157  buildStructure(iSetup);
158  // Book Monitoring Elements
159  bookMEs();
160  firstRun = false;
161  }
162 }
163 
164 
166 
167  if(saveFile) {
168  LogInfo ("PixelDQM") << " SiPixelDigiSource::endJob - Saving Root File " << std::endl;
170  theDMBE->save( outputFile.c_str() );
171  }
172 
173 }
174 
175 //------------------------------------------------------------------
176 // Method called for every event
177 //------------------------------------------------------------------
179 {
180  eventNo++;
181  //cout<<"BIGFATEVENTNUMBER: "<<eventNo<<endl;
182 
183  // get input data
185  iEvent.getByToken(srcToken_, input);
186  if (!input.isValid()) return;
187  // Get DQM interface
189 
190  //float iOrbitSec = iEvent.orbitNumber()/11223.;
191  int bx = iEvent.bunchCrossing();
192  //long long tbx = (long long)iEvent.orbitNumber() * 3564 + bx;
193  int lumiSection = (int)iEvent.luminosityBlock();
194  int nEventDigis = 0; int nActiveModules = 0;
195  //int nEventBPIXDigis = 0; int nEventFPIXDigis = 0;
196 
197  if(modOn){
198  MonitorElement* meReset = theDMBE->get("Pixel/averageDigiOccupancy");
199  //if(meReset && eventNo%1000==0){
200  if(meReset && lumiSection%8==0){
201  meReset->Reset();
202  nBPIXDigis = 0;
203  nFPIXDigis = 0;
204  for(int i=0; i!=40; i++) nDigisPerFed[i]=0;
205  }
206  if (lumiSection%10==0){
207  //Now do resets for ROCuppancy maps every 10 ls
208  std::string baseDirs[2] = {"Pixel/Barrel", "Pixel/Endcap"};
209  for (int i = 0; i < 2; ++i){
210  theDMBE->cd(baseDirs[i]);
211  vector<string> shellDirs = theDMBE->getSubdirs();
212  for (vector<string>::const_iterator it = shellDirs.begin(); it != shellDirs.end(); it++) {
213  theDMBE->cd(*it);
214  vector<string> layDirs = theDMBE->getSubdirs();
215  for (vector<string>::const_iterator itt = layDirs.begin(); itt != layDirs.end(); itt++) {
216  theDMBE->cd(*itt);
217  vector<string> contents = theDMBE->getMEs();
218  for (vector<string>::const_iterator im = contents.begin(); im != contents.end(); im++) {
219  if ((*im).find("rocmap") == string::npos) continue;
220  MonitorElement* me = theDMBE->get((*itt)+"/"+(*im));
221  if(me) me->Reset();}}}}//end for contents//end for layDirs//end for shellDirs//end for bar/EC
222  }
223  }
224  if(!modOn){
225  MonitorElement* meReset = theDMBE->get("Pixel/averageDigiOccupancy");
226  if(meReset && lumiSection%1==0){
227  meReset->Reset();
228  nBPIXDigis = 0;
229  nFPIXDigis = 0;
230  for(int i=0; i!=40; i++) nDigisPerFed[i]=0;
231  }
232  }
233 
234  std::map<uint32_t,SiPixelDigiModule*>::iterator struct_iter;
235  for(int i=0; i!=192; i++) numberOfDigis[i]=0;
236  for(int i=0; i!=1152; i++) nDigisPerChan[i]=0;
237  for(int i=0; i!=4; i++) nDigisPerDisk[i]=0;
238  for (struct_iter = thePixelStructure.begin() ; struct_iter != thePixelStructure.end() ; struct_iter++) {
239  int numberOfDigisMod = (*struct_iter).second->fill(*input, modOn,
240  ladOn, layOn, phiOn,
241  bladeOn, diskOn, ringOn,
243  nDigisA, nDigisB);
244  if(numberOfDigisMod>0){
245  //if((*struct_iter).first == I_detId[39])
246  //std::cout << "FED " << (*struct_iter).first << " NDigis all modules..." << numberOfDigisMod << std::endl;
247  nEventDigis = nEventDigis + numberOfDigisMod;
248  nActiveModules++;
249  bool barrel = DetId((*struct_iter).first).subdetId() == static_cast<int>(PixelSubdetector::PixelBarrel);
250  bool endcap = DetId((*struct_iter).first).subdetId() == static_cast<int>(PixelSubdetector::PixelEndcap);
251  //if((*struct_iter).first >= 302055684 && (*struct_iter).first <= 302197792 ){ // Barrel
252  if(barrel){ // Barrel
253  //cout<<"AAbpix: "<<numberOfDigisMod<<" + "<<nBPIXDigis<<" = ";
254  nBPIXDigis = nBPIXDigis + numberOfDigisMod;
255  //cout<<nBPIXDigis<<endl;
256  for(int i=0; i!=768; ++i){
257  //cout<<"\t\t\t bpix: "<<i<<" , "<<(*struct_iter).first<<" , "<<I_detId[i]<<endl;
258  if((*struct_iter).first == I_detId[i]){
259  //if(I_fedId[i]>=32&&I_fedId[i]<=39) std::cout<<"Attention: a BPIX module matched to an FPIX FED!"<<std::endl;
260  nDigisPerFed[I_fedId[i]]=nDigisPerFed[I_fedId[i]]+numberOfDigisMod;
261  //cout<<"BPIX: "<<i<<" , "<<I_fedId[i]<<" , "<<numberOfDigisMod<<" , "<<nDigisPerFed[I_fedId[i]]<<endl;
262  int index1 = 0; int index2 = 0;
263  if(I_linkId1[i]>0) index1 = I_fedId[i]*36+(I_linkId1[i]-1);
264  if(I_linkId2[i]>0) index2 = I_fedId[i]*36+(I_linkId2[i]-1);
265  if(nDigisA>0 && I_linkId1[i]>0) nDigisPerChan[index1]=nDigisPerChan[index1]+nDigisA;
266  if(nDigisB>0 && I_linkId2[i]>0) nDigisPerChan[index2]=nDigisPerChan[index2]+nDigisB;
267  //if (index1==35 || index2==35) cout<<"BPIX 35: "<<I_detId[i]<<" : "<<I_fedId[i]<<" "<<I_linkId1[i]<<" , "<<I_fedId[i]<<" "<<I_linkId2[i]<<" , "<<nDigisA<<" , "<<nDigisB<<endl;
268  i=767;
269  }
270  }
271  //}else if((*struct_iter).first >= 343999748 && (*struct_iter).first <= 352477708 ){ // Endcap
272  }else if(endcap){ // Endcap
273 
274  //cout<<"AAfpix: "<<nFPIXDigis<<" = ";
275  nFPIXDigis = nFPIXDigis + numberOfDigisMod;
276  //cout<<nFPIXDigis<<endl;
277  PixelEndcapName::HalfCylinder side = PixelEndcapName(DetId((*struct_iter).first)).halfCylinder();
278  int disk = PixelEndcapName(DetId((*struct_iter).first)).diskName();
279  int blade = PixelEndcapName(DetId((*struct_iter).first)).bladeName();
280  int panel = PixelEndcapName(DetId((*struct_iter).first)).pannelName();
281  int module = PixelEndcapName(DetId((*struct_iter).first)).plaquetteName();
282  //std::cout<<"Endcap: "<<side<<" , "<<disk<<" , "<<blade<<" , "<<panel<<" , "<<std::endl;
283  int iter=0; int i=0;
284  if(side==PixelEndcapName::mI){
285  if(disk==1){
286  i=0;
287  if(panel==1){ if(module==1) nDM1P1M1+=numberOfDigisMod;
288  else if(module==2) nDM1P1M2+=numberOfDigisMod;
289  else if(module==3) nDM1P1M3+=numberOfDigisMod;
290  else if(module==4) nDM1P1M4+=numberOfDigisMod;}
291  else if(panel==2){ if(module==1) nDM1P2M1+=numberOfDigisMod;
292  else if(module==2) nDM1P2M2+=numberOfDigisMod;
293  else if(module==3) nDM1P2M3+=numberOfDigisMod; }
294  if(blade==1){ if(panel==1) iter=i; else if(panel==2) iter=i+1; }
295  if(blade==2){ if(panel==1) iter=i+2; else if(panel==2) iter=i+3; }
296  if(blade==3){ if(panel==1) iter=i+4; else if(panel==2) iter=i+5; }
297  if(blade==4){ if(panel==1) iter=i+6; else if(panel==2) iter=i+7; }
298  if(blade==5){ if(panel==1) iter=i+8; else if(panel==2) iter=i+9; }
299  if(blade==6){ if(panel==1) iter=i+10; else if(panel==2) iter=i+11; }
300  if(blade==7){ if(panel==1) iter=i+12; else if(panel==2) iter=i+13; }
301  if(blade==8){ if(panel==1) iter=i+14; else if(panel==2) iter=i+15; }
302  if(blade==9){ if(panel==1) iter=i+16; else if(panel==2) iter=i+17; }
303  if(blade==10){ if(panel==1) iter=i+18; else if(panel==2) iter=i+19; }
304  if(blade==11){ if(panel==1) iter=i+20; else if(panel==2) iter=i+21; }
305  if(blade==12){ if(panel==1) iter=i+22; else if(panel==2) iter=i+23; }
306  }else if(disk==2){
307  i=24;
308  if(panel==1){ if(module==1) nDM2P1M1+=numberOfDigisMod;
309  else if(module==2) nDM2P1M2+=numberOfDigisMod;
310  else if(module==3) nDM2P1M3+=numberOfDigisMod;
311  else if(module==4) nDM2P1M4+=numberOfDigisMod;}
312  else if(panel==2){ if(module==1) nDM2P2M1+=numberOfDigisMod;
313  else if(module==2) nDM2P2M2+=numberOfDigisMod;
314  else if(module==3) nDM2P2M3+=numberOfDigisMod; }
315  if(blade==1){ if(panel==1) iter=i; else if(panel==2) iter=i+1; }
316  if(blade==2){ if(panel==1) iter=i+2; else if(panel==2) iter=i+3; }
317  if(blade==3){ if(panel==1) iter=i+4; else if(panel==2) iter=i+5; }
318  if(blade==4){ if(panel==1) iter=i+6; else if(panel==2) iter=i+7; }
319  if(blade==5){ if(panel==1) iter=i+8; else if(panel==2) iter=i+9; }
320  if(blade==6){ if(panel==1) iter=i+10; else if(panel==2) iter=i+11; }
321  if(blade==7){ if(panel==1) iter=i+12; else if(panel==2) iter=i+13; }
322  if(blade==8){ if(panel==1) iter=i+14; else if(panel==2) iter=i+15; }
323  if(blade==9){ if(panel==1) iter=i+16; else if(panel==2) iter=i+17; }
324  if(blade==10){ if(panel==1) iter=i+18; else if(panel==2) iter=i+19; }
325  if(blade==11){ if(panel==1) iter=i+20; else if(panel==2) iter=i+21; }
326  if(blade==12){ if(panel==1) iter=i+22; else if(panel==2) iter=i+23; }
327  }
328  }else if(side==PixelEndcapName::mO){
329  if(disk==1){
330  i=48;
331  if(panel==1){ if(module==1) nDM1P1M1+=numberOfDigisMod;
332  else if(module==2) nDM1P1M2+=numberOfDigisMod;
333  else if(module==3) nDM1P1M3+=numberOfDigisMod;
334  else if(module==4) nDM1P1M4+=numberOfDigisMod;}
335  else if(panel==2){ if(module==1) nDM1P2M1+=numberOfDigisMod;
336  else if(module==2) nDM1P2M2+=numberOfDigisMod;
337  else if(module==3) nDM1P2M3+=numberOfDigisMod; }
338  if(blade==1){ if(panel==1) iter=i; else if(panel==2) iter=i+1; }
339  if(blade==2){ if(panel==1) iter=i+2; else if(panel==2) iter=i+3; }
340  if(blade==3){ if(panel==1) iter=i+4; else if(panel==2) iter=i+5; }
341  if(blade==4){ if(panel==1) iter=i+6; else if(panel==2) iter=i+7; }
342  if(blade==5){ if(panel==1) iter=i+8; else if(panel==2) iter=i+9; }
343  if(blade==6){ if(panel==1) iter=i+10; else if(panel==2) iter=i+11; }
344  if(blade==7){ if(panel==1) iter=i+12; else if(panel==2) iter=i+13; }
345  if(blade==8){ if(panel==1) iter=i+14; else if(panel==2) iter=i+15; }
346  if(blade==9){ if(panel==1) iter=i+16; else if(panel==2) iter=i+17; }
347  if(blade==10){ if(panel==1) iter=i+18; else if(panel==2) iter=i+19; }
348  if(blade==11){ if(panel==1) iter=i+20; else if(panel==2) iter=i+21; }
349  if(blade==12){ if(panel==1) iter=i+22; else if(panel==2) iter=i+23; }
350  }else if(disk==2){
351  i=72;
352  if(panel==1){ if(module==1) nDM2P1M1+=numberOfDigisMod;
353  else if(module==2) nDM2P1M2+=numberOfDigisMod;
354  else if(module==3) nDM2P1M3+=numberOfDigisMod;
355  else if(module==4) nDM2P1M4+=numberOfDigisMod;}
356  else if(panel==2){ if(module==1) nDM2P2M1+=numberOfDigisMod;
357  else if(module==2) nDM2P2M2+=numberOfDigisMod;
358  else if(module==3) nDM2P2M3+=numberOfDigisMod; }
359  if(blade==1){ if(panel==1) iter=i; else if(panel==2) iter=i+1; }
360  if(blade==2){ if(panel==1) iter=i+2; else if(panel==2) iter=i+3; }
361  if(blade==3){ if(panel==1) iter=i+4; else if(panel==2) iter=i+5; }
362  if(blade==4){ if(panel==1) iter=i+6; else if(panel==2) iter=i+7; }
363  if(blade==5){ if(panel==1) iter=i+8; else if(panel==2) iter=i+9; }
364  if(blade==6){ if(panel==1) iter=i+10; else if(panel==2) iter=i+11; }
365  if(blade==7){ if(panel==1) iter=i+12; else if(panel==2) iter=i+13; }
366  if(blade==8){ if(panel==1) iter=i+14; else if(panel==2) iter=i+15; }
367  if(blade==9){ if(panel==1) iter=i+16; else if(panel==2) iter=i+17; }
368  if(blade==10){ if(panel==1) iter=i+18; else if(panel==2) iter=i+19; }
369  if(blade==11){ if(panel==1) iter=i+20; else if(panel==2) iter=i+21; }
370  if(blade==12){ if(panel==1) iter=i+22; else if(panel==2) iter=i+23; }
371  }
372  }else if(side==PixelEndcapName::pI){
373  if(disk==1){
374  i=96;
375  if(panel==1){ if(module==1) nDP1P1M1+=numberOfDigisMod;
376  else if(module==2) nDP1P1M2+=numberOfDigisMod;
377  else if(module==3) nDP1P1M3+=numberOfDigisMod;
378  else if(module==4) nDP1P1M4+=numberOfDigisMod;}
379  else if(panel==2){ if(module==1) nDP1P2M1+=numberOfDigisMod;
380  else if(module==2) nDP1P2M2+=numberOfDigisMod;
381  else if(module==3) nDP1P2M3+=numberOfDigisMod; }
382  if(blade==1){ if(panel==1) iter=i; else if(panel==2) iter=i+1; }
383  if(blade==2){ if(panel==1) iter=i+2; else if(panel==2) iter=i+3; }
384  if(blade==3){ if(panel==1) iter=i+4; else if(panel==2) iter=i+5; }
385  if(blade==4){ if(panel==1) iter=i+6; else if(panel==2) iter=i+7; }
386  if(blade==5){ if(panel==1) iter=i+8; else if(panel==2) iter=i+9; }
387  if(blade==6){ if(panel==1) iter=i+10; else if(panel==2) iter=i+11; }
388  if(blade==7){ if(panel==1) iter=i+12; else if(panel==2) iter=i+13; }
389  if(blade==8){ if(panel==1) iter=i+14; else if(panel==2) iter=i+15; }
390  if(blade==9){ if(panel==1) iter=i+16; else if(panel==2) iter=i+17; }
391  if(blade==10){ if(panel==1) iter=i+18; else if(panel==2) iter=i+19; }
392  if(blade==11){ if(panel==1) iter=i+20; else if(panel==2) iter=i+21; }
393  if(blade==12){ if(panel==1) iter=i+22; else if(panel==2) iter=i+23; }
394  }else if(disk==2){
395  i=120;
396  if(panel==1){ if(module==1) nDP2P1M1+=numberOfDigisMod;
397  else if(module==2) nDP2P1M2+=numberOfDigisMod;
398  else if(module==3) nDP2P1M3+=numberOfDigisMod;
399  else if(module==4) nDP2P1M4+=numberOfDigisMod;}
400  else if(panel==2){ if(module==1) nDP2P2M1+=numberOfDigisMod;
401  else if(module==2) nDP2P2M2+=numberOfDigisMod;
402  else if(module==3) nDP2P2M3+=numberOfDigisMod; }
403  if(blade==1){ if(panel==1) iter=i; else if(panel==2) iter=i+1; }
404  if(blade==2){ if(panel==1) iter=i+2; else if(panel==2) iter=i+3; }
405  if(blade==3){ if(panel==1) iter=i+4; else if(panel==2) iter=i+5; }
406  if(blade==4){ if(panel==1) iter=i+6; else if(panel==2) iter=i+7; }
407  if(blade==5){ if(panel==1) iter=i+8; else if(panel==2) iter=i+9; }
408  if(blade==6){ if(panel==1) iter=i+10; else if(panel==2) iter=i+11; }
409  if(blade==7){ if(panel==1) iter=i+12; else if(panel==2) iter=i+13; }
410  if(blade==8){ if(panel==1) iter=i+14; else if(panel==2) iter=i+15; }
411  if(blade==9){ if(panel==1) iter=i+16; else if(panel==2) iter=i+17; }
412  if(blade==10){ if(panel==1) iter=i+18; else if(panel==2) iter=i+19; }
413  if(blade==11){ if(panel==1) iter=i+20; else if(panel==2) iter=i+21; }
414  if(blade==12){ if(panel==1) iter=i+22; else if(panel==2) iter=i+23; }
415  }
416  }else if(side==PixelEndcapName::pO){
417  if(disk==1){
418  i=144;
419  if(panel==1){ if(module==1) nDP1P1M1+=numberOfDigisMod;
420  else if(module==2) nDP1P1M2+=numberOfDigisMod;
421  else if(module==3) nDP1P1M3+=numberOfDigisMod;
422  else if(module==4) nDP1P1M4+=numberOfDigisMod;}
423  else if(panel==2){ if(module==1) nDP1P2M1+=numberOfDigisMod;
424  else if(module==2) nDP1P2M2+=numberOfDigisMod;
425  else if(module==3) nDP1P2M3+=numberOfDigisMod; }
426  if(blade==1){ if(panel==1) iter=i; else if(panel==2) iter=i+1; }
427  if(blade==2){ if(panel==1) iter=i+2; else if(panel==2) iter=i+3; }
428  if(blade==3){ if(panel==1) iter=i+4; else if(panel==2) iter=i+5; }
429  if(blade==4){ if(panel==1) iter=i+6; else if(panel==2) iter=i+7; }
430  if(blade==5){ if(panel==1) iter=i+8; else if(panel==2) iter=i+9; }
431  if(blade==6){ if(panel==1) iter=i+10; else if(panel==2) iter=i+11; }
432  if(blade==7){ if(panel==1) iter=i+12; else if(panel==2) iter=i+13; }
433  if(blade==8){ if(panel==1) iter=i+14; else if(panel==2) iter=i+15; }
434  if(blade==9){ if(panel==1) iter=i+16; else if(panel==2) iter=i+17; }
435  if(blade==10){ if(panel==1) iter=i+18; else if(panel==2) iter=i+19; }
436  if(blade==11){ if(panel==1) iter=i+20; else if(panel==2) iter=i+21; }
437  if(blade==12){ if(panel==1) iter=i+22; else if(panel==2) iter=i+23; }
438  }else if(disk==2){
439  i=168;
440  if(panel==1){ if(module==1) nDP2P1M1+=numberOfDigisMod;
441  else if(module==2) nDP2P1M2+=numberOfDigisMod;
442  else if(module==3) nDP2P1M3+=numberOfDigisMod;
443  else if(module==4) nDP2P1M4+=numberOfDigisMod;}
444  else if(panel==2){ if(module==1) nDP2P2M1+=numberOfDigisMod;
445  else if(module==2) nDP2P2M2+=numberOfDigisMod;
446  else if(module==3) nDP2P2M3+=numberOfDigisMod; }
447  if(blade==1){ if(panel==1) iter=i; else if(panel==2) iter=i+1; }
448  if(blade==2){ if(panel==1) iter=i+2; else if(panel==2) iter=i+3; }
449  if(blade==3){ if(panel==1) iter=i+4; else if(panel==2) iter=i+5; }
450  if(blade==4){ if(panel==1) iter=i+6; else if(panel==2) iter=i+7; }
451  if(blade==5){ if(panel==1) iter=i+8; else if(panel==2) iter=i+9; }
452  if(blade==6){ if(panel==1) iter=i+10; else if(panel==2) iter=i+11; }
453  if(blade==7){ if(panel==1) iter=i+12; else if(panel==2) iter=i+13; }
454  if(blade==8){ if(panel==1) iter=i+14; else if(panel==2) iter=i+15; }
455  if(blade==9){ if(panel==1) iter=i+16; else if(panel==2) iter=i+17; }
456  if(blade==10){ if(panel==1) iter=i+18; else if(panel==2) iter=i+19; }
457  if(blade==11){ if(panel==1) iter=i+20; else if(panel==2) iter=i+21; }
458  if(blade==12){ if(panel==1) iter=i+22; else if(panel==2) iter=i+23; }
459  }
460  }
461  numberOfDigis[iter]=numberOfDigis[iter]+numberOfDigisMod;
462  //if(side==PixelEndcapName::pO||side==PixelEndcapName::pI){
463  // if(disk==2){
464  // std::cout<<"status: "<<iter<<","<<side<<","<<disk<<","<<blade<<","<<panel<<","<<numberOfDigisMod<<","<<numberOfDigis[iter]<<std::endl;
465  //}}
466  for(int i=768; i!=1440; i++){
467  //cout<<"\t\t\t fpix: "<<i<<" , "<<(*struct_iter).first<<" , "<<I_detId[i]<<endl;
468  if((*struct_iter).first == I_detId[i]){
469  //if(I_fedId[i]<32||I_fedId[i]>39) std::cout<<"Attention: an FPIX module matched to a BPIX FED!"<<std::endl;
470  nDigisPerFed[I_fedId[i]]=nDigisPerFed[I_fedId[i]]+numberOfDigisMod;
471  //cout<<"FPIX: "<<i<<" , "<<I_fedId[i]<<" , "<<nDigisPerFed[I_fedId[i]]<< ", "<<numberOfDigisMod << endl;
472  i=1439;
473  }
474  }
475  //cout<<"NDigis Endcap: "<<nDM1P1M1/2.<<" "<<nDM1P2M1/6.<<" "<<nDM1P1M2/6.<<" "<<nDM1P2M2/8.<<" "<<nDM1P1M3/8.<<" "<<nDM1P2M3/10.<<" "<<nDM1P1M4/5.<<endl;
476  } //endif Barrel/Endcap
477  //cout<<"numberOfDigis: "<<numberOfDigisMod<<" , nBPIXDigis: "<<nBPIXDigis<<" , nFPIXDigis: "<<nFPIXDigis<<endl;
478  // digi occupancy per individual FED channel:
479  } // endif any digis in this module
480  } // endfor loop over all modules
481 
482  //A really, really ugly way to do the occupancy-based
483  int NzeroROCs[2] = {0,-672};
484  int NloEffROCs[2] = {0,-672};
485  std::string baseDirs[2] = {"Pixel/Barrel", "Pixel/Endcap"};
486  if (lumiSection%10> 2){
487  for (int i = 0; i < 2; ++i){
488  theDMBE->cd(baseDirs[i]);
489  vector<string> shellDirs = theDMBE->getSubdirs();
490  for (vector<string>::const_iterator it = shellDirs.begin(); it != shellDirs.end(); it++) {
491  theDMBE->cd(*it);
492  vector<string> layDirs = theDMBE->getSubdirs();
493  for (vector<string>::const_iterator itt = layDirs.begin(); itt != layDirs.end(); itt++) {
494  theDMBE->cd(*itt);
495  vector<string> contents = theDMBE->getMEs();
496  for (vector<string>::const_iterator im = contents.begin(); im != contents.end(); im++) {
497  if ((*im).find("rocmap") == string::npos) continue;
498  MonitorElement* me = theDMBE->get((*itt)+"/"+(*im));
499  if(!me) continue;
500  MonitorElement* me2;
501  me2 = theDMBE->get((*itt)+"/zeroOccROC_map");
502  float SF = 1.0; if (me->getEntries() > 0) SF = float(me->getNbinsX()*me->getNbinsY()/me->getEntries());
503  for (int ii = 1; ii < me->getNbinsX()+1; ++ii){for (int jj = 1; jj < me->getNbinsY()+1; ++jj){
504  //Putting in conversion to layer maps.. again, ugly way to do it...
505  float localX = float(ii)-0.5;
506  float localY = float(jj)/2.0 + 1.25;
507  if (i ==1) localY = float(jj)/2.0 + 0.75;
508  if (me->getBinContent(ii,jj) < 1) {++NzeroROCs[i]; if (me2) me2->Fill(localX, localY);}
509  if (me->getBinContent(ii,jj)*SF < 0.25) ++NloEffROCs[i];}}
510  }
511  }
512  }
513  }
514  for (int i =0; i < 2; ++i) NloEffROCs[i] = NloEffROCs[i] - NzeroROCs[i];
515  MonitorElement* menoOcc=theDMBE->get("Pixel/noOccROCsBarrel");
516  MonitorElement* meloOcc=theDMBE->get("Pixel/loOccROCsBarrel");
517  if(menoOcc) menoOcc->setBinContent(1+lumiSection/10, NzeroROCs[0]);
518  if(meloOcc) meloOcc->setBinContent(1+lumiSection/10, NloEffROCs[0]);
519  MonitorElement* menoOcc1=theDMBE->get("Pixel/noOccROCsEndcap");
520  MonitorElement* meloOcc1=theDMBE->get("Pixel/loOccROCsEndcap");
521  if(menoOcc1) menoOcc1->setBinContent(1+lumiSection/10, NzeroROCs[1]);
522  if(meloOcc1) meloOcc1->setBinContent(1+lumiSection/10, NloEffROCs[1]);
523  theDMBE->cd();
524  }
525 // if(lumiSection>lumSec){ lumSec = lumiSection; nLumiSecs++; }
526 // if(nEventDigis>bigEventSize) nBigEvents++;
527 // if(nLumiSecs%5==0){
528 
530  meE=theDMBE->get("Pixel/Endcap/ALLMODS_ndigisCHAN_Endcap");
531  if(meE){ for(int j=0; j!=192; j++) if(numberOfDigis[j]>0) meE->Fill((float)numberOfDigis[j]);}
532  meE1=theDMBE->get("Pixel/Endcap/ALLMODS_ndigisCHAN_EndcapDm1");
533  if(meE1){ for(int j=0; j!=72; j++) if((j<24||j>47)&&numberOfDigis[j]>0) meE1->Fill((float)numberOfDigis[j]);}
534  meE2=theDMBE->get("Pixel/Endcap/ALLMODS_ndigisCHAN_EndcapDm2");
535  if(meE2){ for(int j=24; j!=96; j++) if((j<48||j>71)&&numberOfDigis[j]>0) meE2->Fill((float)numberOfDigis[j]);}
536  meE3=theDMBE->get("Pixel/Endcap/ALLMODS_ndigisCHAN_EndcapDp1");
537  if(meE3){ for(int j=96; j!=168; j++) if((j<120||j>143)&&numberOfDigis[j]>0) meE3->Fill((float)numberOfDigis[j]);}
538  meE4=theDMBE->get("Pixel/Endcap/ALLMODS_ndigisCHAN_EndcapDp2");
539  if(meE4){ for(int j=120; j!=192; j++) if((j<144||j>167)&&numberOfDigis[j]>0) meE4->Fill((float)numberOfDigis[j]);}
540 
547  MonitorElement* me36;
548  me1=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh1");
549  if(me1){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+0]>0) me1->Fill((float)nDigisPerChan[i*36+0]);}
550  me2=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh2");
551  if(me2){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+1]>0) me2->Fill((float)nDigisPerChan[i*36+1]);}
552  me3=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh3");
553  if(me3){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+2]>0) me3->Fill((float)nDigisPerChan[i*36+2]);}
554  me4=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh4");
555  if(me4){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+3]>0) me4->Fill((float)nDigisPerChan[i*36+3]);}
556  me5=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh5");
557  if(me5){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+4]>0) me5->Fill((float)nDigisPerChan[i*36+4]);}
558  me6=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh6");
559  if(me6){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+5]>0) me6->Fill((float)nDigisPerChan[i*36+5]);}
560  me7=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh7");
561  if(me7){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+6]>0) me7->Fill((float)nDigisPerChan[i*36+6]);}
562  me8=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh8");
563  if(me8){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+7]>0) me8->Fill((float)nDigisPerChan[i*36+7]);}
564  me9=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh9");
565  if(me9){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+8]>0) me9->Fill((float)nDigisPerChan[i*36+8]);}
566  me10=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh10");
567  if(me10){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+9]>0) me10->Fill((float)nDigisPerChan[i*36+9]);}
568  me11=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh11");
569  if(me11){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+10]>0) me11->Fill((float)nDigisPerChan[i*36+10]);}
570  me12=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh12");
571  if(me12){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+11]>0) me12->Fill((float)nDigisPerChan[i*36+11]);}
572  me13=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh13");
573  if(me13){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+12]>0) me13->Fill((float)nDigisPerChan[i*36+12]);}
574  me14=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh14");
575  if(me14){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+13]>0) me14->Fill((float)nDigisPerChan[i*36+13]);}
576  me15=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh15");
577  if(me15){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+14]>0) me15->Fill((float)nDigisPerChan[i*36+14]);}
578  me16=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh16");
579  if(me16){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+15]>0) me16->Fill((float)nDigisPerChan[i*36+15]);}
580  me17=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh17");
581  if(me17){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+16]>0) me17->Fill((float)nDigisPerChan[i*36+16]);}
582  me18=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh18");
583  if(me18){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+17]>0) me18->Fill((float)nDigisPerChan[i*36+17]);}
584  me19=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh19");
585  if(me19){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+18]>0) me19->Fill((float)nDigisPerChan[i*36+18]);}
586  me20=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh20");
587  if(me20){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+19]>0) me20->Fill((float)nDigisPerChan[i*36+19]);}
588  me21=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh21");
589  if(me21){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+20]>0) me21->Fill((float)nDigisPerChan[i*36+20]);}
590  me22=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh22");
591  if(me22){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+21]>0) me22->Fill((float)nDigisPerChan[i*36+21]);}
592  me23=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh23");
593  if(me23){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+22]>0) me23->Fill((float)nDigisPerChan[i*36+22]);}
594  me24=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh24");
595  if(me24){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+23]>0) me24->Fill((float)nDigisPerChan[i*36+23]);}
596  me25=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh25");
597  if(me25){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+24]>0) me25->Fill((float)nDigisPerChan[i*36+24]);}
598  me26=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh26");
599  if(me26){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+25]>0) me26->Fill((float)nDigisPerChan[i*36+25]);}
600  me27=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh27");
601  if(me27){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+26]>0) me27->Fill((float)nDigisPerChan[i*36+26]);}
602  me28=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh28");
603  if(me28){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+27]>0) me28->Fill((float)nDigisPerChan[i*36+27]);}
604  me29=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh29");
605  if(me29){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+28]>0) me29->Fill((float)nDigisPerChan[i*36+28]);}
606  me30=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh30");
607  if(me30){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+29]>0) me30->Fill((float)nDigisPerChan[i*36+29]);}
608  me31=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh31");
609  if(me31){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+30]>0) me31->Fill((float)nDigisPerChan[i*36+30]);}
610  me32=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh32");
611  if(me32){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+31]>0) me32->Fill((float)nDigisPerChan[i*36+31]);}
612  me33=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh33");
613  if(me33){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+32]>0) me33->Fill((float)nDigisPerChan[i*36+32]);}
614  me34=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh34");
615  if(me34){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+33]>0) me34->Fill((float)nDigisPerChan[i*36+33]);}
616  me35=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh35");
617  if(me35){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+34]>0) me35->Fill((float)nDigisPerChan[i*36+34]);}
618  me36=theDMBE->get("Pixel/Barrel/ALLMODS_ndigisCHAN_BarrelCh36");
619  if(me36){ for(int i=0; i!=32; i++) if(nDigisPerChan[i*36+35]>0) me36->Fill((float)nDigisPerChan[i*36+35]);}
620 
621  // Rate of events with >N digis:
622  MonitorElement* meX1;
623  if(nEventDigis>bigEventSize){
624  meX1 = theDMBE->get("Pixel/bigEventRate");
625  if(meX1) meX1->Fill(lumiSection,1./23.);
626  }
627  //std::cout<<"nEventDigis: "<<nEventDigis<<" , nLumiSecs: "<<nLumiSecs<<" , nBigEvents: "<<nBigEvents<<std::endl;
628 
629  // Rate of pixel events and total number of pixel events per BX:
630  MonitorElement* meX2; MonitorElement* meX3;
631  if(nActiveModules>=4){
632  meX2 = theDMBE->get("Pixel/pixEvtsPerBX");
633  if(meX2) meX2->Fill(float(bx));
634  meX3 = theDMBE->get("Pixel/pixEventRate");
635  if(meX3) meX3->Fill(lumiSection, 1./23.);
636  }
637 
638  // Actual digi occupancy in a FED compared to average digi occupancy per FED
639  MonitorElement* meX4; MonitorElement* meX5;
640  meX4 = theDMBE->get("Pixel/averageDigiOccupancy");
641  meX5 = theDMBE->get("Pixel/avgfedDigiOccvsLumi");
642  if(meX4){
643  int maxfed=0;
644  for(int i=0; i!=32; i++){
645  if(nDigisPerFed[i]>maxfed) maxfed=nDigisPerFed[i];
646  }
647  for(int i=0; i!=40; i++){
648  float averageOcc = 0.;
649  if(i<32){
650  float averageBPIXFed = float(nBPIXDigis-maxfed)/31.;
651  if(averageBPIXFed>0.) averageOcc = nDigisPerFed[i]/averageBPIXFed;
652  //cout<<"\t BPIX i: "<<i<<" , "<<nBPIXDigis<<" , "<<averageBPIXFed<<" , "<<nDigisPerFed[i]<<" , "<<averageOcc<<endl;
653  }else{
654  float averageFPIXFed = float(nFPIXDigis)/8.;
655  if(averageFPIXFed>0.) averageOcc = nDigisPerFed[i]/averageFPIXFed;
656  //cout<<"\t FPIX i: "<<i<<" , "<<nFPIXDigis<<" , "<<averageFPIXFed<<" , "<<nDigisPerFed[i]<<" , "<<averageOcc<<endl;
657  }
658  meX4->setBinContent(i+1,averageOcc);
659  int lumiSections8 = int(lumiSection/8);
660  if (modOn){
661  if (meX5){
662  meX5->setBinContent(1+lumiSections8, i+1, averageOcc);
663  }//endif meX5
664  }//endif modOn
665  }
666  }
667 
668  // slow down...
669  if(slowDown) usleep(10000);
670 
671 }
672 
673 //------------------------------------------------------------------
674 // Build data structure
675 //------------------------------------------------------------------
677 
678  LogInfo ("PixelDQM") <<" SiPixelDigiSource::buildStructure" ;
680  iSetup.get<TrackerDigiGeometryRecord>().get( pDD );
681 
682  LogVerbatim ("PixelDQM") << " *** Geometry node for TrackerGeom is "<<&(*pDD)<<std::endl;
683  LogVerbatim ("PixelDQM") << " *** I have " << pDD->dets().size() <<" detectors"<<std::endl;
684  LogVerbatim ("PixelDQM") << " *** I have " << pDD->detTypes().size() <<" types"<<std::endl;
685 
686  for(TrackerGeometry::DetContainer::const_iterator it = pDD->dets().begin(); it != pDD->dets().end(); it++){
687 
688  if(dynamic_cast<PixelGeomDetUnit*>((*it))!=0){
689 
690  DetId detId = (*it)->geographicalId();
691  const GeomDetUnit * geoUnit = pDD->idToDetUnit( detId );
692  const PixelGeomDetUnit * pixDet = dynamic_cast<const PixelGeomDetUnit*>(geoUnit);
693  int nrows = (pixDet->specificTopology()).nrows();
694  int ncols = (pixDet->specificTopology()).ncolumns();
695 
696  if(detId.subdetId() == static_cast<int>(PixelSubdetector::PixelBarrel)) {
697  if(isPIB) continue;
698  LogDebug ("PixelDQM") << " ---> Adding Barrel Module " << detId.rawId() << endl;
699  uint32_t id = detId();
700  SiPixelDigiModule* theModule = new SiPixelDigiModule(id, ncols, nrows);
701  thePixelStructure.insert(pair<uint32_t,SiPixelDigiModule*> (id,theModule));
702 
703  } else if(detId.subdetId() == static_cast<int>(PixelSubdetector::PixelEndcap)) {
704  LogDebug ("PixelDQM") << " ---> Adding Endcap Module " << detId.rawId() << endl;
705  uint32_t id = detId();
706  SiPixelDigiModule* theModule = new SiPixelDigiModule(id, ncols, nrows);
707 
709  int disk = PixelEndcapName(DetId(id)).diskName();
710  int blade = PixelEndcapName(DetId(id)).bladeName();
711  int panel = PixelEndcapName(DetId(id)).pannelName();
713 
714  char sside[80]; sprintf(sside, "HalfCylinder_%i",side);
715  char sdisk[80]; sprintf(sdisk, "Disk_%i",disk);
716  char sblade[80]; sprintf(sblade, "Blade_%02i",blade);
717  char spanel[80]; sprintf(spanel, "Panel_%i",panel);
718  char smodule[80];sprintf(smodule,"Module_%i",module);
719  std::string side_str = sside;
720  std::string disk_str = sdisk;
721  bool mask = side_str.find("HalfCylinder_1")!=string::npos||
722  side_str.find("HalfCylinder_2")!=string::npos||
723  side_str.find("HalfCylinder_4")!=string::npos||
724  disk_str.find("Disk_2")!=string::npos;
725  // clutch to take all of FPIX, but no BPIX:
726  mask = false;
727  if(isPIB && mask) continue;
728 
729  thePixelStructure.insert(pair<uint32_t,SiPixelDigiModule*> (id,theModule));
730  }
731 
732  }
733  }
734  LogInfo ("PixelDQM") << " *** Pixel Structure Size " << thePixelStructure.size() << endl;
735 }
736 //------------------------------------------------------------------
737 // Book MEs
738 //------------------------------------------------------------------
740 
741  // Get DQM interface
743  theDMBE->setCurrentFolder("Pixel");
744  char title[80]; sprintf(title, "Rate of events with >%i digis;LumiSection;Rate [Hz]",bigEventSize);
745  bigEventRate = theDMBE->book1D("bigEventRate",title,5000,0.,5000.);
746  char title1[80]; sprintf(title1, "Pixel events vs. BX;BX;# events");
747  pixEvtsPerBX = theDMBE->book1D("pixEvtsPerBX",title1,3565,0.,3565.);
748  char title2[80]; sprintf(title2, "Rate of Pixel events;LumiSection;Rate [Hz]");
749  pixEventRate = theDMBE->book1D("pixEventRate",title2,5000,0.,5000.);
750  char title3[80]; sprintf(title3, "Number of Zero-Occupancy Barrel ROCs;LumiSection;N_{ZERO-OCCUPANCY} Barrel ROCs");
751  noOccROCsBarrel = theDMBE->book1D("noOccROCsBarrel",title3,500,0.,5000.);
752  char title4[80]; sprintf(title4, "Number of Low-Efficiency Barrel ROCs;LumiSection;N_{LO EFF} Barrel ROCs");
753  loOccROCsBarrel = theDMBE->book1D("loOccROCsBarrel",title4,500,0.,5000.);
754  char title5[80]; sprintf(title5, "Number of Zero-Occupancy Endcap ROCs;LumiSection;N_{ZERO-OCCUPANCY} Endcap ROCs");
755  noOccROCsEndcap = theDMBE->book1D("noOccROCsEndcap",title5,500,0.,5000.);
756  char title6[80]; sprintf(title6, "Number of Low-Efficiency Endcap ROCs;LumiSection;N_{LO EFF} Endcap ROCs");
757  loOccROCsEndcap = theDMBE->book1D("loOccROCsEndcap",title6,500,0.,5000.);
758  char title7[80]; sprintf(title7, "Average digi occupancy per FED;FED;NDigis/<NDigis>");
759  averageDigiOccupancy = theDMBE->book1D("averageDigiOccupancy",title7,40,-0.5,39.5);
761  if(modOn){
762  char title4[80]; sprintf(title4, "FED Digi Occupancy (NDigis/<NDigis>) vs LumiSections;Lumi Section;FED");
763  avgfedDigiOccvsLumi = theDMBE->book2D ("avgfedDigiOccvsLumi", title4, 400,0., 3200., 40, -0.5, 39.5);
764  }
765  std::map<uint32_t,SiPixelDigiModule*>::iterator struct_iter;
766 
767  SiPixelFolderOrganizer theSiPixelFolder;
768 
769  for(struct_iter = thePixelStructure.begin(); struct_iter != thePixelStructure.end(); struct_iter++){
771  if(modOn){
772  if(theSiPixelFolder.setModuleFolder((*struct_iter).first)){
773  (*struct_iter).second->book( conf_,0,twoDimOn,hiRes, reducedSet, twoDimModOn);
774  } else {
775 
776  if(!isPIB) throw cms::Exception("LogicError")
777  << "[SiPixelDigiSource::bookMEs] Creation of DQM folder failed";
778  }
779  }
780  if(ladOn){
781  if(theSiPixelFolder.setModuleFolder((*struct_iter).first,1)){
782  (*struct_iter).second->book( conf_,1,twoDimOn,hiRes, reducedSet);
783  } else {
784  LogDebug ("PixelDQM") << "PROBLEM WITH LADDER-FOLDER\n";
785  }
786 
787  }
788  if(layOn || twoDimOnlyLayDisk){
789  if(theSiPixelFolder.setModuleFolder((*struct_iter).first,2)){
790  (*struct_iter).second->book( conf_,2,twoDimOn,hiRes, reducedSet, twoDimOnlyLayDisk);
791  } else {
792  LogDebug ("PixelDQM") << "PROBLEM WITH LAYER-FOLDER\n";
793  }
794  }
795 
796  if(phiOn){
797  if(theSiPixelFolder.setModuleFolder((*struct_iter).first,3)){
798  (*struct_iter).second->book( conf_,3,twoDimOn,hiRes, reducedSet);
799  } else {
800  LogDebug ("PixelDQM") << "PROBLEM WITH PHI-FOLDER\n";
801  }
802  }
803  if(bladeOn){
804  if(theSiPixelFolder.setModuleFolder((*struct_iter).first,4)){
805  (*struct_iter).second->book( conf_,4,twoDimOn,hiRes, reducedSet);
806  } else {
807  LogDebug ("PixelDQM") << "PROBLEM WITH BLADE-FOLDER\n";
808  }
809  }
810  if(diskOn || twoDimOnlyLayDisk){
811  if(theSiPixelFolder.setModuleFolder((*struct_iter).first,5)){
812  (*struct_iter).second->book( conf_,5,twoDimOn,hiRes, reducedSet, twoDimOnlyLayDisk);
813  } else {
814  LogDebug ("PixelDQM") << "PROBLEM WITH DISK-FOLDER\n";
815  }
816  }
817  if(ringOn){
818  if(theSiPixelFolder.setModuleFolder((*struct_iter).first,6)){
819  (*struct_iter).second->book( conf_,6,twoDimOn,hiRes, reducedSet);
820  } else {
821  LogDebug ("PixelDQM") << "PROBLEM WITH RING-FOLDER\n";
822  }
823  }
824  }
825  std::string currDir = theDMBE->pwd();
826  theDMBE->cd("Pixel/Barrel");
827  meNDigisCOMBBarrel_ = theDMBE->book1D("ALLMODS_ndigisCOMB_Barrel","Number of Digis",200,0.,400.);
828  meNDigisCOMBBarrel_->setAxisTitle("Number of digis per module per event",1);
829  meNDigisCHANBarrel_ = theDMBE->book1D("ALLMODS_ndigisCHAN_Barrel","Number of Digis",100,0.,1000.);
830  meNDigisCHANBarrel_->setAxisTitle("Number of digis per FED channel per event",1);
831  meNDigisCHANBarrelL1_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelL1","Number of Digis L1",100,0.,1000.);
832  meNDigisCHANBarrelL1_->setAxisTitle("Number of digis per FED channel per event",1);
833  meNDigisCHANBarrelL2_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelL2","Number of Digis L2",100,0.,1000.);
834  meNDigisCHANBarrelL2_->setAxisTitle("Number of digis per FED channel per event",1);
835  meNDigisCHANBarrelL3_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelL3","Number of Digis L3",100,0.,1000.);
836  meNDigisCHANBarrelL3_->setAxisTitle("Number of digis per FED channel per event",1);
837  meNDigisCHANBarrelCh1_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh1","Number of Digis Ch1",100,0.,1000.);
838  meNDigisCHANBarrelCh1_->setAxisTitle("Number of digis per FED channel per event",1);
839  meNDigisCHANBarrelCh2_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh2","Number of Digis Ch2",100,0.,1000.);
840  meNDigisCHANBarrelCh2_->setAxisTitle("Number of digis per FED channel per event",1);
841  meNDigisCHANBarrelCh3_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh3","Number of Digis Ch3",100,0.,1000.);
842  meNDigisCHANBarrelCh3_->setAxisTitle("Number of digis per FED channel per event",1);
843  meNDigisCHANBarrelCh4_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh4","Number of Digis Ch4",100,0.,1000.);
844  meNDigisCHANBarrelCh4_->setAxisTitle("Number of digis per FED channel per event",1);
845  meNDigisCHANBarrelCh5_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh5","Number of Digis Ch5",100,0.,1000.);
846  meNDigisCHANBarrelCh5_->setAxisTitle("Number of digis per FED channel per event",1);
847  meNDigisCHANBarrelCh6_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh6","Number of Digis Ch6",100,0.,1000.);
848  meNDigisCHANBarrelCh6_->setAxisTitle("Number of digis per FED channel per event",1);
849  meNDigisCHANBarrelCh7_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh7","Number of Digis Ch7",100,0.,1000.);
850  meNDigisCHANBarrelCh7_->setAxisTitle("Number of digis per FED channel per event",1);
851  meNDigisCHANBarrelCh8_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh8","Number of Digis Ch8",100,0.,1000.);
852  meNDigisCHANBarrelCh8_->setAxisTitle("Number of digis per FED channel per event",1);
853  meNDigisCHANBarrelCh9_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh9","Number of Digis Ch9",100,0.,1000.);
854  meNDigisCHANBarrelCh9_->setAxisTitle("Number of digis per FED channel per event",1);
855  meNDigisCHANBarrelCh10_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh10","Number of Digis Ch10",100,0.,1000.);
856  meNDigisCHANBarrelCh10_->setAxisTitle("Number of digis per FED channel per event",1);
857  meNDigisCHANBarrelCh11_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh11","Number of Digis Ch11",100,0.,1000.);
858  meNDigisCHANBarrelCh11_->setAxisTitle("Number of digis per FED channel per event",1);
859  meNDigisCHANBarrelCh12_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh12","Number of Digis Ch12",100,0.,1000.);
860  meNDigisCHANBarrelCh12_->setAxisTitle("Number of digis per FED channel per event",1);
861  meNDigisCHANBarrelCh13_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh13","Number of Digis Ch13",100,0.,1000.);
862  meNDigisCHANBarrelCh13_->setAxisTitle("Number of digis per FED channel per event",1);
863  meNDigisCHANBarrelCh14_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh14","Number of Digis Ch14",100,0.,1000.);
864  meNDigisCHANBarrelCh14_->setAxisTitle("Number of digis per FED channel per event",1);
865  meNDigisCHANBarrelCh15_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh15","Number of Digis Ch15",100,0.,1000.);
866  meNDigisCHANBarrelCh15_->setAxisTitle("Number of digis per FED channel per event",1);
867  meNDigisCHANBarrelCh16_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh16","Number of Digis Ch16",100,0.,1000.);
868  meNDigisCHANBarrelCh16_->setAxisTitle("Number of digis per FED channel per event",1);
869  meNDigisCHANBarrelCh17_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh17","Number of Digis Ch17",100,0.,1000.);
870  meNDigisCHANBarrelCh17_->setAxisTitle("Number of digis per FED channel per event",1);
871  meNDigisCHANBarrelCh18_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh18","Number of Digis Ch18",100,0.,1000.);
872  meNDigisCHANBarrelCh18_->setAxisTitle("Number of digis per FED channel per event",1);
873  meNDigisCHANBarrelCh19_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh19","Number of Digis Ch19",100,0.,1000.);
874  meNDigisCHANBarrelCh19_->setAxisTitle("Number of digis per FED channel per event",1);
875  meNDigisCHANBarrelCh20_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh20","Number of Digis Ch20",100,0.,1000.);
876  meNDigisCHANBarrelCh20_->setAxisTitle("Number of digis per FED channel per event",1);
877  meNDigisCHANBarrelCh21_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh21","Number of Digis Ch21",100,0.,1000.);
878  meNDigisCHANBarrelCh21_->setAxisTitle("Number of digis per FED channel per event",1);
879  meNDigisCHANBarrelCh22_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh22","Number of Digis Ch22",100,0.,1000.);
880  meNDigisCHANBarrelCh22_->setAxisTitle("Number of digis per FED channel per event",1);
881  meNDigisCHANBarrelCh23_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh23","Number of Digis Ch23",100,0.,1000.);
882  meNDigisCHANBarrelCh23_->setAxisTitle("Number of digis per FED channel per event",1);
883  meNDigisCHANBarrelCh24_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh24","Number of Digis Ch24",100,0.,1000.);
884  meNDigisCHANBarrelCh24_->setAxisTitle("Number of digis per FED channel per event",1);
885  meNDigisCHANBarrelCh25_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh25","Number of Digis Ch25",100,0.,1000.);
886  meNDigisCHANBarrelCh25_->setAxisTitle("Number of digis per FED channel per event",1);
887  meNDigisCHANBarrelCh26_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh26","Number of Digis Ch26",100,0.,1000.);
888  meNDigisCHANBarrelCh26_->setAxisTitle("Number of digis per FED channel per event",1);
889  meNDigisCHANBarrelCh27_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh27","Number of Digis Ch27",100,0.,1000.);
890  meNDigisCHANBarrelCh27_->setAxisTitle("Number of digis per FED channel per event",1);
891  meNDigisCHANBarrelCh28_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh28","Number of Digis Ch28",100,0.,1000.);
892  meNDigisCHANBarrelCh28_->setAxisTitle("Number of digis per FED channel per event",1);
893  meNDigisCHANBarrelCh29_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh29","Number of Digis Ch29",100,0.,1000.);
894  meNDigisCHANBarrelCh29_->setAxisTitle("Number of digis per FED channel per event",1);
895  meNDigisCHANBarrelCh30_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh30","Number of Digis Ch30",100,0.,1000.);
896  meNDigisCHANBarrelCh30_->setAxisTitle("Number of digis per FED channel per event",1);
897  meNDigisCHANBarrelCh31_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh31","Number of Digis Ch31",100,0.,1000.);
898  meNDigisCHANBarrelCh31_->setAxisTitle("Number of digis per FED channel per event",1);
899  meNDigisCHANBarrelCh32_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh32","Number of Digis Ch32",100,0.,1000.);
900  meNDigisCHANBarrelCh32_->setAxisTitle("Number of digis per FED channel per event",1);
901  meNDigisCHANBarrelCh33_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh33","Number of Digis Ch33",100,0.,1000.);
902  meNDigisCHANBarrelCh33_->setAxisTitle("Number of digis per FED channel per event",1);
903  meNDigisCHANBarrelCh34_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh34","Number of Digis Ch34",100,0.,1000.);
904  meNDigisCHANBarrelCh34_->setAxisTitle("Number of digis per FED channel per event",1);
905  meNDigisCHANBarrelCh35_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh35","Number of Digis Ch35",100,0.,1000.);
906  meNDigisCHANBarrelCh35_->setAxisTitle("Number of digis per FED channel per event",1);
907  meNDigisCHANBarrelCh36_ = theDMBE->book1D("ALLMODS_ndigisCHAN_BarrelCh36","Number of Digis Ch36",100,0.,1000.);
908  meNDigisCHANBarrelCh36_->setAxisTitle("Number of digis per FED channel per event",1);
909  theDMBE->cd("Pixel/Endcap");
910  meNDigisCOMBEndcap_ = theDMBE->book1D("ALLMODS_ndigisCOMB_Endcap","Number of Digis",200,0.,400.);
911  meNDigisCOMBEndcap_->setAxisTitle("Number of digis per module per event",1);
912  meNDigisCHANEndcap_ = theDMBE->book1D("ALLMODS_ndigisCHAN_Endcap","Number of Digis",100,0.,1000.);
913  meNDigisCHANEndcap_->setAxisTitle("Number of digis per FED channel per event",1);
914  meNDigisCHANEndcapDp1_ = theDMBE->book1D("ALLMODS_ndigisCHAN_EndcapDp1","Number of Digis Disk p1",100,0.,1000.);
915  meNDigisCHANEndcapDp1_->setAxisTitle("Number of digis per FED channel per event",1);
916  meNDigisCHANEndcapDp2_ = theDMBE->book1D("ALLMODS_ndigisCHAN_EndcapDp2","Number of Digis Disk p2",100,0.,1000.);
917  meNDigisCHANEndcapDp2_->setAxisTitle("Number of digis per FED channel per event",1);
918  meNDigisCHANEndcapDm1_ = theDMBE->book1D("ALLMODS_ndigisCHAN_EndcapDm1","Number of Digis Disk m1",100,0.,1000.);
919  meNDigisCHANEndcapDm1_->setAxisTitle("Number of digis per FED channel per event",1);
920  meNDigisCHANEndcapDm2_ = theDMBE->book1D("ALLMODS_ndigisCHAN_EndcapDm2","Number of Digis Disk m2",100,0.,1000.);
921  meNDigisCHANEndcapDm2_->setAxisTitle("Number of digis per FED channel per event",1);
922  theDMBE->cd(currDir);
923 }
924 
925 //define this as a plug-in
#define LogDebug(id)
int plaquetteName() const
plaquetteId (in pannel)
T getParameter(std::string const &) const
MonitorElement * meNDigisCHANBarrelCh19_
MonitorElement * meNDigisCHANBarrelCh35_
int i
Definition: DBlmapReader.cc:9
MonitorElement * meNDigisCHANBarrelCh2_
MonitorElement * meNDigisCHANBarrelCh30_
void setBinContent(int binx, double content)
set content of bin (1-D)
virtual void bookMEs()
MonitorElement * meNDigisCHANEndcapDp1_
MonitorElement * meNDigisCHANBarrelCh31_
std::vector< std::string > getSubdirs(void) const
Definition: DQMStore.cc:1574
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:872
MonitorElement * meNDigisCHANBarrelCh8_
std::string I_name[1440]
MonitorElement * meNDigisCHANBarrelCh36_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:561
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
MonitorElement * loOccROCsEndcap
MonitorElement * meNDigisCHANBarrelCh17_
MonitorElement * meNDigisCHANBarrelCh25_
MonitorElement * meNDigisCHANBarrelCh6_
MonitorElement * meNDigisCOMBBarrel_
int bunchCrossing() const
Definition: EventBase.h:62
MonitorElement * meNDigisCHANEndcapDm1_
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:59
MonitorElement * meNDigisCOMBEndcap_
MonitorElement * meNDigisCHANBarrelCh14_
MonitorElement * meNDigisCHANBarrelCh12_
MonitorElement * meNDigisCHANBarrelL3_
MonitorElement * meNDigisCHANBarrelCh29_
double getEntries(void) const
get # of entries
int ii
Definition: cuy.py:588
static std::string const input
Definition: EdmProvDump.cc:44
int getNbinsY(void) const
get # of bins in Y-axis
void Fill(long long x)
edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > srcToken_
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
MonitorElement * meNDigisCHANBarrelCh27_
int bladeName() const
blade id
SiPixelDigiSource(const edm::ParameterSet &conf)
int iEvent
Definition: GenABIO.cc:243
MonitorElement * meNDigisCHANEndcapDm2_
MonitorElement * meNDigisCHANBarrelCh3_
MonitorElement * meNDigisCHANBarrelCh9_
MonitorElement * meNDigisCHANBarrelCh4_
MonitorElement * meNDigisCHANBarrelCh34_
MonitorElement * meNDigisCHANBarrelCh26_
MonitorElement * noOccROCsBarrel
MonitorElement * meNDigisCHANEndcap_
MonitorElement * meNDigisCHANBarrelCh28_
int j
Definition: DBlmapReader.cc:9
MonitorElement * noOccROCsEndcap
virtual void analyze(const edm::Event &, const edm::EventSetup &)
MonitorElement * meNDigisCHANBarrel_
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
Definition: DQMStore.cc:2296
MonitorElement * meNDigisCHANBarrelCh33_
MonitorElement * pixEventRate
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1623
MonitorElement * meNDigisCHANBarrelCh21_
bool isValid() const
Definition: HandleBase.h:76
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
MonitorElement * meNDigisCHANBarrelCh32_
virtual void beginRun(const edm::Run &, edm::EventSetup const &)
MonitorElement * meNDigisCHANBarrelCh10_
MonitorElement * loOccROCsBarrel
MonitorElement * meNDigisCHANBarrelCh1_
MonitorElement * averageDigiOccupancy
Definition: DetId.h:18
unsigned int I_detId[1440]
MonitorElement * meNDigisCHANBarrelCh5_
virtual void endJob()
MonitorElement * meNDigisCHANBarrelCh7_
MonitorElement * meNDigisCHANBarrelCh15_
MonitorElement * meNDigisCHANBarrelCh13_
const T & get() const
Definition: EventSetup.h:55
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
MonitorElement * meNDigisCHANBarrelCh23_
virtual void beginJob()
MonitorElement * meNDigisCHANBarrelCh18_
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
Definition: DQMStore.cc:1597
MonitorElement * meNDigisCHANEndcapDp2_
double getBinContent(int binx) const
get content of bin (1-D)
MonitorElement * bigEventRate
MonitorElement * meNDigisCHANBarrelCh20_
MonitorElement * avgfedDigiOccvsLumi
edm::ParameterSet conf_
list infile
Definition: EdgesToViz.py:90
int pannelName() const
pannel id
int getNbinsX(void) const
get # of bins in X-axis
MonitorElement * meNDigisCHANBarrelCh22_
int diskName() const
disk id
MonitorElement * pixEvtsPerBX
volatile std::atomic< bool > shutdown_flag false
std::map< uint32_t, SiPixelDigiModule * > thePixelStructure
MonitorElement * meNDigisCHANBarrelL1_
void setLumiFlag(void)
this ME is meant to be stored for each luminosity section
HalfCylinder halfCylinder() const
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1000
MonitorElement * meNDigisCHANBarrelCh16_
MonitorElement * meNDigisCHANBarrelCh11_
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)
Definition: vlib.h:208
virtual void buildStructure(edm::EventSetup const &)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:584
MonitorElement * meNDigisCHANBarrelL2_
MonitorElement * meNDigisCHANBarrelCh24_
Definition: Run.h:41
bool setModuleFolder(const uint32_t &rawdetid=0, int type=0)
Set folder name for a module or plaquette.
const std::string & pwd(void) const
Definition: DQMStore.cc:556