12 printProvenanceInfo(
false), theCSCStripPedestalSum(0),
13 theCSCStripPedestalCount(0),
count(0)
15 std::string MsgLoggerCat =
"GlobalDigisHistogrammer_GlobalDigisHistogrammer";
26 m_Prov.getUntrackedParameter<
bool>(
"GetAllProvenances");
28 m_Prov.getUntrackedParameter<
bool>(
"PrintProvenanceInfo");
54 <<
"\n===============================\n"
55 <<
"Initialized as EDHistogrammer with parameter values:\n"
56 <<
" Name = " <<
fName <<
"\n"
57 <<
" Verbosity = " << verbosity <<
"\n"
58 <<
" Frequency = " << frequency <<
"\n"
59 <<
" OutputFile = " << outputfile <<
"\n"
60 <<
" DoOutput = " << doOutput <<
"\n"
61 <<
" GetProv = " << getAllProvenances <<
"\n"
62 <<
" PrintProv = " << printProvenanceInfo <<
"\n"
63 <<
" Global Src = " << GlobalDigisSrc_ <<
"\n"
65 <<
"===============================\n";
85 std::string SiStripString[19] = {
"TECW1",
"TECW2",
"TECW3",
"TECW4",
"TECW5",
86 "TECW6",
"TECW7",
"TECW8",
"TIBL1",
"TIBL2",
"TIBL3",
"TIBL4",
"TIDW1",
87 "TIDW2",
"TIDW3",
"TOBL1",
"TOBL2",
"TOBL3",
"TOBL4"};
89 for (
int i = 0;
i < 19; ++
i) {
96 for (
int amend = 0; amend < 19; ++amend) {
98 SiStripString[amend] +
" Digis", 500, 0., 1000.);
103 SiStripString[amend] +
" ADC", 150, 0.0, 300.);
108 SiStripString[amend] +
" Strip", 200, 0.0, 800.);
114 std::string HCalString[4] = {
"HB",
"HE",
"HO",
"HF"};
115 float calnUpper[4] = {3000., 3000., 3000., 2000.};
116 float calnLower[4] = {2000., 2000., 2000., 1000.};
117 float SHEUpper[4] = {0.05, .05, 0.05, 20};
118 float SHEvAEEUpper[4] = {5000, 5000, 5000, 20};
119 float SHEvAEELower[4] = {-5000, -5000, -5000, -20};
120 int SHEvAEEnBins[4] = {200, 200, 200, 40};
121 double ProfileUpper[4] = {1., 1., 1., 20.};
123 for (
int i =0;
i<4; ++
i) {
132 for (
int amend = 0; amend < 4; ++amend) {
134 HCalString[amend] +
" digis", 1000, calnLower[amend], calnUpper[amend]);
139 HCalString[amend]+
"Cal AEE", 60, -10., 50.);
144 HCalString[amend]+
"Cal SHE", 100, 0.0, SHEUpper[amend]);
149 HCalString[amend] +
"Cal AEE/SHE", SHEvAEEnBins[amend],
150 SHEvAEELower[amend], SHEvAEEUpper[amend]);
157 HCalString[amend] +
"Cal SHE vs. AEE", 60, (
float)-10., (
float)50., 100,
158 (
float)0., (
float)ProfileUpper[amend],
"");
167 for (
int i = 0;
i < 2; ++
i) {
177 for (
int amend = 0; amend < 2; ++amend) {
179 ECalString[amend] +
" digis", 300, 1000., 4000.);
184 ECalString[amend] +
"Cal AEE", 100, 0., 1.);
189 ECalString[amend] +
"Cal SHE", 50, 0., 5.);
194 ECalString[amend] +
"Cal MaxPos", 10, 0., 10.);
201 ECalString[amend] +
"Cal SHE vs. AEE/SHE", 100, (
float)0., (
float)10., 50,
202 (
float)0., (
float)5.,
"");
207 ECalString[amend] +
"Cal Multi vs. AEE", 100, (
float)0., (
float)10., 400,
208 (
float)0., (
float)4000.,
"");
214 mehEcaln[2] = ibooker.
book1D(
"hEcaln_ES",
"ESCAL digis", 100, 0., 500.);
218 for (
int i = 0;
i < 3; ++
i) {
221 "hEcalADC" + ADCNumber[
i] +
"_ES",
"ESCAL ADC" + ADCNumber[
i], 150, 950., 1500.);
228 std::string SiPixelString[7] = {
"BRL1",
"BRL2",
"BRL3",
"FWD1n",
"FWD1p",
"FWD2n",
231 for (
int j = 0;
j < 7; ++
j) {
239 for (
int amend = 0; amend < 7; ++amend) {
242 SiPixelString[amend] +
" Digis", 50, 0., 100.);
246 SiPixelString[amend] +
" Digis", 25, 0., 50.);
252 SiPixelString[amend] +
" ADC", 150, 0.0, 300.);
257 SiPixelString[amend] +
" Row", 100, 0.0, 100.);
262 SiPixelString[amend] +
" Column", 200, 0.0, 500.);
270 std::string MuonString[4] = {
"MB1",
"MB2",
"MB3",
"MB4"};
272 for (
int i = 0;
i < 4; ++
i) {
279 for (
int j = 0;
j < 4; ++
j) {
281 MuonString[j] +
" digis", 25, 0., 50.);
286 MuonString[j]+
" Layer", 12, 1., 13.);
291 MuonString[j] +
" Time", 300, 400., 1000.);
296 MuonString[j] +
" Time vs. Layer", 12, 1., 13., 300, 400., 1000.,
"");
334 std::string MsgLoggerCat =
"GlobalDigisHistogrammer_analyze";
345 <<
"Processing run " << nrun <<
", event " << nevt
346 <<
" (" <<
count <<
" events total)";
350 <<
"Processing run " << nrun <<
", event " << nevt
351 <<
" (" <<
count <<
" events total)";
361 std::vector<const edm::Provenance*> AllProv;
366 <<
"Number of Provenances = " << AllProv.size();
369 TString eventout(
"\nProvenance info:\n");
371 for (
unsigned int i = 0;
i < AllProv.size(); ++
i) {
372 eventout +=
"\n ******************************";
373 eventout +=
"\n Module : ";
375 eventout += AllProv[
i]->moduleLabel();
376 eventout +=
"\n ProductID : ";
378 eventout += AllProv[
i]->productID().id();
379 eventout +=
"\n ClassName : ";
381 eventout += AllProv[
i]->className();
382 eventout +=
"\n InstanceName : ";
384 eventout += AllProv[
i]->productInstanceName();
385 eventout +=
"\n BranchName : ";
387 eventout += AllProv[
i]->branchName();
389 eventout +=
"\n ******************************\n";
396 if (!srcGlobalDigis.
isValid()) {
398 <<
"Unable to find PGlobalDigis in event!";
405 int nEBCalDigis = srcGlobalDigis->getnEBCalDigis();
406 int nEECalDigis = srcGlobalDigis->getnEECalDigis();
407 int nESCalDigis = srcGlobalDigis->getnESCalDigis();
409 int nHBCalDigis = srcGlobalDigis->getnHBCalDigis();
410 int nHECalDigis = srcGlobalDigis->getnHECalDigis();
411 int nHOCalDigis = srcGlobalDigis->getnHOCalDigis();
412 int nHFCalDigis = srcGlobalDigis->getnHFCalDigis();
414 int nTIBL1Digis = srcGlobalDigis->getnTIBL1Digis();
415 int nTIBL2Digis = srcGlobalDigis->getnTIBL2Digis();
416 int nTIBL3Digis = srcGlobalDigis->getnTIBL3Digis();
417 int nTIBL4Digis = srcGlobalDigis->getnTIBL4Digis();
418 int nTOBL1Digis = srcGlobalDigis->getnTOBL1Digis();
419 int nTOBL2Digis = srcGlobalDigis->getnTOBL2Digis();
420 int nTOBL3Digis = srcGlobalDigis->getnTOBL3Digis();
421 int nTOBL4Digis = srcGlobalDigis->getnTOBL4Digis();
422 int nTIDW1Digis = srcGlobalDigis->getnTIDW1Digis();
423 int nTIDW2Digis = srcGlobalDigis->getnTIDW2Digis();
424 int nTIDW3Digis = srcGlobalDigis->getnTIDW3Digis();
425 int nTECW1Digis = srcGlobalDigis->getnTECW1Digis();
426 int nTECW2Digis = srcGlobalDigis->getnTECW2Digis();
427 int nTECW3Digis = srcGlobalDigis->getnTECW3Digis();
428 int nTECW4Digis = srcGlobalDigis->getnTECW4Digis();
429 int nTECW5Digis = srcGlobalDigis->getnTECW5Digis();
430 int nTECW6Digis = srcGlobalDigis->getnTECW6Digis();
431 int nTECW7Digis = srcGlobalDigis->getnTECW7Digis();
432 int nTECW8Digis = srcGlobalDigis->getnTECW8Digis();
434 int nBRL1Digis = srcGlobalDigis->getnBRL1Digis();
435 int nBRL2Digis = srcGlobalDigis->getnBRL2Digis();
436 int nBRL3Digis = srcGlobalDigis->getnBRL3Digis();
437 int nFWD1nDigis = srcGlobalDigis->getnFWD1nDigis();
438 int nFWD1pDigis = srcGlobalDigis->getnFWD1pDigis();
439 int nFWD2nDigis = srcGlobalDigis->getnFWD2nDigis();
440 int nFWD2pDigis = srcGlobalDigis->getnFWD2pDigis();
442 int nMB1Digis = srcGlobalDigis->getnMB1Digis();
443 int nMB2Digis = srcGlobalDigis->getnMB2Digis();
444 int nMB3Digis = srcGlobalDigis->getnMB3Digis();
445 int nMB4Digis = srcGlobalDigis->getnMB4Digis();
447 int nCSCstripDigis = srcGlobalDigis->getnCSCstripDigis();
449 int nCSCwireDigis = srcGlobalDigis->getnCSCwireDigis();
452 std::vector<PGlobalDigi::ECalDigi> EECalDigis =
453 srcGlobalDigis->getEECalDigis();
455 for (
unsigned int i = 0;
i < EECalDigis.size(); ++
i) {
459 if (EECalDigis[
i].SHE != 0.) {
462 Fill(EECalDigis[
i].AEE/EECalDigis[
i].SHE,EECalDigis[
i].SHE,1);
466 std::vector<PGlobalDigi::ECalDigi> EBCalDigis =
467 srcGlobalDigis->getEBCalDigis();
469 for (
unsigned int i = 0;
i < EBCalDigis.size(); ++
i) {
473 if (EBCalDigis[
i].SHE != 0.) {
476 Fill(EBCalDigis[
i].AEE/EBCalDigis[
i].SHE,EBCalDigis[
i].SHE,1);
480 std::vector<PGlobalDigi::ESCalDigi> ESCalDigis =
481 srcGlobalDigis->getESCalDigis();
483 for (
unsigned int i = 0;
i < ESCalDigis.size(); ++
i) {
490 std::vector<PGlobalDigi::HCalDigi> HBCalDigis =
491 srcGlobalDigis->getHBCalDigis();
493 for (
unsigned int i = 0;
i < HBCalDigis.size(); ++
i) {
495 if (HBCalDigis[
i].SHE != 0.) {
499 Fill(HBCalDigis[
i].AEE,HBCalDigis[
i].SHE,1);
502 std::vector<PGlobalDigi::HCalDigi> HECalDigis =
503 srcGlobalDigis->getHECalDigis();
505 for (
unsigned int i = 0;
i < HECalDigis.size(); ++
i) {
507 if (HECalDigis[
i].SHE != 0.) {
511 Fill(HECalDigis[
i].AEE,HECalDigis[
i].SHE,1);
515 std::vector<PGlobalDigi::HCalDigi> HOCalDigis =
516 srcGlobalDigis->getHOCalDigis();
518 for (
unsigned int i = 0;
i < HOCalDigis.size(); ++
i) {
520 if (HOCalDigis[
i].SHE != 0.) {
524 Fill(HOCalDigis[
i].AEE,HOCalDigis[
i].SHE,1);
528 std::vector<PGlobalDigi::HCalDigi> HFCalDigis =
529 srcGlobalDigis->getHFCalDigis();
531 for (
unsigned int i = 0;
i < HFCalDigis.size(); ++
i) {
533 if (HFCalDigis[
i].SHE != 0.) {
537 Fill(HFCalDigis[
i].AEE,HFCalDigis[
i].SHE,1);
542 std::vector<PGlobalDigi::SiStripDigi> TIBL1Digis =
543 srcGlobalDigis->getTIBL1Digis();
545 for (
unsigned int i = 0;
i < TIBL1Digis.size(); ++
i) {
550 std::vector<PGlobalDigi::SiStripDigi> TIBL2Digis =
551 srcGlobalDigis->getTIBL2Digis();
553 for (
unsigned int i = 0;
i < TIBL2Digis.size(); ++
i) {
558 std::vector<PGlobalDigi::SiStripDigi> TIBL3Digis =
559 srcGlobalDigis->getTIBL3Digis();
561 for (
unsigned int i = 0;
i < TIBL3Digis.size(); ++
i) {
566 std::vector<PGlobalDigi::SiStripDigi> TIBL4Digis =
567 srcGlobalDigis->getTIBL4Digis();
569 for (
unsigned int i = 0;
i < TIBL4Digis.size(); ++
i) {
574 std::vector<PGlobalDigi::SiStripDigi> TOBL1Digis =
575 srcGlobalDigis->getTOBL1Digis();
577 for (
unsigned int i = 0;
i < TOBL1Digis.size(); ++
i) {
582 std::vector<PGlobalDigi::SiStripDigi> TOBL2Digis =
583 srcGlobalDigis->getTOBL2Digis();
585 for (
unsigned int i = 0;
i < TOBL2Digis.size(); ++
i) {
590 std::vector<PGlobalDigi::SiStripDigi> TOBL3Digis =
591 srcGlobalDigis->getTOBL3Digis();
593 for (
unsigned int i = 0;
i < TOBL3Digis.size(); ++
i) {
598 std::vector<PGlobalDigi::SiStripDigi> TOBL4Digis =
599 srcGlobalDigis->getTOBL4Digis();
601 for (
unsigned int i = 0;
i < TOBL4Digis.size(); ++
i) {
606 std::vector<PGlobalDigi::SiStripDigi> TIDW1Digis =
607 srcGlobalDigis->getTIDW1Digis();
609 for (
unsigned int i = 0;
i < TIDW1Digis.size(); ++
i) {
614 std::vector<PGlobalDigi::SiStripDigi> TIDW2Digis =
615 srcGlobalDigis->getTIDW2Digis();
617 for (
unsigned int i = 0;
i < TIDW2Digis.size(); ++
i) {
622 std::vector<PGlobalDigi::SiStripDigi> TIDW3Digis =
623 srcGlobalDigis->getTIDW3Digis();
625 for (
unsigned int i = 0;
i < TIDW3Digis.size(); ++
i) {
630 std::vector<PGlobalDigi::SiStripDigi> TECW1Digis =
631 srcGlobalDigis->getTECW1Digis();
633 for (
unsigned int i = 0;
i < TECW1Digis.size(); ++
i) {
638 std::vector<PGlobalDigi::SiStripDigi> TECW2Digis =
639 srcGlobalDigis->getTECW2Digis();
641 for (
unsigned int i = 0;
i < TECW2Digis.size(); ++
i) {
646 std::vector<PGlobalDigi::SiStripDigi> TECW3Digis =
647 srcGlobalDigis->getTECW3Digis();
649 for (
unsigned int i = 0;
i < TECW3Digis.size(); ++
i) {
654 std::vector<PGlobalDigi::SiStripDigi> TECW4Digis =
655 srcGlobalDigis->getTECW4Digis();
657 for (
unsigned int i = 0;
i < TECW4Digis.size(); ++
i) {
662 std::vector<PGlobalDigi::SiStripDigi> TECW5Digis =
663 srcGlobalDigis->getTECW5Digis();
665 for (
unsigned int i = 0;
i < TECW5Digis.size(); ++
i) {
670 std::vector<PGlobalDigi::SiStripDigi> TECW6Digis =
671 srcGlobalDigis->getTECW6Digis();
673 for (
unsigned int i = 0;
i < TECW6Digis.size(); ++
i) {
678 std::vector<PGlobalDigi::SiStripDigi> TECW7Digis =
679 srcGlobalDigis->getTECW7Digis();
681 for (
unsigned int i = 0;
i < TECW7Digis.size(); ++
i) {
686 std::vector<PGlobalDigi::SiStripDigi> TECW8Digis =
687 srcGlobalDigis->getTECW8Digis();
689 for (
unsigned int i = 0;
i < TECW8Digis.size(); ++
i) {
695 std::vector<PGlobalDigi::SiPixelDigi> BRL1Digis =
696 srcGlobalDigis->getBRL1Digis();
698 for (
unsigned int i = 0;
i < BRL1Digis.size(); ++
i) {
704 std::vector<PGlobalDigi::SiPixelDigi> BRL2Digis =
705 srcGlobalDigis->getBRL2Digis();
707 for (
unsigned int i = 0;
i < BRL2Digis.size(); ++
i) {
713 std::vector<PGlobalDigi::SiPixelDigi> BRL3Digis =
714 srcGlobalDigis->getBRL3Digis();
716 for (
unsigned int i = 0;
i < BRL3Digis.size(); ++
i) {
722 std::vector<PGlobalDigi::SiPixelDigi> FWD1pDigis =
723 srcGlobalDigis->getFWD1pDigis();
725 for (
unsigned int i = 0;
i < FWD1pDigis.size(); ++
i) {
731 std::vector<PGlobalDigi::SiPixelDigi> FWD1nDigis =
732 srcGlobalDigis->getFWD1nDigis();
734 for (
unsigned int i = 0;
i < FWD1nDigis.size(); ++
i) {
740 std::vector<PGlobalDigi::SiPixelDigi> FWD2pDigis =
741 srcGlobalDigis->getFWD2pDigis();
743 for (
unsigned int i = 0;
i < FWD2pDigis.size(); ++
i) {
749 std::vector<PGlobalDigi::SiPixelDigi> FWD2nDigis =
750 srcGlobalDigis->getFWD2nDigis();
752 for (
unsigned int i = 0;
i < FWD2nDigis.size(); ++
i) {
759 std::vector<PGlobalDigi::DTDigi> MB1Digis =
760 srcGlobalDigis->getMB1Digis();
762 for (
unsigned int i = 0;
i < MB1Digis.size(); ++
i) {
763 float layer = 4.0 * (MB1Digis[
i].SLAYER - 1.0) + MB1Digis[
i].LAYER;
769 std::vector<PGlobalDigi::DTDigi> MB2Digis =
770 srcGlobalDigis->getMB2Digis();
772 for (
unsigned int i = 0;
i < MB2Digis.size(); ++
i) {
773 float layer = 4.0 * (MB2Digis[
i].SLAYER - 1.0) + MB2Digis[
i].LAYER;
779 std::vector<PGlobalDigi::DTDigi> MB3Digis =
780 srcGlobalDigis->getMB3Digis();
782 for (
unsigned int i = 0;
i < MB3Digis.size(); ++
i) {
783 float layer = 4.0 * (MB3Digis[
i].SLAYER - 1.0) + MB3Digis[
i].LAYER;
789 std::vector<PGlobalDigi::DTDigi> MB4Digis =
790 srcGlobalDigis->getMB4Digis();
792 for (
unsigned int i = 0;
i < MB4Digis.size(); ++
i) {
793 float layer = 4.0 * (MB4Digis[
i].SLAYER - 1.0) + MB4Digis[
i].LAYER;
800 std::vector<PGlobalDigi::CSCstripDigi> CSCstripDigis =
801 srcGlobalDigis->getCSCstripDigis();
803 for (
unsigned int i = 0;
i < CSCstripDigis.size(); ++
i) {
808 std::vector<PGlobalDigi::CSCwireDigi> CSCwireDigis =
809 srcGlobalDigis->getCSCwireDigis();
811 for (
unsigned int i = 0;
i < CSCwireDigis.size(); ++
i) {
816 <<
"Done gathering data from event.";
T getParameter(std::string const &) const
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
void getAllProvenance(std::vector< Provenance const * > &provenances) const
MonitorElement * mehHcaln[4]
virtual void analyze(const edm::Event &, const edm::EventSetup &)
MonitorElement * mehDtMuonLayer[4]
MonitorElement * mehCSCWireTime
MonitorElement * mehEcalMultvAEE[2]
MonitorElement * bookProfile(Args &&...args)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
unsigned long long EventNumber_t
MonitorElement * mehHcalAEESHE[4]
MonitorElement * mehSiPixelCol[7]
MonitorElement * mehHcalSHEvAEE[4]
MonitorElement * mehHcalSHE[4]
MonitorElement * mehCSCStripn
MonitorElement * mehDtMuonTimevLayer[4]
GlobalDigisHistogrammer(const edm::ParameterSet &)
MonitorElement * mehSiStripADC[19]
MonitorElement * mehEcalSHEvAEESHE[2]
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * mehEcalSHE[2]
MonitorElement * mehHcalAEE[4]
MonitorElement * mehSiPixelRow[7]
MonitorElement * mehEcaln[3]
MonitorElement * mehCSCWiren
edm::InputTag GlobalDigisSrc_
MonitorElement * book1D(Args &&...args)
MonitorElement * mehSiPixelADC[7]
MonitorElement * mehSiPixeln[7]
virtual ~GlobalDigisHistogrammer()
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * mehDtMuonn[4]
void setCurrentFolder(const std::string &fullpath)
MonitorElement * mehDtMuonTime[4]
MonitorElement * mehSiStripStrip[19]
MonitorElement * mehEScalADC[3]
MonitorElement * mehEcalAEE[2]
MonitorElement * mehEcalMaxPos[2]
edm::EDGetTokenT< PGlobalDigi > GlobalDigisSrc_Token_
volatile std::atomic< bool > shutdown_flag false
MonitorElement * mehSiStripn[19]
MonitorElement * mehCSCStripADC
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)