15 getAllProvenances(
false), printProvenanceInfo(
false), nRawGenPart(0),
16 G4VtxSrc_(iPSet.getParameter<edm::InputTag>(
"G4VtxSrc")),
17 G4TrkSrc_(iPSet.getParameter<edm::InputTag>(
"G4TrkSrc")),
26 std::string MsgLoggerCat =
"GlobalHitsProducer_GlobalHitsProducer";
37 m_Prov.getUntrackedParameter<
bool>(
"GetAllProvenances");
39 m_Prov.getUntrackedParameter<
bool>(
"PrintProvenanceInfo");
71 produces<PGlobalSimHit>(
label);
76 <<
"\n===============================\n"
77 <<
"Initialized as EDProducer with parameter values:\n"
78 <<
" Name = " <<
fName <<
"\n"
79 <<
" Verbosity = " << verbosity <<
"\n"
80 <<
" Frequency = " << frequency <<
"\n"
81 <<
" VtxUnit = " << vtxunit <<
"\n"
82 <<
" Label = " << label <<
"\n"
83 <<
" GetProv = " << getAllProvenances <<
"\n"
84 <<
" PrintProv = " << printProvenanceInfo <<
"\n"
85 <<
" PxlBrlLowSrc = " << PxlBrlLowSrc_.label()
86 <<
":" << PxlBrlLowSrc_.instance() <<
"\n"
87 <<
" PxlBrlHighSrc = " << PxlBrlHighSrc_.
label()
88 <<
":" << PxlBrlHighSrc_.
instance() <<
"\n"
89 <<
" PxlFwdLowSrc = " << PxlFwdLowSrc_.
label()
90 <<
":" << PxlBrlLowSrc_.instance() <<
"\n"
91 <<
" PxlFwdHighSrc = " << PxlFwdHighSrc_.
label()
92 <<
":" << PxlBrlHighSrc_.
instance() <<
"\n"
93 <<
" SiTIBLowSrc = " << SiTIBLowSrc_.
label()
94 <<
":" << SiTIBLowSrc_.
instance() <<
"\n"
95 <<
" SiTIBHighSrc = " << SiTIBHighSrc_.
label()
96 <<
":" << SiTIBHighSrc_.
instance() <<
"\n"
97 <<
" SiTOBLowSrc = " << SiTOBLowSrc_.
label()
98 <<
":" << SiTOBLowSrc_.
instance() <<
"\n"
99 <<
" SiTOBHighSrc = " << SiTOBHighSrc_.
label()
100 <<
":" << SiTOBHighSrc_.
instance() <<
"\n"
101 <<
" SiTIDLowSrc = " << SiTIDLowSrc_.
label()
102 <<
":" << SiTIDLowSrc_.
instance() <<
"\n"
103 <<
" SiTIDHighSrc = " << SiTIDHighSrc_.
label()
104 <<
":" << SiTIDHighSrc_.
instance() <<
"\n"
105 <<
" SiTECLowSrc = " << SiTECLowSrc_.
label()
106 <<
":" << SiTECLowSrc_.
instance() <<
"\n"
107 <<
" SiTECHighSrc = " << SiTECHighSrc_.
label()
108 <<
":" << SiTECHighSrc_.
instance() <<
"\n"
109 <<
" MuonCscSrc = " << MuonCscSrc_.
label()
110 <<
":" << MuonCscSrc_.
instance() <<
"\n"
111 <<
" MuonDtSrc = " << MuonDtSrc_.
label()
112 <<
":" << MuonDtSrc_.
instance() <<
"\n"
113 <<
" MuonRpcSrc = " << MuonRpcSrc_.
label()
114 <<
":" << MuonRpcSrc_.
instance() <<
"\n"
115 <<
" ECalEBSrc = " << ECalEBSrc_.
label()
116 <<
":" << ECalEBSrc_.
instance() <<
"\n"
117 <<
" ECalEESrc = " << ECalEESrc_.
label()
118 <<
":" << ECalEESrc_.
instance() <<
"\n"
119 <<
" ECalESSrc = " << ECalESSrc_.
label()
120 <<
":" << ECalESSrc_.
instance() <<
"\n"
121 <<
" HCalSrc = " << HCalSrc_.
label()
122 <<
":" << HCalSrc_.
instance() <<
"\n"
123 <<
"===============================\n";
142 std::string MsgLoggerCat =
"GlobalHitsProducer_endJob";
145 <<
"Terminating having processed " <<
count <<
" events.";
152 std::string MsgLoggerCat =
"GlobalHitsProducer_produce";
158 int nrun = iEvent.
id().
run();
163 <<
"Processing run " << nrun <<
", event " << nevt
164 <<
" (" <<
count <<
" events total)";
168 <<
"Processing run " << nrun <<
", event " << nevt
169 <<
" (" <<
count <<
" events total)";
179 std::vector<const edm::Provenance*> AllProv;
184 <<
"Number of Provenances = " << AllProv.size();
187 TString eventout(
"\nProvenance info:\n");
189 for (
unsigned int i = 0;
i < AllProv.size(); ++
i) {
190 eventout +=
"\n ******************************";
191 eventout +=
"\n Module : ";
192 eventout += AllProv[
i]->moduleLabel();
193 eventout +=
"\n ProductID : ";
194 eventout += AllProv[
i]->productID().id();
195 eventout +=
"\n ClassName : ";
196 eventout += AllProv[
i]->className();
197 eventout +=
"\n InstanceName : ";
198 eventout += AllProv[
i]->productInstanceName();
199 eventout +=
"\n BranchName : ";
200 eventout += AllProv[
i]->branchName();
202 eventout +=
"\n ******************************\n";
223 <<
"Done gathering data from event.";
230 <<
"Saving event contents:";
254 std::string MsgLoggerCat =
"GlobalHitsProducer_fillG4MC";
258 eventout =
"\nGathering info:";
264 std::vector<edm::Handle<edm::HepMCProduct> > AllHepMCEvt;
269 for (
unsigned int i = 0;
i < AllHepMCEvt.size(); ++
i) {
270 HepMCEvt = AllHepMCEvt[
i];
277 <<
"Unable to find HepMCProduct in event!";
280 eventout +=
"\n Using HepMCProduct: ";
283 const HepMC::GenEvent* MCEvt = HepMCEvt->GetEvent();
287 eventout +=
"\n Number of Raw Particles collected:......... ";
301 if (!G4VtxContainer.
isValid()) {
303 <<
"Unable to find SimVertex in event!";
307 edm::SimVertexContainer::const_iterator itVtx;
308 for (itVtx = G4VtxContainer->begin(); itVtx != G4VtxContainer->end();
314 itVtx->position().y(),
315 itVtx->position().z(),
316 itVtx->position().e());
318 G4Vtx1.GetCoordinates(G4Vtx);
320 G4VtxX.push_back((G4Vtx[0]*unit)/micrometer);
321 G4VtxY.push_back((G4Vtx[1]*unit)/micrometer);
322 G4VtxZ.push_back((G4Vtx[2]*unit)/millimeter);
326 eventout +=
"\n Number of G4Vertices collected:............ ";
335 if (!G4TrkContainer.
isValid()) {
337 <<
"Unable to find SimTrack in event!";
341 edm::SimTrackContainer::const_iterator itTrk;
342 for (itTrk = G4TrkContainer->begin(); itTrk != G4TrkContainer->end();
348 itTrk->momentum().y(),
349 itTrk->momentum().z(),
350 itTrk->momentum().e());
352 G4Trk1.GetCoordinates(G4Trk);
354 G4TrkPt.push_back(
sqrt(G4Trk[0]*G4Trk[0]+G4Trk[1]*G4Trk[1]));
355 G4TrkE.push_back(G4Trk[3]);
359 eventout +=
"\n Number of G4Tracks collected:.............. ";
371 std::string MsgLoggerCat =
"GlobalHitsProducer_storeG4MC";
374 TString eventout(
"\n nRawGenPart = ");
376 eventout +=
"\n nG4Vtx = ";
377 eventout +=
G4VtxX.size();
378 for (
unsigned int i = 0;
i <
G4VtxX.size(); ++
i) {
379 eventout +=
"\n (x,y,z) = (";
387 eventout +=
"\n nG4Trk = ";
389 for (
unsigned int i = 0;
i <
G4TrkPt.size(); ++
i) {
390 eventout +=
"\n (pt,e) = (";
409 std::string MsgLoggerCat =
"GlobalHitsProducer_fillTrk";
413 eventout =
"\nGathering info:";
418 if (!theTrackerGeometry.
isValid()) {
420 <<
"Unable to find TrackerDigiGeometryRecord in event!";
426 edm::PSimHitContainer::const_iterator itHit;
435 if (!PxlBrlLowContainer.
isValid()) {
437 <<
"Unable to find TrackerHitsPixelBarrelLowTof in event!";
443 if (!PxlBrlHighContainer.
isValid()) {
445 <<
"Unable to find TrackerHitsPixelBarrelHighTof in event!";
449 thePxlBrlHits.insert(thePxlBrlHits.end(),PxlBrlLowContainer->begin(),
450 PxlBrlLowContainer->end());
451 thePxlBrlHits.insert(thePxlBrlHits.end(),PxlBrlHighContainer->begin(),
452 PxlBrlHighContainer->end());
456 for (itHit = thePxlBrlHits.begin(); itHit != thePxlBrlHits.end(); ++itHit) {
461 DetId theDetUnitId(itHit->detUnitId());
462 int detector = theDetUnitId.
det();
463 int subdetector = theDetUnitId.subdetId();
473 <<
"Unable to get GeomDetUnit from PxlBrlHits for Hit " <<
i;
484 PxlBrlR.push_back(bSurface.toGlobal(itHit->localPosition()).
perp());
485 PxlBrlPhi.push_back(bSurface.toGlobal(itHit->localPosition()).
phi());
486 PxlBrlEta.push_back(bSurface.toGlobal(itHit->localPosition()).
eta());
490 <<
"PxlBrl PSimHit " << i
491 <<
" is expected to be (det,subdet) = ("
493 <<
"); value returned is: ("
494 << detector <<
"," << subdetector <<
")";
500 eventout +=
"\n Number of Pixel Barrel Hits collected:..... ";
511 if (!PxlFwdLowContainer.
isValid()) {
513 <<
"Unable to find TrackerHitsPixelEndcapLowTof in event!";
519 if (!PxlFwdHighContainer.
isValid()) {
521 <<
"Unable to find TrackerHitsPixelEndcapHighTof in event!";
525 thePxlFwdHits.insert(thePxlFwdHits.end(),PxlFwdLowContainer->begin(),
526 PxlFwdLowContainer->end());
527 thePxlFwdHits.insert(thePxlFwdHits.end(),PxlFwdHighContainer->begin(),
528 PxlFwdHighContainer->end());
532 for (itHit = thePxlFwdHits.begin(); itHit != thePxlFwdHits.end(); ++itHit) {
537 DetId theDetUnitId(itHit->detUnitId());
538 int detector = theDetUnitId.
det();
539 int subdetector = theDetUnitId.subdetId();
549 <<
"Unable to get GeomDetUnit from PxlFwdHits for Hit " <<
i;;
560 PxlFwdZ.push_back(bSurface.toGlobal(itHit->localPosition()).
z());
561 PxlFwdPhi.push_back(bSurface.toGlobal(itHit->localPosition()).
phi());
562 PxlFwdEta.push_back(bSurface.toGlobal(itHit->localPosition()).
eta());
565 <<
"PxlFwd PSimHit " << i
566 <<
" is expected to be (det,subdet) = ("
568 <<
"); value returned is: ("
569 << detector <<
"," << subdetector <<
")";
575 eventout +=
"\n Number of Pixel Forward Hits collected:.... ";
586 if (!SiTIBLowContainer.
isValid()) {
588 <<
"Unable to find TrackerHitsTIBLowTof in event!";
594 if (!SiTIBHighContainer.
isValid()) {
596 <<
"Unable to find TrackerHitsTIBHighTof in event!";
602 if (!SiTOBLowContainer.
isValid()) {
604 <<
"Unable to find TrackerHitsTOBLowTof in event!";
610 if (!SiTOBHighContainer.
isValid()) {
612 <<
"Unable to find TrackerHitsTOBHighTof in event!";
616 theSiBrlHits.insert(theSiBrlHits.end(),SiTIBLowContainer->begin(),
617 SiTIBLowContainer->end());
618 theSiBrlHits.insert(theSiBrlHits.end(),SiTIBHighContainer->begin(),
619 SiTIBHighContainer->end());
620 theSiBrlHits.insert(theSiBrlHits.end(),SiTOBLowContainer->begin(),
621 SiTOBLowContainer->end());
622 theSiBrlHits.insert(theSiBrlHits.end(),SiTOBHighContainer->begin(),
623 SiTOBHighContainer->end());
627 for (itHit = theSiBrlHits.begin(); itHit != theSiBrlHits.end(); ++itHit) {
632 DetId theDetUnitId(itHit->detUnitId());
633 int detector = theDetUnitId.
det();
634 int subdetector = theDetUnitId.subdetId();
637 if ((detector ==
dTrk) &&
646 <<
"Unable to get GeomDetUnit from SiBrlHits for Hit " <<
i;
657 SiBrlR.push_back(bSurface.toGlobal(itHit->localPosition()).
perp());
658 SiBrlPhi.push_back(bSurface.toGlobal(itHit->localPosition()).
phi());
659 SiBrlEta.push_back(bSurface.toGlobal(itHit->localPosition()).
eta());
662 <<
"SiBrl PSimHit " << i
663 <<
" is expected to be (det,subdet) = ("
665 <<
" || " <<
sdSiTOB <<
"); value returned is: ("
666 << detector <<
"," << subdetector <<
")";
672 eventout +=
"\n Number of Silicon Barrel Hits collected:... ";
683 if (!SiTIDLowContainer.
isValid()) {
685 <<
"Unable to find TrackerHitsTIDLowTof in event!";
691 if (!SiTIDHighContainer.
isValid()) {
693 <<
"Unable to find TrackerHitsTIDHighTof in event!";
699 if (!SiTECLowContainer.
isValid()) {
701 <<
"Unable to find TrackerHitsTECLowTof in event!";
707 if (!SiTECHighContainer.
isValid()) {
709 <<
"Unable to find TrackerHitsTECHighTof in event!";
713 theSiFwdHits.insert(theSiFwdHits.end(),SiTIDLowContainer->begin(),
714 SiTIDLowContainer->end());
715 theSiFwdHits.insert(theSiFwdHits.end(),SiTIDHighContainer->begin(),
716 SiTIDHighContainer->end());
717 theSiFwdHits.insert(theSiFwdHits.end(),SiTECLowContainer->begin(),
718 SiTECLowContainer->end());
719 theSiFwdHits.insert(theSiFwdHits.end(),SiTECHighContainer->begin(),
720 SiTECHighContainer->end());
724 for (itHit = theSiFwdHits.begin(); itHit != theSiFwdHits.end(); ++itHit) {
729 DetId theDetUnitId(itHit->detUnitId());
730 int detector = theDetUnitId.
det();
731 int subdetector = theDetUnitId.subdetId();
734 if ((detector ==
dTrk) &&
743 <<
"Unable to get GeomDetUnit from SiFwdHits Hit " <<
i;
754 SiFwdZ.push_back(bSurface.toGlobal(itHit->localPosition()).
z());
755 SiFwdPhi.push_back(bSurface.toGlobal(itHit->localPosition()).
phi());
756 SiFwdEta.push_back(bSurface.toGlobal(itHit->localPosition()).
eta());
759 <<
"SiFwd PSimHit " << i
760 <<
" is expected to be (det,subdet) = ("
762 <<
" || " <<
sdSiTEC <<
"); value returned is: ("
763 << detector <<
"," << subdetector <<
")";
769 eventout +=
"\n Number of Silicon Forward Hits collected:.. ";
781 std::string MsgLoggerCat =
"GlobalHitsProducer_storeTrk";
784 TString eventout(
"\n nPxlBrlHits = ");
787 eventout +=
"\n (tof,r,phi,eta) = (";
797 eventout +=
"\n nPxlFwdHits = ";
800 eventout +=
"\n (tof,z,phi,eta) = (";
810 eventout +=
"\n nSiBrlHits = ";
812 for (
unsigned int i = 0;
i <
SiBrlToF.size(); ++
i) {
813 eventout +=
"\n (tof,r,phi,eta) = (";
823 eventout +=
"\n nSiFwdHits = ";
825 for (
unsigned int i = 0;
i <
SiFwdToF.size(); ++
i) {
826 eventout +=
"\n (tof,z,phi,eta) = (";
850 std::string MsgLoggerCat =
"GlobalHitsProducer_fillMuon";
854 eventout =
"\nGathering info:";
857 edm::PSimHitContainer::const_iterator itHit;
866 if (!theCSCGeometry.
isValid()) {
868 <<
"Unable to find MuonGeometryRecord for the CSCGeometry in event!";
876 if (!MuonCSCContainer.
isValid()) {
878 <<
"Unable to find MuonCSCHits in event!";
884 for (itHit = MuonCSCContainer->begin(); itHit != MuonCSCContainer->end();
890 DetId theDetUnitId(itHit->detUnitId());
891 int detector = theDetUnitId.
det();
892 int subdetector = theDetUnitId.subdetId();
895 if ((detector ==
dMuon) &&
903 <<
"Unable to get GeomDetUnit from theCSCMuon for hit " <<
i;
914 MuonCscZ.push_back(bSurface.toGlobal(itHit->localPosition()).
z());
915 MuonCscPhi.push_back(bSurface.toGlobal(itHit->localPosition()).
phi());
916 MuonCscEta.push_back(bSurface.toGlobal(itHit->localPosition()).
eta());
919 <<
"MuonCsc PSimHit " << i
920 <<
" is expected to be (det,subdet) = ("
922 <<
"); value returned is: ("
923 << detector <<
"," << subdetector <<
")";
929 eventout +=
"\n Number of CSC muon Hits collected:......... ";
940 if (!theDTGeometry.
isValid()) {
942 <<
"Unable to find MuonGeometryRecord for the DTGeometry in event!";
950 if (!MuonDtContainer.
isValid()) {
952 <<
"Unable to find MuonDTHits in event!";
958 for (itHit = MuonDtContainer->begin(); itHit != MuonDtContainer->end();
964 DetId theDetUnitId(itHit->detUnitId());
965 int detector = theDetUnitId.
det();
966 int subdetector = theDetUnitId.subdetId();
969 if ((detector ==
dMuon) &&
974 DTWireId wireId(itHit->detUnitId());
977 const DTLayer *theDet = theDTMuon.
layer(wireId.layerId());
981 <<
"Unable to get GeomDetUnit from theDtMuon for hit " <<
i;
988 const BoundPlane& bSurface = theDet->surface();
992 MuonDtR.push_back(bSurface.toGlobal(itHit->localPosition()).
perp());
993 MuonDtPhi.push_back(bSurface.toGlobal(itHit->localPosition()).
phi());
994 MuonDtEta.push_back(bSurface.toGlobal(itHit->localPosition()).
eta());
997 <<
"MuonDt PSimHit " << i
998 <<
" is expected to be (det,subdet) = ("
1000 <<
"); value returned is: ("
1001 << detector <<
"," << subdetector <<
")";
1007 eventout +=
"\n Number of DT muon Hits collected:.......... ";
1019 if (!theRPCGeometry.
isValid()) {
1021 <<
"Unable to find MuonGeometryRecord for the RPCGeometry in event!";
1029 if (!MuonRPCContainer.
isValid()) {
1031 <<
"Unable to find MuonRPCHits in event!";
1037 int RPCBrl =0, RPCFwd = 0;
1038 for (itHit = MuonRPCContainer->begin(); itHit != MuonRPCContainer->end();
1044 DetId theDetUnitId(itHit->detUnitId());
1045 int detector = theDetUnitId.
det();
1046 int subdetector = theDetUnitId.subdetId();
1049 if ((detector ==
dMuon) &&
1053 RPCDetId RPCId(itHit->detUnitId());
1056 int region = RPCId.
region();
1063 <<
"Unable to get GeomDetUnit from theRPCMuon for hit " <<
i;
1077 MuonRpcFwdZ.push_back(bSurface.toGlobal(itHit->localPosition()).
z());
1079 push_back(bSurface.toGlobal(itHit->localPosition()).
phi());
1081 push_back(bSurface.toGlobal(itHit->localPosition()).
eta());
1087 push_back(bSurface.toGlobal(itHit->localPosition()).
perp());
1089 push_back(bSurface.toGlobal(itHit->localPosition()).
phi());
1091 push_back(bSurface.toGlobal(itHit->localPosition()).
eta());
1094 <<
"Invalid region for RPC Muon hit" <<
i;
1099 <<
"MuonRpc PSimHit " << i
1100 <<
" is expected to be (det,subdet) = ("
1102 <<
"); value returned is: ("
1103 << detector <<
"," << subdetector <<
")";
1109 eventout +=
"\n Number of RPC muon Hits collected:......... ";
1111 eventout +=
"\n RPC Barrel muon Hits:............ ";
1113 eventout +=
"\n RPC Forward muon Hits:........... ";
1125 std::string MsgLoggerCat =
"GlobalHitsProducer_storeMuon";
1128 TString eventout(
"\n nMuonCSCHits = ");
1131 eventout +=
"\n (tof,z,phi,eta) = (";
1141 eventout +=
"\n nMuonDtHits = ";
1144 eventout +=
"\n (tof,r,phi,eta) = (";
1154 eventout +=
"\n nMuonRpcBrlHits = ";
1157 eventout +=
"\n (tof,r,phi,eta) = (";
1167 eventout +=
"\n nMuonRpcFwdHits = ";
1170 eventout +=
"\n (tof,z,phi,eta) = (";
1196 std::string MsgLoggerCat =
"GlobalHitsProducer_fillECal";
1200 eventout =
"\nGathering info:";
1205 if (!theCaloGeometry.
isValid()) {
1207 <<
"Unable to find CaloGeometryRecord in event!";
1213 edm::PCaloHitContainer::const_iterator itHit;
1224 <<
"Unable to find EcalHitsEB in event!";
1232 <<
"Unable to find EcalHitsEE in event!";
1236 theECalHits.insert(theECalHits.end(),EBContainer->begin(),
1237 EBContainer->end());
1238 theECalHits.insert(theECalHits.end(),EEContainer->begin(),
1239 EEContainer->end());
1243 for (itHit = theECalHits.begin(); itHit != theECalHits.end(); ++itHit) {
1248 DetId theDetUnitId(itHit->id());
1249 int detector = theDetUnitId.
det();
1250 int subdetector = theDetUnitId.subdetId();
1253 if ((detector ==
dEcal) &&
1259 getSubdetectorGeometry(theDetUnitId)->
getGeometry(theDetUnitId);
1263 <<
"Unable to get CaloCellGeometry from ECalHits for Hit " <<
i;
1273 ECalE.push_back(itHit->energy());
1274 ECalToF.push_back(itHit->time());
1280 <<
"ECal PCaloHit " << i
1281 <<
" is expected to be (det,subdet) = ("
1283 <<
" || " <<
sdEcalFwd <<
"); value returned is: ("
1284 << detector <<
"," << subdetector <<
")";
1290 eventout +=
"\n Number of ECal Hits collected:............. ";
1300 if (!PreShContainer.
isValid()) {
1302 <<
"Unable to find EcalHitsES in event!";
1308 for (itHit = PreShContainer->begin();
1309 itHit != PreShContainer->end(); ++itHit) {
1314 DetId theDetUnitId(itHit->id());
1315 int detector = theDetUnitId.
det();
1316 int subdetector = theDetUnitId.subdetId();
1319 if ((detector ==
dEcal) &&
1324 getSubdetectorGeometry(theDetUnitId)->
getGeometry(theDetUnitId);
1328 <<
"Unable to get CaloCellGeometry from PreShContainer for Hit "
1339 PreShE.push_back(itHit->energy());
1346 <<
"PreSh PCaloHit " << i
1347 <<
" is expected to be (det,subdet) = ("
1349 <<
"); value returned is: ("
1350 << detector <<
"," << subdetector <<
")";
1356 eventout +=
"\n Number of PreSh Hits collected:............ ";
1368 std::string MsgLoggerCat =
"GlobalHitsProducer_storeECal";
1371 TString eventout(
"\n nECalHits = ");
1372 eventout +=
ECalE.size();
1373 for (
unsigned int i = 0;
i <
ECalE.size(); ++
i) {
1374 eventout +=
"\n (e,tof,phi,eta) = (";
1384 eventout +=
"\n nPreShHits = ";
1385 eventout +=
PreShE.size();
1386 for (
unsigned int i = 0;
i <
PreShE.size(); ++
i) {
1387 eventout +=
"\n (e,tof,phi,eta) = (";
1409 std::string MsgLoggerCat =
"GlobalHitsProducer_fillHCal";
1413 eventout =
"\nGathering info:";
1418 if (!theCaloGeometry.
isValid()) {
1420 <<
"Unable to find CaloGeometryRecord in event!";
1426 edm::PCaloHitContainer::const_iterator itHit;
1434 if (!HCalContainer.
isValid()) {
1436 <<
"Unable to find HCalHits in event!";
1442 for (itHit = HCalContainer->begin();
1443 itHit != HCalContainer->end(); ++itHit) {
1448 DetId theDetUnitId(itHit->id());
1449 int detector = theDetUnitId.
det();
1450 int subdetector = theDetUnitId.subdetId();
1453 if ((detector ==
dHcal) &&
1461 getSubdetectorGeometry(theDetUnitId)->
getGeometry(theDetUnitId);
1465 <<
"Unable to get CaloCellGeometry from HCalContainer for Hit " <<
i;
1475 HCalE.push_back(itHit->energy());
1476 HCalToF.push_back(itHit->time());
1482 <<
"HCal PCaloHit " << i
1483 <<
" is expected to be (det,subdet) = ("
1486 <<
"); value returned is: ("
1487 << detector <<
"," << subdetector <<
")";
1493 eventout +=
"\n Number of HCal Hits collected:............. ";
1505 std::string MsgLoggerCat =
"GlobalHitsProducer_storeHCal";
1508 TString eventout(
"\n nHCalHits = ");
1509 eventout +=
HCalE.size();
1510 for (
unsigned int i = 0;
i <
HCalE.size(); ++
i) {
1511 eventout +=
"\n (e,tof,phi,eta) = (";
1531 std::string MsgLoggerCat =
"GlobalHitsProducer_clear";
1535 <<
"Clearing event holders";
void storeECal(PGlobalSimHit &)
void getManyByType(std::vector< Handle< PROD > > &results) const
virtual ~GlobalHitsProducer()
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
std::vector< PCaloHit > PCaloHitContainer
static const int sdMuonRPCRgnFwdn
virtual 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
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
edm::InputTag MuonCscSrc_
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_
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 &)
edm::InputTag PxlFwdLowSrc_
static const int sdMuonRPC
void storeG4MC(PGlobalSimHit &)
FloatVector MuonRpcFwdPhi
edm::InputTag SiTIDLowSrc_
void storeTrk(PGlobalSimHit &)
const Plane & surface() const
The nominal surface of the GeomDet.
FloatVector MuonRpcFwdToF
const DTLayer * layer(DTLayerId id) const
Return a layer given its id.
edm::InputTag SiTECHighSrc_
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
void fillMuon(edm::Event &, const edm::EventSetup &)
void putG4Trk(const std::vector< float > &pt, const std::vector< float > &e)
GlobalHitsProducer(const edm::ParameterSet &)
static const int sdPxlBrl
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
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::InputTag SiTECLowSrc_
static const int sdEcalBrl
BranchDescription const & product() const
static const int sdMuonRPCRgnFwdp
static const int sdMuonRPCRgnBrl
edm::InputTag SiTIDHighSrc_
void putSiFwdHits(const std::vector< float > &tof, const std::vector< float > &z, const std::vector< float > &phi, const std::vector< float > &eta)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
edm::InputTag PxlFwdHighSrc_
FloatVector MuonRpcFwdEta
virtual void beginJob(void)
void putPreShHits(const std::vector< float > &e, const std::vector< float > &tof, const std::vector< float > &phi, const std::vector< float > &eta)
void fillECal(edm::Event &, const edm::EventSetup &)
void fillHCal(edm::Event &, const edm::EventSetup &)
static const int sdHcalFwd
FloatVector MuonRpcBrlEta
static const int sdHcalBrl
void storeHCal(PGlobalSimHit &)
edm::InputTag SiTOBLowSrc_
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
T perp() const
Magnitude of transverse component.
void putPxlBrlHits(const std::vector< float > &tof, const std::vector< float > &r, const std::vector< float > &phi, const std::vector< float > &eta)
const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id.
void putRawGenPart(int n)
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
FloatVector MuonRpcBrlPhi
static const int sdPxlFwd
Detector det() const
get the detector field from this detid
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
edm::InputTag SiTIBHighSrc_
edm::InputTag MuonRpcSrc_
static const int sdHcalEC
Provenance const * provenance() const
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.