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";
348 if (!srcGlobalRecHits.
isValid()) {
350 <<
"Unable to find PGlobalRecHit in event!";
354 int nEBCalRecHits = srcGlobalRecHits->getnEBCalRecHits();
355 int nEECalRecHits = srcGlobalRecHits->getnEECalRecHits();
356 int nESCalRecHits = srcGlobalRecHits->getnESCalRecHits();
358 int nHBCalRecHits = srcGlobalRecHits->getnHBCalRecHits();
359 int nHECalRecHits = srcGlobalRecHits->getnHECalRecHits();
360 int nHOCalRecHits = srcGlobalRecHits->getnHOCalRecHits();
361 int nHFCalRecHits = srcGlobalRecHits->getnHFCalRecHits();
363 int nTIBL1RecHits = srcGlobalRecHits->getnTIBL1RecHits();
364 int nTIBL2RecHits = srcGlobalRecHits->getnTIBL2RecHits();
365 int nTIBL3RecHits = srcGlobalRecHits->getnTIBL3RecHits();
366 int nTIBL4RecHits = srcGlobalRecHits->getnTIBL4RecHits();
367 int nTOBL1RecHits = srcGlobalRecHits->getnTOBL1RecHits();
368 int nTOBL2RecHits = srcGlobalRecHits->getnTOBL2RecHits();
369 int nTOBL3RecHits = srcGlobalRecHits->getnTOBL3RecHits();
370 int nTOBL4RecHits = srcGlobalRecHits->getnTOBL4RecHits();
371 int nTIDW1RecHits = srcGlobalRecHits->getnTIDW1RecHits();
372 int nTIDW2RecHits = srcGlobalRecHits->getnTIDW2RecHits();
373 int nTIDW3RecHits = srcGlobalRecHits->getnTIDW3RecHits();
374 int nTECW1RecHits = srcGlobalRecHits->getnTECW1RecHits();
375 int nTECW2RecHits = srcGlobalRecHits->getnTECW2RecHits();
376 int nTECW3RecHits = srcGlobalRecHits->getnTECW3RecHits();
377 int nTECW4RecHits = srcGlobalRecHits->getnTECW4RecHits();
378 int nTECW5RecHits = srcGlobalRecHits->getnTECW5RecHits();
379 int nTECW6RecHits = srcGlobalRecHits->getnTECW6RecHits();
380 int nTECW7RecHits = srcGlobalRecHits->getnTECW7RecHits();
381 int nTECW8RecHits = srcGlobalRecHits->getnTECW8RecHits();
383 int nBRL1RecHits = srcGlobalRecHits->getnBRL1RecHits();
384 int nBRL2RecHits = srcGlobalRecHits->getnBRL2RecHits();
385 int nBRL3RecHits = srcGlobalRecHits->getnBRL3RecHits();
386 int nFWD1nRecHits = srcGlobalRecHits->getnFWD1nRecHits();
387 int nFWD1pRecHits = srcGlobalRecHits->getnFWD1pRecHits();
388 int nFWD2nRecHits = srcGlobalRecHits->getnFWD2nRecHits();
389 int nFWD2pRecHits = srcGlobalRecHits->getnFWD2pRecHits();
391 int nDTRecHits = srcGlobalRecHits->getnDTRecHits();
393 int nCSCRecHits = srcGlobalRecHits->getnCSCRecHits();
395 int nRPCRecHits = srcGlobalRecHits->getnRPCRecHits();
398 std::vector<PGlobalRecHit::ECalRecHit> EECalRecHits =
399 srcGlobalRecHits->getEECalRecHits();
401 for (
unsigned int i = 0;
i < EECalRecHits.size(); ++
i) {
405 std::vector<PGlobalRecHit::ECalRecHit> EBCalRecHits =
406 srcGlobalRecHits->getEBCalRecHits();
408 for (
unsigned int i = 0;
i < EBCalRecHits.size(); ++
i) {
412 std::vector<PGlobalRecHit::ECalRecHit> ESCalRecHits =
413 srcGlobalRecHits->getESCalRecHits();
415 for (
unsigned int i = 0;
i < ESCalRecHits.size(); ++
i) {
420 std::vector<PGlobalRecHit::HCalRecHit> HBCalRecHits =
421 srcGlobalRecHits->getHBCalRecHits();
423 for (
unsigned int i = 0;
i < HBCalRecHits.size(); ++
i) {
427 std::vector<PGlobalRecHit::HCalRecHit> HECalRecHits =
428 srcGlobalRecHits->getHECalRecHits();
430 for (
unsigned int i = 0;
i < HECalRecHits.size(); ++
i) {
434 std::vector<PGlobalRecHit::HCalRecHit> HOCalRecHits =
435 srcGlobalRecHits->getHOCalRecHits();
437 for (
unsigned int i = 0;
i < HOCalRecHits.size(); ++
i) {
441 std::vector<PGlobalRecHit::HCalRecHit> HFCalRecHits =
442 srcGlobalRecHits->getHFCalRecHits();
444 for (
unsigned int i = 0;
i < HFCalRecHits.size(); ++
i) {
449 std::vector<PGlobalRecHit::SiStripRecHit> TIBL1RecHits =
450 srcGlobalRecHits->getTIBL1RecHits();
452 for (
unsigned int i = 0;
i < TIBL1RecHits.size(); ++
i) {
457 std::vector<PGlobalRecHit::SiStripRecHit> TIBL2RecHits =
458 srcGlobalRecHits->getTIBL2RecHits();
460 for (
unsigned int i = 0;
i < TIBL2RecHits.size(); ++
i) {
465 std::vector<PGlobalRecHit::SiStripRecHit> TIBL3RecHits =
466 srcGlobalRecHits->getTIBL3RecHits();
468 for (
unsigned int i = 0;
i < TIBL3RecHits.size(); ++
i) {
473 std::vector<PGlobalRecHit::SiStripRecHit> TIBL4RecHits =
474 srcGlobalRecHits->getTIBL4RecHits();
476 for (
unsigned int i = 0;
i < TIBL4RecHits.size(); ++
i) {
481 std::vector<PGlobalRecHit::SiStripRecHit> TOBL1RecHits =
482 srcGlobalRecHits->getTOBL1RecHits();
484 for (
unsigned int i = 0;
i < TOBL1RecHits.size(); ++
i) {
489 std::vector<PGlobalRecHit::SiStripRecHit> TOBL2RecHits =
490 srcGlobalRecHits->getTOBL2RecHits();
492 for (
unsigned int i = 0;
i < TOBL2RecHits.size(); ++
i) {
497 std::vector<PGlobalRecHit::SiStripRecHit> TOBL3RecHits =
498 srcGlobalRecHits->getTOBL3RecHits();
500 for (
unsigned int i = 0;
i < TOBL3RecHits.size(); ++
i) {
505 std::vector<PGlobalRecHit::SiStripRecHit> TOBL4RecHits =
506 srcGlobalRecHits->getTOBL4RecHits();
508 for (
unsigned int i = 0;
i < TOBL4RecHits.size(); ++
i) {
513 std::vector<PGlobalRecHit::SiStripRecHit> TIDW1RecHits =
514 srcGlobalRecHits->getTIDW1RecHits();
516 for (
unsigned int i = 0;
i < TIDW1RecHits.size(); ++
i) {
521 std::vector<PGlobalRecHit::SiStripRecHit> TIDW2RecHits =
522 srcGlobalRecHits->getTIDW2RecHits();
524 for (
unsigned int i = 0;
i < TIDW2RecHits.size(); ++
i) {
529 std::vector<PGlobalRecHit::SiStripRecHit> TIDW3RecHits =
530 srcGlobalRecHits->getTIDW3RecHits();
532 for (
unsigned int i = 0;
i < TIDW3RecHits.size(); ++
i) {
537 std::vector<PGlobalRecHit::SiStripRecHit> TECW1RecHits =
538 srcGlobalRecHits->getTECW1RecHits();
540 for (
unsigned int i = 0;
i < TECW1RecHits.size(); ++
i) {
545 std::vector<PGlobalRecHit::SiStripRecHit> TECW2RecHits =
546 srcGlobalRecHits->getTECW2RecHits();
548 for (
unsigned int i = 0;
i < TECW2RecHits.size(); ++
i) {
553 std::vector<PGlobalRecHit::SiStripRecHit> TECW3RecHits =
554 srcGlobalRecHits->getTECW3RecHits();
556 for (
unsigned int i = 0;
i < TECW3RecHits.size(); ++
i) {
561 std::vector<PGlobalRecHit::SiStripRecHit> TECW4RecHits =
562 srcGlobalRecHits->getTECW4RecHits();
564 for (
unsigned int i = 0;
i < TECW4RecHits.size(); ++
i) {
569 std::vector<PGlobalRecHit::SiStripRecHit> TECW5RecHits =
570 srcGlobalRecHits->getTECW5RecHits();
572 for (
unsigned int i = 0;
i < TECW5RecHits.size(); ++
i) {
577 std::vector<PGlobalRecHit::SiStripRecHit> TECW6RecHits =
578 srcGlobalRecHits->getTECW6RecHits();
580 for (
unsigned int i = 0;
i < TECW6RecHits.size(); ++
i) {
585 std::vector<PGlobalRecHit::SiStripRecHit> TECW7RecHits =
586 srcGlobalRecHits->getTECW7RecHits();
588 for (
unsigned int i = 0;
i < TECW7RecHits.size(); ++
i) {
593 std::vector<PGlobalRecHit::SiStripRecHit> TECW8RecHits =
594 srcGlobalRecHits->getTECW8RecHits();
596 for (
unsigned int i = 0;
i < TECW8RecHits.size(); ++
i) {
602 std::vector<PGlobalRecHit::SiPixelRecHit> BRL1RecHits =
603 srcGlobalRecHits->getBRL1RecHits();
605 for (
unsigned int i = 0;
i < BRL1RecHits.size(); ++
i) {
610 std::vector<PGlobalRecHit::SiPixelRecHit> BRL2RecHits =
611 srcGlobalRecHits->getBRL2RecHits();
613 for (
unsigned int i = 0;
i < BRL2RecHits.size(); ++
i) {
618 std::vector<PGlobalRecHit::SiPixelRecHit> BRL3RecHits =
619 srcGlobalRecHits->getBRL3RecHits();
621 for (
unsigned int i = 0;
i < BRL3RecHits.size(); ++
i) {
626 std::vector<PGlobalRecHit::SiPixelRecHit> FWD1pRecHits =
627 srcGlobalRecHits->getFWD1pRecHits();
629 for (
unsigned int i = 0;
i < FWD1pRecHits.size(); ++
i) {
634 std::vector<PGlobalRecHit::SiPixelRecHit> FWD1nRecHits =
635 srcGlobalRecHits->getFWD1nRecHits();
637 for (
unsigned int i = 0;
i < FWD1nRecHits.size(); ++
i) {
642 std::vector<PGlobalRecHit::SiPixelRecHit> FWD2pRecHits =
643 srcGlobalRecHits->getFWD2pRecHits();
645 for (
unsigned int i = 0;
i < FWD2pRecHits.size(); ++
i) {
650 std::vector<PGlobalRecHit::SiPixelRecHit> FWD2nRecHits =
651 srcGlobalRecHits->getFWD2nRecHits();
653 for (
unsigned int i = 0;
i < FWD2nRecHits.size(); ++
i) {
659 std::vector<PGlobalRecHit::DTRecHit> DTRecHits =
660 srcGlobalRecHits->getDTRecHits();
662 for (
unsigned int i = 0;
i < DTRecHits.size(); ++
i) {
667 std::vector<PGlobalRecHit::CSCRecHit> CSCRecHits =
668 srcGlobalRecHits->getCSCRecHits();
670 for (
unsigned int i = 0;
i < CSCRecHits.size(); ++
i) {
672 (CSCRecHits[
i].RHPHI - CSCRecHits[
i].SHPHI));
676 std::vector<PGlobalRecHit::RPCRecHit> RPCRecHits =
677 srcGlobalRecHits->getRPCRecHits();
679 for (
unsigned int i = 0;
i < RPCRecHits.size(); ++
i) {
685 <<
"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 setVerbose(unsigned level)
MonitorElement * mehEcalRes[3]
MonitorElement * mehSiPixelResY[7]
MonitorElement * mehDtMuonn
virtual void analyze(const edm::Event &, const edm::EventSetup &)
MonitorElement * mehSiStripResY[19]
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, const uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE", const bool resetMEsAfterWriting=false)
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]