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";
94 string SiStripString[19] = {
"TECW1",
"TECW2",
"TECW3",
"TECW4",
"TECW5",
"TECW6",
"TECW7",
"TECW8",
"TIBL1",
"TIBL2",
"TIBL3",
"TIBL4",
"TIDW1",
"TIDW2",
"TIDW3",
"TOBL1",
"TOBL2",
"TOBL3",
"TOBL4"};
95 for(
int i = 0;
i<19; ++
i)
101 string hcharname, hchartitle;
103 for(
int amend = 0; amend < 19; ++amend)
105 hcharname =
"hSiStripn_"+SiStripString[amend];
106 hchartitle= SiStripString[amend]+
" rechits";
110 hcharname =
"hSiStripResX_"+SiStripString[amend];
111 hchartitle= SiStripString[amend]+
" rechit x resolution";
115 hcharname =
"hSiStripResY_"+SiStripString[amend];
116 hchartitle= SiStripString[amend]+
" rechit y resolution";
125 string HCalString[4]={
"HB",
"HE",
"HF",
"HO"};
126 float HCalnUpper[4]={3000.,3000.,3000.,2000.};
float HCalnLower[4]={2000.,2000.,2000.,1000.};
127 for(
int j =0;
j <4; ++
j)
134 for(
int amend = 0; amend < 4; ++amend)
136 hcharname =
"hHcaln_"+HCalString[amend];
137 hchartitle= HCalString[amend]+
" rechits";
138 mehHcaln[amend] =
dbe->
book1D(hcharname,hchartitle, 500, HCalnLower[amend], HCalnUpper[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)
164 for(
int amend = 0; amend < 3; ++amend)
166 hcharname =
"hEcaln_"+ECalString[amend];
167 hchartitle= ECalString[amend]+
" rechits";
168 mehEcaln[amend] =
dbe->
book1D(hcharname,hchartitle, ECalnBins[amend], ECalnLower[amend], ECalnUpper[amend]);
171 hcharname =
"hEcalRes_"+ECalString[amend];
172 hchartitle= ECalString[amend]+
" rechit resolution";
173 mehEcalRes[amend] =
dbe->
book1D(hcharname,hchartitle,ECalResBins[amend], ECalResLower[amend], ECalResUpper[amend]);
180 string SiPixelString[7] = {
"BRL1",
"BRL2",
"BRL3",
"FWD1n",
"FWD1p",
"FWD2n",
"FWD2p"};
181 for(
int j =0;
j<7; ++
j)
189 for(
int amend = 0; amend < 7; ++amend)
191 hcharname =
"hSiPixeln_"+SiPixelString[amend];
192 hchartitle= SiPixelString[amend]+
" rechits";
196 hcharname =
"hSiPixelResX_"+SiPixelString[amend];
197 hchartitle= SiPixelString[amend]+
" rechit x resolution";
201 hcharname =
"hSiPixelResY_"+SiPixelString[amend];
202 hchartitle= SiPixelString[amend]+
" rechit y resolution";
216 string n_List[3] = {
"hDtMuonn",
"hCSCn",
"hRPCn"};
218 string hist_string[3] = {
"Dt",
"CSC",
"RPC"};
220 for(
int amend=0; amend<3; ++amend)
222 hchartitle = hist_string[amend]+
" rechits";
247 hcharname=
"hDtMuonRes";
248 hchartitle=
"DT wire distance resolution";
250 hcharname=
"CSCResRDPhi";
251 hchartitle=
"CSC perp*dphi resolution";
253 hcharname =
"hRPCResX";
254 hchartitle =
"RPC rechits x resolution";
274 std::string MsgLoggerCat =
"GlobalRecHitsAnalyzer_endJob";
277 <<
"Terminating having processed " <<
count <<
" events.";
284 std::string MsgLoggerCat =
"GlobalRecHitsHistogrammer_analyze";
290 int nrun = iEvent.
id().
run();
295 <<
"Processing run " << nrun <<
", event " << nevt
296 <<
" (" <<
count <<
" events total)";
300 <<
"Processing run " << nrun <<
", event " << nevt
301 <<
" (" <<
count <<
" events total)";
311 std::vector<const edm::Provenance*> AllProv;
316 <<
"Number of Provenances = " << AllProv.size();
319 TString eventout(
"\nProvenance info:\n");
321 for (
unsigned int i = 0;
i < AllProv.size(); ++
i) {
322 eventout +=
"\n ******************************";
323 eventout +=
"\n Module : ";
325 eventout += AllProv[
i]->moduleLabel();
326 eventout +=
"\n ProductID : ";
328 eventout += AllProv[
i]->productID().id();
329 eventout +=
"\n ClassName : ";
331 eventout += AllProv[
i]->className();
332 eventout +=
"\n InstanceName : ";
334 eventout += AllProv[
i]->productInstanceName();
335 eventout +=
"\n BranchName : ";
337 eventout += AllProv[
i]->branchName();
339 eventout +=
"\n ******************************\n";
349 if (!srcGlobalRecHits.
isValid()) {
351 <<
"Unable to find PGlobalRecHit in event!";
355 int nEBCalRecHits = srcGlobalRecHits->getnEBCalRecHits();
356 int nEECalRecHits = srcGlobalRecHits->getnEECalRecHits();
357 int nESCalRecHits = srcGlobalRecHits->getnESCalRecHits();
359 int nHBCalRecHits = srcGlobalRecHits->getnHBCalRecHits();
360 int nHECalRecHits = srcGlobalRecHits->getnHECalRecHits();
361 int nHOCalRecHits = srcGlobalRecHits->getnHOCalRecHits();
362 int nHFCalRecHits = srcGlobalRecHits->getnHFCalRecHits();
364 int nTIBL1RecHits = srcGlobalRecHits->getnTIBL1RecHits();
365 int nTIBL2RecHits = srcGlobalRecHits->getnTIBL2RecHits();
366 int nTIBL3RecHits = srcGlobalRecHits->getnTIBL3RecHits();
367 int nTIBL4RecHits = srcGlobalRecHits->getnTIBL4RecHits();
368 int nTOBL1RecHits = srcGlobalRecHits->getnTOBL1RecHits();
369 int nTOBL2RecHits = srcGlobalRecHits->getnTOBL2RecHits();
370 int nTOBL3RecHits = srcGlobalRecHits->getnTOBL3RecHits();
371 int nTOBL4RecHits = srcGlobalRecHits->getnTOBL4RecHits();
372 int nTIDW1RecHits = srcGlobalRecHits->getnTIDW1RecHits();
373 int nTIDW2RecHits = srcGlobalRecHits->getnTIDW2RecHits();
374 int nTIDW3RecHits = srcGlobalRecHits->getnTIDW3RecHits();
375 int nTECW1RecHits = srcGlobalRecHits->getnTECW1RecHits();
376 int nTECW2RecHits = srcGlobalRecHits->getnTECW2RecHits();
377 int nTECW3RecHits = srcGlobalRecHits->getnTECW3RecHits();
378 int nTECW4RecHits = srcGlobalRecHits->getnTECW4RecHits();
379 int nTECW5RecHits = srcGlobalRecHits->getnTECW5RecHits();
380 int nTECW6RecHits = srcGlobalRecHits->getnTECW6RecHits();
381 int nTECW7RecHits = srcGlobalRecHits->getnTECW7RecHits();
382 int nTECW8RecHits = srcGlobalRecHits->getnTECW8RecHits();
384 int nBRL1RecHits = srcGlobalRecHits->getnBRL1RecHits();
385 int nBRL2RecHits = srcGlobalRecHits->getnBRL2RecHits();
386 int nBRL3RecHits = srcGlobalRecHits->getnBRL3RecHits();
387 int nFWD1nRecHits = srcGlobalRecHits->getnFWD1nRecHits();
388 int nFWD1pRecHits = srcGlobalRecHits->getnFWD1pRecHits();
389 int nFWD2nRecHits = srcGlobalRecHits->getnFWD2nRecHits();
390 int nFWD2pRecHits = srcGlobalRecHits->getnFWD2pRecHits();
392 int nDTRecHits = srcGlobalRecHits->getnDTRecHits();
394 int nCSCRecHits = srcGlobalRecHits->getnCSCRecHits();
396 int nRPCRecHits = srcGlobalRecHits->getnRPCRecHits();
399 std::vector<PGlobalRecHit::ECalRecHit> EECalRecHits =
400 srcGlobalRecHits->getEECalRecHits();
402 for (
unsigned int i = 0;
i < EECalRecHits.size(); ++
i) {
406 std::vector<PGlobalRecHit::ECalRecHit> EBCalRecHits =
407 srcGlobalRecHits->getEBCalRecHits();
409 for (
unsigned int i = 0;
i < EBCalRecHits.size(); ++
i) {
413 std::vector<PGlobalRecHit::ECalRecHit> ESCalRecHits =
414 srcGlobalRecHits->getESCalRecHits();
416 for (
unsigned int i = 0;
i < ESCalRecHits.size(); ++
i) {
421 std::vector<PGlobalRecHit::HCalRecHit> HBCalRecHits =
422 srcGlobalRecHits->getHBCalRecHits();
424 for (
unsigned int i = 0;
i < HBCalRecHits.size(); ++
i) {
428 std::vector<PGlobalRecHit::HCalRecHit> HECalRecHits =
429 srcGlobalRecHits->getHECalRecHits();
431 for (
unsigned int i = 0;
i < HECalRecHits.size(); ++
i) {
435 std::vector<PGlobalRecHit::HCalRecHit> HOCalRecHits =
436 srcGlobalRecHits->getHOCalRecHits();
438 for (
unsigned int i = 0;
i < HOCalRecHits.size(); ++
i) {
442 std::vector<PGlobalRecHit::HCalRecHit> HFCalRecHits =
443 srcGlobalRecHits->getHFCalRecHits();
445 for (
unsigned int i = 0;
i < HFCalRecHits.size(); ++
i) {
450 std::vector<PGlobalRecHit::SiStripRecHit> TIBL1RecHits =
451 srcGlobalRecHits->getTIBL1RecHits();
453 for (
unsigned int i = 0;
i < TIBL1RecHits.size(); ++
i) {
458 std::vector<PGlobalRecHit::SiStripRecHit> TIBL2RecHits =
459 srcGlobalRecHits->getTIBL2RecHits();
461 for (
unsigned int i = 0;
i < TIBL2RecHits.size(); ++
i) {
466 std::vector<PGlobalRecHit::SiStripRecHit> TIBL3RecHits =
467 srcGlobalRecHits->getTIBL3RecHits();
469 for (
unsigned int i = 0;
i < TIBL3RecHits.size(); ++
i) {
474 std::vector<PGlobalRecHit::SiStripRecHit> TIBL4RecHits =
475 srcGlobalRecHits->getTIBL4RecHits();
477 for (
unsigned int i = 0;
i < TIBL4RecHits.size(); ++
i) {
482 std::vector<PGlobalRecHit::SiStripRecHit> TOBL1RecHits =
483 srcGlobalRecHits->getTOBL1RecHits();
485 for (
unsigned int i = 0;
i < TOBL1RecHits.size(); ++
i) {
490 std::vector<PGlobalRecHit::SiStripRecHit> TOBL2RecHits =
491 srcGlobalRecHits->getTOBL2RecHits();
493 for (
unsigned int i = 0;
i < TOBL2RecHits.size(); ++
i) {
498 std::vector<PGlobalRecHit::SiStripRecHit> TOBL3RecHits =
499 srcGlobalRecHits->getTOBL3RecHits();
501 for (
unsigned int i = 0;
i < TOBL3RecHits.size(); ++
i) {
506 std::vector<PGlobalRecHit::SiStripRecHit> TOBL4RecHits =
507 srcGlobalRecHits->getTOBL4RecHits();
509 for (
unsigned int i = 0;
i < TOBL4RecHits.size(); ++
i) {
514 std::vector<PGlobalRecHit::SiStripRecHit> TIDW1RecHits =
515 srcGlobalRecHits->getTIDW1RecHits();
517 for (
unsigned int i = 0;
i < TIDW1RecHits.size(); ++
i) {
522 std::vector<PGlobalRecHit::SiStripRecHit> TIDW2RecHits =
523 srcGlobalRecHits->getTIDW2RecHits();
525 for (
unsigned int i = 0;
i < TIDW2RecHits.size(); ++
i) {
530 std::vector<PGlobalRecHit::SiStripRecHit> TIDW3RecHits =
531 srcGlobalRecHits->getTIDW3RecHits();
533 for (
unsigned int i = 0;
i < TIDW3RecHits.size(); ++
i) {
538 std::vector<PGlobalRecHit::SiStripRecHit> TECW1RecHits =
539 srcGlobalRecHits->getTECW1RecHits();
541 for (
unsigned int i = 0;
i < TECW1RecHits.size(); ++
i) {
546 std::vector<PGlobalRecHit::SiStripRecHit> TECW2RecHits =
547 srcGlobalRecHits->getTECW2RecHits();
549 for (
unsigned int i = 0;
i < TECW2RecHits.size(); ++
i) {
554 std::vector<PGlobalRecHit::SiStripRecHit> TECW3RecHits =
555 srcGlobalRecHits->getTECW3RecHits();
557 for (
unsigned int i = 0;
i < TECW3RecHits.size(); ++
i) {
562 std::vector<PGlobalRecHit::SiStripRecHit> TECW4RecHits =
563 srcGlobalRecHits->getTECW4RecHits();
565 for (
unsigned int i = 0;
i < TECW4RecHits.size(); ++
i) {
570 std::vector<PGlobalRecHit::SiStripRecHit> TECW5RecHits =
571 srcGlobalRecHits->getTECW5RecHits();
573 for (
unsigned int i = 0;
i < TECW5RecHits.size(); ++
i) {
578 std::vector<PGlobalRecHit::SiStripRecHit> TECW6RecHits =
579 srcGlobalRecHits->getTECW6RecHits();
581 for (
unsigned int i = 0;
i < TECW6RecHits.size(); ++
i) {
586 std::vector<PGlobalRecHit::SiStripRecHit> TECW7RecHits =
587 srcGlobalRecHits->getTECW7RecHits();
589 for (
unsigned int i = 0;
i < TECW7RecHits.size(); ++
i) {
594 std::vector<PGlobalRecHit::SiStripRecHit> TECW8RecHits =
595 srcGlobalRecHits->getTECW8RecHits();
597 for (
unsigned int i = 0;
i < TECW8RecHits.size(); ++
i) {
603 std::vector<PGlobalRecHit::SiPixelRecHit> BRL1RecHits =
604 srcGlobalRecHits->getBRL1RecHits();
606 for (
unsigned int i = 0;
i < BRL1RecHits.size(); ++
i) {
611 std::vector<PGlobalRecHit::SiPixelRecHit> BRL2RecHits =
612 srcGlobalRecHits->getBRL2RecHits();
614 for (
unsigned int i = 0;
i < BRL2RecHits.size(); ++
i) {
619 std::vector<PGlobalRecHit::SiPixelRecHit> BRL3RecHits =
620 srcGlobalRecHits->getBRL3RecHits();
622 for (
unsigned int i = 0;
i < BRL3RecHits.size(); ++
i) {
627 std::vector<PGlobalRecHit::SiPixelRecHit> FWD1pRecHits =
628 srcGlobalRecHits->getFWD1pRecHits();
630 for (
unsigned int i = 0;
i < FWD1pRecHits.size(); ++
i) {
635 std::vector<PGlobalRecHit::SiPixelRecHit> FWD1nRecHits =
636 srcGlobalRecHits->getFWD1nRecHits();
638 for (
unsigned int i = 0;
i < FWD1nRecHits.size(); ++
i) {
643 std::vector<PGlobalRecHit::SiPixelRecHit> FWD2pRecHits =
644 srcGlobalRecHits->getFWD2pRecHits();
646 for (
unsigned int i = 0;
i < FWD2pRecHits.size(); ++
i) {
651 std::vector<PGlobalRecHit::SiPixelRecHit> FWD2nRecHits =
652 srcGlobalRecHits->getFWD2nRecHits();
654 for (
unsigned int i = 0;
i < FWD2nRecHits.size(); ++
i) {
660 std::vector<PGlobalRecHit::DTRecHit> DTRecHits =
661 srcGlobalRecHits->getDTRecHits();
663 for (
unsigned int i = 0;
i < DTRecHits.size(); ++
i) {
668 std::vector<PGlobalRecHit::CSCRecHit> CSCRecHits =
669 srcGlobalRecHits->getCSCRecHits();
671 for (
unsigned int i = 0;
i < CSCRecHits.size(); ++
i) {
673 (CSCRecHits[
i].RHPHI - CSCRecHits[
i].SHPHI));
677 std::vector<PGlobalRecHit::RPCRecHit> RPCRecHits =
678 srcGlobalRecHits->getRPCRecHits();
680 for (
unsigned int i = 0;
i < RPCRecHits.size(); ++
i) {
686 <<
"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]
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
virtual ~GlobalRecHitsHistogrammer()
MonitorElement * mehEcaln[3]
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< PGlobalRecHit > GlobalRecHitSrc_Token_
MonitorElement * mehSiPixelResX[7]
MonitorElement * mehSiStripResX[19]
MonitorElement * mehDtMuonRes
MonitorElement * mehSiStripn[19]
MonitorElement * mehCSCResRDPhi
GlobalRecHitsHistogrammer(const edm::ParameterSet &)
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")
void setVerbose(unsigned level)
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
void showDirStructure(void) const
MonitorElement * mehRPCResX
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)
MonitorElement * mehHcaln[4]