18 getAllProvenances(
false),
19 printProvenanceInfo(
false),
30 std::string MsgLoggerCat =
"GlobalHitsProducer_GlobalHitsProducer";
96 produces<PGlobalSimHit>(
label);
101 <<
"\n===============================\n" 102 <<
"Initialized as EDProducer with parameter values:\n" 103 <<
" Name = " <<
fName <<
"\n" 104 <<
" Verbosity = " << verbosity <<
"\n" 105 <<
" Frequency = " << frequency <<
"\n" 106 <<
" VtxUnit = " << vtxunit <<
"\n" 107 <<
" Label = " << label <<
"\n" 108 <<
" GetProv = " << getAllProvenances <<
"\n" 109 <<
" PrintProv = " << printProvenanceInfo <<
"\n" 110 <<
" PxlBrlLowSrc = " << PxlBrlLowSrc_.label() <<
":" << PxlBrlLowSrc_.instance() <<
"\n" 111 <<
" PxlBrlHighSrc = " << PxlBrlHighSrc_.
label() <<
":" << PxlBrlHighSrc_.
instance() <<
"\n" 112 <<
" PxlFwdLowSrc = " << PxlFwdLowSrc_.
label() <<
":" << PxlBrlLowSrc_.instance() <<
"\n" 113 <<
" PxlFwdHighSrc = " << PxlFwdHighSrc_.
label() <<
":" << PxlBrlHighSrc_.
instance() <<
"\n" 114 <<
" SiTIBLowSrc = " << SiTIBLowSrc_.
label() <<
":" << SiTIBLowSrc_.
instance() <<
"\n" 115 <<
" SiTIBHighSrc = " << SiTIBHighSrc_.
label() <<
":" << SiTIBHighSrc_.
instance() <<
"\n" 116 <<
" SiTOBLowSrc = " << SiTOBLowSrc_.
label() <<
":" << SiTOBLowSrc_.
instance() <<
"\n" 117 <<
" SiTOBHighSrc = " << SiTOBHighSrc_.
label() <<
":" << SiTOBHighSrc_.
instance() <<
"\n" 118 <<
" SiTIDLowSrc = " << SiTIDLowSrc_.
label() <<
":" << SiTIDLowSrc_.
instance() <<
"\n" 119 <<
" SiTIDHighSrc = " << SiTIDHighSrc_.
label() <<
":" << SiTIDHighSrc_.
instance() <<
"\n" 120 <<
" SiTECLowSrc = " << SiTECLowSrc_.
label() <<
":" << SiTECLowSrc_.
instance() <<
"\n" 121 <<
" SiTECHighSrc = " << SiTECHighSrc_.
label() <<
":" << SiTECHighSrc_.
instance() <<
"\n" 122 <<
" MuonCscSrc = " << MuonCscSrc_.
label() <<
":" << MuonCscSrc_.
instance() <<
"\n" 123 <<
" MuonDtSrc = " << MuonDtSrc_.
label() <<
":" << MuonDtSrc_.
instance() <<
"\n" 124 <<
" MuonRpcSrc = " << MuonRpcSrc_.
label() <<
":" << MuonRpcSrc_.
instance() <<
"\n" 125 <<
" ECalEBSrc = " << ECalEBSrc_.
label() <<
":" << ECalEBSrc_.
instance() <<
"\n" 126 <<
" ECalEESrc = " << ECalEESrc_.
label() <<
":" << ECalEESrc_.
instance() <<
"\n" 127 <<
" ECalESSrc = " << ECalESSrc_.
label() <<
":" << ECalESSrc_.
instance() <<
"\n" 128 <<
" HCalSrc = " << HCalSrc_.
label() <<
":" << HCalSrc_.
instance() <<
"\n" 129 <<
"===============================\n";
141 std::string MsgLoggerCat =
"GlobalHitsProducer_endJob";
143 edm::LogInfo(MsgLoggerCat) <<
"Terminating having processed " <<
count <<
" events.";
148 std::string MsgLoggerCat =
"GlobalHitsProducer_produce";
158 edm::LogInfo(MsgLoggerCat) <<
"Processing run " << nrun <<
", event " << nevt <<
" (" <<
count <<
" events total)";
160 if (nevt %
frequency == 0 || nevt == 1) {
161 edm::LogInfo(MsgLoggerCat) <<
"Processing run " << nrun <<
", event " << nevt <<
" (" <<
count 171 std::vector<const edm::StableProvenance *> AllProv;
175 edm::LogInfo(MsgLoggerCat) <<
"Number of Provenances = " << AllProv.size();
178 TString eventout(
"\nProvenance info:\n");
180 for (
unsigned int i = 0;
i < AllProv.size(); ++
i) {
181 eventout +=
"\n ******************************";
182 eventout +=
"\n Module : ";
183 eventout += AllProv[
i]->moduleLabel();
184 eventout +=
"\n ProductID : ";
185 eventout += AllProv[
i]->productID().id();
186 eventout +=
"\n ClassName : ";
187 eventout += AllProv[
i]->className();
188 eventout +=
"\n InstanceName : ";
189 eventout += AllProv[
i]->productInstanceName();
190 eventout +=
"\n BranchName : ";
191 eventout += AllProv[
i]->branchName();
193 eventout +=
"\n ******************************\n";
213 edm::LogInfo(MsgLoggerCat) <<
"Done gathering data from event.";
241 std::string MsgLoggerCat =
"GlobalHitsProducer_fillG4MC";
245 eventout =
"\nGathering info:";
251 std::vector<edm::Handle<edm::HepMCProduct>> AllHepMCEvt;
256 for (
unsigned int i = 0;
i < AllHepMCEvt.size(); ++
i) {
257 HepMCEvt = AllHepMCEvt[
i];
263 edm::LogWarning(MsgLoggerCat) <<
"Unable to find HepMCProduct in event!";
266 eventout +=
"\n Using HepMCProduct: ";
273 eventout +=
"\n Number of Raw Particles collected:......... ";
289 if (!G4VtxContainer.
isValid()) {
294 edm::SimVertexContainer::const_iterator itVtx;
295 for (itVtx = G4VtxContainer->begin(); itVtx != G4VtxContainer->end(); ++itVtx) {
299 itVtx->position().x(), itVtx->position().y(), itVtx->position().z(), itVtx->position().e());
301 G4Vtx1.GetCoordinates(G4Vtx);
303 G4VtxX.push_back((G4Vtx[0] * unit) / micrometer);
304 G4VtxY.push_back((G4Vtx[1] * unit) / micrometer);
305 G4VtxZ.push_back((G4Vtx[2] * unit) / millimeter);
309 eventout +=
"\n Number of G4Vertices collected:............ ";
319 if (!G4TrkContainer.
isValid()) {
324 edm::SimTrackContainer::const_iterator itTrk;
325 for (itTrk = G4TrkContainer->begin(); itTrk != G4TrkContainer->end(); ++itTrk) {
329 itTrk->momentum().x(), itTrk->momentum().y(), itTrk->momentum().z(), itTrk->momentum().e());
331 G4Trk1.GetCoordinates(G4Trk);
333 G4TrkPt.push_back(
sqrt(G4Trk[0] * G4Trk[0] + G4Trk[1] * G4Trk[1]));
334 G4TrkE.push_back(G4Trk[3]);
338 eventout +=
"\n Number of G4Tracks collected:.............. ";
349 std::string MsgLoggerCat =
"GlobalHitsProducer_storeG4MC";
352 TString eventout(
"\n nRawGenPart = ");
354 eventout +=
"\n nG4Vtx = ";
355 eventout +=
G4VtxX.size();
356 for (
unsigned int i = 0;
i <
G4VtxX.size(); ++
i) {
357 eventout +=
"\n (x,y,z) = (";
365 eventout +=
"\n nG4Trk = ";
367 for (
unsigned int i = 0;
i <
G4TrkPt.size(); ++
i) {
368 eventout +=
"\n (pt,e) = (";
385 std::string MsgLoggerCat =
"GlobalHitsProducer_fillTrk";
389 eventout =
"\nGathering info:";
394 if (!theTrackerGeometry.
isValid()) {
395 edm::LogWarning(MsgLoggerCat) <<
"Unable to find TrackerDigiGeometryRecord in event!";
401 edm::PSimHitContainer::const_iterator itHit;
410 if (!PxlBrlLowContainer.
isValid()) {
411 edm::LogWarning(MsgLoggerCat) <<
"Unable to find TrackerHitsPixelBarrelLowTof in event!";
417 if (!PxlBrlHighContainer.
isValid()) {
418 edm::LogWarning(MsgLoggerCat) <<
"Unable to find TrackerHitsPixelBarrelHighTof in event!";
422 thePxlBrlHits.insert(thePxlBrlHits.end(), PxlBrlLowContainer->begin(), PxlBrlLowContainer->end());
423 thePxlBrlHits.insert(thePxlBrlHits.end(), PxlBrlHighContainer->begin(), PxlBrlHighContainer->end());
427 for (itHit = thePxlBrlHits.begin(); itHit != thePxlBrlHits.end(); ++itHit) {
431 DetId theDetUnitId(itHit->detUnitId());
441 edm::LogWarning(MsgLoggerCat) <<
"Unable to get GeomDetUnit from PxlBrlHits for Hit " <<
i;
452 PxlBrlR.push_back(bSurface.toGlobal(itHit->localPosition()).
perp());
453 PxlBrlPhi.push_back(bSurface.toGlobal(itHit->localPosition()).
phi());
454 PxlBrlEta.push_back(bSurface.toGlobal(itHit->localPosition()).
eta());
457 edm::LogWarning(MsgLoggerCat) <<
"PxlBrl PSimHit " << i <<
" is expected to be (det,subdet) = (" <<
dTrk <<
"," 458 <<
sdPxlBrl <<
"); value returned is: (" << detector <<
"," << subdetector <<
")";
464 eventout +=
"\n Number of Pixel Barrel Hits collected:..... ";
475 if (!PxlFwdLowContainer.
isValid()) {
476 edm::LogWarning(MsgLoggerCat) <<
"Unable to find TrackerHitsPixelEndcapLowTof in event!";
482 if (!PxlFwdHighContainer.
isValid()) {
483 edm::LogWarning(
"GlobalHitsProducer_fillTrk") <<
"Unable to find TrackerHitsPixelEndcapHighTof in event!";
487 thePxlFwdHits.insert(thePxlFwdHits.end(), PxlFwdLowContainer->begin(), PxlFwdLowContainer->end());
488 thePxlFwdHits.insert(thePxlFwdHits.end(), PxlFwdHighContainer->begin(), PxlFwdHighContainer->end());
493 for (itHit = thePxlFwdHits.begin(); itHit != thePxlFwdHits.end(); ++itHit) {
497 DetId theDetUnitId(itHit->detUnitId());
507 edm::LogWarning(MsgLoggerCat) <<
"Unable to get GeomDetUnit from PxlFwdHits for Hit " <<
i;
519 PxlFwdZ.push_back(bSurface.toGlobal(itHit->localPosition()).
z());
520 PxlFwdPhi.push_back(bSurface.toGlobal(itHit->localPosition()).
phi());
521 PxlFwdEta.push_back(bSurface.toGlobal(itHit->localPosition()).
eta());
523 edm::LogWarning(MsgLoggerCat) <<
"PxlFwd PSimHit " << i <<
" is expected to be (det,subdet) = (" <<
dTrk <<
"," 524 <<
sdPxlFwd <<
"); value returned is: (" << detector <<
"," << subdetector <<
")";
530 eventout +=
"\n Number of Pixel Forward Hits collected:.... ";
541 if (!SiTIBLowContainer.
isValid()) {
542 edm::LogWarning(MsgLoggerCat) <<
"Unable to find TrackerHitsTIBLowTof in event!";
548 if (!SiTIBHighContainer.
isValid()) {
549 edm::LogWarning(MsgLoggerCat) <<
"Unable to find TrackerHitsTIBHighTof in event!";
555 if (!SiTOBLowContainer.
isValid()) {
556 edm::LogWarning(MsgLoggerCat) <<
"Unable to find TrackerHitsTOBLowTof in event!";
562 if (!SiTOBHighContainer.
isValid()) {
563 edm::LogWarning(MsgLoggerCat) <<
"Unable to find TrackerHitsTOBHighTof in event!";
567 theSiBrlHits.insert(theSiBrlHits.end(), SiTIBLowContainer->begin(), SiTIBLowContainer->end());
568 theSiBrlHits.insert(theSiBrlHits.end(), SiTIBHighContainer->begin(), SiTIBHighContainer->end());
569 theSiBrlHits.insert(theSiBrlHits.end(), SiTOBLowContainer->begin(), SiTOBLowContainer->end());
570 theSiBrlHits.insert(theSiBrlHits.end(), SiTOBHighContainer->begin(), SiTOBHighContainer->end());
575 for (itHit = theSiBrlHits.begin(); itHit != theSiBrlHits.end(); ++itHit) {
579 DetId theDetUnitId(itHit->detUnitId());
589 edm::LogWarning(MsgLoggerCat) <<
"Unable to get GeomDetUnit from SiBrlHits for Hit " <<
i;
600 SiBrlR.push_back(bSurface.toGlobal(itHit->localPosition()).
perp());
601 SiBrlPhi.push_back(bSurface.toGlobal(itHit->localPosition()).
phi());
602 SiBrlEta.push_back(bSurface.toGlobal(itHit->localPosition()).
eta());
604 edm::LogWarning(MsgLoggerCat) <<
"SiBrl PSimHit " << i <<
" is expected to be (det,subdet) = (" <<
dTrk <<
"," 605 <<
sdSiTIB <<
" || " <<
sdSiTOB <<
"); value returned is: (" << detector <<
"," 606 << subdetector <<
")";
612 eventout +=
"\n Number of Silicon Barrel Hits collected:... ";
623 if (!SiTIDLowContainer.
isValid()) {
624 edm::LogWarning(MsgLoggerCat) <<
"Unable to find TrackerHitsTIDLowTof in event!";
630 if (!SiTIDHighContainer.
isValid()) {
631 edm::LogWarning(
"GlobalHitsProducer_fillTrk") <<
"Unable to find TrackerHitsTIDHighTof in event!";
637 if (!SiTECLowContainer.
isValid()) {
638 edm::LogWarning(MsgLoggerCat) <<
"Unable to find TrackerHitsTECLowTof in event!";
644 if (!SiTECHighContainer.
isValid()) {
645 edm::LogWarning(MsgLoggerCat) <<
"Unable to find TrackerHitsTECHighTof in event!";
649 theSiFwdHits.insert(theSiFwdHits.end(), SiTIDLowContainer->begin(), SiTIDLowContainer->end());
650 theSiFwdHits.insert(theSiFwdHits.end(), SiTIDHighContainer->begin(), SiTIDHighContainer->end());
651 theSiFwdHits.insert(theSiFwdHits.end(), SiTECLowContainer->begin(), SiTECLowContainer->end());
652 theSiFwdHits.insert(theSiFwdHits.end(), SiTECHighContainer->begin(), SiTECHighContainer->end());
657 for (itHit = theSiFwdHits.begin(); itHit != theSiFwdHits.end(); ++itHit) {
661 DetId theDetUnitId(itHit->detUnitId());
671 edm::LogWarning(MsgLoggerCat) <<
"Unable to get GeomDetUnit from SiFwdHits Hit " <<
i;
682 SiFwdZ.push_back(bSurface.toGlobal(itHit->localPosition()).
z());
683 SiFwdPhi.push_back(bSurface.toGlobal(itHit->localPosition()).
phi());
684 SiFwdEta.push_back(bSurface.toGlobal(itHit->localPosition()).
eta());
686 edm::LogWarning(MsgLoggerCat) <<
"SiFwd PSimHit " << i <<
" is expected to be (det,subdet) = (" <<
dTrk <<
"," 687 <<
sdSiTOB <<
" || " <<
sdSiTEC <<
"); value returned is: (" << detector <<
"," 688 << subdetector <<
")";
694 eventout +=
"\n Number of Silicon Forward Hits collected:.. ";
705 std::string MsgLoggerCat =
"GlobalHitsProducer_storeTrk";
708 TString eventout(
"\n nPxlBrlHits = ");
711 eventout +=
"\n (tof,r,phi,eta) = (";
721 eventout +=
"\n nPxlFwdHits = ";
724 eventout +=
"\n (tof,z,phi,eta) = (";
734 eventout +=
"\n nSiBrlHits = ";
736 for (
unsigned int i = 0;
i <
SiBrlToF.size(); ++
i) {
737 eventout +=
"\n (tof,r,phi,eta) = (";
747 eventout +=
"\n nSiFwdHits = ";
749 for (
unsigned int i = 0;
i <
SiFwdToF.size(); ++
i) {
750 eventout +=
"\n (tof,z,phi,eta) = (";
772 std::string MsgLoggerCat =
"GlobalHitsProducer_fillMuon";
776 eventout =
"\nGathering info:";
779 edm::PSimHitContainer::const_iterator itHit;
788 if (!theCSCGeometry.
isValid()) {
789 edm::LogWarning(MsgLoggerCat) <<
"Unable to find MuonGeometryRecord for the CSCGeometry in event!";
797 if (!MuonCSCContainer.
isValid()) {
798 edm::LogWarning(MsgLoggerCat) <<
"Unable to find MuonCSCHits in event!";
804 for (itHit = MuonCSCContainer->begin(); itHit != MuonCSCContainer->end(); ++itHit) {
808 DetId theDetUnitId(itHit->detUnitId());
818 edm::LogWarning(MsgLoggerCat) <<
"Unable to get GeomDetUnit from theCSCMuon for hit " <<
i;
829 MuonCscZ.push_back(bSurface.toGlobal(itHit->localPosition()).
z());
830 MuonCscPhi.push_back(bSurface.toGlobal(itHit->localPosition()).
phi());
831 MuonCscEta.push_back(bSurface.toGlobal(itHit->localPosition()).
eta());
833 edm::LogWarning(MsgLoggerCat) <<
"MuonCsc PSimHit " << i <<
" is expected to be (det,subdet) = (" <<
dMuon <<
"," 834 <<
sdMuonCSC <<
"); value returned is: (" << detector <<
"," << subdetector <<
")";
840 eventout +=
"\n Number of CSC muon Hits collected:......... ";
851 if (!theDTGeometry.
isValid()) {
852 edm::LogWarning(MsgLoggerCat) <<
"Unable to find MuonGeometryRecord for the DTGeometry in event!";
860 if (!MuonDtContainer.
isValid()) {
861 edm::LogWarning(MsgLoggerCat) <<
"Unable to find MuonDTHits in event!";
867 for (itHit = MuonDtContainer->begin(); itHit != MuonDtContainer->end(); ++itHit) {
871 DetId theDetUnitId(itHit->detUnitId());
879 DTWireId wireId(itHit->detUnitId());
882 const DTLayer *theDet = theDTMuon.
layer(wireId.layerId());
885 edm::LogWarning(MsgLoggerCat) <<
"Unable to get GeomDetUnit from theDtMuon for hit " <<
i;
892 const BoundPlane &bSurface = theDet->surface();
896 MuonDtR.push_back(bSurface.toGlobal(itHit->localPosition()).
perp());
897 MuonDtPhi.push_back(bSurface.toGlobal(itHit->localPosition()).
phi());
898 MuonDtEta.push_back(bSurface.toGlobal(itHit->localPosition()).
eta());
900 edm::LogWarning(MsgLoggerCat) <<
"MuonDt PSimHit " << i <<
" is expected to be (det,subdet) = (" <<
dMuon <<
"," 901 <<
sdMuonDT <<
"); value returned is: (" << detector <<
"," << subdetector <<
")";
907 eventout +=
"\n Number of DT muon Hits collected:.......... ";
919 if (!theRPCGeometry.
isValid()) {
920 edm::LogWarning(MsgLoggerCat) <<
"Unable to find MuonGeometryRecord for the RPCGeometry in event!";
928 if (!MuonRPCContainer.
isValid()) {
929 edm::LogWarning(MsgLoggerCat) <<
"Unable to find MuonRPCHits in event!";
935 int RPCBrl = 0, RPCFwd = 0;
936 for (itHit = MuonRPCContainer->begin(); itHit != MuonRPCContainer->end(); ++itHit) {
940 DetId theDetUnitId(itHit->detUnitId());
950 int region = RPCId.
region();
956 edm::LogWarning(MsgLoggerCat) <<
"Unable to get GeomDetUnit from theRPCMuon for hit " <<
i;
970 MuonRpcFwdZ.push_back(bSurface.toGlobal(itHit->localPosition()).
z());
977 MuonRpcBrlR.push_back(bSurface.toGlobal(itHit->localPosition()).
perp());
985 edm::LogWarning(MsgLoggerCat) <<
"MuonRpc PSimHit " << i <<
" is expected to be (det,subdet) = (" <<
dMuon <<
"," 986 <<
sdMuonRPC <<
"); value returned is: (" << detector <<
"," << subdetector <<
")";
992 eventout +=
"\n Number of RPC muon Hits collected:......... ";
994 eventout +=
"\n RPC Barrel muon Hits:............ ";
996 eventout +=
"\n RPC Forward muon Hits:........... ";
1007 std::string MsgLoggerCat =
"GlobalHitsProducer_storeMuon";
1010 TString eventout(
"\n nMuonCSCHits = ");
1013 eventout +=
"\n (tof,z,phi,eta) = (";
1023 eventout +=
"\n nMuonDtHits = ";
1026 eventout +=
"\n (tof,r,phi,eta) = (";
1036 eventout +=
"\n nMuonRpcBrlHits = ";
1039 eventout +=
"\n (tof,r,phi,eta) = (";
1049 eventout +=
"\n nMuonRpcFwdHits = ";
1052 eventout +=
"\n (tof,z,phi,eta) = (";
1074 std::string MsgLoggerCat =
"GlobalHitsProducer_fillECal";
1078 eventout =
"\nGathering info:";
1083 if (!theCaloGeometry.
isValid()) {
1084 edm::LogWarning(MsgLoggerCat) <<
"Unable to find CaloGeometryRecord in event!";
1090 edm::PCaloHitContainer::const_iterator itHit;
1100 edm::LogWarning(MsgLoggerCat) <<
"Unable to find EcalHitsEB in event!";
1107 edm::LogWarning(MsgLoggerCat) <<
"Unable to find EcalHitsEE in event!";
1111 theECalHits.insert(theECalHits.end(), EBContainer->begin(), EBContainer->end());
1112 theECalHits.insert(theECalHits.end(), EEContainer->begin(), EEContainer->end());
1116 for (itHit = theECalHits.begin(); itHit != theECalHits.end(); ++itHit) {
1120 DetId theDetUnitId(itHit->id());
1130 edm::LogWarning(MsgLoggerCat) <<
"Unable to get CaloCellGeometry from ECalHits for Hit " <<
i;
1137 const GlobalPoint &globalposition = theDet->getPosition();
1140 ECalE.push_back(itHit->energy());
1141 ECalToF.push_back(itHit->time());
1146 edm::LogWarning(MsgLoggerCat) <<
"ECal PCaloHit " << i <<
" is expected to be (det,subdet) = (" <<
dEcal <<
"," 1148 << subdetector <<
")";
1154 eventout +=
"\n Number of ECal Hits collected:............. ";
1164 if (!PreShContainer.
isValid()) {
1165 edm::LogWarning(MsgLoggerCat) <<
"Unable to find EcalHitsES in event!";
1171 for (itHit = PreShContainer->begin(); itHit != PreShContainer->end(); ++itHit) {
1175 DetId theDetUnitId(itHit->id());
1185 edm::LogWarning(MsgLoggerCat) <<
"Unable to get CaloCellGeometry from PreShContainer for Hit " <<
i;
1192 const GlobalPoint &globalposition = theDet->getPosition();
1195 PreShE.push_back(itHit->energy());
1201 edm::LogWarning(MsgLoggerCat) <<
"PreSh PCaloHit " << i <<
" is expected to be (det,subdet) = (" <<
dEcal <<
"," 1202 <<
sdEcalPS <<
"); value returned is: (" << detector <<
"," << subdetector <<
")";
1208 eventout +=
"\n Number of PreSh Hits collected:............ ";
1219 std::string MsgLoggerCat =
"GlobalHitsProducer_storeECal";
1222 TString eventout(
"\n nECalHits = ");
1223 eventout +=
ECalE.size();
1224 for (
unsigned int i = 0;
i <
ECalE.size(); ++
i) {
1225 eventout +=
"\n (e,tof,phi,eta) = (";
1235 eventout +=
"\n nPreShHits = ";
1236 eventout +=
PreShE.size();
1237 for (
unsigned int i = 0;
i <
PreShE.size(); ++
i) {
1238 eventout +=
"\n (e,tof,phi,eta) = (";
1258 std::string MsgLoggerCat =
"GlobalHitsProducer_fillHCal";
1262 eventout =
"\nGathering info:";
1267 if (!theCaloGeometry.
isValid()) {
1268 edm::LogWarning(MsgLoggerCat) <<
"Unable to find CaloGeometryRecord in event!";
1274 edm::PCaloHitContainer::const_iterator itHit;
1282 if (!HCalContainer.
isValid()) {
1289 for (itHit = HCalContainer->begin(); itHit != HCalContainer->end(); ++itHit) {
1293 DetId theDetUnitId(itHit->id());
1304 edm::LogWarning(MsgLoggerCat) <<
"Unable to get CaloCellGeometry from HCalContainer for Hit " <<
i;
1314 HCalE.push_back(itHit->energy());
1315 HCalToF.push_back(itHit->time());
1320 edm::LogWarning(MsgLoggerCat) <<
"HCal PCaloHit " << i <<
" is expected to be (det,subdet) = (" <<
dHcal <<
"," 1322 <<
"); value returned is: (" << detector <<
"," << subdetector <<
")";
1328 eventout +=
"\n Number of HCal Hits collected:............. ";
1339 std::string MsgLoggerCat =
"GlobalHitsProducer_storeHCal";
1342 TString eventout(
"\n nHCalHits = ");
1343 eventout +=
HCalE.size();
1344 for (
unsigned int i = 0;
i <
HCalE.size(); ++
i) {
1345 eventout +=
"\n (e,tof,phi,eta) = (";
1364 std::string MsgLoggerCat =
"GlobalHitsProducer_clear";
1367 edm::LogInfo(MsgLoggerCat) <<
"Clearing event holders";
void storeECal(PGlobalSimHit &)
edm::EDGetTokenT< edm::PSimHitContainer > SiTIBHighSrc_Token_
T getParameter(std::string const &) const
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< edm::PSimHitContainer > SiTECHighSrc_Token_
std::vector< PCaloHit > PCaloHitContainer
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
const GeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
static const int sdMuonRPCRgnFwdn
void produce(edm::Event &, const edm::EventSetup &) override
static const int sdHcalOut
void putHCalHits(const std::vector< float > &e, const std::vector< float > &tof, const std::vector< float > &phi, const std::vector< float > &eta)
static const int sdMuonDT
edm::EDGetTokenT< edm::PSimHitContainer > MuonRpcSrc_Token_
edm::InputTag MuonCscSrc_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void putMuonRpcFwdHits(const std::vector< float > &tof, const std::vector< float > &z, const std::vector< float > &phi, const std::vector< float > &eta)
void putMuonRpcBrlHits(const std::vector< float > &tof, const std::vector< float > &r, const std::vector< float > &phi, const std::vector< float > &eta)
Geom::Phi< T > phi() const
edm::InputTag SiTOBHighSrc_
edm::InputTag PxlBrlHighSrc_
edm::InputTag PxlBrlLowSrc_
unsigned long long EventNumber_t
static const int sdEcalPS
void putMuonCscHits(const std::vector< float > &tof, const std::vector< float > &z, const std::vector< float > &phi, const std::vector< float > &eta)
void putECalHits(const std::vector< float > &e, const std::vector< float > &tof, const std::vector< float > &phi, const std::vector< float > &eta)
void storeMuon(PGlobalSimHit &)
void getManyByType(std::vector< Handle< PROD >> &results) const
edm::InputTag PxlFwdLowSrc_
static const int sdMuonRPC
void storeG4MC(PGlobalSimHit &)
FloatVector MuonRpcFwdPhi
edm::EDGetTokenT< edm::PSimHitContainer > PxlBrlHighSrc_Token_
CaloGeometry const * getGeometry()
edm::InputTag SiTIDLowSrc_
void storeTrk(PGlobalSimHit &)
const Plane & surface() const
The nominal surface of the GeomDet.
FloatVector MuonRpcFwdToF
void beginJob(void) override
edm::EDGetTokenT< edm::PSimHitContainer > PxlFwdHighSrc_Token_
edm::InputTag SiTECHighSrc_
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
edm::EDGetTokenT< edm::PSimHitContainer > SiTIBLowSrc_Token_
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
void fillMuon(edm::Event &, const edm::EventSetup &)
void putG4Trk(const std::vector< float > &pt, const std::vector< float > &e)
edm::EDGetTokenT< edm::PCaloHitContainer > HCalSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > MuonCscSrc_Token_
GlobalHitsProducer(const edm::ParameterSet &)
static const int sdPxlBrl
FloatVector MuonRpcBrlToF
void putSiBrlHits(const std::vector< float > &tof, const std::vector< float > &r, const std::vector< float > &phi, const std::vector< float > &eta)
static const int sdMuonCSC
void putPxlFwdHits(const std::vector< float > &tof, const std::vector< float > &z, const std::vector< float > &phi, const std::vector< float > &eta)
static const int sdEcalFwd
void fillTrk(edm::Event &, const edm::EventSetup &)
edm::InputTag SiTIBLowSrc_
edm::EDGetTokenT< edm::PSimHitContainer > SiTIDLowSrc_Token_
edm::InputTag SiTECLowSrc_
static const int sdEcalBrl
static const int sdMuonRPCRgnFwdp
static const int sdMuonRPCRgnBrl
edm::InputTag SiTIDHighSrc_
edm::EDGetTokenT< edm::PSimHitContainer > SiTOBLowSrc_Token_
void putSiFwdHits(const std::vector< float > &tof, const std::vector< float > &z, const std::vector< float > &phi, const std::vector< float > &eta)
edm::EDGetTokenT< edm::SimTrackContainer > G4TrkSrc_Token_
edm::InputTag PxlFwdHighSrc_
GlobalPoint getPosition(const DetId &id) const
edm::EDGetTokenT< edm::PCaloHitContainer > ECalESSrc_Token_
FloatVector MuonRpcFwdEta
edm::EDGetTokenT< edm::PSimHitContainer > SiTOBHighSrc_Token_
void putPreShHits(const std::vector< float > &e, const std::vector< float > &tof, const std::vector< float > &phi, const std::vector< float > &eta)
const HepMC::GenEvent * GetEvent() const
BranchDescription const & branchDescription() const
void fillECal(edm::Event &, const edm::EventSetup &)
void fillHCal(edm::Event &, const edm::EventSetup &)
std::vector< SimVertex > SimVertexContainer
edm::EDGetTokenT< edm::PSimHitContainer > SiTIDHighSrc_Token_
static const int sdHcalFwd
FloatVector MuonRpcBrlEta
static const int sdHcalBrl
void storeHCal(PGlobalSimHit &)
edm::InputTag SiTOBLowSrc_
edm::EDGetTokenT< edm::PSimHitContainer > PxlFwdLowSrc_Token_
edm::EDGetTokenT< edm::PSimHitContainer > MuonDtSrc_Token_
const GeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
edm::EDGetTokenT< edm::PSimHitContainer > PxlBrlLowSrc_Token_
edm::EDGetTokenT< edm::SimVertexContainer > G4VtxSrc_Token_
T perp() const
Magnitude of transverse component.
edm::EDGetTokenT< edm::PCaloHitContainer > ECalEBSrc_Token_
edm::EDGetTokenT< edm::PCaloHitContainer > ECalEESrc_Token_
void putPxlBrlHits(const std::vector< float > &tof, const std::vector< float > &r, const std::vector< float > &phi, const std::vector< float > &eta)
void putRawGenPart(int n)
~GlobalHitsProducer() override
void putG4Vtx(const std::vector< float > &x, const std::vector< float > &y, const std::vector< float > &z)
void fillG4MC(edm::Event &)
void putMuonDtHits(const std::vector< float > &tof, const std::vector< float > &r, const std::vector< float > &phi, const std::vector< float > &eta)
std::vector< PSimHit > PSimHitContainer
edm::EDGetTokenT< edm::PSimHitContainer > SiTECLowSrc_Token_
FloatVector MuonRpcBrlPhi
static const int sdPxlFwd
const DTLayer * layer(const DTLayerId &id) const
Return a layer given its id.
edm::InputTag SiTIBHighSrc_
std::vector< SimTrack > SimTrackContainer
edm::InputTag MuonRpcSrc_
static const int sdHcalEC
Provenance const * provenance() const
void getAllStableProvenance(std::vector< StableProvenance const * > &provenances) const
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.