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) ),
80 assert(!infile.fail());
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;
184 if (thisls % 10 == 0)
191 if(
modOn && thisls % 10 == 0) {
201 LogInfo (
"PixelDQM") <<
" SiPixelDigiSource::beginJob - Initialisation ... " << std::endl;
206 LogInfo (
"PixelDQM") <<
"2DIM IS " <<
twoDimOn <<
" and set to high resolution? " <<
hiRes <<
"\n";
325 int nEventDigis = 0;
int nActiveModules = 0;
327 std::map<uint32_t,SiPixelDigiModule*>::iterator struct_iter;
334 int numberOfDigisMod = (*struct_iter).second->fill(*input, iSetup,
345 if(numberOfDigisMod>0){
346 nEventDigis = nEventDigis + numberOfDigisMod;
381 for(
int i=0;
i!=nBPiXmodules; ++
i){
382 if((*struct_iter).first ==
I_detId[
i]){
384 int index1 = 0;
int index2 = 0;
419 if(panel==1){
if(module==1)
nDM1P1M1+=numberOfDigisMod;
420 else if(module==2)
nDM1P1M2+=numberOfDigisMod;
421 else if(module==3)
nDM1P1M3+=numberOfDigisMod;
422 else if(module==4)
nDM1P1M4+=numberOfDigisMod;}
423 else if(panel==2){
if(module==1)
nDM1P2M1+=numberOfDigisMod;
424 else if(module==2)
nDM1P2M2+=numberOfDigisMod;
425 else if(module==3)
nDM1P2M3+=numberOfDigisMod; }
426 if(blade<13 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
429 if(panel==1){
if(module==1)
nDM2P1M1+=numberOfDigisMod;
430 else if(module==2)
nDM2P1M2+=numberOfDigisMod;
431 else if(module==3)
nDM2P1M3+=numberOfDigisMod;
432 else if(module==4)
nDM2P1M4+=numberOfDigisMod;}
433 else if(panel==2){
if(module==1)
nDM2P2M1+=numberOfDigisMod;
434 else if(module==2)
nDM2P2M2+=numberOfDigisMod;
435 else if(module==3)
nDM2P2M3+=numberOfDigisMod; }
436 if(blade<13 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
441 if(panel==1){
if(module==1)
nDM1P1M1+=numberOfDigisMod;
442 else if(module==2)
nDM1P1M2+=numberOfDigisMod;
443 else if(module==3)
nDM1P1M3+=numberOfDigisMod;
444 else if(module==4)
nDM1P1M4+=numberOfDigisMod;}
445 else if(panel==2){
if(module==1)
nDM1P2M1+=numberOfDigisMod;
446 else if(module==2)
nDM1P2M2+=numberOfDigisMod;
447 else if(module==3)
nDM1P2M3+=numberOfDigisMod; }
448 if(blade<13 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
451 if(panel==1){
if(module==1)
nDM2P1M1+=numberOfDigisMod;
452 else if(module==2)
nDM2P1M2+=numberOfDigisMod;
453 else if(module==3)
nDM2P1M3+=numberOfDigisMod;
454 else if(module==4)
nDM2P1M4+=numberOfDigisMod;}
455 else if(panel==2){
if(module==1)
nDM2P2M1+=numberOfDigisMod;
456 else if(module==2)
nDM2P2M2+=numberOfDigisMod;
457 else if(module==3)
nDM2P2M3+=numberOfDigisMod; }
458 if(blade<13 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
463 if(panel==1){
if(module==1)
nDP1P1M1+=numberOfDigisMod;
464 else if(module==2)
nDP1P1M2+=numberOfDigisMod;
465 else if(module==3)
nDP1P1M3+=numberOfDigisMod;
466 else if(module==4)
nDP1P1M4+=numberOfDigisMod;}
467 else if(panel==2){
if(module==1)
nDP1P2M1+=numberOfDigisMod;
468 else if(module==2)
nDP1P2M2+=numberOfDigisMod;
469 else if(module==3)
nDP1P2M3+=numberOfDigisMod; }
470 if(blade<13 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
473 if(panel==1){
if(module==1)
nDP2P1M1+=numberOfDigisMod;
474 else if(module==2)
nDP2P1M2+=numberOfDigisMod;
475 else if(module==3)
nDP2P1M3+=numberOfDigisMod;
476 else if(module==4)
nDP2P1M4+=numberOfDigisMod;}
477 else if(panel==2){
if(module==1)
nDP2P2M1+=numberOfDigisMod;
478 else if(module==2)
nDP2P2M2+=numberOfDigisMod;
479 else if(module==3)
nDP2P2M3+=numberOfDigisMod; }
480 if(blade<13 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
485 if(panel==1){
if(module==1)
nDP1P1M1+=numberOfDigisMod;
486 else if(module==2)
nDP1P1M2+=numberOfDigisMod;
487 else if(module==3)
nDP1P1M3+=numberOfDigisMod;
488 else if(module==4)
nDP1P1M4+=numberOfDigisMod;}
489 else if(panel==2){
if(module==1)
nDP1P2M1+=numberOfDigisMod;
490 else if(module==2)
nDP1P2M2+=numberOfDigisMod;
491 else if(module==3)
nDP1P2M3+=numberOfDigisMod; }
492 if(blade<13 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
495 if(panel==1){
if(module==1)
nDP2P1M1+=numberOfDigisMod;
496 else if(module==2)
nDP2P1M2+=numberOfDigisMod;
497 else if(module==3)
nDP2P1M3+=numberOfDigisMod;
498 else if(module==4)
nDP2P1M4+=numberOfDigisMod;}
499 else if(panel==2){
if(module==1)
nDP2P2M1+=numberOfDigisMod;
500 else if(module==2)
nDP2P2M2+=numberOfDigisMod;
501 else if(module==3)
nDP2P2M3+=numberOfDigisMod; }
502 if(blade<13 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
507 for(
int i=nBPiXmodules; i!=nTOTmodules; i++){
508 if((*struct_iter).first ==
I_detId[i]){
526 if(panel==1){
if(module==1)
nDM1P1M1+=numberOfDigisMod; }
527 else if(panel==2){
if(module==1)
nDM1P2M1+=numberOfDigisMod; }
528 if(blade<12 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
531 if(panel==1){
if(module==1)
nDM2P1M1+=numberOfDigisMod; }
532 else if(panel==2){
if(module==1)
nDM2P2M1+=numberOfDigisMod; }
533 if(blade<12 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
536 if(panel==1){
if(module==1)
nDM3P1M1+=numberOfDigisMod; }
537 else if(panel==2){
if(module==1)
nDM3P2M1+=numberOfDigisMod; }
538 if(blade<12 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
543 if(panel==1){
if(module==1)
nDM1P1M1+=numberOfDigisMod; }
544 else if(panel==2){
if(module==1)
nDM1P2M1+=numberOfDigisMod; }
545 if(blade<18 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
548 if(panel==1){
if(module==1)
nDM2P1M1+=numberOfDigisMod; }
549 else if(panel==2){
if(module==1)
nDM2P2M1+=numberOfDigisMod; }
550 if(blade<18 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
553 if(panel==1){
if(module==1)
nDM3P1M1+=numberOfDigisMod; }
554 else if(panel==2){
if(module==1)
nDM3P2M1+=numberOfDigisMod; }
555 if(blade<18 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
560 if(panel==1){
if(module==1)
nDP1P1M1+=numberOfDigisMod; }
561 else if(panel==2){
if(module==1)
nDP1P2M1+=numberOfDigisMod; }
562 if(blade<12 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
565 if(panel==1){
if(module==1)
nDP2P1M1+=numberOfDigisMod; }
566 else if(panel==2){
if(module==1)
nDP2P2M1+=numberOfDigisMod; }
567 if(blade<12 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
570 if(panel==1){
if(module==1)
nDP3P1M1+=numberOfDigisMod; }
571 else if(panel==2){
if(module==1)
nDP3P2M1+=numberOfDigisMod; }
572 if(blade<12 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
577 if(panel==1){
if(module==1)
nDP1P1M1+=numberOfDigisMod; }
578 else if(panel==2){
if(module==1)
nDP1P2M1+=numberOfDigisMod; }
579 if(blade<18 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
582 if(panel==1){
if(module==1)
nDP2P1M1+=numberOfDigisMod; }
583 else if(panel==2){
if(module==1)
nDP2P2M1+=numberOfDigisMod; }
584 if(blade<18 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
587 if(panel==1){
if(module==1)
nDP3P1M1+=numberOfDigisMod; }
588 else if(panel==2){
if(module==1)
nDP3P2M1+=numberOfDigisMod; }
589 if(blade<18 && blade>0 && (panel==1 || panel==2)) iter = i+2*(blade-1)+(panel-1);
593 for(
int i=nBPiXmodules; i!=nTOTmodules; i++){
594 if((*struct_iter).first ==
I_detId[i]){
674 if(nActiveModules>=4){
692 LogInfo (
"PixelDQM") <<
" SiPixelDigiSource::buildStructure" ;
696 LogVerbatim (
"PixelDQM") <<
" *** Geometry node for TrackerGeom is "<<&(*pDD)<<std::endl;
697 LogVerbatim (
"PixelDQM") <<
" *** I have " << pDD->
dets().size() <<
" detectors"<<std::endl;
698 LogVerbatim (
"PixelDQM") <<
" *** I have " << pDD->
detTypes().size() <<
" types"<<std::endl;
700 for(TrackerGeometry::DetContainer::const_iterator it = pDD->
dets().begin(); it != pDD->
dets().end(); it++){
702 if(dynamic_cast<PixelGeomDetUnit const *>((*it))!=0){
704 DetId detId = (*it)->geographicalId();
712 LogDebug (
"PixelDQM") <<
" ---> Adding Barrel Module " << detId.
rawId() << endl;
713 uint32_t
id = detId();
720 LogDebug (
"PixelDQM") <<
" ---> Adding Endcap Module " << detId.
rawId() << endl;
721 uint32_t
id = detId();
731 char sside[80]; sprintf(sside,
"HalfCylinder_%i",side);
732 char sdisk[80]; sprintf(sdisk,
"Disk_%i",disk);
733 char sblade[80]; sprintf(sblade,
"Blade_%02i",blade);
734 char spanel[80]; sprintf(spanel,
"Panel_%i",panel);
735 char smodule[80];sprintf(smodule,
"Module_%i",module);
738 bool mask = side_str.find(
"HalfCylinder_1")!=string::npos||
739 side_str.find(
"HalfCylinder_2")!=string::npos||
740 side_str.find(
"HalfCylinder_4")!=string::npos||
741 disk_str.find(
"Disk_2")!=string::npos;
744 if(
isPIB && mask)
continue;
748 LogDebug (
"PixelDQM") <<
" ---> Adding Endcap Module " << detId.
rawId() << endl;
749 uint32_t
id = detId();
759 char sside[80]; sprintf(sside,
"HalfCylinder_%i",side);
760 char sdisk[80]; sprintf(sdisk,
"Disk_%i",disk);
761 char sblade[80]; sprintf(sblade,
"Blade_%02i",blade);
762 char spanel[80]; sprintf(spanel,
"Panel_%i",panel);
763 char smodule[80];sprintf(smodule,
"Module_%i",module);
766 bool mask = side_str.find(
"HalfCylinder_1")!=string::npos||
767 side_str.find(
"HalfCylinder_2")!=string::npos||
768 side_str.find(
"HalfCylinder_4")!=string::npos||
769 disk_str.find(
"Disk_2")!=string::npos;
772 if(
isPIB && mask)
continue;
788 char title[80]; sprintf(title,
"Rate of events with >%i digis;LumiSection;Rate [Hz]",
bigEventSize);
790 char title1[80]; sprintf(title1,
"Pixel events vs. BX;BX;# events");
792 char title2[80]; sprintf(title2,
"Rate of Pixel events;LumiSection;Rate [Hz]");
794 char title3[80]; sprintf(title3,
"Number of Zero-Occupancy Barrel ROCs;LumiSection;N_{ZERO-OCCUPANCY} Barrel ROCs");
796 char title4[80]; sprintf(title4,
"Number of Low-Efficiency Barrel ROCs;LumiSection;N_{LO EFF} Barrel ROCs");
798 char title5[80]; sprintf(title5,
"Number of Zero-Occupancy Endcap ROCs;LumiSection;N_{ZERO-OCCUPANCY} Endcap ROCs");
800 char title6[80]; sprintf(title6,
"Number of Low-Efficiency Endcap ROCs;LumiSection;N_{LO EFF} Endcap ROCs");
802 char title7[80]; sprintf(title7,
"Average digi occupancy per FED;FED;NDigis/<NDigis>");
803 char title8[80]; sprintf(title8,
"FED Digi Occupancy (NDigis/<NDigis>) vs LumiSections;Lumi Section;FED");
809 "Average Barrel FED digi occupancy (<NDigis>) vs LumiSections;Lumi Section;Average digi occupancy per FED", 320,0., 3200.);
811 "Average Endcap FED digi occupancy (<NDigis>) vs LumiSections;Lumi Section;Average digi occupancy per FED", 320,0., 3200.);
817 std::map<uint32_t,SiPixelDigiModule*>::iterator struct_iter;
829 <<
"[SiPixelDigiSource::bookMEs] Creation of DQM folder failed";
836 LogDebug (
"PixelDQM") <<
"PROBLEM WITH LADDER-FOLDER\n";
844 LogDebug (
"PixelDQM") <<
"PROBLEM WITH LAYER-FOLDER\n";
852 LogDebug (
"PixelDQM") <<
"PROBLEM WITH PHI-FOLDER\n";
859 LogDebug (
"PixelDQM") <<
"PROBLEM WITH BLADE-FOLDER\n";
866 LogDebug (
"PixelDQM") <<
"PROBLEM WITH DISK-FOLDER\n";
873 LogDebug (
"PixelDQM") <<
"PROBLEM WITH RING-FOLDER\n";
882 std::stringstream ss1, ss2;
885 ss1.str(
std::string()); ss1 <<
"ALLMODS_ndigisCHAN_BarrelL" <<
i;
886 ss2.str(
std::string()); ss2 <<
"Number of Digis L" <<
i;
969 ss1.str(
std::string()); ss1 <<
"ALLMODS_ndigisCHAN_EndcapDp" <<
i;
970 ss2.str(
std::string()); ss2 <<
"Number of Digis Disk p" <<
i;
976 ss1.str(
std::string()); ss1 <<
"ALLMODS_ndigisCHAN_EndcapDm" <<
i;
977 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_
const DetTypeContainer & detTypes() const override
Return a vector of all det types.
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
MonitorElement * avgBarrelFedOccvsLumi
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)
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
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
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * meNDigisCHANEndcap_
MonitorElement * book1D(Args &&...args)
virtual void dqmBeginRun(const edm::Run &, edm::EventSetup const &) override
MonitorElement * meNDigisCHANBarrelCh28_
MonitorElement * noOccROCsEndcap
MonitorElement * meNDigisCHANBarrel_
std::vector< MonitorElement * > meNDigisCHANEndcapDms_
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
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
MonitorElement * avgEndcapFedOccvsLumi
std::vector< MonitorElement * > meNDigisCHANEndcapDps_
MonitorElement * pixEvtsPerBX
virtual void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
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)
T const * product() const
virtual void CountZeroROCsInSubstructure(bool, bool &, SiPixelDigiModule *)
virtual void buildStructure(edm::EventSetup const &)
MonitorElement * meNDigisCHANBarrelCh24_