19 using CLHEP::micrometer;
20 using CLHEP::millimeter;
28 getAllProvenances(
false),
29 printProvenanceInfo(
false),
43 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_GlobalHitsAnalyzer";
135 <<
"\n===============================\n" 136 <<
"Initialized as EDAnalyzer with parameter values:\n" 137 <<
" Name = " <<
fName <<
"\n" 140 <<
" VtxUnit = " <<
vtxunit <<
"\n" 163 <<
" validHepMCevt = " 165 <<
" validG4VtxContainer = " 167 <<
" validG4trkContainer = " 169 <<
" validPxlBrlLow = " 171 <<
" validPxlBrlHigh = " 173 <<
" validPxlFwdLow = " 175 <<
" validPxlFwdHigh = " 177 <<
" validSiTIBLow = " 179 <<
" validSiTIBHigh = " 181 <<
" validSiTOBLow = " 183 <<
" validSiTOBHigh = " 185 <<
" validSiTIDLow = " 187 <<
" validSiTIDHigh = " 189 <<
" validSiTECLow = " 191 <<
" validSiTECHigh = " 193 <<
" validMuonCSC = " 197 <<
" validMuonRPC = " 207 <<
"===============================\n";
211 for (Int_t
i = 0;
i < 2; ++
i) {
276 sprintf(hname,
"hMCRGP1");
277 sprintf(htitle,
"RawGenParticles");
279 sprintf(hname,
"hMCRGP2");
281 for (Int_t
i = 0;
i < 2; ++
i) {
286 sprintf(hname,
"hMCG4Vtx1");
287 sprintf(htitle,
"G4 Vertices");
289 sprintf(hname,
"hMCG4Vtx2");
291 for (Int_t
i = 0;
i < 2; ++
i) {
296 sprintf(hname,
"hMCG4Trk1");
297 sprintf(htitle,
"G4 Tracks");
299 sprintf(hname,
"hMCG4Trk2");
301 for (Int_t
i = 0;
i < 2; ++
i) {
306 sprintf(hname,
"hGeantVtxX1");
307 sprintf(htitle,
"Geant vertex x/micrometer");
309 sprintf(hname,
"hGeantVtxX2");
311 for (Int_t
i = 0;
i < 2; ++
i) {
316 sprintf(hname,
"hGeantVtxY1");
317 sprintf(htitle,
"Geant vertex y/micrometer");
319 sprintf(hname,
"hGeantVtxY2");
321 for (Int_t
i = 0;
i < 2; ++
i) {
326 sprintf(hname,
"hGeantVtxZ1");
327 sprintf(htitle,
"Geant vertex z/millimeter");
329 sprintf(hname,
"hGeantVtxZ2");
332 for (Int_t
i = 0;
i < 2; ++
i) {
337 sprintf(hname,
"hGeantTrkPt");
338 sprintf(htitle,
"Log10 Geant track pt/GeV");
343 sprintf(hname,
"hGeantTrkE");
344 sprintf(htitle,
"Log10 Geant track E/GeV");
349 sprintf(hname,
"hGeantVtxEta");
350 sprintf(htitle,
"Geant vertices eta");
355 sprintf(hname,
"hGeantVtxPhi");
356 sprintf(htitle,
"Geant vertices phi/rad");
361 sprintf(hname,
"hGeantVtxRad1");
362 sprintf(htitle,
"Geant vertices radius/cm");
364 sprintf(hname,
"hGeantVtxRad2");
366 for (Int_t
i = 0;
i < 2; ++
i) {
371 sprintf(hname,
"hGeantVtxMulti");
372 sprintf(htitle,
"Geant vertices outgoing multiplicity");
379 sprintf(hname,
"hCaloEcal1");
380 sprintf(htitle,
"Ecal hits");
382 sprintf(hname,
"hCaloEcal2");
385 sprintf(hname,
"hCaloEcalE1");
386 sprintf(htitle,
"Ecal hits, energy/GeV");
388 sprintf(hname,
"hCaloEcalE2");
390 sprintf(hname,
"hCaloEcalToF1");
391 sprintf(htitle,
"Ecal hits, ToF/ns");
393 sprintf(hname,
"hCaloEcalToF2");
396 for (Int_t
i = 0;
i < 2; ++
i) {
405 sprintf(hname,
"hCaloEcalPhi");
406 sprintf(htitle,
"Ecal hits, phi/rad");
411 sprintf(hname,
"hCaloEcalEta");
412 sprintf(htitle,
"Ecal hits, eta");
417 sprintf(hname,
"hCaloPreSh1");
418 sprintf(htitle,
"PreSh hits");
420 sprintf(hname,
"hCaloPreSh2");
423 sprintf(hname,
"hCaloPreShE1");
424 sprintf(htitle,
"PreSh hits, energy/GeV");
426 sprintf(hname,
"hCaloPreShE2");
429 sprintf(hname,
"hCaloPreShToF1");
430 sprintf(htitle,
"PreSh hits, ToF/ns");
432 sprintf(hname,
"hCaloPreShToF2");
435 for (Int_t
i = 0;
i < 2; ++
i) {
444 sprintf(hname,
"hCaloPreShPhi");
445 sprintf(htitle,
"PreSh hits, phi/rad");
450 sprintf(hname,
"hCaloPreShEta");
451 sprintf(htitle,
"PreSh hits, eta");
458 sprintf(hname,
"hCaloHcal1");
459 sprintf(htitle,
"Hcal hits");
461 sprintf(hname,
"hCaloHcal2");
464 sprintf(hname,
"hCaloHcalE1");
465 sprintf(htitle,
"Hcal hits, energy/GeV");
467 sprintf(hname,
"hCaloHcalE2");
470 sprintf(hname,
"hCaloHcalToF1");
471 sprintf(htitle,
"Hcal hits, ToF/ns");
473 sprintf(hname,
"hCaloHcalToF2");
476 for (Int_t
i = 0;
i < 2; ++
i) {
485 sprintf(hname,
"hCaloHcalPhi");
486 sprintf(htitle,
"Hcal hits, phi/rad");
491 sprintf(hname,
"hCaloHcalEta");
492 sprintf(htitle,
"Hcal hits, eta");
499 sprintf(hname,
"hTrackerPx1");
500 sprintf(htitle,
"Pixel hits");
502 sprintf(hname,
"hTrackerPx2");
504 for (Int_t
i = 0;
i < 2; ++
i) {
509 sprintf(hname,
"hTrackerPxPhi");
510 sprintf(htitle,
"Pixel hits phi/rad");
515 sprintf(hname,
"hTrackerPxEta");
516 sprintf(htitle,
"Pixel hits eta");
521 sprintf(hname,
"hTrackerPxBToF");
522 sprintf(htitle,
"Pixel barrel hits, ToF/ns");
527 sprintf(hname,
"hTrackerPxBR");
528 sprintf(htitle,
"Pixel barrel hits, R/cm");
533 sprintf(hname,
"hTrackerPxFToF");
534 sprintf(htitle,
"Pixel forward hits, ToF/ns");
539 sprintf(hname,
"hTrackerPxFZ");
540 sprintf(htitle,
"Pixel forward hits, Z/cm");
547 sprintf(hname,
"hTrackerSi1");
548 sprintf(htitle,
"Silicon hits");
550 sprintf(hname,
"hTrackerSi2");
552 for (Int_t
i = 0;
i < 2; ++
i) {
557 sprintf(hname,
"hTrackerSiPhi");
558 sprintf(htitle,
"Silicon hits phi/rad");
563 sprintf(hname,
"hTrackerSiEta");
564 sprintf(htitle,
"Silicon hits eta");
569 sprintf(hname,
"hTrackerSiBToF");
570 sprintf(htitle,
"Silicon barrel hits, ToF/ns");
575 sprintf(hname,
"hTrackerSiBR");
576 sprintf(htitle,
"Silicon barrel hits, R/cm");
581 sprintf(hname,
"hTrackerSiFToF");
582 sprintf(htitle,
"Silicon forward hits, ToF/ns");
587 sprintf(hname,
"hTrackerSiFZ");
588 sprintf(htitle,
"Silicon forward hits, Z/cm");
595 sprintf(hname,
"hMuon1");
596 sprintf(htitle,
"Muon hits");
597 meMuon[0] = iBooker.
book1D(hname, htitle, 100, 0., 10000.);
598 sprintf(hname,
"hMuon2");
599 meMuon[1] = iBooker.
book1D(hname, htitle, 100, -0.5, 99.5);
600 for (Int_t
i = 0;
i < 2; ++
i) {
605 sprintf(hname,
"hMuonPhi");
606 sprintf(htitle,
"Muon hits phi/rad");
611 sprintf(hname,
"hMuonEta");
612 sprintf(htitle,
"Muon hits eta");
617 sprintf(hname,
"hMuonCscToF1");
618 sprintf(htitle,
"Muon CSC hits, ToF/ns");
620 sprintf(hname,
"hMuonCscToF2");
622 for (Int_t
i = 0;
i < 2; ++
i) {
627 sprintf(hname,
"hMuonCscZ");
628 sprintf(htitle,
"Muon CSC hits, Z/cm");
633 sprintf(hname,
"hMuonDtToF1");
634 sprintf(htitle,
"Muon DT hits, ToF/ns");
636 sprintf(hname,
"hMuonDtToF2");
638 for (Int_t
i = 0;
i < 2; ++
i) {
643 sprintf(hname,
"hMuonDtR");
644 sprintf(htitle,
"Muon DT hits, R/cm");
649 sprintf(hname,
"hMuonRpcFToF1");
650 sprintf(htitle,
"Muon RPC forward hits, ToF/ns");
652 sprintf(hname,
"hMuonRpcFToF2");
654 for (Int_t
i = 0;
i < 2; ++
i) {
658 sprintf(hname,
"hMuonRpcFZ");
659 sprintf(htitle,
"Muon RPC forward hits, Z/cm");
664 sprintf(hname,
"hMuonRpcBToF1");
665 sprintf(htitle,
"Muon RPC barrel hits, ToF/ns");
667 sprintf(hname,
"hMuonRpcBToF2");
669 for (Int_t
i = 0;
i < 2; ++
i) {
674 sprintf(hname,
"hMuonRpcBR");
675 sprintf(htitle,
"Muon RPC barrel hits, R/cm");
682 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_analyze";
692 edm::LogInfo(MsgLoggerCat) <<
"Processing run " << nrun <<
", event " <<
nevt <<
" (" <<
count <<
" events total)";
702 std::vector<const edm::StableProvenance *> AllProv;
703 iEvent.getAllStableProvenance(AllProv);
706 edm::LogInfo(MsgLoggerCat) <<
"Number of Provenances = " << AllProv.size();
709 TString eventout(
"\nProvenance info:\n");
711 for (
unsigned int i = 0;
i < AllProv.size(); ++
i) {
712 eventout +=
"\n ******************************";
713 eventout +=
"\n Module : ";
714 eventout += AllProv[
i]->moduleLabel();
715 eventout +=
"\n ProductID : ";
716 eventout += AllProv[
i]->productID().id();
717 eventout +=
"\n ClassName : ";
718 eventout += AllProv[
i]->className();
719 eventout +=
"\n InstanceName : ";
720 eventout += AllProv[
i]->productInstanceName();
721 eventout +=
"\n BranchName : ";
722 eventout += AllProv[
i]->branchName();
724 eventout +=
"\n ******************************\n";
744 edm::LogInfo(MsgLoggerCat) <<
"Done gathering data from event.";
751 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillG4MC";
755 eventout =
"\nGathering info:";
761 std::vector<edm::Handle<edm::HepMCProduct>> AllHepMCEvt;
765 for (
unsigned int i = 0;
i < AllHepMCEvt.size(); ++
i) {
766 HepMCEvt = AllHepMCEvt[
i];
772 LogDebug(MsgLoggerCat) <<
"Unable to find HepMCProduct in event!";
775 eventout +=
"\n Using HepMCProduct: ";
783 eventout +=
"\n Number of Raw Particles collected:......... ";
810 if (!G4VtxContainer.
isValid()) {
811 LogDebug(MsgLoggerCat) <<
"Unable to find SimVertex in event!";
816 edm::SimVertexContainer::const_iterator itVtx;
817 for (itVtx = G4VtxContainer->begin(); itVtx != G4VtxContainer->end(); ++itVtx) {
821 itVtx->position().x(), itVtx->position().y(), itVtx->position().z(), itVtx->position().e());
824 G4Vtx1.GetCoordinates(G4Vtx);
852 if (G4TrkContainer.
isValid()) {
853 edm::SimTrackContainer::const_iterator itTrk;
854 for (itTrk = G4TrkContainer->begin(); itTrk != G4TrkContainer->end(); ++itTrk) {
855 if ((*itTrk).vertIndex() ==
i) {
865 eventout +=
"\n Number of G4Vertices collected:............ ";
878 if (!G4TrkContainer.
isValid()) {
879 LogDebug(MsgLoggerCat) <<
"Unable to find SimTrack in event!";
884 edm::SimTrackContainer::const_iterator itTrk;
885 for (itTrk = G4TrkContainer->begin(); itTrk != G4TrkContainer->end(); ++itTrk) {
889 itTrk->momentum().x(), itTrk->momentum().y(), itTrk->momentum().z(), itTrk->momentum().e());
891 G4Trk1.GetCoordinates(G4Trk);
900 eventout +=
"\n Number of G4Tracks collected:.............. ";
918 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillTrk";
922 eventout =
"\nGathering info:";
926 if (!theTrackerGeometry.isValid()) {
927 edm::LogWarning(MsgLoggerCat) <<
"Unable to find TrackerDigiGeometryRecord in event!";
933 edm::PSimHitContainer::const_iterator itHit;
942 if (!PxlBrlLowContainer.
isValid()) {
943 LogDebug(MsgLoggerCat) <<
"Unable to find TrackerHitsPixelBarrelLowTof in event!";
949 if (!PxlBrlHighContainer.
isValid()) {
950 LogDebug(MsgLoggerCat) <<
"Unable to find TrackerHitsPixelBarrelHighTof in event!";
955 thePxlBrlHits.insert(thePxlBrlHits.end(), PxlBrlLowContainer->begin(), PxlBrlLowContainer->end());
957 thePxlBrlHits.insert(thePxlBrlHits.end(), PxlBrlHighContainer->begin(), PxlBrlHighContainer->end());
961 for (itHit = thePxlBrlHits.begin(); itHit != thePxlBrlHits.end(); ++itHit) {
965 DetId theDetUnitId(itHit->detUnitId());
975 edm::LogWarning(MsgLoggerCat) <<
"Unable to get GeomDetUnit from PxlBrlHits for Hit " <<
i;
994 edm::LogWarning(MsgLoggerCat) <<
"PxlBrl PSimHit " <<
i <<
" is expected to be (det,subdet) = (" <<
dTrk <<
"," 1001 eventout +=
"\n Number of Pixel Barrel Hits collected:..... ";
1014 if (!PxlFwdLowContainer.
isValid()) {
1015 LogDebug(MsgLoggerCat) <<
"Unable to find TrackerHitsPixelEndcapLowTof in event!";
1021 if (!PxlFwdHighContainer.
isValid()) {
1022 LogDebug(
"GlobalHitsAnalyzer_fillTrk") <<
"Unable to find TrackerHitsPixelEndcapHighTof in event!";
1027 thePxlFwdHits.insert(thePxlFwdHits.end(), PxlFwdLowContainer->begin(), PxlFwdLowContainer->end());
1029 thePxlFwdHits.insert(thePxlFwdHits.end(), PxlFwdHighContainer->begin(), PxlFwdHighContainer->end());
1034 for (itHit = thePxlFwdHits.begin(); itHit != thePxlFwdHits.end(); ++itHit) {
1038 DetId theDetUnitId(itHit->detUnitId());
1048 edm::LogWarning(MsgLoggerCat) <<
"Unable to get GeomDetUnit from PxlFwdHits for Hit " <<
i;
1068 edm::LogWarning(MsgLoggerCat) <<
"PxlFwd PSimHit " <<
i <<
" is expected to be (det,subdet) = (" <<
dTrk <<
"," 1075 eventout +=
"\n Number of Pixel Forward Hits collected:.... ";
1094 if (!SiTIBLowContainer.
isValid()) {
1095 LogDebug(MsgLoggerCat) <<
"Unable to find TrackerHitsTIBLowTof in event!";
1101 if (!SiTIBHighContainer.
isValid()) {
1102 LogDebug(MsgLoggerCat) <<
"Unable to find TrackerHitsTIBHighTof in event!";
1108 if (!SiTOBLowContainer.
isValid()) {
1109 LogDebug(MsgLoggerCat) <<
"Unable to find TrackerHitsTOBLowTof in event!";
1115 if (!SiTOBHighContainer.
isValid()) {
1116 LogDebug(MsgLoggerCat) <<
"Unable to find TrackerHitsTOBHighTof in event!";
1121 theSiBrlHits.insert(theSiBrlHits.end(), SiTIBLowContainer->begin(), SiTIBLowContainer->end());
1123 theSiBrlHits.insert(theSiBrlHits.end(), SiTIBHighContainer->begin(), SiTIBHighContainer->end());
1125 theSiBrlHits.insert(theSiBrlHits.end(), SiTOBLowContainer->begin(), SiTOBLowContainer->end());
1127 theSiBrlHits.insert(theSiBrlHits.end(), SiTOBHighContainer->begin(), SiTOBHighContainer->end());
1132 for (itHit = theSiBrlHits.begin(); itHit != theSiBrlHits.end(); ++itHit) {
1136 DetId theDetUnitId(itHit->detUnitId());
1146 edm::LogWarning(MsgLoggerCat) <<
"Unable to get GeomDetUnit from SiBrlHits for Hit " <<
i;
1165 edm::LogWarning(MsgLoggerCat) <<
"SiBrl PSimHit " <<
i <<
" is expected to be (det,subdet) = (" <<
dTrk <<
"," 1173 eventout +=
"\n Number of Silicon Barrel Hits collected:... ";
1186 if (!SiTIDLowContainer.
isValid()) {
1187 LogDebug(MsgLoggerCat) <<
"Unable to find TrackerHitsTIDLowTof in event!";
1193 if (!SiTIDHighContainer.
isValid()) {
1194 LogDebug(
"GlobalHitsAnalyzer_fillTrk") <<
"Unable to find TrackerHitsTIDHighTof in event!";
1200 if (!SiTECLowContainer.
isValid()) {
1201 LogDebug(MsgLoggerCat) <<
"Unable to find TrackerHitsTECLowTof in event!";
1207 if (!SiTECHighContainer.
isValid()) {
1208 LogDebug(MsgLoggerCat) <<
"Unable to find TrackerHitsTECHighTof in event!";
1213 theSiFwdHits.insert(theSiFwdHits.end(), SiTIDLowContainer->begin(), SiTIDLowContainer->end());
1215 theSiFwdHits.insert(theSiFwdHits.end(), SiTIDHighContainer->begin(), SiTIDHighContainer->end());
1217 theSiFwdHits.insert(theSiFwdHits.end(), SiTECLowContainer->begin(), SiTECLowContainer->end());
1219 theSiFwdHits.insert(theSiFwdHits.end(), SiTECHighContainer->begin(), SiTECHighContainer->end());
1224 for (itHit = theSiFwdHits.begin(); itHit != theSiFwdHits.end(); ++itHit) {
1228 DetId theDetUnitId(itHit->detUnitId());
1238 edm::LogWarning(MsgLoggerCat) <<
"Unable to get GeomDetUnit from SiFwdHits Hit " <<
i;
1257 edm::LogWarning(MsgLoggerCat) <<
"SiFwd PSimHit " <<
i <<
" is expected to be (det,subdet) = (" <<
dTrk <<
"," 1265 eventout +=
"\n Number of Silicon Forward Hits collected:.. ";
1284 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillMuon";
1288 eventout =
"\nGathering info:";
1291 edm::PSimHitContainer::const_iterator itHit;
1298 if (!theCSCGeometry.isValid()) {
1299 edm::LogWarning(MsgLoggerCat) <<
"Unable to find MuonGeometryRecord for the CSCGeometry in event!";
1307 if (!MuonCSCContainer.
isValid()) {
1308 LogDebug(MsgLoggerCat) <<
"Unable to find MuonCSCHits in event!";
1315 for (itHit = MuonCSCContainer->begin(); itHit != MuonCSCContainer->end(); ++itHit) {
1319 DetId theDetUnitId(itHit->detUnitId());
1329 edm::LogWarning(MsgLoggerCat) <<
"Unable to get GeomDetUnit from theCSCMuon for hit " <<
i;
1350 edm::LogWarning(MsgLoggerCat) <<
"MuonCsc PSimHit " <<
i <<
" is expected to be (det,subdet) = (" <<
dMuon 1358 eventout +=
"\n Number of CSC muon Hits collected:......... ";
1370 if (!theDTGeometry.isValid()) {
1371 edm::LogWarning(MsgLoggerCat) <<
"Unable to find MuonGeometryRecord for the DTGeometry in event!";
1379 if (!MuonDtContainer.
isValid()) {
1380 LogDebug(MsgLoggerCat) <<
"Unable to find MuonDTHits in event!";
1387 for (itHit = MuonDtContainer->begin(); itHit != MuonDtContainer->end(); ++itHit) {
1391 DetId theDetUnitId(itHit->detUnitId());
1399 DTWireId wireId(itHit->detUnitId());
1402 const DTLayer *theDet = theDTMuon.
layer(wireId.layerId());
1405 edm::LogWarning(MsgLoggerCat) <<
"Unable to get GeomDetUnit from theDtMuon for hit " <<
i;
1412 const BoundPlane &bSurface = theDet->surface();
1426 edm::LogWarning(MsgLoggerCat) <<
"MuonDt PSimHit " <<
i <<
" is expected to be (det,subdet) = (" <<
dMuon <<
"," 1433 eventout +=
"\n Number of DT muon Hits collected:.......... ";
1446 if (!theRPCGeometry.isValid()) {
1447 edm::LogWarning(MsgLoggerCat) <<
"Unable to find MuonGeometryRecord for the RPCGeometry in event!";
1455 if (!MuonRPCContainer.
isValid()) {
1456 LogDebug(MsgLoggerCat) <<
"Unable to find MuonRPCHits in event!";
1463 int RPCBrl = 0, RPCFwd = 0;
1464 for (itHit = MuonRPCContainer->begin(); itHit != MuonRPCContainer->end(); ++itHit) {
1468 DetId theDetUnitId(itHit->detUnitId());
1475 RPCDetId RPCId(itHit->detUnitId());
1478 int region = RPCId.region();
1484 edm::LogWarning(MsgLoggerCat) <<
"Unable to get GeomDetUnit from theRPCMuon for hit " <<
i;
1527 edm::LogWarning(MsgLoggerCat) <<
"MuonRpc PSimHit " <<
i <<
" is expected to be (det,subdet) = (" <<
dMuon 1535 eventout +=
"\n Number of RPC muon Hits collected:......... ";
1537 eventout +=
"\n RPC Barrel muon Hits:............ ";
1539 eventout +=
"\n RPC Forward muon Hits:........... ";
1558 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillECal";
1562 eventout =
"\nGathering info:";
1566 if (!theCaloGeometry.isValid()) {
1567 edm::LogWarning(MsgLoggerCat) <<
"Unable to find CaloGeometryRecord in event!";
1573 edm::PCaloHitContainer::const_iterator itHit;
1583 LogDebug(MsgLoggerCat) <<
"Unable to find EcalHitsEB in event!";
1590 LogDebug(MsgLoggerCat) <<
"Unable to find EcalHitsEE in event!";
1595 theECalHits.insert(theECalHits.end(), EBContainer->begin(), EBContainer->end());
1597 theECalHits.insert(theECalHits.end(), EEContainer->begin(), EEContainer->end());
1601 for (itHit = theECalHits.begin(); itHit != theECalHits.end(); ++itHit) {
1605 DetId theDetUnitId(itHit->id());
1615 edm::LogWarning(MsgLoggerCat) <<
"Unable to get CaloCellGeometry from ECalHits for Hit " <<
i;
1622 const GlobalPoint &globalposition = theDet->getPosition();
1638 edm::LogWarning(MsgLoggerCat) <<
"ECal PCaloHit " <<
i <<
" is expected to be (det,subdet) = (" <<
dEcal <<
"," 1646 eventout +=
"\n Number of ECal Hits collected:............. ";
1661 if (!PreShContainer.
isValid()) {
1662 LogDebug(MsgLoggerCat) <<
"Unable to find EcalHitsES in event!";
1669 for (itHit = PreShContainer->begin(); itHit != PreShContainer->end(); ++itHit) {
1673 DetId theDetUnitId(itHit->id());
1683 edm::LogWarning(MsgLoggerCat) <<
"Unable to get CaloCellGeometry from PreShContainer for Hit " <<
i;
1690 const GlobalPoint &globalposition = theDet->getPosition();
1706 edm::LogWarning(MsgLoggerCat) <<
"PreSh PCaloHit " <<
i <<
" is expected to be (det,subdet) = (" <<
dEcal <<
"," 1713 eventout +=
"\n Number of PreSh Hits collected:............ ";
1730 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillHCal";
1734 eventout =
"\nGathering info:";
1738 if (!theCaloGeometry.isValid()) {
1739 edm::LogWarning(MsgLoggerCat) <<
"Unable to find CaloGeometryRecord in event!";
1747 edm::PCaloHitContainer::const_iterator itHit;
1755 if (!HCalContainer.
isValid()) {
1756 LogDebug(MsgLoggerCat) <<
"Unable to find HCalHits in event!";
1763 for (itHit = HCalContainer->begin(); itHit != HCalContainer->end(); ++itHit) {
1768 unsigned int id_ = itHit->id();
1784 edm::LogWarning(MsgLoggerCat) <<
"Unable to get HcalGeometry from HCalContainer for Hit " <<
i;
1807 edm::LogWarning(MsgLoggerCat) <<
"HCal PCaloHit " <<
i <<
" is expected to be (det,subdet) = (" <<
dHcal <<
"," 1815 eventout +=
"\n Number of HCal Hits collected:............. ";
MonitorElement * meTrackerSiPhi
edm::EDGetTokenT< edm::PSimHitContainer > SiTIDLowSrc_Token_
void fillG4MC(const edm::Event &)
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > caloGeomToken_
T getParameter(std::string const &) const
std::vector< PCaloHit > PCaloHitContainer
edm::InputTag SiTECLowSrc_
edm::EDGetTokenT< edm::PSimHitContainer > SiTECHighSrc_Token_
~GlobalHitsAnalyzer() override
edm::InputTag PxlBrlLowSrc_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
static const int sdMuonRPCRgnFwdn
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken_
static const int sdHcalOut
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * meMuonDtToF[2]
static const int sdMuonDT
MonitorElement * meGeantVtxRad[2]
MonitorElement * meCaloHcal[2]
Geom::Phi< T > phi() const
MonitorElement * meMCG4Trk[2]
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > hcaldddRecToken_
MonitorElement * meTrackerPxPhi
MonitorElement * meCaloHcalToF[2]
edm::EDGetTokenT< edm::PSimHitContainer > SiTIDHighSrc_Token_
unsigned long long EventNumber_t
MonitorElement * meCaloPreSh[2]
static const int sdEcalPS
edm::EDGetTokenT< edm::PCaloHitContainer > ECalEESrc_Token_
MonitorElement * meTrackerSiEta
const GeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
void fillHCal(const edm::Event &, const edm::EventSetup &)
MonitorElement * meTrackerSiBToF
static const int sdMuonRPC
MonitorElement * meTrackerSi[2]
edm::EDGetTokenT< edm::SimTrackContainer > G4TrkSrc_Token_
Provenance const * provenance() const
constexpr Detector det() const
get the detector field from this detid
edm::EDGetTokenT< edm::PSimHitContainer > SiTIBHighSrc_Token_
MonitorElement * meMCG4Vtx[2]
edm::InputTag SiTIBHighSrc_
MonitorElement * meGeantVtxY[2]
MonitorElement * meGeantVtxMulti
MonitorElement * meTrackerPxFZ
T getUntrackedParameter(std::string const &, T const &) const
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
MonitorElement * meCaloPreShE[2]
edm::InputTag PxlFwdLowSrc_
static const int sdMuonCSC
MonitorElement * meTrackerPxBToF
static const int sdEcalFwd
MonitorElement * meGeantVtxPhi
edm::InputTag SiTIDLowSrc_
MonitorElement * meCaloEcalPhi
edm::EDGetTokenT< edm::PSimHitContainer > SiTIBLowSrc_Token_
MonitorElement * meTrackerPx[2]
MonitorElement * meGeantTrkPt
MonitorElement * meGeantVtxEta
edm::InputTag PxlFwdHighSrc_
MonitorElement * meMuonRpcFZ
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
edm::EDGetTokenT< edm::PSimHitContainer > PxlBrlHighSrc_Token_
BranchDescription const & branchDescription() const
static const int sdEcalBrl
edm::InputTag SiTECHighSrc_
static const int sdMuonRPCRgnFwdp
static const int sdMuonRPCRgnBrl
DetId relabel(const uint32_t testId) const
edm::EDGetTokenT< edm::PCaloHitContainer > ECalEBSrc_Token_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
T perp() const
Magnitude of transverse component.
Basic3DVector unit() const
void fillTrk(const edm::Event &, const edm::EventSetup &)
MonitorElement * meMCRGP[2]
edm::EDGetTokenT< edm::PSimHitContainer > PxlBrlLowSrc_Token_
const HepMC::GenEvent * GetEvent() const
MonitorElement * meMuonRpcBToF[2]
void fillHandles(ProductContainer const &productContainer, std::vector< edm::Handle< T >> &handles) const
MonitorElement * meCaloHcalE[2]
Log< level::Info, false > LogInfo
MonitorElement * meMuonCscZ
MonitorElement * meGeantVtxX[2]
void fillMuon(const edm::Event &, const edm::EventSetup &)
edm::EDGetTokenT< edm::PSimHitContainer > SiTOBLowSrc_Token_
const Plane & surface() const
The nominal surface of the GeomDet.
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscGeomToken_
edm::EDGetTokenT< edm::PSimHitContainer > MuonRpcSrc_Token_
MonitorElement * meCaloEcal[2]
edm::EDGetTokenT< edm::PSimHitContainer > PxlFwdLowSrc_Token_
MonitorElement * meTrackerSiFZ
MonitorElement * meGeantVtxZ[2]
MonitorElement * meCaloEcalToF[2]
edm::EDGetTokenT< edm::PSimHitContainer > SiTOBHighSrc_Token_
std::vector< SimVertex > SimVertexContainer
static const int sdHcalFwd
edm::EDGetTokenT< edm::PSimHitContainer > MuonCscSrc_Token_
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
MonitorElement * meTrackerPxFToF
edm::GetterOfProducts< edm::HepMCProduct > getterOfProducts_
edm::InputTag MuonRpcSrc_
edm::EDGetTokenT< edm::SimVertexContainer > G4VtxSrc_Token_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * meMuonEta
GlobalPoint getPosition(const DetId &id) const
edm::InputTag SiTOBLowSrc_
edm::InputTag SiTOBHighSrc_
MonitorElement * meMuonDtR
edm::EDGetTokenT< edm::PCaloHitContainer > HCalSrc_Token_
std::vector< PSimHit > PSimHitContainer
edm::EDGetTokenT< edm::PSimHitContainer > PxlFwdHighSrc_Token_
static const int sdPxlFwd
edm::InputTag SiTIBLowSrc_
Log< level::Warning, false > LogWarning
MonitorElement * meCaloHcalPhi
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
edm::ESGetToken< RPCGeometry, MuonGeometryRecord > rpcGeomToken_
MonitorElement * meMuonRpcBR
MonitorElement * meTrackerPxEta
edm::EDGetTokenT< edm::PCaloHitContainer > ECalESSrc_Token_
std::vector< SimTrack > SimTrackContainer
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
MonitorElement * meCaloHcalEta
static const int sdHcalEC
MonitorElement * meMuonPhi
GlobalHitsAnalyzer(const edm::ParameterSet &)
edm::EDGetTokenT< edm::PSimHitContainer > MuonDtSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > SiTECLowSrc_Token_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tGeomToken_
const GeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
MonitorElement * meTrackerSiBR
void analyze(const edm::Event &, const edm::EventSetup &) override
const DTLayer * layer(const DTLayerId &id) const
Return a layer given its id.
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * meCaloEcalE[2]