18 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_GlobalHitsAnalyzer";
28 m_Prov.getUntrackedParameter<
bool>(
"GetAllProvenances");
30 m_Prov.getUntrackedParameter<
bool>(
"PrintProvenanceInfo");
90 <<
"\n===============================\n"
91 <<
"Initialized as EDAnalyzer with parameter values:\n"
92 <<
" Name = " <<
fName <<
"\n"
93 <<
" Verbosity = " << verbosity <<
"\n"
94 <<
" Frequency = " << frequency <<
"\n"
95 <<
" VtxUnit = " << vtxunit <<
"\n"
96 <<
" GetProv = " << getAllProvenances <<
"\n"
97 <<
" PrintProv = " << printProvenanceInfo <<
"\n"
98 <<
" PxlBrlLowSrc = " << PxlBrlLowSrc_.label()
99 <<
":" << PxlBrlLowSrc_.instance() <<
"\n"
100 <<
" PxlBrlHighSrc = " << PxlBrlHighSrc_.
label()
101 <<
":" << PxlBrlHighSrc_.
instance() <<
"\n"
102 <<
" PxlFwdLowSrc = " << PxlFwdLowSrc_.
label()
103 <<
":" << PxlBrlLowSrc_.instance() <<
"\n"
104 <<
" PxlFwdHighSrc = " << PxlFwdHighSrc_.
label()
105 <<
":" << PxlBrlHighSrc_.
instance() <<
"\n"
106 <<
" SiTIBLowSrc = " << SiTIBLowSrc_.
label()
107 <<
":" << SiTIBLowSrc_.
instance() <<
"\n"
108 <<
" SiTIBHighSrc = " << SiTIBHighSrc_.
label()
109 <<
":" << SiTIBHighSrc_.
instance() <<
"\n"
110 <<
" SiTOBLowSrc = " << SiTOBLowSrc_.
label()
111 <<
":" << SiTOBLowSrc_.
instance() <<
"\n"
112 <<
" SiTOBHighSrc = " << SiTOBHighSrc_.
label()
113 <<
":" << SiTOBHighSrc_.
instance() <<
"\n"
114 <<
" SiTIDLowSrc = " << SiTIDLowSrc_.
label()
115 <<
":" << SiTIDLowSrc_.
instance() <<
"\n"
116 <<
" SiTIDHighSrc = " << SiTIDHighSrc_.
label()
117 <<
":" << SiTIDHighSrc_.
instance() <<
"\n"
118 <<
" SiTECLowSrc = " << SiTECLowSrc_.
label()
119 <<
":" << SiTECLowSrc_.
instance() <<
"\n"
120 <<
" SiTECHighSrc = " << SiTECHighSrc_.
label()
121 <<
":" << SiTECHighSrc_.
instance() <<
"\n"
122 <<
" MuonCscSrc = " << MuonCscSrc_.
label()
123 <<
":" << MuonCscSrc_.
instance() <<
"\n"
124 <<
" MuonDtSrc = " << MuonDtSrc_.
label()
125 <<
":" << MuonDtSrc_.
instance() <<
"\n"
126 <<
" MuonRpcSrc = " << MuonRpcSrc_.
label()
127 <<
":" << MuonRpcSrc_.
instance() <<
"\n"
128 <<
" ECalEBSrc = " << ECalEBSrc_.
label()
129 <<
":" << ECalEBSrc_.
instance() <<
"\n"
130 <<
" ECalEESrc = " << ECalEESrc_.
label()
131 <<
":" << ECalEESrc_.
instance() <<
"\n"
132 <<
" ECalESSrc = " << ECalESSrc_.
label()
133 <<
":" << ECalESSrc_.
instance() <<
"\n"
134 <<
" HCalSrc = " << HCalSrc_.
label()
135 <<
":" << HCalSrc_.
instance() <<
"\n"
137 <<
" validHepMCevt = "
138 <<
":" << validHepMCevt <<
"\n"
139 <<
" validG4VtxContainer = "
140 <<
":" << validG4VtxContainer <<
"\n"
141 <<
" validG4trkContainer = "
142 <<
":" << validG4trkContainer <<
"\n"
143 <<
" validPxlBrlLow = "
144 <<
":" << validPxlBrlLow <<
"\n"
145 <<
" validPxlBrlHigh = "
146 <<
":" << validPxlBrlHigh <<
"\n"
147 <<
" validPxlFwdLow = "
148 <<
":" << validPxlFwdLow <<
"\n"
149 <<
" validPxlFwdHigh = "
150 <<
":" << validPxlFwdHigh <<
"\n"
151 <<
" validSiTIBLow = "
152 <<
":" << validSiTIBLow <<
"\n"
153 <<
" validSiTIBHigh = "
154 <<
":" << validSiTIBHigh <<
"\n"
155 <<
" validSiTOBLow = "
156 <<
":" << validSiTOBLow <<
"\n"
157 <<
" validSiTOBHigh = "
158 <<
":" << validSiTOBHigh <<
"\n"
159 <<
" validSiTIDLow = "
160 <<
":" << validSiTIDLow <<
"\n"
161 <<
" validSiTIDHigh = "
162 <<
":" << validSiTIDHigh <<
"\n"
163 <<
" validSiTECLow = "
164 <<
":" << validSiTECLow <<
"\n"
165 <<
" validSiTECHigh = "
166 <<
":" << validSiTECHigh <<
"\n"
167 <<
" validMuonCSC = "
168 <<
":" << validMuonCSC <<
"\n"
170 <<
":" << validMuonDt <<
"\n"
171 <<
" validMuonRPC = "
172 <<
":" << validMuonRPC <<
"\n"
174 <<
":" << validEB <<
"\n"
176 <<
":" << validEE <<
"\n"
178 <<
":" << validPresh <<
"\n"
180 <<
":" << validHcal <<
"\n"
181 <<
"===============================\n";
188 if (verbosity > 0 ) {
200 for (Int_t
i = 0;
i < 2; ++
i) {
262 sprintf(hname,
"hMCRGP1");
263 sprintf(htitle,
"RawGenParticles");
265 sprintf(hname,
"hMCRGP2");
267 for (Int_t
i = 0;
i < 2; ++
i) {
272 sprintf(hname,
"hMCG4Vtx1");
273 sprintf(htitle,
"G4 Vertices");
275 sprintf(hname,
"hMCG4Vtx2");
277 for (Int_t
i = 0;
i < 2; ++
i) {
282 sprintf(hname,
"hMCG4Trk1");
283 sprintf(htitle,
"G4 Tracks");
285 sprintf(hname,
"hMCG4Trk2");
287 for (Int_t
i = 0;
i < 2; ++
i) {
292 sprintf(hname,
"hGeantVtxX1");
293 sprintf(htitle,
"Geant vertex x/micrometer");
295 sprintf(hname,
"hGeantVtxX2");
297 for (Int_t
i = 0;
i < 2; ++
i) {
302 sprintf(hname,
"hGeantVtxY1");
303 sprintf(htitle,
"Geant vertex y/micrometer");
305 sprintf(hname,
"hGeantVtxY2");
307 for (Int_t
i = 0;
i < 2; ++
i) {
312 sprintf(hname,
"hGeantVtxZ1");
313 sprintf(htitle,
"Geant vertex z/millimeter");
315 sprintf(hname,
"hGeantVtxZ2");
318 for (Int_t
i = 0;
i < 2; ++
i) {
323 sprintf(hname,
"hGeantTrkPt");
324 sprintf(htitle,
"Log10 Geant track pt/GeV");
329 sprintf(hname,
"hGeantTrkE");
330 sprintf(htitle,
"Log10 Geant track E/GeV");
335 sprintf(hname,
"hGeantVtxEta");
336 sprintf(htitle,
"Geant vertices eta");
341 sprintf(hname,
"hGeantVtxPhi");
342 sprintf(htitle,
"Geant vertices phi/rad");
347 sprintf(hname,
"hGeantVtxRad1");
348 sprintf(htitle,
"Geant vertices radius/cm");
350 sprintf(hname,
"hGeantVtxRad2");
352 for (Int_t
i = 0;
i < 2; ++
i) {
357 sprintf(hname,
"hGeantVtxMulti");
358 sprintf(htitle,
"Geant vertices outgoing multiplicity");
365 sprintf(hname,
"hCaloEcal1");
366 sprintf(htitle,
"Ecal hits");
368 sprintf(hname,
"hCaloEcal2");
371 sprintf(hname,
"hCaloEcalE1");
372 sprintf(htitle,
"Ecal hits, energy/GeV");
374 sprintf(hname,
"hCaloEcalE2");
376 sprintf(hname,
"hCaloEcalToF1");
377 sprintf(htitle,
"Ecal hits, ToF/ns");
379 sprintf(hname,
"hCaloEcalToF2");
382 for (Int_t
i = 0;
i < 2; ++
i) {
391 sprintf(hname,
"hCaloEcalPhi");
392 sprintf(htitle,
"Ecal hits, phi/rad");
397 sprintf(hname,
"hCaloEcalEta");
398 sprintf(htitle,
"Ecal hits, eta");
403 sprintf(hname,
"hCaloPreSh1");
404 sprintf(htitle,
"PreSh hits");
406 sprintf(hname,
"hCaloPreSh2");
409 sprintf(hname,
"hCaloPreShE1");
410 sprintf(htitle,
"PreSh hits, energy/GeV");
412 sprintf(hname,
"hCaloPreShE2");
415 sprintf(hname,
"hCaloPreShToF1");
416 sprintf(htitle,
"PreSh hits, ToF/ns");
418 sprintf(hname,
"hCaloPreShToF2");
421 for (Int_t
i = 0;
i < 2; ++
i) {
430 sprintf(hname,
"hCaloPreShPhi");
431 sprintf(htitle,
"PreSh hits, phi/rad");
436 sprintf(hname,
"hCaloPreShEta");
437 sprintf(htitle,
"PreSh hits, eta");
444 sprintf(hname,
"hCaloHcal1");
445 sprintf(htitle,
"Hcal hits");
447 sprintf(hname,
"hCaloHcal2");
450 sprintf(hname,
"hCaloHcalE1");
451 sprintf(htitle,
"Hcal hits, energy/GeV");
453 sprintf(hname,
"hCaloHcalE2");
456 sprintf(hname,
"hCaloHcalToF1");
457 sprintf(htitle,
"Hcal hits, ToF/ns");
459 sprintf(hname,
"hCaloHcalToF2");
462 for (Int_t
i = 0;
i < 2; ++
i) {
471 sprintf(hname,
"hCaloHcalPhi");
472 sprintf(htitle,
"Hcal hits, phi/rad");
477 sprintf(hname,
"hCaloHcalEta");
478 sprintf(htitle,
"Hcal hits, eta");
485 sprintf(hname,
"hTrackerPx1");
486 sprintf(htitle,
"Pixel hits");
488 sprintf(hname,
"hTrackerPx2");
490 for (Int_t
i = 0;
i < 2; ++
i) {
495 sprintf(hname,
"hTrackerPxPhi");
496 sprintf(htitle,
"Pixel hits phi/rad");
501 sprintf(hname,
"hTrackerPxEta");
502 sprintf(htitle,
"Pixel hits eta");
507 sprintf(hname,
"hTrackerPxBToF");
508 sprintf(htitle,
"Pixel barrel hits, ToF/ns");
513 sprintf(hname,
"hTrackerPxBR");
514 sprintf(htitle,
"Pixel barrel hits, R/cm");
519 sprintf(hname,
"hTrackerPxFToF");
520 sprintf(htitle,
"Pixel forward hits, ToF/ns");
525 sprintf(hname,
"hTrackerPxFZ");
526 sprintf(htitle,
"Pixel forward hits, Z/cm");
528 dbe->
book1D(hname,htitle,200,-100.,100.);
534 sprintf(hname,
"hTrackerSi1");
535 sprintf(htitle,
"Silicon hits");
537 sprintf(hname,
"hTrackerSi2");
539 for (Int_t
i = 0;
i < 2; ++
i) {
544 sprintf(hname,
"hTrackerSiPhi");
545 sprintf(htitle,
"Silicon hits phi/rad");
550 sprintf(hname,
"hTrackerSiEta");
551 sprintf(htitle,
"Silicon hits eta");
556 sprintf(hname,
"hTrackerSiBToF");
557 sprintf(htitle,
"Silicon barrel hits, ToF/ns");
562 sprintf(hname,
"hTrackerSiBR");
563 sprintf(htitle,
"Silicon barrel hits, R/cm");
568 sprintf(hname,
"hTrackerSiFToF");
569 sprintf(htitle,
"Silicon forward hits, ToF/ns");
574 sprintf(hname,
"hTrackerSiFZ");
575 sprintf(htitle,
"Silicon forward hits, Z/cm");
582 sprintf(hname,
"hMuon1");
583 sprintf(htitle,
"Muon hits");
585 sprintf(hname,
"hMuon2");
587 for (Int_t
i = 0;
i < 2; ++
i) {
592 sprintf(hname,
"hMuonPhi");
593 sprintf(htitle,
"Muon hits phi/rad");
598 sprintf(hname,
"hMuonEta");
599 sprintf(htitle,
"Muon hits eta");
604 sprintf(hname,
"hMuonCscToF1");
605 sprintf(htitle,
"Muon CSC hits, ToF/ns");
607 sprintf(hname,
"hMuonCscToF2");
609 for (Int_t
i = 0;
i < 2; ++
i) {
614 sprintf(hname,
"hMuonCscZ");
615 sprintf(htitle,
"Muon CSC hits, Z/cm");
620 sprintf(hname,
"hMuonDtToF1");
621 sprintf(htitle,
"Muon DT hits, ToF/ns");
623 sprintf(hname,
"hMuonDtToF2");
625 for (Int_t
i = 0;
i < 2; ++
i) {
630 sprintf(hname,
"hMuonDtR");
631 sprintf(htitle,
"Muon DT hits, R/cm");
636 sprintf(hname,
"hMuonRpcFToF1");
637 sprintf(htitle,
"Muon RPC forward hits, ToF/ns");
639 sprintf(hname,
"hMuonRpcFToF2");
641 for (Int_t
i = 0;
i < 2; ++
i) {
645 sprintf(hname,
"hMuonRpcFZ");
646 sprintf(htitle,
"Muon RPC forward hits, Z/cm");
651 sprintf(hname,
"hMuonRpcBToF1");
652 sprintf(htitle,
"Muon RPC barrel hits, ToF/ns");
654 sprintf(hname,
"hMuonRpcBToF2");
656 for (Int_t
i = 0;
i < 2; ++
i) {
661 sprintf(hname,
"hMuonRpcBR");
662 sprintf(htitle,
"Muon RPC barrel hits, R/cm");
678 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_endJob";
681 <<
"Terminating having processed " <<
count <<
" events.";
688 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_analyze";
694 int nrun = iEvent.
id().
run();
699 <<
"Processing run " << nrun <<
", event " << nevt
700 <<
" (" <<
count <<
" events total)";
704 <<
"Processing run " << nrun <<
", event " << nevt
705 <<
" (" <<
count <<
" events total)";
712 std::vector<const edm::Provenance*> AllProv;
717 <<
"Number of Provenances = " << AllProv.size();
720 TString eventout(
"\nProvenance info:\n");
722 for (
unsigned int i = 0;
i < AllProv.size(); ++
i) {
723 eventout +=
"\n ******************************";
724 eventout +=
"\n Module : ";
725 eventout += AllProv[
i]->moduleLabel();
726 eventout +=
"\n ProductID : ";
727 eventout += AllProv[
i]->productID().id();
728 eventout +=
"\n ClassName : ";
729 eventout += AllProv[
i]->className();
730 eventout +=
"\n InstanceName : ";
731 eventout += AllProv[
i]->productInstanceName();
732 eventout +=
"\n BranchName : ";
733 eventout += AllProv[
i]->branchName();
735 eventout +=
"\n ******************************\n";
756 <<
"Done gathering data from event.";
765 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillG4MC";
769 eventout =
"\nGathering info:";
775 std::vector<edm::Handle<edm::HepMCProduct> > AllHepMCEvt;
780 for (
unsigned int i = 0;
i < AllHepMCEvt.size(); ++
i) {
781 HepMCEvt = AllHepMCEvt[
i];
788 <<
"Unable to find HepMCProduct in event!";
791 eventout +=
"\n Using HepMCProduct: ";
795 const HepMC::GenEvent* MCEvt = HepMCEvt->GetEvent();
800 eventout +=
"\n Number of Raw Particles collected:......... ";
825 if (!G4VtxContainer.
isValid()) {
827 <<
"Unable to find SimVertex in event!";
832 edm::SimVertexContainer::const_iterator itVtx;
833 for (itVtx = G4VtxContainer->begin(); itVtx != G4VtxContainer->end();
839 itVtx->position().y(),
840 itVtx->position().z(),
841 itVtx->position().e());
844 G4Vtx1.GetCoordinates(G4Vtx);
862 if ( G4TrkContainer.
isValid() ) {
863 edm::SimTrackContainer::const_iterator itTrk;
864 for (itTrk = G4TrkContainer->begin(); itTrk != G4TrkContainer->end();
866 if ( (*itTrk).vertIndex() ==
i ) { multi++; }
875 eventout +=
"\n Number of G4Vertices collected:............ ";
887 if (!G4TrkContainer.
isValid()) {
889 <<
"Unable to find SimTrack in event!";
894 edm::SimTrackContainer::const_iterator itTrk;
895 for (itTrk = G4TrkContainer->begin(); itTrk != G4TrkContainer->end();
901 itTrk->momentum().y(),
902 itTrk->momentum().z(),
903 itTrk->momentum().e());
905 G4Trk1.GetCoordinates(G4Trk);
913 eventout +=
"\n Number of G4Tracks collected:.............. ";
932 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillTrk";
936 eventout =
"\nGathering info:";
941 if (!theTrackerGeometry.
isValid()) {
943 <<
"Unable to find TrackerDigiGeometryRecord in event!";
949 edm::PSimHitContainer::const_iterator itHit;
958 if (!PxlBrlLowContainer.
isValid()) {
960 <<
"Unable to find TrackerHitsPixelBarrelLowTof in event!";
966 if (!PxlBrlHighContainer.
isValid()) {
968 <<
"Unable to find TrackerHitsPixelBarrelHighTof in event!";
973 thePxlBrlHits.insert(thePxlBrlHits.end(),PxlBrlLowContainer->begin(),
974 PxlBrlLowContainer->end());
976 thePxlBrlHits.insert(thePxlBrlHits.end(),PxlBrlHighContainer->begin(),
977 PxlBrlHighContainer->end());
981 for (itHit = thePxlBrlHits.begin(); itHit != thePxlBrlHits.end(); ++itHit) {
986 DetId theDetUnitId(itHit->detUnitId());
987 int detector = theDetUnitId.
det();
988 int subdetector = theDetUnitId.subdetId();
998 <<
"Unable to get GeomDetUnit from PxlBrlHits for Hit " <<
i;
1017 <<
"PxlBrl PSimHit " << i
1018 <<
" is expected to be (det,subdet) = ("
1020 <<
"); value returned is: ("
1021 << detector <<
"," << subdetector <<
")";
1027 eventout +=
"\n Number of Pixel Barrel Hits collected:..... ";
1040 if (!PxlFwdLowContainer.
isValid()) {
1042 <<
"Unable to find TrackerHitsPixelEndcapLowTof in event!";
1048 if (!PxlFwdHighContainer.
isValid()) {
1049 LogDebug(
"GlobalHitsAnalyzer_fillTrk")
1050 <<
"Unable to find TrackerHitsPixelEndcapHighTof in event!";
1055 thePxlFwdHits.insert(thePxlFwdHits.end(),PxlFwdLowContainer->begin(),
1056 PxlFwdLowContainer->end());
1058 thePxlFwdHits.insert(thePxlFwdHits.end(),PxlFwdHighContainer->begin(),
1059 PxlFwdHighContainer->end());
1063 for (itHit = thePxlFwdHits.begin(); itHit != thePxlFwdHits.end(); ++itHit) {
1068 DetId theDetUnitId(itHit->detUnitId());
1069 int detector = theDetUnitId.
det();
1070 int subdetector = theDetUnitId.subdetId();
1080 <<
"Unable to get GeomDetUnit from PxlFwdHits for Hit " <<
i;;
1099 <<
"PxlFwd PSimHit " << i
1100 <<
" is expected to be (det,subdet) = ("
1102 <<
"); value returned is: ("
1103 << detector <<
"," << subdetector <<
")";
1109 eventout +=
"\n Number of Pixel Forward Hits collected:.... ";
1126 if (!SiTIBLowContainer.
isValid()) {
1128 <<
"Unable to find TrackerHitsTIBLowTof in event!";
1134 if (!SiTIBHighContainer.
isValid()) {
1136 <<
"Unable to find TrackerHitsTIBHighTof in event!";
1142 if (!SiTOBLowContainer.
isValid()) {
1144 <<
"Unable to find TrackerHitsTOBLowTof in event!";
1150 if (!SiTOBHighContainer.
isValid()) {
1152 <<
"Unable to find TrackerHitsTOBHighTof in event!";
1157 theSiBrlHits.insert(theSiBrlHits.end(),SiTIBLowContainer->begin(),
1158 SiTIBLowContainer->end());
1160 theSiBrlHits.insert(theSiBrlHits.end(),SiTIBHighContainer->begin(),
1161 SiTIBHighContainer->end());
1163 theSiBrlHits.insert(theSiBrlHits.end(),SiTOBLowContainer->begin(),
1164 SiTOBLowContainer->end());
1166 theSiBrlHits.insert(theSiBrlHits.end(),SiTOBHighContainer->begin(),
1167 SiTOBHighContainer->end());
1171 for (itHit = theSiBrlHits.begin(); itHit != theSiBrlHits.end(); ++itHit) {
1176 DetId theDetUnitId(itHit->detUnitId());
1177 int detector = theDetUnitId.
det();
1178 int subdetector = theDetUnitId.subdetId();
1181 if ((detector ==
dTrk) &&
1190 <<
"Unable to get GeomDetUnit from SiBrlHits for Hit " <<
i;
1209 <<
"SiBrl PSimHit " << i
1210 <<
" is expected to be (det,subdet) = ("
1212 <<
" || " <<
sdSiTOB <<
"); value returned is: ("
1213 << detector <<
"," << subdetector <<
")";
1219 eventout +=
"\n Number of Silicon Barrel Hits collected:... ";
1232 if (!SiTIDLowContainer.
isValid()) {
1234 <<
"Unable to find TrackerHitsTIDLowTof in event!";
1240 if (!SiTIDHighContainer.
isValid()) {
1241 LogDebug(
"GlobalHitsAnalyzer_fillTrk")
1242 <<
"Unable to find TrackerHitsTIDHighTof in event!";
1248 if (!SiTECLowContainer.
isValid()) {
1250 <<
"Unable to find TrackerHitsTECLowTof in event!";
1256 if (!SiTECHighContainer.
isValid()) {
1258 <<
"Unable to find TrackerHitsTECHighTof in event!";
1263 theSiFwdHits.insert(theSiFwdHits.end(),SiTIDLowContainer->begin(),
1264 SiTIDLowContainer->end());
1266 theSiFwdHits.insert(theSiFwdHits.end(),SiTIDHighContainer->begin(),
1267 SiTIDHighContainer->end());
1269 theSiFwdHits.insert(theSiFwdHits.end(),SiTECLowContainer->begin(),
1270 SiTECLowContainer->end());
1272 theSiFwdHits.insert(theSiFwdHits.end(),SiTECHighContainer->begin(),
1273 SiTECHighContainer->end());
1277 for (itHit = theSiFwdHits.begin(); itHit != theSiFwdHits.end(); ++itHit) {
1282 DetId theDetUnitId(itHit->detUnitId());
1283 int detector = theDetUnitId.
det();
1284 int subdetector = theDetUnitId.subdetId();
1287 if ((detector ==
dTrk) &&
1296 <<
"Unable to get GeomDetUnit from SiFwdHits Hit " <<
i;
1315 <<
"SiFwd PSimHit " << i
1316 <<
" is expected to be (det,subdet) = ("
1318 <<
" || " <<
sdSiTEC <<
"); value returned is: ("
1319 << detector <<
"," << subdetector <<
")";
1325 eventout +=
"\n Number of Silicon Forward Hits collected:.. ";
1344 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillMuon";
1348 eventout =
"\nGathering info:";
1351 edm::PSimHitContainer::const_iterator itHit;
1359 if (!theCSCGeometry.
isValid()) {
1361 <<
"Unable to find MuonGeometryRecord for the CSCGeometry in event!";
1369 if (!MuonCSCContainer.
isValid()) {
1371 <<
"Unable to find MuonCSCHits in event!";
1378 for (itHit = MuonCSCContainer->begin(); itHit != MuonCSCContainer->end();
1384 DetId theDetUnitId(itHit->detUnitId());
1385 int detector = theDetUnitId.
det();
1386 int subdetector = theDetUnitId.subdetId();
1389 if ((detector ==
dMuon) &&
1397 <<
"Unable to get GeomDetUnit from theCSCMuon for hit " <<
i;
1417 <<
"MuonCsc PSimHit " << i
1418 <<
" is expected to be (det,subdet) = ("
1420 <<
"); value returned is: ("
1421 << detector <<
"," << subdetector <<
")";
1427 eventout +=
"\n Number of CSC muon Hits collected:......... ";
1440 if (!theDTGeometry.
isValid()) {
1442 <<
"Unable to find MuonGeometryRecord for the DTGeometry in event!";
1450 if (!MuonDtContainer.
isValid()) {
1452 <<
"Unable to find MuonDTHits in event!";
1459 for (itHit = MuonDtContainer->begin(); itHit != MuonDtContainer->end();
1465 DetId theDetUnitId(itHit->detUnitId());
1466 int detector = theDetUnitId.
det();
1467 int subdetector = theDetUnitId.subdetId();
1470 if ((detector ==
dMuon) &&
1475 DTWireId wireId(itHit->detUnitId());
1478 const DTLayer *theDet = theDTMuon.
layer(wireId.layerId());
1482 <<
"Unable to get GeomDetUnit from theDtMuon for hit " <<
i;
1489 const BoundPlane& bSurface = theDet->surface();
1502 <<
"MuonDt PSimHit " << i
1503 <<
" is expected to be (det,subdet) = ("
1505 <<
"); value returned is: ("
1506 << detector <<
"," << subdetector <<
")";
1512 eventout +=
"\n Number of DT muon Hits collected:.......... ";
1526 if (!theRPCGeometry.
isValid()) {
1528 <<
"Unable to find MuonGeometryRecord for the RPCGeometry in event!";
1536 if (!MuonRPCContainer.
isValid()) {
1538 <<
"Unable to find MuonRPCHits in event!";
1545 int RPCBrl =0, RPCFwd = 0;
1546 for (itHit = MuonRPCContainer->begin(); itHit != MuonRPCContainer->end();
1552 DetId theDetUnitId(itHit->detUnitId());
1553 int detector = theDetUnitId.
det();
1554 int subdetector = theDetUnitId.subdetId();
1557 if ((detector ==
dMuon) &&
1561 RPCDetId RPCId(itHit->detUnitId());
1564 int region = RPCId.
region();
1571 <<
"Unable to get GeomDetUnit from theRPCMuon for hit " <<
i;
1600 localPosition()).
perp());
1608 <<
"Invalid region for RPC Muon hit" <<
i;
1613 <<
"MuonRpc PSimHit " << i
1614 <<
" is expected to be (det,subdet) = ("
1616 <<
"); value returned is: ("
1617 << detector <<
"," << subdetector <<
")";
1623 eventout +=
"\n Number of RPC muon Hits collected:......... ";
1625 eventout +=
"\n RPC Barrel muon Hits:............ ";
1627 eventout +=
"\n RPC Forward muon Hits:........... ";
1646 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillECal";
1650 eventout =
"\nGathering info:";
1655 if (!theCaloGeometry.
isValid()) {
1657 <<
"Unable to find CaloGeometryRecord in event!";
1663 edm::PCaloHitContainer::const_iterator itHit;
1674 <<
"Unable to find EcalHitsEB in event!";
1682 <<
"Unable to find EcalHitsEE in event!";
1687 theECalHits.insert(theECalHits.end(),EBContainer->begin(),
1688 EBContainer->end());
1690 theECalHits.insert(theECalHits.end(),EEContainer->begin(),
1691 EEContainer->end());
1695 for (itHit = theECalHits.begin(); itHit != theECalHits.end(); ++itHit) {
1700 DetId theDetUnitId(itHit->id());
1701 int detector = theDetUnitId.
det();
1702 int subdetector = theDetUnitId.subdetId();
1705 if ((detector ==
dEcal) &&
1711 getSubdetectorGeometry(theDetUnitId)->
getGeometry(theDetUnitId);
1715 <<
"Unable to get CaloCellGeometry from ECalHits for Hit " <<
i;
1733 <<
"ECal PCaloHit " << i
1734 <<
" is expected to be (det,subdet) = ("
1736 <<
" || " <<
sdEcalFwd <<
"); value returned is: ("
1737 << detector <<
"," << subdetector <<
")";
1743 eventout +=
"\n Number of ECal Hits collected:............. ";
1756 if (!PreShContainer.
isValid()) {
1758 <<
"Unable to find EcalHitsES in event!";
1765 for (itHit = PreShContainer->begin();
1766 itHit != PreShContainer->end(); ++itHit) {
1771 DetId theDetUnitId(itHit->id());
1772 int detector = theDetUnitId.
det();
1773 int subdetector = theDetUnitId.subdetId();
1776 if ((detector ==
dEcal) &&
1781 getSubdetectorGeometry(theDetUnitId)->
getGeometry(theDetUnitId);
1785 <<
"Unable to get CaloCellGeometry from PreShContainer for Hit "
1804 <<
"PreSh PCaloHit " << i
1805 <<
" is expected to be (det,subdet) = ("
1807 <<
"); value returned is: ("
1808 << detector <<
"," << subdetector <<
")";
1814 eventout +=
"\n Number of PreSh Hits collected:............ ";
1831 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillHCal";
1835 eventout =
"\nGathering info:";
1840 if (!theCaloGeometry.
isValid()) {
1842 <<
"Unable to find CaloGeometryRecord in event!";
1848 edm::PCaloHitContainer::const_iterator itHit;
1856 if (!HCalContainer.
isValid()) {
1858 <<
"Unable to find HCalHits in event!";
1865 for (itHit = HCalContainer->begin();
1866 itHit != HCalContainer->end(); ++itHit) {
1871 DetId theDetUnitId(itHit->id());
1872 int detector = theDetUnitId.
det();
1873 int subdetector = theDetUnitId.subdetId();
1876 if ((detector ==
dHcal) &&
1884 getSubdetectorGeometry(theDetUnitId)->
getGeometry(theDetUnitId);
1888 <<
"Unable to get CaloCellGeometry from HCalContainer for Hit "
1907 <<
"HCal PCaloHit " << i
1908 <<
" is expected to be (det,subdet) = ("
1911 <<
"); value returned is: ("
1912 << detector <<
"," << subdetector <<
")";
1918 eventout +=
"\n Number of HCal Hits collected:............. ";
MonitorElement * meTrackerSiPhi
void getManyByType(std::vector< Handle< PROD > > &results) const
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
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
void fillG4MC(const edm::Event &)
std::vector< PCaloHit > PCaloHitContainer
edm::InputTag SiTECLowSrc_
virtual ~GlobalHitsAnalyzer()
edm::InputTag PxlBrlLowSrc_
static const int sdMuonRPCRgnFwdn
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
static const int sdHcalOut
MonitorElement * meMuonDtToF[2]
static const int sdMuonDT
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
MonitorElement * meGeantVtxRad[2]
MonitorElement * meCaloHcal[2]
MonitorElement * meMCG4Trk[2]
MonitorElement * meTrackerPxPhi
Geom::Phi< T > phi() const
MonitorElement * meCaloHcalToF[2]
MonitorElement * meCaloPreSh[2]
static const int sdEcalPS
MonitorElement * meTrackerSiEta
bool getByType(Handle< PROD > &result) const
void fillHCal(const edm::Event &, const edm::EventSetup &)
MonitorElement * meTrackerSiBToF
static const int sdMuonRPC
MonitorElement * meTrackerSi[2]
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
MonitorElement * meMCG4Vtx[2]
edm::InputTag SiTIBHighSrc_
MonitorElement * meGeantVtxY[2]
MonitorElement * meGeantVtxMulti
MonitorElement * meTrackerPxFZ
const DTLayer * layer(DTLayerId id) const
Return a layer given its id.
edm::InputTag MuonCscSrc_
edm::InputTag PxlBrlHighSrc_
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
MonitorElement * meMuonCscToF[2]
MonitorElement * meCaloPreShPhi
MonitorElement * meGeantTrkE
MonitorElement * meCaloEcalEta
static const int sdPxlBrl
MonitorElement * meTrackerPxBR
const T & max(const T &a, const T &b)
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
MonitorElement * meCaloPreShE[2]
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
edm::InputTag PxlFwdLowSrc_
static const int sdMuonCSC
MonitorElement * meTrackerPxBToF
static const int sdEcalFwd
MonitorElement * meGeantVtxPhi
edm::InputTag SiTIDLowSrc_
MonitorElement * meCaloEcalPhi
MonitorElement * meTrackerPx[2]
MonitorElement * meGeantTrkPt
MonitorElement * meGeantVtxEta
edm::InputTag PxlFwdHighSrc_
MonitorElement * meMuonRpcFZ
static const int sdEcalBrl
void setVerbose(unsigned level)
BranchDescription const & product() const
edm::InputTag SiTECHighSrc_
static const int sdMuonRPCRgnFwdp
static const int sdMuonRPCRgnBrl
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void fillTrk(const edm::Event &, const edm::EventSetup &)
MonitorElement * meMCRGP[2]
MonitorElement * meMuonRpcBToF[2]
MonitorElement * meCaloHcalE[2]
MonitorElement * meMuonCscZ
MonitorElement * meGeantVtxX[2]
void fillMuon(const edm::Event &, const edm::EventSetup &)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
MonitorElement * meCaloEcal[2]
MonitorElement * meTrackerSiFZ
MonitorElement * meGeantVtxZ[2]
MonitorElement * meCaloEcalToF[2]
static const int sdHcalFwd
void fillECal(const edm::Event &, const edm::EventSetup &)
edm::InputTag SiTIDHighSrc_
MonitorElement * meMuon[2]
static const int sdHcalBrl
MonitorElement * meMuonRpcFToF[2]
MonitorElement * meCaloPreShToF[2]
MonitorElement * meCaloPreShEta
MonitorElement * meTrackerSiFToF
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
MonitorElement * meTrackerPxFToF
edm::InputTag MuonRpcSrc_
T perp() const
Magnitude of transverse component.
MonitorElement * meMuonEta
const BoundPlane & surface() const
The nominal surface of the GeomDet.
const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id.
edm::InputTag SiTOBLowSrc_
edm::InputTag SiTOBHighSrc_
MonitorElement * meMuonDtR
std::vector< PSimHit > PSimHitContainer
static const int sdPxlFwd
edm::InputTag SiTIBLowSrc_
void showDirStructure(void) const
MonitorElement * meCaloHcalPhi
Detector det() const
get the detector field from this detid
MonitorElement * meMuonRpcBR
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * meTrackerPxEta
MonitorElement * meCaloHcalEta
virtual void beginJob(void)
static const int sdHcalEC
MonitorElement * meMuonPhi
void setCurrentFolder(const std::string &fullpath)
GlobalHitsAnalyzer(const edm::ParameterSet &)
Provenance const * provenance() const
MonitorElement * meTrackerSiBR
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
MonitorElement * meCaloEcalE[2]