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::StableProvenance*> 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!";
376 std::vector<PGlobalRecHit::ECalRecHit> EECalRecHits =
379 for (
unsigned int i = 0;
i < EECalRecHits.size(); ++
i) {
383 std::vector<PGlobalRecHit::ECalRecHit> EBCalRecHits =
386 for (
unsigned int i = 0;
i < EBCalRecHits.size(); ++
i) {
390 std::vector<PGlobalRecHit::ECalRecHit> ESCalRecHits =
393 for (
unsigned int i = 0;
i < ESCalRecHits.size(); ++
i) {
398 std::vector<PGlobalRecHit::HCalRecHit> HBCalRecHits =
401 for (
unsigned int i = 0;
i < HBCalRecHits.size(); ++
i) {
405 std::vector<PGlobalRecHit::HCalRecHit> HECalRecHits =
408 for (
unsigned int i = 0;
i < HECalRecHits.size(); ++
i) {
412 std::vector<PGlobalRecHit::HCalRecHit> HOCalRecHits =
415 for (
unsigned int i = 0;
i < HOCalRecHits.size(); ++
i) {
419 std::vector<PGlobalRecHit::HCalRecHit> HFCalRecHits =
422 for (
unsigned int i = 0;
i < HFCalRecHits.size(); ++
i) {
427 std::vector<PGlobalRecHit::SiStripRecHit> TIBL1RecHits =
430 for (
unsigned int i = 0;
i < TIBL1RecHits.size(); ++
i) {
435 std::vector<PGlobalRecHit::SiStripRecHit> TIBL2RecHits =
438 for (
unsigned int i = 0;
i < TIBL2RecHits.size(); ++
i) {
443 std::vector<PGlobalRecHit::SiStripRecHit> TIBL3RecHits =
446 for (
unsigned int i = 0;
i < TIBL3RecHits.size(); ++
i) {
451 std::vector<PGlobalRecHit::SiStripRecHit> TIBL4RecHits =
454 for (
unsigned int i = 0;
i < TIBL4RecHits.size(); ++
i) {
459 std::vector<PGlobalRecHit::SiStripRecHit> TOBL1RecHits =
462 for (
unsigned int i = 0;
i < TOBL1RecHits.size(); ++
i) {
467 std::vector<PGlobalRecHit::SiStripRecHit> TOBL2RecHits =
470 for (
unsigned int i = 0;
i < TOBL2RecHits.size(); ++
i) {
475 std::vector<PGlobalRecHit::SiStripRecHit> TOBL3RecHits =
478 for (
unsigned int i = 0;
i < TOBL3RecHits.size(); ++
i) {
483 std::vector<PGlobalRecHit::SiStripRecHit> TOBL4RecHits =
486 for (
unsigned int i = 0;
i < TOBL4RecHits.size(); ++
i) {
491 std::vector<PGlobalRecHit::SiStripRecHit> TIDW1RecHits =
494 for (
unsigned int i = 0;
i < TIDW1RecHits.size(); ++
i) {
499 std::vector<PGlobalRecHit::SiStripRecHit> TIDW2RecHits =
502 for (
unsigned int i = 0;
i < TIDW2RecHits.size(); ++
i) {
507 std::vector<PGlobalRecHit::SiStripRecHit> TIDW3RecHits =
510 for (
unsigned int i = 0;
i < TIDW3RecHits.size(); ++
i) {
515 std::vector<PGlobalRecHit::SiStripRecHit> TECW1RecHits =
518 for (
unsigned int i = 0;
i < TECW1RecHits.size(); ++
i) {
523 std::vector<PGlobalRecHit::SiStripRecHit> TECW2RecHits =
526 for (
unsigned int i = 0;
i < TECW2RecHits.size(); ++
i) {
531 std::vector<PGlobalRecHit::SiStripRecHit> TECW3RecHits =
534 for (
unsigned int i = 0;
i < TECW3RecHits.size(); ++
i) {
539 std::vector<PGlobalRecHit::SiStripRecHit> TECW4RecHits =
542 for (
unsigned int i = 0;
i < TECW4RecHits.size(); ++
i) {
547 std::vector<PGlobalRecHit::SiStripRecHit> TECW5RecHits =
550 for (
unsigned int i = 0;
i < TECW5RecHits.size(); ++
i) {
555 std::vector<PGlobalRecHit::SiStripRecHit> TECW6RecHits =
558 for (
unsigned int i = 0;
i < TECW6RecHits.size(); ++
i) {
563 std::vector<PGlobalRecHit::SiStripRecHit> TECW7RecHits =
566 for (
unsigned int i = 0;
i < TECW7RecHits.size(); ++
i) {
571 std::vector<PGlobalRecHit::SiStripRecHit> TECW8RecHits =
574 for (
unsigned int i = 0;
i < TECW8RecHits.size(); ++
i) {
580 std::vector<PGlobalRecHit::SiPixelRecHit> BRL1RecHits =
583 for (
unsigned int i = 0;
i < BRL1RecHits.size(); ++
i) {
588 std::vector<PGlobalRecHit::SiPixelRecHit> BRL2RecHits =
591 for (
unsigned int i = 0;
i < BRL2RecHits.size(); ++
i) {
596 std::vector<PGlobalRecHit::SiPixelRecHit> BRL3RecHits =
599 for (
unsigned int i = 0;
i < BRL3RecHits.size(); ++
i) {
604 std::vector<PGlobalRecHit::SiPixelRecHit> FWD1pRecHits =
607 for (
unsigned int i = 0;
i < FWD1pRecHits.size(); ++
i) {
612 std::vector<PGlobalRecHit::SiPixelRecHit> FWD1nRecHits =
615 for (
unsigned int i = 0;
i < FWD1nRecHits.size(); ++
i) {
620 std::vector<PGlobalRecHit::SiPixelRecHit> FWD2pRecHits =
623 for (
unsigned int i = 0;
i < FWD2pRecHits.size(); ++
i) {
628 std::vector<PGlobalRecHit::SiPixelRecHit> FWD2nRecHits =
631 for (
unsigned int i = 0;
i < FWD2nRecHits.size(); ++
i) {
637 std::vector<PGlobalRecHit::DTRecHit> DTRecHits =
640 for (
unsigned int i = 0;
i < DTRecHits.size(); ++
i) {
645 std::vector<PGlobalRecHit::CSCRecHit> CSCRecHits =
648 for (
unsigned int i = 0;
i < CSCRecHits.size(); ++
i) {
650 (CSCRecHits[
i].RHPHI - CSCRecHits[
i].SHPHI));
654 std::vector<PGlobalRecHit::RPCRecHit> RPCRecHits =
657 for (
unsigned int i = 0;
i < RPCRecHits.size(); ++
i) {
663 <<
"Done gathering data from event.";
SiPixelRecHitVector getBRL1RecHits() const
SiStripRecHitVector getTIDW2RecHits() const
int getnBRL3RecHits() const
T getParameter(std::string const &) const
EventNumber_t event() const
SiStripRecHitVector getTECW5RecHits() const
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * mehSiPixeln[7]
int getnDTRecHits() const
SiStripRecHitVector getTECW8RecHits() const
virtual ~GlobalRecHitsHistogrammer()
MonitorElement * mehEcaln[3]
HCalRecHitVector getHFCalRecHits() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
SiStripRecHitVector getTECW3RecHits() const
SiPixelRecHitVector getBRL3RecHits() const
SiPixelRecHitVector getBRL2RecHits() const
SiStripRecHitVector getTIBL2RecHits() const
CSCRecHitVector getCSCRecHits() const
int getnTECW7RecHits() const
unsigned long long EventNumber_t
int getnHFCalRecHits() const
SiStripRecHitVector getTOBL4RecHits() const
int getnFWD1nRecHits() const
int getnFWD2pRecHits() const
int getnBRL2RecHits() const
edm::EDGetTokenT< PGlobalRecHit > GlobalRecHitSrc_Token_
int getnCSCRecHits() const
SiStripRecHitVector getTOBL3RecHits() const
SiStripRecHitVector getTIBL4RecHits() const
int getnESCalRecHits() const
MonitorElement * mehSiPixelResX[7]
int getnTIBL3RecHits() const
int getnTOBL1RecHits() const
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
SiStripRecHitVector getTIDW1RecHits() const
SiPixelRecHitVector getFWD2nRecHits() const
int getnTECW5RecHits() const
DTRecHitVector getDTRecHits() const
MonitorElement * mehSiStripResX[19]
HCalRecHitVector getHOCalRecHits() const
int getnBRL1RecHits() const
SiStripRecHitVector getTECW7RecHits() const
MonitorElement * mehDtMuonRes
ECalRecHitVector getEBCalRecHits() const
int getnTECW1RecHits() const
MonitorElement * mehSiStripn[19]
MonitorElement * book1D(Args &&...args)
RPCRecHitVector getRPCRecHits() const
MonitorElement * mehCSCResRDPhi
GlobalRecHitsHistogrammer(const edm::ParameterSet &)
int getnTOBL3RecHits() const
int getnTECW8RecHits() const
SiPixelRecHitVector getFWD1pRecHits() const
SiStripRecHitVector getTECW6RecHits() const
int getnTECW6RecHits() const
int getnRPCRecHits() const
SiStripRecHitVector getTECW2RecHits() const
SiStripRecHitVector getTECW4RecHits() const
int getnTIDW1RecHits() const
int getnTOBL2RecHits() const
int getnTIDW3RecHits() const
HCalRecHitVector getHECalRecHits() const
void setCurrentFolder(const std::string &fullpath)
int getnTECW2RecHits() const
MonitorElement * mehEcalRes[3]
SiStripRecHitVector getTOBL2RecHits() const
MonitorElement * mehSiPixelResY[7]
int getnHOCalRecHits() const
MonitorElement * mehDtMuonn
int getnTIBL1RecHits() const
int getnHBCalRecHits() const
int getnFWD1pRecHits() const
ECalRecHitVector getEECalRecHits() const
MonitorElement * mehSiStripResY[19]
SiStripRecHitVector getTIDW3RecHits() const
HCalRecHitVector getHBCalRecHits() const
int getnTIDW2RecHits() const
int getnTECW4RecHits() const
int getnEBCalRecHits() const
SiPixelRecHitVector getFWD2pRecHits() const
int getnHECalRecHits() const
SiStripRecHitVector getTOBL1RecHits() const
int getnEECalRecHits() const
MonitorElement * mehHcalRes[4]
SiStripRecHitVector getTIBL1RecHits() const
edm::InputTag GlobalRecHitSrc_
int getnTIBL4RecHits() const
int getnTECW3RecHits() const
SiPixelRecHitVector getFWD1nRecHits() const
MonitorElement * mehRPCResX
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
int getnFWD2nRecHits() const
int getnTIBL2RecHits() const
MonitorElement * mehHcaln[4]
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
SiStripRecHitVector getTECW1RecHits() const
SiStripRecHitVector getTIBL3RecHits() const
ECalRecHitVector getESCalRecHits() const
void getAllStableProvenance(std::vector< StableProvenance const * > &provenances) const
int getnTOBL4RecHits() const