50 src_( conf_.getParameter<edm::
InputTag>(
"src" ) ),
51 saveFile( conf_.getUntrackedParameter<bool>(
"saveFile",
false) ),
52 isPIB( conf_.getUntrackedParameter<bool>(
"isPIB",
false) ),
53 slowDown( conf_.getUntrackedParameter<bool>(
"slowDown",
false) ),
54 modOn( conf_.getUntrackedParameter<bool>(
"modOn",
true) ),
55 twoDimOn( conf_.getUntrackedParameter<bool>(
"twoDimOn",
true) ),
56 twoDimModOn( conf_.getUntrackedParameter<bool>(
"twoDimModOn",
true) ),
57 twoDimOnlyLayDisk( conf_.getUntrackedParameter<bool>(
"twoDimOnlyLayDisk",
false) ),
58 hiRes( conf_.getUntrackedParameter<bool>(
"hiRes",
false) ),
59 reducedSet( conf_.getUntrackedParameter<bool>(
"reducedSet",
false) ),
60 ladOn( conf_.getUntrackedParameter<bool>(
"ladOn",
false) ),
61 layOn( conf_.getUntrackedParameter<bool>(
"layOn",
false) ),
62 phiOn( conf_.getUntrackedParameter<bool>(
"phiOn",
false) ),
63 ringOn( conf_.getUntrackedParameter<bool>(
"ringOn",
false) ),
64 bladeOn( conf_.getUntrackedParameter<bool>(
"bladeOn",
false) ),
65 diskOn( conf_.getUntrackedParameter<bool>(
"diskOn",
false) ),
66 bigEventSize( conf_.getUntrackedParameter<int>(
"bigEventSize",1000) ),
67 isUpgrade( conf_.getUntrackedParameter<bool>(
"isUpgrade",
false) ),
82 if (
isUpgrade) { nTOTmodules=1856; }
else { nTOTmodules=1440; }
83 while(!infile.eof()&&nModsInFile<nTOTmodules) {
89 LogInfo (
"PixelDQM") <<
"SiPixelDigiSource::SiPixelDigiSource: Got DQM BackEnd interface"<<endl;
97 LogInfo (
"PixelDQM") <<
"SiPixelDigiSource::~SiPixelDigiSource: Destructor"<<endl;
119 if (
modOn && thisls % 10 == 0) {
171 for(
int i=0;
i!=40;
i++){
173 float averageOcc = 0.;
175 if(averageBPIXFed>0.) averageOcc =
nDigisPerFed[
i]/averageBPIXFed;
177 if(averageFPIXFed>0.) averageOcc =
nDigisPerFed[
i]/averageFPIXFed;
183 if (thisls % 10 == 0)
195 LogInfo (
"PixelDQM") <<
" SiPixelDigiSource::beginJob - Initialisation ... " << std::endl;
200 LogInfo (
"PixelDQM") <<
"2DIM IS " <<
twoDimOn <<
" and set to high resolution? " <<
hiRes <<
"\n";
319 int nEventDigis = 0;
int nActiveModules = 0;
321 std::map<uint32_t,SiPixelDigiModule*>::iterator struct_iter;
328 int numberOfDigisMod = (*struct_iter).second->fill(*input, iSetup,
339 if(numberOfDigisMod>0){
340 nEventDigis = nEventDigis + numberOfDigisMod;
375 for(
int i=0;
i!=nBPiXmodules; ++
i){
376 if((*struct_iter).first ==
I_detId[
i]){
378 int index1 = 0;
int index2 = 0;
413 if(panel==1){
if(module==1)
nDM1P1M1+=numberOfDigisMod;
414 else if(module==2)
nDM1P1M2+=numberOfDigisMod;
415 else if(module==3)
nDM1P1M3+=numberOfDigisMod;
416 else if(module==4)
nDM1P1M4+=numberOfDigisMod;}
417 else if(panel==2){
if(module==1)
nDM1P2M1+=numberOfDigisMod;
418 else if(module==2)
nDM1P2M2+=numberOfDigisMod;
419 else if(module==3)
nDM1P2M3+=numberOfDigisMod; }
420 if(blade<13 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
423 if(panel==1){
if(module==1)
nDM2P1M1+=numberOfDigisMod;
424 else if(module==2)
nDM2P1M2+=numberOfDigisMod;
425 else if(module==3)
nDM2P1M3+=numberOfDigisMod;
426 else if(module==4)
nDM2P1M4+=numberOfDigisMod;}
427 else if(panel==2){
if(module==1)
nDM2P2M1+=numberOfDigisMod;
428 else if(module==2)
nDM2P2M2+=numberOfDigisMod;
429 else if(module==3)
nDM2P2M3+=numberOfDigisMod; }
430 if(blade<13 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
435 if(panel==1){
if(module==1)
nDM1P1M1+=numberOfDigisMod;
436 else if(module==2)
nDM1P1M2+=numberOfDigisMod;
437 else if(module==3)
nDM1P1M3+=numberOfDigisMod;
438 else if(module==4)
nDM1P1M4+=numberOfDigisMod;}
439 else if(panel==2){
if(module==1)
nDM1P2M1+=numberOfDigisMod;
440 else if(module==2)
nDM1P2M2+=numberOfDigisMod;
441 else if(module==3)
nDM1P2M3+=numberOfDigisMod; }
442 if(blade<13 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
445 if(panel==1){
if(module==1)
nDM2P1M1+=numberOfDigisMod;
446 else if(module==2)
nDM2P1M2+=numberOfDigisMod;
447 else if(module==3)
nDM2P1M3+=numberOfDigisMod;
448 else if(module==4)
nDM2P1M4+=numberOfDigisMod;}
449 else if(panel==2){
if(module==1)
nDM2P2M1+=numberOfDigisMod;
450 else if(module==2)
nDM2P2M2+=numberOfDigisMod;
451 else if(module==3)
nDM2P2M3+=numberOfDigisMod; }
452 if(blade<13 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
457 if(panel==1){
if(module==1)
nDP1P1M1+=numberOfDigisMod;
458 else if(module==2)
nDP1P1M2+=numberOfDigisMod;
459 else if(module==3)
nDP1P1M3+=numberOfDigisMod;
460 else if(module==4)
nDP1P1M4+=numberOfDigisMod;}
461 else if(panel==2){
if(module==1)
nDP1P2M1+=numberOfDigisMod;
462 else if(module==2)
nDP1P2M2+=numberOfDigisMod;
463 else if(module==3)
nDP1P2M3+=numberOfDigisMod; }
464 if(blade<13 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
467 if(panel==1){
if(module==1)
nDP2P1M1+=numberOfDigisMod;
468 else if(module==2)
nDP2P1M2+=numberOfDigisMod;
469 else if(module==3)
nDP2P1M3+=numberOfDigisMod;
470 else if(module==4)
nDP2P1M4+=numberOfDigisMod;}
471 else if(panel==2){
if(module==1)
nDP2P2M1+=numberOfDigisMod;
472 else if(module==2)
nDP2P2M2+=numberOfDigisMod;
473 else if(module==3)
nDP2P2M3+=numberOfDigisMod; }
474 if(blade<13 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
479 if(panel==1){
if(module==1)
nDP1P1M1+=numberOfDigisMod;
480 else if(module==2)
nDP1P1M2+=numberOfDigisMod;
481 else if(module==3)
nDP1P1M3+=numberOfDigisMod;
482 else if(module==4)
nDP1P1M4+=numberOfDigisMod;}
483 else if(panel==2){
if(module==1)
nDP1P2M1+=numberOfDigisMod;
484 else if(module==2)
nDP1P2M2+=numberOfDigisMod;
485 else if(module==3)
nDP1P2M3+=numberOfDigisMod; }
486 if(blade<13 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
489 if(panel==1){
if(module==1)
nDP2P1M1+=numberOfDigisMod;
490 else if(module==2)
nDP2P1M2+=numberOfDigisMod;
491 else if(module==3)
nDP2P1M3+=numberOfDigisMod;
492 else if(module==4)
nDP2P1M4+=numberOfDigisMod;}
493 else if(panel==2){
if(module==1)
nDP2P2M1+=numberOfDigisMod;
494 else if(module==2)
nDP2P2M2+=numberOfDigisMod;
495 else if(module==3)
nDP2P2M3+=numberOfDigisMod; }
496 if(blade<13 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
501 for(
int i=nBPiXmodules; i!=nTOTmodules; i++){
502 if((*struct_iter).first ==
I_detId[i]){
520 if(panel==1){
if(module==1)
nDM1P1M1+=numberOfDigisMod; }
521 else if(panel==2){
if(module==1)
nDM1P2M1+=numberOfDigisMod; }
522 if(blade<12 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
525 if(panel==1){
if(module==1)
nDM2P1M1+=numberOfDigisMod; }
526 else if(panel==2){
if(module==1)
nDM2P2M1+=numberOfDigisMod; }
527 if(blade<12 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
530 if(panel==1){
if(module==1)
nDM3P1M1+=numberOfDigisMod; }
531 else if(panel==2){
if(module==1)
nDM3P2M1+=numberOfDigisMod; }
532 if(blade<12 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
537 if(panel==1){
if(module==1)
nDM1P1M1+=numberOfDigisMod; }
538 else if(panel==2){
if(module==1)
nDM1P2M1+=numberOfDigisMod; }
539 if(blade<18 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
542 if(panel==1){
if(module==1)
nDM2P1M1+=numberOfDigisMod; }
543 else if(panel==2){
if(module==1)
nDM2P2M1+=numberOfDigisMod; }
544 if(blade<18 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
547 if(panel==1){
if(module==1)
nDM3P1M1+=numberOfDigisMod; }
548 else if(panel==2){
if(module==1)
nDM3P2M1+=numberOfDigisMod; }
549 if(blade<18 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
554 if(panel==1){
if(module==1)
nDP1P1M1+=numberOfDigisMod; }
555 else if(panel==2){
if(module==1)
nDP1P2M1+=numberOfDigisMod; }
556 if(blade<12 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
559 if(panel==1){
if(module==1)
nDP2P1M1+=numberOfDigisMod; }
560 else if(panel==2){
if(module==1)
nDP2P2M1+=numberOfDigisMod; }
561 if(blade<12 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
564 if(panel==1){
if(module==1)
nDP3P1M1+=numberOfDigisMod; }
565 else if(panel==2){
if(module==1)
nDP3P2M1+=numberOfDigisMod; }
566 if(blade<12 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
571 if(panel==1){
if(module==1)
nDP1P1M1+=numberOfDigisMod; }
572 else if(panel==2){
if(module==1)
nDP1P2M1+=numberOfDigisMod; }
573 if(blade<18 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
576 if(panel==1){
if(module==1)
nDP2P1M1+=numberOfDigisMod; }
577 else if(panel==2){
if(module==1)
nDP2P2M1+=numberOfDigisMod; }
578 if(blade<18 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
581 if(panel==1){
if(module==1)
nDP3P1M1+=numberOfDigisMod; }
582 else if(panel==2){
if(module==1)
nDP3P2M1+=numberOfDigisMod; }
583 if(blade<18 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
587 for(
int i=nBPiXmodules; i!=nTOTmodules; i++){
588 if((*struct_iter).first ==
I_detId[i]){
668 if(nActiveModules>=4){
686 LogInfo (
"PixelDQM") <<
" SiPixelDigiSource::buildStructure" ;
690 LogVerbatim (
"PixelDQM") <<
" *** Geometry node for TrackerGeom is "<<&(*pDD)<<std::endl;
691 LogVerbatim (
"PixelDQM") <<
" *** I have " << pDD->dets().size() <<
" detectors"<<std::endl;
692 LogVerbatim (
"PixelDQM") <<
" *** I have " << pDD->detTypes().size() <<
" types"<<std::endl;
694 for(TrackerGeometry::DetContainer::const_iterator it = pDD->dets().begin(); it != pDD->dets().end(); it++){
696 if(dynamic_cast<PixelGeomDetUnit const *>((*it))!=0){
698 DetId detId = (*it)->geographicalId();
699 const GeomDetUnit * geoUnit = pDD->idToDetUnit( detId );
706 LogDebug (
"PixelDQM") <<
" ---> Adding Barrel Module " << detId.
rawId() << endl;
707 uint32_t
id = detId();
714 LogDebug (
"PixelDQM") <<
" ---> Adding Endcap Module " << detId.
rawId() << endl;
715 uint32_t
id = detId();
725 char sside[80]; sprintf(sside,
"HalfCylinder_%i",side);
726 char sdisk[80]; sprintf(sdisk,
"Disk_%i",disk);
727 char sblade[80]; sprintf(sblade,
"Blade_%02i",blade);
728 char spanel[80]; sprintf(spanel,
"Panel_%i",panel);
729 char smodule[80];sprintf(smodule,
"Module_%i",module);
732 bool mask = side_str.find(
"HalfCylinder_1")!=string::npos||
733 side_str.find(
"HalfCylinder_2")!=string::npos||
734 side_str.find(
"HalfCylinder_4")!=string::npos||
735 disk_str.find(
"Disk_2")!=string::npos;
738 if(
isPIB && mask)
continue;
742 LogDebug (
"PixelDQM") <<
" ---> Adding Endcap Module " << detId.
rawId() << endl;
743 uint32_t
id = detId();
753 char sside[80]; sprintf(sside,
"HalfCylinder_%i",side);
754 char sdisk[80]; sprintf(sdisk,
"Disk_%i",disk);
755 char sblade[80]; sprintf(sblade,
"Blade_%02i",blade);
756 char spanel[80]; sprintf(spanel,
"Panel_%i",panel);
757 char smodule[80];sprintf(smodule,
"Module_%i",module);
760 bool mask = side_str.find(
"HalfCylinder_1")!=string::npos||
761 side_str.find(
"HalfCylinder_2")!=string::npos||
762 side_str.find(
"HalfCylinder_4")!=string::npos||
763 disk_str.find(
"Disk_2")!=string::npos;
766 if(
isPIB && mask)
continue;
782 char title[80]; sprintf(title,
"Rate of events with >%i digis;LumiSection;Rate [Hz]",
bigEventSize);
784 char title1[80]; sprintf(title1,
"Pixel events vs. BX;BX;# events");
786 char title2[80]; sprintf(title2,
"Rate of Pixel events;LumiSection;Rate [Hz]");
788 char title3[80]; sprintf(title3,
"Number of Zero-Occupancy Barrel ROCs;LumiSection;N_{ZERO-OCCUPANCY} Barrel ROCs");
790 char title4[80]; sprintf(title4,
"Number of Low-Efficiency Barrel ROCs;LumiSection;N_{LO EFF} Barrel ROCs");
792 char title5[80]; sprintf(title5,
"Number of Zero-Occupancy Endcap ROCs;LumiSection;N_{ZERO-OCCUPANCY} Endcap ROCs");
794 char title6[80]; sprintf(title6,
"Number of Low-Efficiency Endcap ROCs;LumiSection;N_{LO EFF} Endcap ROCs");
796 char title7[80]; sprintf(title7,
"Average digi occupancy per FED;FED;NDigis/<NDigis>");
800 char title4[80]; sprintf(title4,
"FED Digi Occupancy (NDigis/<NDigis>) vs LumiSections;Lumi Section;FED");
806 std::map<uint32_t,SiPixelDigiModule*>::iterator struct_iter;
818 <<
"[SiPixelDigiSource::bookMEs] Creation of DQM folder failed";
825 LogDebug (
"PixelDQM") <<
"PROBLEM WITH LADDER-FOLDER\n";
833 LogDebug (
"PixelDQM") <<
"PROBLEM WITH LAYER-FOLDER\n";
841 LogDebug (
"PixelDQM") <<
"PROBLEM WITH PHI-FOLDER\n";
848 LogDebug (
"PixelDQM") <<
"PROBLEM WITH BLADE-FOLDER\n";
855 LogDebug (
"PixelDQM") <<
"PROBLEM WITH DISK-FOLDER\n";
862 LogDebug (
"PixelDQM") <<
"PROBLEM WITH RING-FOLDER\n";
871 std::stringstream ss1, ss2;
874 ss1.str(
std::string()); ss1 <<
"ALLMODS_ndigisCHAN_BarrelL" <<
i;
875 ss2.str(
std::string()); ss2 <<
"Number of Digis L" <<
i;
958 ss1.str(
std::string()); ss1 <<
"ALLMODS_ndigisCHAN_EndcapDp" <<
i;
959 ss2.str(
std::string()); ss2 <<
"Number of Digis Disk p" <<
i;
965 ss1.str(
std::string()); ss1 <<
"ALLMODS_ndigisCHAN_EndcapDm" <<
i;
966 ss2.str(
std::string()); ss2 <<
"Number of Digis Disk m" <<
i;
int plaquetteName() const
plaquetteId (in pannel)
LuminosityBlockID id() const
T getParameter(std::string const &) const
MonitorElement * meNDigisCHANBarrelCh19_
MonitorElement * meNDigisCHANBarrelCh35_
MonitorElement * meNDigisCHANBarrelCh2_
MonitorElement * meNDigisCHANBarrelCh30_
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * meNDigisCHANBarrelCh31_
MonitorElement * meNDigisCHANBarrelCh8_
MonitorElement * bookProfile(Args &&...args)
MonitorElement * meNDigisCHANBarrelCh36_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
MonitorElement * loOccROCsEndcap
MonitorElement * meNDigisCHANBarrelCh17_
MonitorElement * meNDigisCHANBarrelCh25_
MonitorElement * meNDigisCHANBarrelCh6_
MonitorElement * meNDigisCOMBBarrel_
int bunchCrossing() const
std::string topFolderName_
edm::LuminosityBlockNumber_t luminosityBlock() const
MonitorElement * meNDigisCOMBEndcap_
std::pair< int, int > getZeroLoEffROCs()
MonitorElement * meNDigisCHANBarrelCh14_
MonitorElement * meNDigisCHANBarrelCh12_
MonitorElement * meNDigisCHANBarrelCh29_
static std::string const input
edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > srcToken_
uint32_t rawId() const
get the raw id
MonitorElement * meNDigisCHANBarrelCh27_
int bladeName() const
blade id
virtual void bookMEs(DQMStore::IBooker &, const edm::EventSetup &iSetup)
SiPixelDigiSource(const edm::ParameterSet &conf)
MonitorElement * meNDigisCHANBarrelCh3_
MonitorElement * meNDigisCHANBarrelCh9_
MonitorElement * meNDigisCHANBarrelCh4_
MonitorElement * meNDigisCHANBarrelCh34_
MonitorElement * meNDigisCHANBarrelCh26_
bool setModuleFolder(const uint32_t &rawdetid=0, int type=0, bool isUpgrade=false)
Set folder name for a module or plaquette.
MonitorElement * noOccROCsBarrel
MonitorElement * meNDigisCHANEndcap_
MonitorElement * book1D(Args &&...args)
MonitorElement * meNDigisCHANBarrelCh28_
MonitorElement * noOccROCsEndcap
virtual void analyze(const edm::Event &, const edm::EventSetup &)
MonitorElement * meNDigisCHANBarrel_
std::vector< MonitorElement * > meNDigisCHANEndcapDms_
virtual void dqmBeginRun(const edm::Run &, edm::EventSetup const &)
MonitorElement * meNDigisCHANBarrelCh33_
MonitorElement * pixEventRate
MonitorElement * meNDigisCHANBarrelCh21_
unsigned int I_detId[1856]
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
MonitorElement * meNDigisCHANBarrelCh32_
MonitorElement * meNDigisCHANBarrelCh10_
MonitorElement * loOccROCsBarrel
MonitorElement * meNDigisCHANBarrelCh1_
MonitorElement * averageDigiOccupancy
void setCurrentFolder(const std::string &fullpath)
MonitorElement * meNDigisCHANBarrelCh5_
MonitorElement * book2D(Args &&...args)
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * meNDigisCHANBarrelCh7_
MonitorElement * meNDigisCHANBarrelCh15_
MonitorElement * meNDigisCHANBarrelCh13_
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
MonitorElement * meNDigisCHANBarrelCh23_
int layerName() const
layer id
T const * product() const
LuminosityBlockNumber_t luminosityBlock() const
MonitorElement * meNDigisCHANBarrelCh18_
MonitorElement * bigEventRate
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
MonitorElement * meNDigisCHANBarrelCh20_
MonitorElement * avgfedDigiOccvsLumi
int pannelName() const
pannel id
MonitorElement * meNDigisCHANBarrelCh22_
int diskName() const
disk id
std::vector< MonitorElement * > meNDigisCHANEndcapDps_
MonitorElement * pixEvtsPerBX
virtual void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
volatile std::atomic< bool > shutdown_flag false
std::vector< MonitorElement * > meNDigisCHANBarrelLs_
std::map< uint32_t, SiPixelDigiModule * > thePixelStructure
void setLumiFlag(void)
this ME is meant to be stored for each luminosity section
HalfCylinder halfCylinder() const
MonitorElement * meNDigisCHANBarrelCh16_
MonitorElement * meNDigisCHANBarrelCh11_
T mod(const T &a, const T &b)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
virtual void CountZeroROCsInSubstructure(bool, bool &, SiPixelDigiModule *)
virtual void buildStructure(edm::EventSetup const &)
MonitorElement * meNDigisCHANBarrelCh24_