15 getAllProvenances(
false),
16 printProvenanceInfo(
false),
17 theCSCStripPedestalSum(0),
18 theCSCStripPedestalCount(0),
20 std::string MsgLoggerCat =
"GlobalDigisHistogrammer_GlobalDigisHistogrammer";
55 edm::LogInfo(MsgLoggerCat) <<
"\n===============================\n"
56 <<
"Initialized as EDHistogrammer with parameter values:\n"
57 <<
" Name = " <<
fName <<
"\n"
58 <<
" Verbosity = " << verbosity <<
"\n"
59 <<
" Frequency = " << frequency <<
"\n"
60 <<
" OutputFile = " << outputfile <<
"\n"
61 <<
" DoOutput = " << doOutput <<
"\n"
62 <<
" GetProv = " << getAllProvenances <<
"\n"
63 <<
" PrintProv = " << printProvenanceInfo <<
"\n"
64 <<
" Global Src = " << GlobalDigisSrc_ <<
"\n"
66 <<
"===============================\n";
104 for (
int i = 0;
i < 19; ++
i) {
111 for (
int amend = 0; amend < 19; ++amend) {
113 ibooker.
book1D(
"hSiStripn_" + SiStripString[amend], SiStripString[amend] +
" Digis", 500, 0., 1000.);
118 ibooker.
book1D(
"hSiStripADC_" + SiStripString[amend], SiStripString[amend] +
" ADC", 150, 0.0, 300.);
123 ibooker.
book1D(
"hSiStripStripADC_" + SiStripString[amend], SiStripString[amend] +
" Strip", 200, 0.0, 800.);
129 std::string HCalString[4] = {
"HB",
"HE",
"HO",
"HF"};
130 float calnUpper[4] = {3000., 3000., 3000., 2000.};
131 float calnLower[4] = {2000., 2000., 2000., 1000.};
132 float SHEUpper[4] = {0.05, .05, 0.05, 20};
133 float SHEvAEEUpper[4] = {5000, 5000, 5000, 20};
134 float SHEvAEELower[4] = {-5000, -5000, -5000, -20};
135 int SHEvAEEnBins[4] = {200, 200, 200, 40};
136 double ProfileUpper[4] = {1., 1., 1., 20.};
138 for (
int i = 0;
i < 4; ++
i) {
147 for (
int amend = 0; amend < 4; ++amend) {
149 "hHcaln_" + HCalString[amend], HCalString[amend] +
" digis", 1000, calnLower[amend], calnUpper[amend]);
153 mehHcalAEE[amend] = ibooker.
book1D(
"hHcalAEE_" + HCalString[amend], HCalString[amend] +
"Cal AEE", 60, -10., 50.);
158 ibooker.
book1D(
"hHcalSHE_" + HCalString[amend], HCalString[amend] +
"Cal SHE", 100, 0.0, SHEUpper[amend]);
163 HCalString[amend] +
"Cal AEE/SHE",
166 SHEvAEEUpper[amend]);
173 HCalString[amend] +
"Cal SHE vs. AEE",
179 (
float)ProfileUpper[amend],
189 for (
int i = 0;
i < 2; ++
i) {
199 for (
int amend = 0; amend < 2; ++amend) {
200 mehEcaln[amend] = ibooker.
book1D(
"hEcaln_" + ECalString[amend], ECalString[amend] +
" digis", 300, 1000., 4000.);
204 mehEcalAEE[amend] = ibooker.
book1D(
"hEcalAEE_" + ECalString[amend], ECalString[amend] +
"Cal AEE", 100, 0., 1.);
208 mehEcalSHE[amend] = ibooker.
book1D(
"hEcalSHE_" + ECalString[amend], ECalString[amend] +
"Cal SHE", 50, 0., 5.);
213 ibooker.
book1D(
"hEcalMaxPos_" + ECalString[amend], ECalString[amend] +
"Cal MaxPos", 10, 0., 10.);
220 ECalString[amend] +
"Cal SHE vs. AEE/SHE",
232 ECalString[amend] +
"Cal Multi vs. AEE",
245 mehEcaln[2] = ibooker.
book1D(
"hEcaln_ES",
"ESCAL digis", 100, 0., 500.);
249 for (
int i = 0;
i < 3; ++
i) {
251 mehEScalADC[
i] = ibooker.
book1D(
"hEcalADC" + ADCNumber[
i] +
"_ES",
"ESCAL ADC" + ADCNumber[
i], 150, 950., 1500.);
258 std::string SiPixelString[7] = {
"BRL1",
"BRL2",
"BRL3",
"FWD1n",
"FWD1p",
"FWD2n",
"FWD2p"};
260 for (
int j = 0;
j < 7; ++
j) {
268 for (
int amend = 0; amend < 7; ++amend) {
271 ibooker.
book1D(
"hSiPixeln_" + SiPixelString[amend], SiPixelString[amend] +
" Digis", 50, 0., 100.);
274 ibooker.
book1D(
"hSiPixeln_" + SiPixelString[amend], SiPixelString[amend] +
" Digis", 25, 0., 50.);
280 ibooker.
book1D(
"hSiPixelADC_" + SiPixelString[amend], SiPixelString[amend] +
" ADC", 150, 0.0, 300.);
285 ibooker.
book1D(
"hSiPixelRow_" + SiPixelString[amend], SiPixelString[amend] +
" Row", 100, 0.0, 100.);
290 ibooker.
book1D(
"hSiPixelColumn_" + SiPixelString[amend], SiPixelString[amend] +
" Column", 200, 0.0, 500.);
298 std::string MuonString[4] = {
"MB1",
"MB2",
"MB3",
"MB4"};
300 for (
int i = 0;
i < 4; ++
i) {
307 for (
int j = 0;
j < 4; ++
j) {
308 mehDtMuonn[
j] = ibooker.
book1D(
"hDtMuonn_" + MuonString[
j], MuonString[j] +
" digis", 25, 0., 50.);
312 mehDtMuonLayer[
j] = ibooker.
book1D(
"hDtLayer_" + MuonString[j], MuonString[j] +
" Layer", 12, 1., 13.);
316 mehDtMuonTime[
j] = ibooker.
book1D(
"hDtMuonTime_" + MuonString[j], MuonString[j] +
" Time", 300, 400., 1000.);
321 "hDtMuonTimevLayer_" + MuonString[j], MuonString[j] +
" Time vs. Layer", 12, 1., 13., 300, 400., 1000.,
"");
354 std::string MsgLoggerCat =
"GlobalDigisHistogrammer_analyze";
364 edm::LogInfo(MsgLoggerCat) <<
"Processing run " << nrun <<
", event " << nevt <<
" (" <<
count <<
" events total)";
366 if (nevt %
frequency == 0 || nevt == 1) {
367 edm::LogInfo(MsgLoggerCat) <<
"Processing run " << nrun <<
", event " << nevt <<
" (" <<
count
377 std::vector<const edm::StableProvenance *> AllProv;
381 edm::LogInfo(MsgLoggerCat) <<
"Number of Provenances = " << AllProv.size();
384 TString eventout(
"\nProvenance info:\n");
386 for (
unsigned int i = 0;
i < AllProv.size(); ++
i) {
387 eventout +=
"\n ******************************";
388 eventout +=
"\n Module : ";
390 eventout += AllProv[
i]->moduleLabel();
391 eventout +=
"\n ProductID : ";
393 eventout += AllProv[
i]->productID().id();
394 eventout +=
"\n ClassName : ";
396 eventout += AllProv[
i]->className();
397 eventout +=
"\n InstanceName : ";
399 eventout += AllProv[
i]->productInstanceName();
400 eventout +=
"\n BranchName : ";
402 eventout += AllProv[
i]->branchName();
404 eventout +=
"\n ******************************\n";
411 if (!srcGlobalDigis.
isValid()) {
412 edm::LogWarning(MsgLoggerCat) <<
"Unable to find PGlobalDigis in event!";
416 int nEBCalDigis = srcGlobalDigis->getnEBCalDigis();
417 int nEECalDigis = srcGlobalDigis->getnEECalDigis();
418 int nESCalDigis = srcGlobalDigis->getnESCalDigis();
420 int nHBCalDigis = srcGlobalDigis->getnHBCalDigis();
421 int nHECalDigis = srcGlobalDigis->getnHECalDigis();
422 int nHOCalDigis = srcGlobalDigis->getnHOCalDigis();
423 int nHFCalDigis = srcGlobalDigis->getnHFCalDigis();
425 int nTIBL1Digis = srcGlobalDigis->getnTIBL1Digis();
426 int nTIBL2Digis = srcGlobalDigis->getnTIBL2Digis();
427 int nTIBL3Digis = srcGlobalDigis->getnTIBL3Digis();
428 int nTIBL4Digis = srcGlobalDigis->getnTIBL4Digis();
429 int nTOBL1Digis = srcGlobalDigis->getnTOBL1Digis();
430 int nTOBL2Digis = srcGlobalDigis->getnTOBL2Digis();
431 int nTOBL3Digis = srcGlobalDigis->getnTOBL3Digis();
432 int nTOBL4Digis = srcGlobalDigis->getnTOBL4Digis();
433 int nTIDW1Digis = srcGlobalDigis->getnTIDW1Digis();
434 int nTIDW2Digis = srcGlobalDigis->getnTIDW2Digis();
435 int nTIDW3Digis = srcGlobalDigis->getnTIDW3Digis();
436 int nTECW1Digis = srcGlobalDigis->getnTECW1Digis();
437 int nTECW2Digis = srcGlobalDigis->getnTECW2Digis();
438 int nTECW3Digis = srcGlobalDigis->getnTECW3Digis();
439 int nTECW4Digis = srcGlobalDigis->getnTECW4Digis();
440 int nTECW5Digis = srcGlobalDigis->getnTECW5Digis();
441 int nTECW6Digis = srcGlobalDigis->getnTECW6Digis();
442 int nTECW7Digis = srcGlobalDigis->getnTECW7Digis();
443 int nTECW8Digis = srcGlobalDigis->getnTECW8Digis();
445 int nBRL1Digis = srcGlobalDigis->getnBRL1Digis();
446 int nBRL2Digis = srcGlobalDigis->getnBRL2Digis();
447 int nBRL3Digis = srcGlobalDigis->getnBRL3Digis();
448 int nFWD1nDigis = srcGlobalDigis->getnFWD1nDigis();
449 int nFWD1pDigis = srcGlobalDigis->getnFWD1pDigis();
450 int nFWD2nDigis = srcGlobalDigis->getnFWD2nDigis();
451 int nFWD2pDigis = srcGlobalDigis->getnFWD2pDigis();
453 int nMB1Digis = srcGlobalDigis->getnMB1Digis();
454 int nMB2Digis = srcGlobalDigis->getnMB2Digis();
455 int nMB3Digis = srcGlobalDigis->getnMB3Digis();
456 int nMB4Digis = srcGlobalDigis->getnMB4Digis();
458 int nCSCstripDigis = srcGlobalDigis->getnCSCstripDigis();
460 int nCSCwireDigis = srcGlobalDigis->getnCSCwireDigis();
463 std::vector<PGlobalDigi::ECalDigi> EECalDigis = srcGlobalDigis->getEECalDigis();
465 for (
unsigned int i = 0;
i < EECalDigis.size(); ++
i) {
469 if (EECalDigis[
i].SHE != 0.) {
475 std::vector<PGlobalDigi::ECalDigi> EBCalDigis = srcGlobalDigis->getEBCalDigis();
477 for (
unsigned int i = 0;
i < EBCalDigis.size(); ++
i) {
481 if (EBCalDigis[
i].SHE != 0.) {
487 std::vector<PGlobalDigi::ESCalDigi> ESCalDigis = srcGlobalDigis->getESCalDigis();
489 for (
unsigned int i = 0;
i < ESCalDigis.size(); ++
i) {
496 std::vector<PGlobalDigi::HCalDigi> HBCalDigis = srcGlobalDigis->getHBCalDigis();
498 for (
unsigned int i = 0;
i < HBCalDigis.size(); ++
i) {
500 if (HBCalDigis[
i].SHE != 0.) {
506 std::vector<PGlobalDigi::HCalDigi> HECalDigis = srcGlobalDigis->getHECalDigis();
508 for (
unsigned int i = 0;
i < HECalDigis.size(); ++
i) {
510 if (HECalDigis[
i].SHE != 0.) {
517 std::vector<PGlobalDigi::HCalDigi> HOCalDigis = srcGlobalDigis->getHOCalDigis();
519 for (
unsigned int i = 0;
i < HOCalDigis.size(); ++
i) {
521 if (HOCalDigis[
i].SHE != 0.) {
528 std::vector<PGlobalDigi::HCalDigi> HFCalDigis = srcGlobalDigis->getHFCalDigis();
530 for (
unsigned int i = 0;
i < HFCalDigis.size(); ++
i) {
532 if (HFCalDigis[
i].SHE != 0.) {
540 std::vector<PGlobalDigi::SiStripDigi> TIBL1Digis = srcGlobalDigis->getTIBL1Digis();
542 for (
unsigned int i = 0;
i < TIBL1Digis.size(); ++
i) {
547 std::vector<PGlobalDigi::SiStripDigi> TIBL2Digis = srcGlobalDigis->getTIBL2Digis();
549 for (
unsigned int i = 0;
i < TIBL2Digis.size(); ++
i) {
554 std::vector<PGlobalDigi::SiStripDigi> TIBL3Digis = srcGlobalDigis->getTIBL3Digis();
556 for (
unsigned int i = 0;
i < TIBL3Digis.size(); ++
i) {
561 std::vector<PGlobalDigi::SiStripDigi> TIBL4Digis = srcGlobalDigis->getTIBL4Digis();
563 for (
unsigned int i = 0;
i < TIBL4Digis.size(); ++
i) {
568 std::vector<PGlobalDigi::SiStripDigi> TOBL1Digis = srcGlobalDigis->getTOBL1Digis();
570 for (
unsigned int i = 0;
i < TOBL1Digis.size(); ++
i) {
575 std::vector<PGlobalDigi::SiStripDigi> TOBL2Digis = srcGlobalDigis->getTOBL2Digis();
577 for (
unsigned int i = 0;
i < TOBL2Digis.size(); ++
i) {
582 std::vector<PGlobalDigi::SiStripDigi> TOBL3Digis = srcGlobalDigis->getTOBL3Digis();
584 for (
unsigned int i = 0;
i < TOBL3Digis.size(); ++
i) {
589 std::vector<PGlobalDigi::SiStripDigi> TOBL4Digis = srcGlobalDigis->getTOBL4Digis();
591 for (
unsigned int i = 0;
i < TOBL4Digis.size(); ++
i) {
596 std::vector<PGlobalDigi::SiStripDigi> TIDW1Digis = srcGlobalDigis->getTIDW1Digis();
598 for (
unsigned int i = 0;
i < TIDW1Digis.size(); ++
i) {
603 std::vector<PGlobalDigi::SiStripDigi> TIDW2Digis = srcGlobalDigis->getTIDW2Digis();
605 for (
unsigned int i = 0;
i < TIDW2Digis.size(); ++
i) {
610 std::vector<PGlobalDigi::SiStripDigi> TIDW3Digis = srcGlobalDigis->getTIDW3Digis();
612 for (
unsigned int i = 0;
i < TIDW3Digis.size(); ++
i) {
617 std::vector<PGlobalDigi::SiStripDigi> TECW1Digis = srcGlobalDigis->getTECW1Digis();
619 for (
unsigned int i = 0;
i < TECW1Digis.size(); ++
i) {
624 std::vector<PGlobalDigi::SiStripDigi> TECW2Digis = srcGlobalDigis->getTECW2Digis();
626 for (
unsigned int i = 0;
i < TECW2Digis.size(); ++
i) {
631 std::vector<PGlobalDigi::SiStripDigi> TECW3Digis = srcGlobalDigis->getTECW3Digis();
633 for (
unsigned int i = 0;
i < TECW3Digis.size(); ++
i) {
638 std::vector<PGlobalDigi::SiStripDigi> TECW4Digis = srcGlobalDigis->getTECW4Digis();
640 for (
unsigned int i = 0;
i < TECW4Digis.size(); ++
i) {
645 std::vector<PGlobalDigi::SiStripDigi> TECW5Digis = srcGlobalDigis->getTECW5Digis();
647 for (
unsigned int i = 0;
i < TECW5Digis.size(); ++
i) {
652 std::vector<PGlobalDigi::SiStripDigi> TECW6Digis = srcGlobalDigis->getTECW6Digis();
654 for (
unsigned int i = 0;
i < TECW6Digis.size(); ++
i) {
659 std::vector<PGlobalDigi::SiStripDigi> TECW7Digis = srcGlobalDigis->getTECW7Digis();
661 for (
unsigned int i = 0;
i < TECW7Digis.size(); ++
i) {
666 std::vector<PGlobalDigi::SiStripDigi> TECW8Digis = srcGlobalDigis->getTECW8Digis();
668 for (
unsigned int i = 0;
i < TECW8Digis.size(); ++
i) {
674 std::vector<PGlobalDigi::SiPixelDigi> BRL1Digis = srcGlobalDigis->getBRL1Digis();
676 for (
unsigned int i = 0;
i < BRL1Digis.size(); ++
i) {
682 std::vector<PGlobalDigi::SiPixelDigi> BRL2Digis = srcGlobalDigis->getBRL2Digis();
684 for (
unsigned int i = 0;
i < BRL2Digis.size(); ++
i) {
690 std::vector<PGlobalDigi::SiPixelDigi> BRL3Digis = srcGlobalDigis->getBRL3Digis();
692 for (
unsigned int i = 0;
i < BRL3Digis.size(); ++
i) {
698 std::vector<PGlobalDigi::SiPixelDigi> FWD1pDigis = srcGlobalDigis->getFWD1pDigis();
700 for (
unsigned int i = 0;
i < FWD1pDigis.size(); ++
i) {
706 std::vector<PGlobalDigi::SiPixelDigi> FWD1nDigis = srcGlobalDigis->getFWD1nDigis();
708 for (
unsigned int i = 0;
i < FWD1nDigis.size(); ++
i) {
714 std::vector<PGlobalDigi::SiPixelDigi> FWD2pDigis = srcGlobalDigis->getFWD2pDigis();
716 for (
unsigned int i = 0;
i < FWD2pDigis.size(); ++
i) {
722 std::vector<PGlobalDigi::SiPixelDigi> FWD2nDigis = srcGlobalDigis->getFWD2nDigis();
724 for (
unsigned int i = 0;
i < FWD2nDigis.size(); ++
i) {
731 std::vector<PGlobalDigi::DTDigi> MB1Digis = srcGlobalDigis->getMB1Digis();
733 for (
unsigned int i = 0;
i < MB1Digis.size(); ++
i) {
734 float layer = 4.0 * (MB1Digis[
i].SLAYER - 1.0) + MB1Digis[
i].LAYER;
740 std::vector<PGlobalDigi::DTDigi> MB2Digis = srcGlobalDigis->getMB2Digis();
742 for (
unsigned int i = 0;
i < MB2Digis.size(); ++
i) {
743 float layer = 4.0 * (MB2Digis[
i].SLAYER - 1.0) + MB2Digis[
i].LAYER;
749 std::vector<PGlobalDigi::DTDigi> MB3Digis = srcGlobalDigis->getMB3Digis();
751 for (
unsigned int i = 0;
i < MB3Digis.size(); ++
i) {
752 float layer = 4.0 * (MB3Digis[
i].SLAYER - 1.0) + MB3Digis[
i].LAYER;
758 std::vector<PGlobalDigi::DTDigi> MB4Digis = srcGlobalDigis->getMB4Digis();
760 for (
unsigned int i = 0;
i < MB4Digis.size(); ++
i) {
761 float layer = 4.0 * (MB4Digis[
i].SLAYER - 1.0) + MB4Digis[
i].LAYER;
768 std::vector<PGlobalDigi::CSCstripDigi> CSCstripDigis = srcGlobalDigis->getCSCstripDigis();
770 for (
unsigned int i = 0;
i < CSCstripDigis.size(); ++
i) {
775 std::vector<PGlobalDigi::CSCwireDigi> CSCwireDigis = srcGlobalDigis->getCSCwireDigis();
777 for (
unsigned int i = 0;
i < CSCwireDigis.size(); ++
i) {
781 edm::LogInfo(MsgLoggerCat) <<
"Done gathering data from event.";
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * mehHcaln[4]
MonitorElement * mehDtMuonLayer[4]
MonitorElement * mehCSCWireTime
MonitorElement * mehEcalMultvAEE[2]
virtual void setCurrentFolder(std::string const &fullpath)
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]
constexpr std::array< uint8_t, layerIndexSize > layer
GlobalDigisHistogrammer(const edm::ParameterSet &)
MonitorElement * mehSiStripADC[19]
MonitorElement * mehEcalSHEvAEESHE[2]
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
MonitorElement * mehEcalSHE[2]
MonitorElement * mehHcalAEE[4]
MonitorElement * mehSiPixelRow[7]
MonitorElement * mehEcaln[3]
MonitorElement * mehCSCWiren
edm::InputTag GlobalDigisSrc_
MonitorElement * mehSiPixelADC[7]
MonitorElement * mehSiPixeln[7]
Log< level::Info, false > LogInfo
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * mehDtMuonn[4]
T getParameter(std::string const &) const
MonitorElement * mehDtMuonTime[4]
MonitorElement * mehSiStripStrip[19]
MonitorElement * mehEScalADC[3]
MonitorElement * mehEcalAEE[2]
MonitorElement * mehEcalMaxPos[2]
edm::EDGetTokenT< PGlobalDigi > GlobalDigisSrc_Token_
MonitorElement * mehSiStripn[19]
Log< level::Warning, false > LogWarning
MonitorElement * mehCSCStripADC
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
void analyze(const edm::Event &, const edm::EventSetup &) override
~GlobalDigisHistogrammer() override
void getAllStableProvenance(std::vector< StableProvenance const * > &provenances) const
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)