14 std::string MsgLoggerCat =
"GlobalRecHitsAnalyzer_GlobalRecHitsAnalyzer";
54 edm::LogInfo(MsgLoggerCat) <<
"\n===============================\n"
55 <<
"Initialized as EDProducer with parameter values:\n"
56 <<
" Name = " <<
fName <<
"\n"
60 <<
" DoOutput = " <<
doOutput <<
"\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)";
279 std::vector<const edm::StableProvenance*> AllProv;
280 iEvent.getAllStableProvenance(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!";
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.";