14 std::string MsgLoggerCat =
"GlobalRecHitsAnalyzer_GlobalRecHitsAnalyzer";
54 edm::LogInfo(MsgLoggerCat) <<
"\n===============================\n"
55 <<
"Initialized as EDProducer with parameter values:\n"
56 <<
" Name = " <<
fName <<
"\n"
57 <<
" Verbosity = " << verbosity <<
"\n"
58 <<
" Frequency = " << frequency <<
"\n"
59 <<
" OutputFile = " << outputfile <<
"\n"
60 <<
" DoOutput = " << doOutput <<
"\n"
61 <<
" GetProv = " << getAllProvenances <<
"\n"
62 <<
" PrintProv = " << printProvenanceInfo <<
"\n"
63 <<
" Global Src = " << GlobalRecHitSrc_ <<
"\n"
64 <<
"===============================\n";
74 string SiStripString[19] = {
"TECW1",
94 for (
int i = 0;
i < 19; ++
i) {
100 string hcharname, hchartitle;
102 for (
int amend = 0; amend < 19; ++amend) {
103 hcharname =
"hSiStripn_" + SiStripString[amend];
104 hchartitle = SiStripString[amend] +
" rechits";
109 hcharname =
"hSiStripResX_" + SiStripString[amend];
110 hchartitle = SiStripString[amend] +
" rechit x resolution";
115 hcharname =
"hSiStripResY_" + SiStripString[amend];
116 hchartitle = SiStripString[amend] +
" rechit y resolution";
124 string HCalString[4] = {
"HB",
"HE",
"HF",
"HO"};
125 float HCalnUpper[4] = {3000., 3000., 3000., 2000.};
126 float HCalnLower[4] = {2000., 2000., 2000., 1000.};
127 for (
int j = 0;
j < 4; ++
j) {
133 for (
int amend = 0; amend < 4; ++amend) {
134 hcharname =
"hHcaln_" + HCalString[amend];
135 hchartitle = HCalString[amend] +
" rechits";
136 mehHcaln[amend] = ibooker.
book1D(hcharname, hchartitle, 500, HCalnLower[amend], HCalnUpper[amend]);
141 hcharname =
"hHcalRes_" + HCalString[amend];
142 hchartitle = HCalString[amend] +
" rechit resolution";
149 string ECalString[3] = {
"EB",
"EE",
"ES"};
150 int ECalnBins[3] = {700, 100, 50};
151 float ECalnUpper[3] = {20000., 62000., 300.};
152 float ECalnLower[3] = {6000., 60000., 100.};
153 int ECalResBins[3] = {200, 200, 200};
154 float ECalResUpper[3] = {1., 0.3, .0002};
155 float ECalResLower[3] = {-1., -0.3, -.0002};
156 for (
int i = 0;
i < 3; ++
i) {
162 for (
int amend = 0; amend < 3; ++amend) {
163 hcharname =
"hEcaln_" + ECalString[amend];
164 hchartitle = ECalString[amend] +
" rechits";
165 mehEcaln[amend] = ibooker.
book1D(hcharname, hchartitle, ECalnBins[amend], ECalnLower[amend], ECalnUpper[amend]);
170 hcharname =
"hEcalRes_" + ECalString[amend];
171 hchartitle = ECalString[amend] +
" rechit resolution";
173 ibooker.
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) {
188 for (
int amend = 0; amend < 7; ++amend) {
189 hcharname =
"hSiPixeln_" + SiPixelString[amend];
190 hchartitle = SiPixelString[amend] +
" rechits";
195 hcharname =
"hSiPixelResX_" + SiPixelString[amend];
196 hchartitle = SiPixelString[amend] +
" rechit x resolution";
201 hcharname =
"hSiPixelResY_" + SiPixelString[amend];
202 hchartitle = SiPixelString[amend] +
" rechit y resolution";
215 string n_List[3] = {
"hDtMuonn",
"hCSCn",
"hRPCn"};
217 string hist_string[3] = {
"Dt",
"CSC",
"RPC"};
219 for (
int amend = 0; amend < 3; ++amend) {
220 hchartitle = hist_string[amend] +
" rechits";
227 mehCSCn = ibooker.
book1D(n_List[amend], hchartitle, 25, 0., 50.);
232 mehRPCn = ibooker.
book1D(n_List[amend], hchartitle, 25, 0., 50.);
242 hcharname =
"hDtMuonRes";
243 hchartitle =
"DT wire distance resolution";
246 hcharname =
"CSCResRDPhi";
247 hchartitle =
"CSC perp*dphi resolution";
250 hcharname =
"hRPCResX";
251 hchartitle =
"RPC rechits x resolution";
256 std::string MsgLoggerCat =
"GlobalRecHitsHistogrammer_analyze";
266 edm::LogInfo(MsgLoggerCat) <<
"Processing run " << nrun <<
", event " << nevt <<
" (" <<
count <<
" events total)";
268 if (nevt %
frequency == 0 || nevt == 1) {
269 edm::LogInfo(MsgLoggerCat) <<
"Processing run " << nrun <<
", event " << nevt <<
" (" <<
count
279 std::vector<const edm::StableProvenance*> AllProv;
283 edm::LogInfo(MsgLoggerCat) <<
"Number of Provenances = " << AllProv.size();
286 TString eventout(
"\nProvenance info:\n");
288 for (
unsigned int i = 0;
i < AllProv.size(); ++
i) {
289 eventout +=
"\n ******************************";
290 eventout +=
"\n Module : ";
292 eventout += AllProv[
i]->moduleLabel();
293 eventout +=
"\n ProductID : ";
295 eventout += AllProv[
i]->productID().id();
296 eventout +=
"\n ClassName : ";
298 eventout += AllProv[
i]->className();
299 eventout +=
"\n InstanceName : ";
301 eventout += AllProv[
i]->productInstanceName();
302 eventout +=
"\n BranchName : ";
304 eventout += AllProv[
i]->branchName();
306 eventout +=
"\n ******************************\n";
315 if (!srcGlobalRecHits.
isValid()) {
316 edm::LogWarning(MsgLoggerCat) <<
"Unable to find PGlobalRecHit in event!";
320 int nEBCalRecHits = srcGlobalRecHits->getnEBCalRecHits();
321 int nEECalRecHits = srcGlobalRecHits->getnEECalRecHits();
322 int nESCalRecHits = srcGlobalRecHits->getnESCalRecHits();
324 int nHBCalRecHits = srcGlobalRecHits->getnHBCalRecHits();
325 int nHECalRecHits = srcGlobalRecHits->getnHECalRecHits();
326 int nHOCalRecHits = srcGlobalRecHits->getnHOCalRecHits();
327 int nHFCalRecHits = srcGlobalRecHits->getnHFCalRecHits();
329 int nTIBL1RecHits = srcGlobalRecHits->getnTIBL1RecHits();
330 int nTIBL2RecHits = srcGlobalRecHits->getnTIBL2RecHits();
331 int nTIBL3RecHits = srcGlobalRecHits->getnTIBL3RecHits();
332 int nTIBL4RecHits = srcGlobalRecHits->getnTIBL4RecHits();
333 int nTOBL1RecHits = srcGlobalRecHits->getnTOBL1RecHits();
334 int nTOBL2RecHits = srcGlobalRecHits->getnTOBL2RecHits();
335 int nTOBL3RecHits = srcGlobalRecHits->getnTOBL3RecHits();
336 int nTOBL4RecHits = srcGlobalRecHits->getnTOBL4RecHits();
337 int nTIDW1RecHits = srcGlobalRecHits->getnTIDW1RecHits();
338 int nTIDW2RecHits = srcGlobalRecHits->getnTIDW2RecHits();
339 int nTIDW3RecHits = srcGlobalRecHits->getnTIDW3RecHits();
340 int nTECW1RecHits = srcGlobalRecHits->getnTECW1RecHits();
341 int nTECW2RecHits = srcGlobalRecHits->getnTECW2RecHits();
342 int nTECW3RecHits = srcGlobalRecHits->getnTECW3RecHits();
343 int nTECW4RecHits = srcGlobalRecHits->getnTECW4RecHits();
344 int nTECW5RecHits = srcGlobalRecHits->getnTECW5RecHits();
345 int nTECW6RecHits = srcGlobalRecHits->getnTECW6RecHits();
346 int nTECW7RecHits = srcGlobalRecHits->getnTECW7RecHits();
347 int nTECW8RecHits = srcGlobalRecHits->getnTECW8RecHits();
349 int nBRL1RecHits = srcGlobalRecHits->getnBRL1RecHits();
350 int nBRL2RecHits = srcGlobalRecHits->getnBRL2RecHits();
351 int nBRL3RecHits = srcGlobalRecHits->getnBRL3RecHits();
352 int nFWD1nRecHits = srcGlobalRecHits->getnFWD1nRecHits();
353 int nFWD1pRecHits = srcGlobalRecHits->getnFWD1pRecHits();
354 int nFWD2nRecHits = srcGlobalRecHits->getnFWD2nRecHits();
355 int nFWD2pRecHits = srcGlobalRecHits->getnFWD2pRecHits();
357 int nDTRecHits = srcGlobalRecHits->getnDTRecHits();
359 int nCSCRecHits = srcGlobalRecHits->getnCSCRecHits();
361 int nRPCRecHits = srcGlobalRecHits->getnRPCRecHits();
364 std::vector<PGlobalRecHit::ECalRecHit> EECalRecHits = srcGlobalRecHits->getEECalRecHits();
366 for (
unsigned int i = 0;
i < EECalRecHits.size(); ++
i) {
370 std::vector<PGlobalRecHit::ECalRecHit> EBCalRecHits = srcGlobalRecHits->getEBCalRecHits();
372 for (
unsigned int i = 0;
i < EBCalRecHits.size(); ++
i) {
376 std::vector<PGlobalRecHit::ECalRecHit> ESCalRecHits = srcGlobalRecHits->getESCalRecHits();
378 for (
unsigned int i = 0;
i < ESCalRecHits.size(); ++
i) {
383 std::vector<PGlobalRecHit::HCalRecHit> HBCalRecHits = srcGlobalRecHits->getHBCalRecHits();
385 for (
unsigned int i = 0;
i < HBCalRecHits.size(); ++
i) {
389 std::vector<PGlobalRecHit::HCalRecHit> HECalRecHits = srcGlobalRecHits->getHECalRecHits();
391 for (
unsigned int i = 0;
i < HECalRecHits.size(); ++
i) {
395 std::vector<PGlobalRecHit::HCalRecHit> HOCalRecHits = srcGlobalRecHits->getHOCalRecHits();
397 for (
unsigned int i = 0;
i < HOCalRecHits.size(); ++
i) {
401 std::vector<PGlobalRecHit::HCalRecHit> HFCalRecHits = srcGlobalRecHits->getHFCalRecHits();
403 for (
unsigned int i = 0;
i < HFCalRecHits.size(); ++
i) {
408 std::vector<PGlobalRecHit::SiStripRecHit> TIBL1RecHits = srcGlobalRecHits->getTIBL1RecHits();
410 for (
unsigned int i = 0;
i < TIBL1RecHits.size(); ++
i) {
415 std::vector<PGlobalRecHit::SiStripRecHit> TIBL2RecHits = srcGlobalRecHits->getTIBL2RecHits();
417 for (
unsigned int i = 0;
i < TIBL2RecHits.size(); ++
i) {
422 std::vector<PGlobalRecHit::SiStripRecHit> TIBL3RecHits = srcGlobalRecHits->getTIBL3RecHits();
424 for (
unsigned int i = 0;
i < TIBL3RecHits.size(); ++
i) {
429 std::vector<PGlobalRecHit::SiStripRecHit> TIBL4RecHits = srcGlobalRecHits->getTIBL4RecHits();
431 for (
unsigned int i = 0;
i < TIBL4RecHits.size(); ++
i) {
436 std::vector<PGlobalRecHit::SiStripRecHit> TOBL1RecHits = srcGlobalRecHits->getTOBL1RecHits();
438 for (
unsigned int i = 0;
i < TOBL1RecHits.size(); ++
i) {
443 std::vector<PGlobalRecHit::SiStripRecHit> TOBL2RecHits = srcGlobalRecHits->getTOBL2RecHits();
445 for (
unsigned int i = 0;
i < TOBL2RecHits.size(); ++
i) {
450 std::vector<PGlobalRecHit::SiStripRecHit> TOBL3RecHits = srcGlobalRecHits->getTOBL3RecHits();
452 for (
unsigned int i = 0;
i < TOBL3RecHits.size(); ++
i) {
457 std::vector<PGlobalRecHit::SiStripRecHit> TOBL4RecHits = srcGlobalRecHits->getTOBL4RecHits();
459 for (
unsigned int i = 0;
i < TOBL4RecHits.size(); ++
i) {
464 std::vector<PGlobalRecHit::SiStripRecHit> TIDW1RecHits = srcGlobalRecHits->getTIDW1RecHits();
466 for (
unsigned int i = 0;
i < TIDW1RecHits.size(); ++
i) {
471 std::vector<PGlobalRecHit::SiStripRecHit> TIDW2RecHits = srcGlobalRecHits->getTIDW2RecHits();
473 for (
unsigned int i = 0;
i < TIDW2RecHits.size(); ++
i) {
478 std::vector<PGlobalRecHit::SiStripRecHit> TIDW3RecHits = srcGlobalRecHits->getTIDW3RecHits();
480 for (
unsigned int i = 0;
i < TIDW3RecHits.size(); ++
i) {
485 std::vector<PGlobalRecHit::SiStripRecHit> TECW1RecHits = srcGlobalRecHits->getTECW1RecHits();
487 for (
unsigned int i = 0;
i < TECW1RecHits.size(); ++
i) {
492 std::vector<PGlobalRecHit::SiStripRecHit> TECW2RecHits = srcGlobalRecHits->getTECW2RecHits();
494 for (
unsigned int i = 0;
i < TECW2RecHits.size(); ++
i) {
499 std::vector<PGlobalRecHit::SiStripRecHit> TECW3RecHits = srcGlobalRecHits->getTECW3RecHits();
501 for (
unsigned int i = 0;
i < TECW3RecHits.size(); ++
i) {
506 std::vector<PGlobalRecHit::SiStripRecHit> TECW4RecHits = srcGlobalRecHits->getTECW4RecHits();
508 for (
unsigned int i = 0;
i < TECW4RecHits.size(); ++
i) {
513 std::vector<PGlobalRecHit::SiStripRecHit> TECW5RecHits = srcGlobalRecHits->getTECW5RecHits();
515 for (
unsigned int i = 0;
i < TECW5RecHits.size(); ++
i) {
520 std::vector<PGlobalRecHit::SiStripRecHit> TECW6RecHits = srcGlobalRecHits->getTECW6RecHits();
522 for (
unsigned int i = 0;
i < TECW6RecHits.size(); ++
i) {
527 std::vector<PGlobalRecHit::SiStripRecHit> TECW7RecHits = srcGlobalRecHits->getTECW7RecHits();
529 for (
unsigned int i = 0;
i < TECW7RecHits.size(); ++
i) {
534 std::vector<PGlobalRecHit::SiStripRecHit> TECW8RecHits = srcGlobalRecHits->getTECW8RecHits();
536 for (
unsigned int i = 0;
i < TECW8RecHits.size(); ++
i) {
542 std::vector<PGlobalRecHit::SiPixelRecHit> BRL1RecHits = srcGlobalRecHits->getBRL1RecHits();
544 for (
unsigned int i = 0;
i < BRL1RecHits.size(); ++
i) {
549 std::vector<PGlobalRecHit::SiPixelRecHit> BRL2RecHits = srcGlobalRecHits->getBRL2RecHits();
551 for (
unsigned int i = 0;
i < BRL2RecHits.size(); ++
i) {
556 std::vector<PGlobalRecHit::SiPixelRecHit> BRL3RecHits = srcGlobalRecHits->getBRL3RecHits();
558 for (
unsigned int i = 0;
i < BRL3RecHits.size(); ++
i) {
563 std::vector<PGlobalRecHit::SiPixelRecHit> FWD1pRecHits = srcGlobalRecHits->getFWD1pRecHits();
565 for (
unsigned int i = 0;
i < FWD1pRecHits.size(); ++
i) {
570 std::vector<PGlobalRecHit::SiPixelRecHit> FWD1nRecHits = srcGlobalRecHits->getFWD1nRecHits();
572 for (
unsigned int i = 0;
i < FWD1nRecHits.size(); ++
i) {
577 std::vector<PGlobalRecHit::SiPixelRecHit> FWD2pRecHits = srcGlobalRecHits->getFWD2pRecHits();
579 for (
unsigned int i = 0;
i < FWD2pRecHits.size(); ++
i) {
584 std::vector<PGlobalRecHit::SiPixelRecHit> FWD2nRecHits = srcGlobalRecHits->getFWD2nRecHits();
586 for (
unsigned int i = 0;
i < FWD2nRecHits.size(); ++
i) {
592 std::vector<PGlobalRecHit::DTRecHit> DTRecHits = srcGlobalRecHits->getDTRecHits();
594 for (
unsigned int i = 0;
i < DTRecHits.size(); ++
i) {
599 std::vector<PGlobalRecHit::CSCRecHit> CSCRecHits = srcGlobalRecHits->getCSCRecHits();
601 for (
unsigned int i = 0;
i < CSCRecHits.size(); ++
i) {
606 std::vector<PGlobalRecHit::RPCRecHit> RPCRecHits = srcGlobalRecHits->getRPCRecHits();
608 for (
unsigned int i = 0;
i < RPCRecHits.size(); ++
i) {
613 edm::LogInfo(MsgLoggerCat) <<
"Done gathering data from event.";
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * mehSiPixeln[7]
virtual void setCurrentFolder(std::string const &fullpath)
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 * mehCSCResRDPhi
GlobalRecHitsHistogrammer(const edm::ParameterSet &)
Log< level::Info, false > LogInfo
MonitorElement * mehEcalRes[3]
MonitorElement * mehSiPixelResY[7]
MonitorElement * mehDtMuonn
T getParameter(std::string const &) const
MonitorElement * mehSiStripResY[19]
MonitorElement * mehHcalRes[4]
edm::InputTag GlobalRecHitSrc_
~GlobalRecHitsHistogrammer() override
Log< level::Warning, false > LogWarning
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
MonitorElement * mehRPCResX
MonitorElement * mehHcaln[4]
void analyze(const edm::Event &, const edm::EventSetup &) 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)