17 std::string MsgLoggerCat =
"GlobalRecHitsAnalyzer_GlobalRecHitsAnalyzer";
28 m_Prov.getUntrackedParameter<
bool>(
"GetAllProvenances");
30 m_Prov.getUntrackedParameter<
bool>(
"PrintProvenanceInfo");
61 <<
"\n===============================\n"
62 <<
"Initialized as EDProducer with parameter values:\n"
63 <<
" Name = " <<
fName <<
"\n"
64 <<
" Verbosity = " << verbosity <<
"\n"
65 <<
" Frequency = " << frequency <<
"\n"
66 <<
" OutputFile = " << outputfile <<
"\n"
67 <<
" DoOutput = " << doOutput <<
"\n"
68 <<
" GetProv = " << getAllProvenances <<
"\n"
69 <<
" PrintProv = " << printProvenanceInfo <<
"\n"
70 <<
" Global Src = " << GlobalRecHitSrc_ <<
"\n"
71 <<
"===============================\n";
88 string SiStripString[19] = {
"TECW1",
"TECW2",
"TECW3",
"TECW4",
"TECW5",
"TECW6",
89 "TECW7",
"TECW8",
"TIBL1",
"TIBL2",
"TIBL3",
"TIBL4",
"TIDW1",
"TIDW2",
"TIDW3",
90 "TOBL1",
"TOBL2",
"TOBL3",
"TOBL4"};
92 for (
int i = 0;
i < 19; ++
i) {
98 string hcharname, hchartitle;
100 for (
int amend = 0; amend < 19; ++amend) {
101 hcharname =
"hSiStripn_" + SiStripString[amend];
102 hchartitle= SiStripString[amend] +
" rechits";
107 hcharname =
"hSiStripResX_" + SiStripString[amend];
108 hchartitle = SiStripString[amend] +
" rechit x resolution";
113 hcharname =
"hSiStripResY_" + SiStripString[amend];
114 hchartitle = SiStripString[amend] +
" rechit y resolution";
123 string HCalString[4] = {
"HB",
"HE",
"HF",
"HO"};
124 float HCalnUpper[4] = {3000., 3000., 3000., 2000.};
125 float HCalnLower[4] = {2000., 2000., 2000., 1000.};
126 for (
int j =0;
j <4; ++
j) {
132 for (
int amend = 0; amend < 4; ++amend) {
133 hcharname =
"hHcaln_" + HCalString[amend];
134 hchartitle = HCalString[amend]+
" rechits";
135 mehHcaln[amend] = ibooker.
book1D(hcharname, hchartitle, 500, HCalnLower[amend],
141 hcharname =
"hHcalRes_" + HCalString[amend];
142 hchartitle = HCalString[amend] +
" rechit resolution";
150 string ECalString[3] = {
"EB",
"EE",
"ES"};
151 int ECalnBins[3] = {700, 100, 50};
152 float ECalnUpper[3] = {20000., 62000., 300.};
153 float ECalnLower[3] = {6000., 60000., 100.};
154 int ECalResBins[3] = {200, 200, 200};
155 float ECalResUpper[3] = {1., 0.3, .0002};
156 float ECalResLower[3] = {-1., -0.3, -.0002};
157 for (
int i = 0;
i < 3; ++
i) {
163 for (
int amend = 0; amend < 3; ++amend) {
164 hcharname =
"hEcaln_" + ECalString[amend];
165 hchartitle = ECalString[amend] +
" rechits";
166 mehEcaln[amend] = ibooker.
book1D(hcharname, hchartitle, ECalnBins[amend],
167 ECalnLower[amend], ECalnUpper[amend]);
172 hcharname =
"hEcalRes_" + ECalString[amend];
173 hchartitle = ECalString[amend] +
" rechit resolution";
174 mehEcalRes[amend] = ibooker.
book1D(hcharname, hchartitle, ECalResBins[amend],
175 ECalResLower[amend], ECalResUpper[amend]);
183 string SiPixelString[7] = {
"BRL1",
"BRL2",
"BRL3",
"FWD1n",
"FWD1p",
"FWD2n",
"FWD2p"};
184 for (
int j =0;
j < 7; ++
j) {
191 for (
int amend = 0; amend < 7; ++amend) {
192 hcharname =
"hSiPixeln_" + SiPixelString[amend];
193 hchartitle= SiPixelString[amend] +
" rechits";
198 hcharname =
"hSiPixelResX_" + SiPixelString[amend];
199 hchartitle= SiPixelString[amend] +
" rechit x resolution";
204 hcharname =
"hSiPixelResY_" + SiPixelString[amend];
205 hchartitle= SiPixelString[amend] +
" rechit y resolution";
218 string n_List[3] = {
"hDtMuonn",
"hCSCn",
"hRPCn"};
220 string hist_string[3] = {
"Dt",
"CSC",
"RPC"};
222 for (
int amend = 0; amend < 3; ++amend) {
223 hchartitle = hist_string[amend] +
" rechits";
230 mehCSCn = ibooker.
book1D(n_List[amend], hchartitle, 25, 0., 50.);
235 mehRPCn = ibooker.
book1D(n_List[amend], hchartitle, 25, 0., 50.);
245 hcharname =
"hDtMuonRes";
246 hchartitle =
"DT wire distance resolution";
249 hcharname =
"CSCResRDPhi";
250 hchartitle =
"CSC perp*dphi resolution";
253 hcharname =
"hRPCResX";
254 hchartitle =
"RPC rechits x resolution";
262 std::string MsgLoggerCat =
"GlobalRecHitsHistogrammer_analyze";
273 <<
"Processing run " << nrun <<
", event " << nevt
274 <<
" (" <<
count <<
" events total)";
278 <<
"Processing run " << nrun <<
", event " << nevt
279 <<
" (" <<
count <<
" events total)";
289 std::vector<const edm::Provenance*> AllProv;
294 <<
"Number of Provenances = " << AllProv.size();
297 TString eventout(
"\nProvenance info:\n");
299 for (
unsigned int i = 0;
i < AllProv.size(); ++
i) {
300 eventout +=
"\n ******************************";
301 eventout +=
"\n Module : ";
303 eventout += AllProv[
i]->moduleLabel();
304 eventout +=
"\n ProductID : ";
306 eventout += AllProv[
i]->productID().id();
307 eventout +=
"\n ClassName : ";
309 eventout += AllProv[
i]->className();
310 eventout +=
"\n InstanceName : ";
312 eventout += AllProv[
i]->productInstanceName();
313 eventout +=
"\n BranchName : ";
315 eventout += AllProv[
i]->branchName();
317 eventout +=
"\n ******************************\n";
326 if (!srcGlobalRecHits.
isValid()) {
328 <<
"Unable to find PGlobalRecHit in event!";
332 int nEBCalRecHits = srcGlobalRecHits->getnEBCalRecHits();
333 int nEECalRecHits = srcGlobalRecHits->getnEECalRecHits();
334 int nESCalRecHits = srcGlobalRecHits->getnESCalRecHits();
336 int nHBCalRecHits = srcGlobalRecHits->getnHBCalRecHits();
337 int nHECalRecHits = srcGlobalRecHits->getnHECalRecHits();
338 int nHOCalRecHits = srcGlobalRecHits->getnHOCalRecHits();
339 int nHFCalRecHits = srcGlobalRecHits->getnHFCalRecHits();
341 int nTIBL1RecHits = srcGlobalRecHits->getnTIBL1RecHits();
342 int nTIBL2RecHits = srcGlobalRecHits->getnTIBL2RecHits();
343 int nTIBL3RecHits = srcGlobalRecHits->getnTIBL3RecHits();
344 int nTIBL4RecHits = srcGlobalRecHits->getnTIBL4RecHits();
345 int nTOBL1RecHits = srcGlobalRecHits->getnTOBL1RecHits();
346 int nTOBL2RecHits = srcGlobalRecHits->getnTOBL2RecHits();
347 int nTOBL3RecHits = srcGlobalRecHits->getnTOBL3RecHits();
348 int nTOBL4RecHits = srcGlobalRecHits->getnTOBL4RecHits();
349 int nTIDW1RecHits = srcGlobalRecHits->getnTIDW1RecHits();
350 int nTIDW2RecHits = srcGlobalRecHits->getnTIDW2RecHits();
351 int nTIDW3RecHits = srcGlobalRecHits->getnTIDW3RecHits();
352 int nTECW1RecHits = srcGlobalRecHits->getnTECW1RecHits();
353 int nTECW2RecHits = srcGlobalRecHits->getnTECW2RecHits();
354 int nTECW3RecHits = srcGlobalRecHits->getnTECW3RecHits();
355 int nTECW4RecHits = srcGlobalRecHits->getnTECW4RecHits();
356 int nTECW5RecHits = srcGlobalRecHits->getnTECW5RecHits();
357 int nTECW6RecHits = srcGlobalRecHits->getnTECW6RecHits();
358 int nTECW7RecHits = srcGlobalRecHits->getnTECW7RecHits();
359 int nTECW8RecHits = srcGlobalRecHits->getnTECW8RecHits();
361 int nBRL1RecHits = srcGlobalRecHits->getnBRL1RecHits();
362 int nBRL2RecHits = srcGlobalRecHits->getnBRL2RecHits();
363 int nBRL3RecHits = srcGlobalRecHits->getnBRL3RecHits();
364 int nFWD1nRecHits = srcGlobalRecHits->getnFWD1nRecHits();
365 int nFWD1pRecHits = srcGlobalRecHits->getnFWD1pRecHits();
366 int nFWD2nRecHits = srcGlobalRecHits->getnFWD2nRecHits();
367 int nFWD2pRecHits = srcGlobalRecHits->getnFWD2pRecHits();
369 int nDTRecHits = srcGlobalRecHits->getnDTRecHits();
371 int nCSCRecHits = srcGlobalRecHits->getnCSCRecHits();
373 int nRPCRecHits = srcGlobalRecHits->getnRPCRecHits();
376 std::vector<PGlobalRecHit::ECalRecHit> EECalRecHits =
377 srcGlobalRecHits->getEECalRecHits();
379 for (
unsigned int i = 0;
i < EECalRecHits.size(); ++
i) {
383 std::vector<PGlobalRecHit::ECalRecHit> EBCalRecHits =
384 srcGlobalRecHits->getEBCalRecHits();
386 for (
unsigned int i = 0;
i < EBCalRecHits.size(); ++
i) {
390 std::vector<PGlobalRecHit::ECalRecHit> ESCalRecHits =
391 srcGlobalRecHits->getESCalRecHits();
393 for (
unsigned int i = 0;
i < ESCalRecHits.size(); ++
i) {
398 std::vector<PGlobalRecHit::HCalRecHit> HBCalRecHits =
399 srcGlobalRecHits->getHBCalRecHits();
401 for (
unsigned int i = 0;
i < HBCalRecHits.size(); ++
i) {
405 std::vector<PGlobalRecHit::HCalRecHit> HECalRecHits =
406 srcGlobalRecHits->getHECalRecHits();
408 for (
unsigned int i = 0;
i < HECalRecHits.size(); ++
i) {
412 std::vector<PGlobalRecHit::HCalRecHit> HOCalRecHits =
413 srcGlobalRecHits->getHOCalRecHits();
415 for (
unsigned int i = 0;
i < HOCalRecHits.size(); ++
i) {
419 std::vector<PGlobalRecHit::HCalRecHit> HFCalRecHits =
420 srcGlobalRecHits->getHFCalRecHits();
422 for (
unsigned int i = 0;
i < HFCalRecHits.size(); ++
i) {
427 std::vector<PGlobalRecHit::SiStripRecHit> TIBL1RecHits =
428 srcGlobalRecHits->getTIBL1RecHits();
430 for (
unsigned int i = 0;
i < TIBL1RecHits.size(); ++
i) {
435 std::vector<PGlobalRecHit::SiStripRecHit> TIBL2RecHits =
436 srcGlobalRecHits->getTIBL2RecHits();
438 for (
unsigned int i = 0;
i < TIBL2RecHits.size(); ++
i) {
443 std::vector<PGlobalRecHit::SiStripRecHit> TIBL3RecHits =
444 srcGlobalRecHits->getTIBL3RecHits();
446 for (
unsigned int i = 0;
i < TIBL3RecHits.size(); ++
i) {
451 std::vector<PGlobalRecHit::SiStripRecHit> TIBL4RecHits =
452 srcGlobalRecHits->getTIBL4RecHits();
454 for (
unsigned int i = 0;
i < TIBL4RecHits.size(); ++
i) {
459 std::vector<PGlobalRecHit::SiStripRecHit> TOBL1RecHits =
460 srcGlobalRecHits->getTOBL1RecHits();
462 for (
unsigned int i = 0;
i < TOBL1RecHits.size(); ++
i) {
467 std::vector<PGlobalRecHit::SiStripRecHit> TOBL2RecHits =
468 srcGlobalRecHits->getTOBL2RecHits();
470 for (
unsigned int i = 0;
i < TOBL2RecHits.size(); ++
i) {
475 std::vector<PGlobalRecHit::SiStripRecHit> TOBL3RecHits =
476 srcGlobalRecHits->getTOBL3RecHits();
478 for (
unsigned int i = 0;
i < TOBL3RecHits.size(); ++
i) {
483 std::vector<PGlobalRecHit::SiStripRecHit> TOBL4RecHits =
484 srcGlobalRecHits->getTOBL4RecHits();
486 for (
unsigned int i = 0;
i < TOBL4RecHits.size(); ++
i) {
491 std::vector<PGlobalRecHit::SiStripRecHit> TIDW1RecHits =
492 srcGlobalRecHits->getTIDW1RecHits();
494 for (
unsigned int i = 0;
i < TIDW1RecHits.size(); ++
i) {
499 std::vector<PGlobalRecHit::SiStripRecHit> TIDW2RecHits =
500 srcGlobalRecHits->getTIDW2RecHits();
502 for (
unsigned int i = 0;
i < TIDW2RecHits.size(); ++
i) {
507 std::vector<PGlobalRecHit::SiStripRecHit> TIDW3RecHits =
508 srcGlobalRecHits->getTIDW3RecHits();
510 for (
unsigned int i = 0;
i < TIDW3RecHits.size(); ++
i) {
515 std::vector<PGlobalRecHit::SiStripRecHit> TECW1RecHits =
516 srcGlobalRecHits->getTECW1RecHits();
518 for (
unsigned int i = 0;
i < TECW1RecHits.size(); ++
i) {
523 std::vector<PGlobalRecHit::SiStripRecHit> TECW2RecHits =
524 srcGlobalRecHits->getTECW2RecHits();
526 for (
unsigned int i = 0;
i < TECW2RecHits.size(); ++
i) {
531 std::vector<PGlobalRecHit::SiStripRecHit> TECW3RecHits =
532 srcGlobalRecHits->getTECW3RecHits();
534 for (
unsigned int i = 0;
i < TECW3RecHits.size(); ++
i) {
539 std::vector<PGlobalRecHit::SiStripRecHit> TECW4RecHits =
540 srcGlobalRecHits->getTECW4RecHits();
542 for (
unsigned int i = 0;
i < TECW4RecHits.size(); ++
i) {
547 std::vector<PGlobalRecHit::SiStripRecHit> TECW5RecHits =
548 srcGlobalRecHits->getTECW5RecHits();
550 for (
unsigned int i = 0;
i < TECW5RecHits.size(); ++
i) {
555 std::vector<PGlobalRecHit::SiStripRecHit> TECW6RecHits =
556 srcGlobalRecHits->getTECW6RecHits();
558 for (
unsigned int i = 0;
i < TECW6RecHits.size(); ++
i) {
563 std::vector<PGlobalRecHit::SiStripRecHit> TECW7RecHits =
564 srcGlobalRecHits->getTECW7RecHits();
566 for (
unsigned int i = 0;
i < TECW7RecHits.size(); ++
i) {
571 std::vector<PGlobalRecHit::SiStripRecHit> TECW8RecHits =
572 srcGlobalRecHits->getTECW8RecHits();
574 for (
unsigned int i = 0;
i < TECW8RecHits.size(); ++
i) {
580 std::vector<PGlobalRecHit::SiPixelRecHit> BRL1RecHits =
581 srcGlobalRecHits->getBRL1RecHits();
583 for (
unsigned int i = 0;
i < BRL1RecHits.size(); ++
i) {
588 std::vector<PGlobalRecHit::SiPixelRecHit> BRL2RecHits =
589 srcGlobalRecHits->getBRL2RecHits();
591 for (
unsigned int i = 0;
i < BRL2RecHits.size(); ++
i) {
596 std::vector<PGlobalRecHit::SiPixelRecHit> BRL3RecHits =
597 srcGlobalRecHits->getBRL3RecHits();
599 for (
unsigned int i = 0;
i < BRL3RecHits.size(); ++
i) {
604 std::vector<PGlobalRecHit::SiPixelRecHit> FWD1pRecHits =
605 srcGlobalRecHits->getFWD1pRecHits();
607 for (
unsigned int i = 0;
i < FWD1pRecHits.size(); ++
i) {
612 std::vector<PGlobalRecHit::SiPixelRecHit> FWD1nRecHits =
613 srcGlobalRecHits->getFWD1nRecHits();
615 for (
unsigned int i = 0;
i < FWD1nRecHits.size(); ++
i) {
620 std::vector<PGlobalRecHit::SiPixelRecHit> FWD2pRecHits =
621 srcGlobalRecHits->getFWD2pRecHits();
623 for (
unsigned int i = 0;
i < FWD2pRecHits.size(); ++
i) {
628 std::vector<PGlobalRecHit::SiPixelRecHit> FWD2nRecHits =
629 srcGlobalRecHits->getFWD2nRecHits();
631 for (
unsigned int i = 0;
i < FWD2nRecHits.size(); ++
i) {
637 std::vector<PGlobalRecHit::DTRecHit> DTRecHits =
638 srcGlobalRecHits->getDTRecHits();
640 for (
unsigned int i = 0;
i < DTRecHits.size(); ++
i) {
645 std::vector<PGlobalRecHit::CSCRecHit> CSCRecHits =
646 srcGlobalRecHits->getCSCRecHits();
648 for (
unsigned int i = 0;
i < CSCRecHits.size(); ++
i) {
650 (CSCRecHits[
i].RHPHI - CSCRecHits[
i].SHPHI));
654 std::vector<PGlobalRecHit::RPCRecHit> RPCRecHits =
655 srcGlobalRecHits->getRPCRecHits();
657 for (
unsigned int i = 0;
i < RPCRecHits.size(); ++
i) {
663 <<
"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 * mehSiPixeln[7]
virtual ~GlobalRecHitsHistogrammer()
MonitorElement * mehEcaln[3]
bool getByToken(EDGetToken token, Handle< PROD > &result) const
unsigned long long EventNumber_t
edm::EDGetTokenT< PGlobalRecHit > GlobalRecHitSrc_Token_
MonitorElement * mehSiPixelResX[7]
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * mehSiStripResX[19]
MonitorElement * mehDtMuonRes
MonitorElement * mehSiStripn[19]
MonitorElement * book1D(Args &&...args)
MonitorElement * mehCSCResRDPhi
GlobalRecHitsHistogrammer(const edm::ParameterSet &)
void setCurrentFolder(const std::string &fullpath)
MonitorElement * mehEcalRes[3]
MonitorElement * mehSiPixelResY[7]
MonitorElement * mehDtMuonn
virtual void analyze(const edm::Event &, const edm::EventSetup &)
MonitorElement * mehSiStripResY[19]
MonitorElement * mehHcalRes[4]
edm::InputTag GlobalRecHitSrc_
volatile std::atomic< bool > shutdown_flag false
MonitorElement * mehRPCResX
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * mehHcaln[4]