13 printProvenanceInfo(
false), theCSCStripPedestalSum(0),
14 theCSCStripPedestalCount(0),
count(0)
16 std::string MsgLoggerCat =
"GlobalDigisHistogrammer_GlobalDigisHistogrammer";
27 m_Prov.getUntrackedParameter<
bool>(
"GetAllProvenances");
29 m_Prov.getUntrackedParameter<
bool>(
"PrintProvenanceInfo");
55 <<
"\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";
89 std::string SiStripString[19] = {
"TECW1",
"TECW2",
"TECW3",
"TECW4",
"TECW5",
"TECW6",
"TECW7",
"TECW8",
"TIBL1",
"TIBL2",
"TIBL3",
"TIBL4",
"TIDW1",
"TIDW2",
"TIDW3",
"TOBL1",
"TOBL2",
"TOBL3",
"TOBL4"};
90 for(
int i = 0;
i<19; ++
i)
97 for(
int amend = 0; amend < 19; ++amend)
99 mehSiStripn[amend] =
dbe->
book1D(
"hSiStripn_"+SiStripString[amend], SiStripString[amend]+
" Digis",500,0.,1000.);
102 mehSiStripADC[amend] =
dbe->
book1D(
"hSiStripADC_"+SiStripString[amend],SiStripString[amend]+
" ADC",150,0.0,300.);
105 mehSiStripStrip[amend] =
dbe->
book1D(
"hSiStripStripADC_"+SiStripString[amend],SiStripString[amend]+
" Strip",200,0.0,800.);
112 std::string HCalString[4] = {
"HB",
"HE",
"HO",
"HF"};
113 float calnUpper[4] = {3000.,3000.,3000.,2000.};
float calnLower[4]={2000.,2000.,2000.,1000.};
114 float SHEUpper[4]={0.05,.05,0.05,20};
115 float SHEvAEEUpper[4] = {5000, 5000, 5000, 20};
float SHEvAEELower[4] = {-5000, -5000, -5000, -20};
116 int SHEvAEEnBins[4] = {200,200,200,40};
117 double ProfileUpper[4] = {1.,1.,1.,20.};
119 for(
int i =0;
i<4; ++
i)
129 for(
int amend = 0; amend < 4; ++amend)
131 mehHcaln[amend] =
dbe->
book1D(
"hHcaln_"+HCalString[amend],HCalString[amend]+
" digis", 1000, calnLower[amend], calnUpper[amend]);
134 mehHcalAEE[amend] =
dbe->
book1D(
"hHcalAEE_"+HCalString[amend],HCalString[amend]+
"Cal AEE", 60, -10., 50.);
137 mehHcalSHE[amend] =
dbe->
book1D(
"hHcalSHE_"+HCalString[amend],HCalString[amend]+
"Cal SHE", 100, 0.0, SHEUpper[amend]);
140 mehHcalAEESHE[amend] =
dbe->
book1D(
"hHcalAEESHE_"+HCalString[amend], HCalString[amend]+
"Cal AEE/SHE", SHEvAEEnBins[amend], SHEvAEELower[amend], SHEvAEEUpper[amend]);
145 mehHcalSHEvAEE[amend] =
dbe->
bookProfile(
"hHcalSHEvAEE_"+HCalString[amend],HCalString[amend]+
"Cal SHE vs. AEE", 60, (
float)-10., (
float)50., 100, (
float)0., (
float)ProfileUpper[amend],
"");
157 for(
int i =0;
i<2; ++
i)
168 for(
int amend = 0; amend < 2; ++amend)
170 mehEcaln[amend] =
dbe->
book1D(
"hEcaln_"+ECalString[amend],ECalString[amend]+
" digis", 300, 1000., 4000.);
173 mehEcalAEE[amend] =
dbe->
book1D(
"hEcalAEE_"+ECalString[amend],ECalString[amend]+
"Cal AEE", 100, 0., 1.);
176 mehEcalSHE[amend] =
dbe->
book1D(
"hEcalSHE_"+ECalString[amend],ECalString[amend]+
"Cal SHE", 50, 0., 5.);
179 mehEcalMaxPos[amend] =
dbe->
book1D(
"hEcalMaxPos_"+ECalString[amend],ECalString[amend]+
"Cal MaxPos",10, 0., 10.);
184 mehEcalSHEvAEESHE[amend] =
dbe->
bookProfile(
"hEcalSHEvAEESHE_"+ECalString[amend],ECalString[amend]+
"Cal SHE vs. AEE/SHE",100, (
float)0., (
float)10., 50, (
float)0., (
float)5.,
"");
187 mehEcalMultvAEE[amend] =
dbe->
bookProfile(
"hEcalMultvAEE_"+ECalString[amend],ECalString[amend]+
"Cal Multi vs. AEE", 100, (
float)0., (
float)10., 400, (
float)0., (
float)4000.,
"");
199 for(
int i =0;
i<3; ++
i)
209 std::string SiPixelString[7] = {
"BRL1",
"BRL2",
"BRL3",
"FWD1n",
"FWD1p",
"FWD2n",
"FWD2p"};
210 for(
int j =0;
j<7; ++
j)
219 for(
int amend = 0; amend < 7; ++amend)
221 if(amend<3)
mehSiPixeln[amend] =
dbe->
book1D(
"hSiPixeln_"+SiPixelString[amend],SiPixelString[amend]+
" Digis",50,0.,100.);
222 else mehSiPixeln[amend] =
dbe->
book1D(
"hSiPixeln_"+SiPixelString[amend],SiPixelString[amend]+
" Digis",25,0.,50.);
225 mehSiPixelADC[amend] =
dbe->
book1D(
"hSiPixelADC_"+SiPixelString[amend],SiPixelString[amend]+
" ADC",150,0.0,300.);
228 mehSiPixelRow[amend] =
dbe->
book1D(
"hSiPixelRow_"+SiPixelString[amend],SiPixelString[amend]+
" Row",100,0.0,100.);
231 mehSiPixelCol[amend] =
dbe->
book1D(
"hSiPixelColumn_"+SiPixelString[amend],SiPixelString[amend]+
" Column",200,0.0,500.);
237 std::string MuonString[4] = {
"MB1",
"MB2",
"MB3",
"MB4"};
239 for(
int i =0;
i < 4; ++
i)
247 for(
int j = 0;
j < 4; ++
j)
312 std::string MsgLoggerCat =
"GlobalDigisHistogrammer_beginJob";
348 std::string MsgLoggerCat =
"GlobalDigisHistogrammer_endJob";
351 <<
"Terminating having processed " <<
count <<
" events.";
358 std::string MsgLoggerCat =
"GlobalDigisHistogrammer_analyze";
364 int nrun = iEvent.
id().
run();
369 <<
"Processing run " << nrun <<
", event " << nevt
370 <<
" (" <<
count <<
" events total)";
374 <<
"Processing run " << nrun <<
", event " << nevt
375 <<
" (" <<
count <<
" events total)";
385 std::vector<const edm::Provenance*> AllProv;
390 <<
"Number of Provenances = " << AllProv.size();
393 TString eventout(
"\nProvenance info:\n");
395 for (
unsigned int i = 0;
i < AllProv.size(); ++
i) {
396 eventout +=
"\n ******************************";
397 eventout +=
"\n Module : ";
399 eventout += AllProv[
i]->moduleLabel();
400 eventout +=
"\n ProductID : ";
402 eventout += AllProv[
i]->productID().id();
403 eventout +=
"\n ClassName : ";
405 eventout += AllProv[
i]->className();
406 eventout +=
"\n InstanceName : ";
408 eventout += AllProv[
i]->productInstanceName();
409 eventout +=
"\n BranchName : ";
411 eventout += AllProv[
i]->branchName();
413 eventout +=
"\n ******************************\n";
420 if (!srcGlobalDigis.
isValid()) {
422 <<
"Unable to find PGlobalDigis in event!";
429 int nEBCalDigis = srcGlobalDigis->getnEBCalDigis();
430 int nEECalDigis = srcGlobalDigis->getnEECalDigis();
431 int nESCalDigis = srcGlobalDigis->getnESCalDigis();
433 int nHBCalDigis = srcGlobalDigis->getnHBCalDigis();
434 int nHECalDigis = srcGlobalDigis->getnHECalDigis();
435 int nHOCalDigis = srcGlobalDigis->getnHOCalDigis();
436 int nHFCalDigis = srcGlobalDigis->getnHFCalDigis();
438 int nTIBL1Digis = srcGlobalDigis->getnTIBL1Digis();
439 int nTIBL2Digis = srcGlobalDigis->getnTIBL2Digis();
440 int nTIBL3Digis = srcGlobalDigis->getnTIBL3Digis();
441 int nTIBL4Digis = srcGlobalDigis->getnTIBL4Digis();
442 int nTOBL1Digis = srcGlobalDigis->getnTOBL1Digis();
443 int nTOBL2Digis = srcGlobalDigis->getnTOBL2Digis();
444 int nTOBL3Digis = srcGlobalDigis->getnTOBL3Digis();
445 int nTOBL4Digis = srcGlobalDigis->getnTOBL4Digis();
446 int nTIDW1Digis = srcGlobalDigis->getnTIDW1Digis();
447 int nTIDW2Digis = srcGlobalDigis->getnTIDW2Digis();
448 int nTIDW3Digis = srcGlobalDigis->getnTIDW3Digis();
449 int nTECW1Digis = srcGlobalDigis->getnTECW1Digis();
450 int nTECW2Digis = srcGlobalDigis->getnTECW2Digis();
451 int nTECW3Digis = srcGlobalDigis->getnTECW3Digis();
452 int nTECW4Digis = srcGlobalDigis->getnTECW4Digis();
453 int nTECW5Digis = srcGlobalDigis->getnTECW5Digis();
454 int nTECW6Digis = srcGlobalDigis->getnTECW6Digis();
455 int nTECW7Digis = srcGlobalDigis->getnTECW7Digis();
456 int nTECW8Digis = srcGlobalDigis->getnTECW8Digis();
458 int nBRL1Digis = srcGlobalDigis->getnBRL1Digis();
459 int nBRL2Digis = srcGlobalDigis->getnBRL2Digis();
460 int nBRL3Digis = srcGlobalDigis->getnBRL3Digis();
461 int nFWD1nDigis = srcGlobalDigis->getnFWD1nDigis();
462 int nFWD1pDigis = srcGlobalDigis->getnFWD1pDigis();
463 int nFWD2nDigis = srcGlobalDigis->getnFWD2nDigis();
464 int nFWD2pDigis = srcGlobalDigis->getnFWD2pDigis();
466 int nMB1Digis = srcGlobalDigis->getnMB1Digis();
467 int nMB2Digis = srcGlobalDigis->getnMB2Digis();
468 int nMB3Digis = srcGlobalDigis->getnMB3Digis();
469 int nMB4Digis = srcGlobalDigis->getnMB4Digis();
471 int nCSCstripDigis = srcGlobalDigis->getnCSCstripDigis();
473 int nCSCwireDigis = srcGlobalDigis->getnCSCwireDigis();
476 std::vector<PGlobalDigi::ECalDigi> EECalDigis =
477 srcGlobalDigis->getEECalDigis();
479 for (
unsigned int i = 0;
i < EECalDigis.size(); ++
i) {
483 if (EECalDigis[
i].SHE != 0.) {
486 Fill(EECalDigis[
i].AEE/EECalDigis[
i].SHE,EECalDigis[
i].SHE,1);
490 std::vector<PGlobalDigi::ECalDigi> EBCalDigis =
491 srcGlobalDigis->getEBCalDigis();
493 for (
unsigned int i = 0;
i < EBCalDigis.size(); ++
i) {
497 if (EBCalDigis[
i].SHE != 0.) {
500 Fill(EBCalDigis[
i].AEE/EBCalDigis[
i].SHE,EBCalDigis[
i].SHE,1);
504 std::vector<PGlobalDigi::ESCalDigi> ESCalDigis =
505 srcGlobalDigis->getESCalDigis();
507 for (
unsigned int i = 0;
i < ESCalDigis.size(); ++
i) {
514 std::vector<PGlobalDigi::HCalDigi> HBCalDigis =
515 srcGlobalDigis->getHBCalDigis();
517 for (
unsigned int i = 0;
i < HBCalDigis.size(); ++
i) {
519 if (HBCalDigis[
i].SHE != 0.) {
523 Fill(HBCalDigis[
i].AEE,HBCalDigis[
i].SHE,1);
526 std::vector<PGlobalDigi::HCalDigi> HECalDigis =
527 srcGlobalDigis->getHECalDigis();
529 for (
unsigned int i = 0;
i < HECalDigis.size(); ++
i) {
531 if (HECalDigis[
i].SHE != 0.) {
535 Fill(HECalDigis[
i].AEE,HECalDigis[
i].SHE,1);
539 std::vector<PGlobalDigi::HCalDigi> HOCalDigis =
540 srcGlobalDigis->getHOCalDigis();
542 for (
unsigned int i = 0;
i < HOCalDigis.size(); ++
i) {
544 if (HOCalDigis[
i].SHE != 0.) {
548 Fill(HOCalDigis[
i].AEE,HOCalDigis[
i].SHE,1);
552 std::vector<PGlobalDigi::HCalDigi> HFCalDigis =
553 srcGlobalDigis->getHFCalDigis();
555 for (
unsigned int i = 0;
i < HFCalDigis.size(); ++
i) {
557 if (HFCalDigis[
i].SHE != 0.) {
561 Fill(HFCalDigis[
i].AEE,HFCalDigis[
i].SHE,1);
566 std::vector<PGlobalDigi::SiStripDigi> TIBL1Digis =
567 srcGlobalDigis->getTIBL1Digis();
569 for (
unsigned int i = 0;
i < TIBL1Digis.size(); ++
i) {
574 std::vector<PGlobalDigi::SiStripDigi> TIBL2Digis =
575 srcGlobalDigis->getTIBL2Digis();
577 for (
unsigned int i = 0;
i < TIBL2Digis.size(); ++
i) {
582 std::vector<PGlobalDigi::SiStripDigi> TIBL3Digis =
583 srcGlobalDigis->getTIBL3Digis();
585 for (
unsigned int i = 0;
i < TIBL3Digis.size(); ++
i) {
590 std::vector<PGlobalDigi::SiStripDigi> TIBL4Digis =
591 srcGlobalDigis->getTIBL4Digis();
593 for (
unsigned int i = 0;
i < TIBL4Digis.size(); ++
i) {
598 std::vector<PGlobalDigi::SiStripDigi> TOBL1Digis =
599 srcGlobalDigis->getTOBL1Digis();
601 for (
unsigned int i = 0;
i < TOBL1Digis.size(); ++
i) {
606 std::vector<PGlobalDigi::SiStripDigi> TOBL2Digis =
607 srcGlobalDigis->getTOBL2Digis();
609 for (
unsigned int i = 0;
i < TOBL2Digis.size(); ++
i) {
614 std::vector<PGlobalDigi::SiStripDigi> TOBL3Digis =
615 srcGlobalDigis->getTOBL3Digis();
617 for (
unsigned int i = 0;
i < TOBL3Digis.size(); ++
i) {
622 std::vector<PGlobalDigi::SiStripDigi> TOBL4Digis =
623 srcGlobalDigis->getTOBL4Digis();
625 for (
unsigned int i = 0;
i < TOBL4Digis.size(); ++
i) {
630 std::vector<PGlobalDigi::SiStripDigi> TIDW1Digis =
631 srcGlobalDigis->getTIDW1Digis();
633 for (
unsigned int i = 0;
i < TIDW1Digis.size(); ++
i) {
638 std::vector<PGlobalDigi::SiStripDigi> TIDW2Digis =
639 srcGlobalDigis->getTIDW2Digis();
641 for (
unsigned int i = 0;
i < TIDW2Digis.size(); ++
i) {
646 std::vector<PGlobalDigi::SiStripDigi> TIDW3Digis =
647 srcGlobalDigis->getTIDW3Digis();
649 for (
unsigned int i = 0;
i < TIDW3Digis.size(); ++
i) {
654 std::vector<PGlobalDigi::SiStripDigi> TECW1Digis =
655 srcGlobalDigis->getTECW1Digis();
657 for (
unsigned int i = 0;
i < TECW1Digis.size(); ++
i) {
662 std::vector<PGlobalDigi::SiStripDigi> TECW2Digis =
663 srcGlobalDigis->getTECW2Digis();
665 for (
unsigned int i = 0;
i < TECW2Digis.size(); ++
i) {
670 std::vector<PGlobalDigi::SiStripDigi> TECW3Digis =
671 srcGlobalDigis->getTECW3Digis();
673 for (
unsigned int i = 0;
i < TECW3Digis.size(); ++
i) {
678 std::vector<PGlobalDigi::SiStripDigi> TECW4Digis =
679 srcGlobalDigis->getTECW4Digis();
681 for (
unsigned int i = 0;
i < TECW4Digis.size(); ++
i) {
686 std::vector<PGlobalDigi::SiStripDigi> TECW5Digis =
687 srcGlobalDigis->getTECW5Digis();
689 for (
unsigned int i = 0;
i < TECW5Digis.size(); ++
i) {
694 std::vector<PGlobalDigi::SiStripDigi> TECW6Digis =
695 srcGlobalDigis->getTECW6Digis();
697 for (
unsigned int i = 0;
i < TECW6Digis.size(); ++
i) {
702 std::vector<PGlobalDigi::SiStripDigi> TECW7Digis =
703 srcGlobalDigis->getTECW7Digis();
705 for (
unsigned int i = 0;
i < TECW7Digis.size(); ++
i) {
710 std::vector<PGlobalDigi::SiStripDigi> TECW8Digis =
711 srcGlobalDigis->getTECW8Digis();
713 for (
unsigned int i = 0;
i < TECW8Digis.size(); ++
i) {
719 std::vector<PGlobalDigi::SiPixelDigi> BRL1Digis =
720 srcGlobalDigis->getBRL1Digis();
722 for (
unsigned int i = 0;
i < BRL1Digis.size(); ++
i) {
728 std::vector<PGlobalDigi::SiPixelDigi> BRL2Digis =
729 srcGlobalDigis->getBRL2Digis();
731 for (
unsigned int i = 0;
i < BRL2Digis.size(); ++
i) {
737 std::vector<PGlobalDigi::SiPixelDigi> BRL3Digis =
738 srcGlobalDigis->getBRL3Digis();
740 for (
unsigned int i = 0;
i < BRL3Digis.size(); ++
i) {
746 std::vector<PGlobalDigi::SiPixelDigi> FWD1pDigis =
747 srcGlobalDigis->getFWD1pDigis();
749 for (
unsigned int i = 0;
i < FWD1pDigis.size(); ++
i) {
755 std::vector<PGlobalDigi::SiPixelDigi> FWD1nDigis =
756 srcGlobalDigis->getFWD1nDigis();
758 for (
unsigned int i = 0;
i < FWD1nDigis.size(); ++
i) {
764 std::vector<PGlobalDigi::SiPixelDigi> FWD2pDigis =
765 srcGlobalDigis->getFWD2pDigis();
767 for (
unsigned int i = 0;
i < FWD2pDigis.size(); ++
i) {
773 std::vector<PGlobalDigi::SiPixelDigi> FWD2nDigis =
774 srcGlobalDigis->getFWD2nDigis();
776 for (
unsigned int i = 0;
i < FWD2nDigis.size(); ++
i) {
783 std::vector<PGlobalDigi::DTDigi> MB1Digis =
784 srcGlobalDigis->getMB1Digis();
786 for (
unsigned int i = 0;
i < MB1Digis.size(); ++
i) {
787 float layer = 4.0 * (MB1Digis[
i].SLAYER - 1.0) + MB1Digis[
i].LAYER;
793 std::vector<PGlobalDigi::DTDigi> MB2Digis =
794 srcGlobalDigis->getMB2Digis();
796 for (
unsigned int i = 0;
i < MB2Digis.size(); ++
i) {
797 float layer = 4.0 * (MB2Digis[
i].SLAYER - 1.0) + MB2Digis[
i].LAYER;
803 std::vector<PGlobalDigi::DTDigi> MB3Digis =
804 srcGlobalDigis->getMB3Digis();
806 for (
unsigned int i = 0;
i < MB3Digis.size(); ++
i) {
807 float layer = 4.0 * (MB3Digis[
i].SLAYER - 1.0) + MB3Digis[
i].LAYER;
813 std::vector<PGlobalDigi::DTDigi> MB4Digis =
814 srcGlobalDigis->getMB4Digis();
816 for (
unsigned int i = 0;
i < MB4Digis.size(); ++
i) {
817 float layer = 4.0 * (MB4Digis[
i].SLAYER - 1.0) + MB4Digis[
i].LAYER;
824 std::vector<PGlobalDigi::CSCstripDigi> CSCstripDigis =
825 srcGlobalDigis->getCSCstripDigis();
827 for (
unsigned int i = 0;
i < CSCstripDigis.size(); ++
i) {
832 std::vector<PGlobalDigi::CSCwireDigi> CSCwireDigis =
833 srcGlobalDigis->getCSCwireDigis();
835 for (
unsigned int i = 0;
i < CSCwireDigis.size(); ++
i) {
840 <<
"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 * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
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 * mehSiPixelADC[7]
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")
virtual void beginJob(void)
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
void setVerbose(unsigned level)
MonitorElement * mehSiPixeln[7]
virtual ~GlobalDigisHistogrammer()
MonitorElement * mehDtMuonn[4]
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
void showDirStructure(void) const
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)
void setCurrentFolder(const std::string &fullpath)