25 consumesMany<edm::HepMCProduct>();
26 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_GlobalHitsAnalyzer";
36 m_Prov.getUntrackedParameter<
bool>(
"GetAllProvenances");
38 m_Prov.getUntrackedParameter<
bool>(
"PrintProvenanceInfo");
121 if (verbosity >= 0) {
123 <<
"\n===============================\n" 124 <<
"Initialized as EDAnalyzer with parameter values:\n" 125 <<
" Name = " <<
fName <<
"\n" 126 <<
" Verbosity = " << verbosity <<
"\n" 127 <<
" Frequency = " << frequency <<
"\n" 128 <<
" VtxUnit = " << vtxunit <<
"\n" 129 <<
" GetProv = " << getAllProvenances <<
"\n" 130 <<
" PrintProv = " << printProvenanceInfo <<
"\n" 131 <<
" PxlBrlLowSrc = " << PxlBrlLowSrc_.label()
132 <<
":" << PxlBrlLowSrc_.instance() <<
"\n" 133 <<
" PxlBrlHighSrc = " << PxlBrlHighSrc_.
label()
134 <<
":" << PxlBrlHighSrc_.
instance() <<
"\n" 135 <<
" PxlFwdLowSrc = " << PxlFwdLowSrc_.
label()
136 <<
":" << PxlBrlLowSrc_.instance() <<
"\n" 137 <<
" PxlFwdHighSrc = " << PxlFwdHighSrc_.
label()
138 <<
":" << PxlBrlHighSrc_.
instance() <<
"\n" 139 <<
" SiTIBLowSrc = " << SiTIBLowSrc_.
label()
140 <<
":" << SiTIBLowSrc_.
instance() <<
"\n" 141 <<
" SiTIBHighSrc = " << SiTIBHighSrc_.
label()
142 <<
":" << SiTIBHighSrc_.
instance() <<
"\n" 143 <<
" SiTOBLowSrc = " << SiTOBLowSrc_.
label()
144 <<
":" << SiTOBLowSrc_.
instance() <<
"\n" 145 <<
" SiTOBHighSrc = " << SiTOBHighSrc_.
label()
146 <<
":" << SiTOBHighSrc_.
instance() <<
"\n" 147 <<
" SiTIDLowSrc = " << SiTIDLowSrc_.
label()
148 <<
":" << SiTIDLowSrc_.
instance() <<
"\n" 149 <<
" SiTIDHighSrc = " << SiTIDHighSrc_.
label()
150 <<
":" << SiTIDHighSrc_.
instance() <<
"\n" 151 <<
" SiTECLowSrc = " << SiTECLowSrc_.
label()
152 <<
":" << SiTECLowSrc_.
instance() <<
"\n" 153 <<
" SiTECHighSrc = " << SiTECHighSrc_.
label()
154 <<
":" << SiTECHighSrc_.
instance() <<
"\n" 155 <<
" MuonCscSrc = " << MuonCscSrc_.
label()
156 <<
":" << MuonCscSrc_.
instance() <<
"\n" 157 <<
" MuonDtSrc = " << MuonDtSrc_.
label()
158 <<
":" << MuonDtSrc_.
instance() <<
"\n" 159 <<
" MuonRpcSrc = " << MuonRpcSrc_.
label()
160 <<
":" << MuonRpcSrc_.
instance() <<
"\n" 161 <<
" ECalEBSrc = " << ECalEBSrc_.
label()
162 <<
":" << ECalEBSrc_.
instance() <<
"\n" 163 <<
" ECalEESrc = " << ECalEESrc_.
label()
164 <<
":" << ECalEESrc_.
instance() <<
"\n" 165 <<
" ECalESSrc = " << ECalESSrc_.
label()
166 <<
":" << ECalESSrc_.
instance() <<
"\n" 167 <<
" HCalSrc = " << HCalSrc_.
label()
168 <<
":" << HCalSrc_.
instance() <<
"\n" 170 <<
" validHepMCevt = " 172 <<
" validG4VtxContainer = " 173 <<
":" << validG4VtxContainer <<
"\n" 174 <<
" validG4trkContainer = " 175 <<
":" << validG4trkContainer <<
"\n" 176 <<
" validPxlBrlLow = " 177 <<
":" << validPxlBrlLow <<
"\n" 178 <<
" validPxlBrlHigh = " 179 <<
":" << validPxlBrlHigh <<
"\n" 180 <<
" validPxlFwdLow = " 181 <<
":" << validPxlFwdLow <<
"\n" 182 <<
" validPxlFwdHigh = " 183 <<
":" << validPxlFwdHigh <<
"\n" 184 <<
" validSiTIBLow = " 185 <<
":" << validSiTIBLow <<
"\n" 186 <<
" validSiTIBHigh = " 187 <<
":" << validSiTIBHigh <<
"\n" 188 <<
" validSiTOBLow = " 189 <<
":" << validSiTOBLow <<
"\n" 190 <<
" validSiTOBHigh = " 191 <<
":" << validSiTOBHigh <<
"\n" 192 <<
" validSiTIDLow = " 193 <<
":" << validSiTIDLow <<
"\n" 194 <<
" validSiTIDHigh = " 195 <<
":" << validSiTIDHigh <<
"\n" 196 <<
" validSiTECLow = " 197 <<
":" << validSiTECLow <<
"\n" 198 <<
" validSiTECHigh = " 199 <<
":" << validSiTECHigh <<
"\n" 200 <<
" validMuonCSC = " 201 <<
":" << validMuonCSC <<
"\n" 203 <<
":" << validMuonDt <<
"\n" 204 <<
" validMuonRPC = " 205 <<
":" << validMuonRPC <<
"\n" 207 <<
":" << validEB <<
"\n" 209 <<
":" << validEE <<
"\n" 211 <<
":" << validPresh <<
"\n" 213 <<
":" << validHcal <<
"\n" 214 <<
"===============================\n";
218 for (Int_t
i = 0;
i < 2; ++
i) {
284 sprintf(hname,
"hMCRGP1");
285 sprintf(htitle,
"RawGenParticles");
287 sprintf(hname,
"hMCRGP2");
289 for (Int_t
i = 0;
i < 2; ++
i) {
294 sprintf(hname,
"hMCG4Vtx1");
295 sprintf(htitle,
"G4 Vertices");
297 sprintf(hname,
"hMCG4Vtx2");
299 for (Int_t
i = 0;
i < 2; ++
i) {
304 sprintf(hname,
"hMCG4Trk1");
305 sprintf(htitle,
"G4 Tracks");
307 sprintf(hname,
"hMCG4Trk2");
309 for (Int_t
i = 0;
i < 2; ++
i) {
314 sprintf(hname,
"hGeantVtxX1");
315 sprintf(htitle,
"Geant vertex x/micrometer");
317 sprintf(hname,
"hGeantVtxX2");
319 for (Int_t
i = 0;
i < 2; ++
i) {
324 sprintf(hname,
"hGeantVtxY1");
325 sprintf(htitle,
"Geant vertex y/micrometer");
327 sprintf(hname,
"hGeantVtxY2");
329 for (Int_t
i = 0;
i < 2; ++
i) {
334 sprintf(hname,
"hGeantVtxZ1");
335 sprintf(htitle,
"Geant vertex z/millimeter");
337 sprintf(hname,
"hGeantVtxZ2");
340 for (Int_t
i = 0;
i < 2; ++
i) {
345 sprintf(hname,
"hGeantTrkPt");
346 sprintf(htitle,
"Log10 Geant track pt/GeV");
351 sprintf(hname,
"hGeantTrkE");
352 sprintf(htitle,
"Log10 Geant track E/GeV");
357 sprintf(hname,
"hGeantVtxEta");
358 sprintf(htitle,
"Geant vertices eta");
363 sprintf(hname,
"hGeantVtxPhi");
364 sprintf(htitle,
"Geant vertices phi/rad");
369 sprintf(hname,
"hGeantVtxRad1");
370 sprintf(htitle,
"Geant vertices radius/cm");
372 sprintf(hname,
"hGeantVtxRad2");
374 for (Int_t
i = 0;
i < 2; ++
i) {
379 sprintf(hname,
"hGeantVtxMulti");
380 sprintf(htitle,
"Geant vertices outgoing multiplicity");
387 sprintf(hname,
"hCaloEcal1");
388 sprintf(htitle,
"Ecal hits");
390 sprintf(hname,
"hCaloEcal2");
393 sprintf(hname,
"hCaloEcalE1");
394 sprintf(htitle,
"Ecal hits, energy/GeV");
396 sprintf(hname,
"hCaloEcalE2");
398 sprintf(hname,
"hCaloEcalToF1");
399 sprintf(htitle,
"Ecal hits, ToF/ns");
401 sprintf(hname,
"hCaloEcalToF2");
404 for (Int_t
i = 0;
i < 2; ++
i) {
413 sprintf(hname,
"hCaloEcalPhi");
414 sprintf(htitle,
"Ecal hits, phi/rad");
419 sprintf(hname,
"hCaloEcalEta");
420 sprintf(htitle,
"Ecal hits, eta");
425 sprintf(hname,
"hCaloPreSh1");
426 sprintf(htitle,
"PreSh hits");
428 sprintf(hname,
"hCaloPreSh2");
431 sprintf(hname,
"hCaloPreShE1");
432 sprintf(htitle,
"PreSh hits, energy/GeV");
434 sprintf(hname,
"hCaloPreShE2");
437 sprintf(hname,
"hCaloPreShToF1");
438 sprintf(htitle,
"PreSh hits, ToF/ns");
440 sprintf(hname,
"hCaloPreShToF2");
443 for (Int_t
i = 0;
i < 2; ++
i) {
452 sprintf(hname,
"hCaloPreShPhi");
453 sprintf(htitle,
"PreSh hits, phi/rad");
458 sprintf(hname,
"hCaloPreShEta");
459 sprintf(htitle,
"PreSh hits, eta");
466 sprintf(hname,
"hCaloHcal1");
467 sprintf(htitle,
"Hcal hits");
469 sprintf(hname,
"hCaloHcal2");
472 sprintf(hname,
"hCaloHcalE1");
473 sprintf(htitle,
"Hcal hits, energy/GeV");
475 sprintf(hname,
"hCaloHcalE2");
478 sprintf(hname,
"hCaloHcalToF1");
479 sprintf(htitle,
"Hcal hits, ToF/ns");
481 sprintf(hname,
"hCaloHcalToF2");
484 for (Int_t
i = 0;
i < 2; ++
i) {
493 sprintf(hname,
"hCaloHcalPhi");
494 sprintf(htitle,
"Hcal hits, phi/rad");
499 sprintf(hname,
"hCaloHcalEta");
500 sprintf(htitle,
"Hcal hits, eta");
507 sprintf(hname,
"hTrackerPx1");
508 sprintf(htitle,
"Pixel hits");
510 sprintf(hname,
"hTrackerPx2");
512 for (Int_t
i = 0;
i < 2; ++
i) {
517 sprintf(hname,
"hTrackerPxPhi");
518 sprintf(htitle,
"Pixel hits phi/rad");
523 sprintf(hname,
"hTrackerPxEta");
524 sprintf(htitle,
"Pixel hits eta");
529 sprintf(hname,
"hTrackerPxBToF");
530 sprintf(htitle,
"Pixel barrel hits, ToF/ns");
535 sprintf(hname,
"hTrackerPxBR");
536 sprintf(htitle,
"Pixel barrel hits, R/cm");
541 sprintf(hname,
"hTrackerPxFToF");
542 sprintf(htitle,
"Pixel forward hits, ToF/ns");
547 sprintf(hname,
"hTrackerPxFZ");
548 sprintf(htitle,
"Pixel forward hits, Z/cm");
550 iBooker.
book1D(hname,htitle,200,-100.,100.);
556 sprintf(hname,
"hTrackerSi1");
557 sprintf(htitle,
"Silicon hits");
559 sprintf(hname,
"hTrackerSi2");
561 for (Int_t
i = 0;
i < 2; ++
i) {
566 sprintf(hname,
"hTrackerSiPhi");
567 sprintf(htitle,
"Silicon hits phi/rad");
572 sprintf(hname,
"hTrackerSiEta");
573 sprintf(htitle,
"Silicon hits eta");
578 sprintf(hname,
"hTrackerSiBToF");
579 sprintf(htitle,
"Silicon barrel hits, ToF/ns");
584 sprintf(hname,
"hTrackerSiBR");
585 sprintf(htitle,
"Silicon barrel hits, R/cm");
590 sprintf(hname,
"hTrackerSiFToF");
591 sprintf(htitle,
"Silicon forward hits, ToF/ns");
596 sprintf(hname,
"hTrackerSiFZ");
597 sprintf(htitle,
"Silicon forward hits, Z/cm");
604 sprintf(hname,
"hMuon1");
605 sprintf(htitle,
"Muon hits");
607 sprintf(hname,
"hMuon2");
609 for (Int_t
i = 0;
i < 2; ++
i) {
614 sprintf(hname,
"hMuonPhi");
615 sprintf(htitle,
"Muon hits phi/rad");
620 sprintf(hname,
"hMuonEta");
621 sprintf(htitle,
"Muon hits eta");
626 sprintf(hname,
"hMuonCscToF1");
627 sprintf(htitle,
"Muon CSC hits, ToF/ns");
629 sprintf(hname,
"hMuonCscToF2");
631 for (Int_t
i = 0;
i < 2; ++
i) {
636 sprintf(hname,
"hMuonCscZ");
637 sprintf(htitle,
"Muon CSC hits, Z/cm");
642 sprintf(hname,
"hMuonDtToF1");
643 sprintf(htitle,
"Muon DT hits, ToF/ns");
645 sprintf(hname,
"hMuonDtToF2");
647 for (Int_t
i = 0;
i < 2; ++
i) {
652 sprintf(hname,
"hMuonDtR");
653 sprintf(htitle,
"Muon DT hits, R/cm");
658 sprintf(hname,
"hMuonRpcFToF1");
659 sprintf(htitle,
"Muon RPC forward hits, ToF/ns");
661 sprintf(hname,
"hMuonRpcFToF2");
663 for (Int_t
i = 0;
i < 2; ++
i) {
667 sprintf(hname,
"hMuonRpcFZ");
668 sprintf(htitle,
"Muon RPC forward hits, Z/cm");
673 sprintf(hname,
"hMuonRpcBToF1");
674 sprintf(htitle,
"Muon RPC barrel hits, ToF/ns");
676 sprintf(hname,
"hMuonRpcBToF2");
678 for (Int_t
i = 0;
i < 2; ++
i) {
683 sprintf(hname,
"hMuonRpcBR");
684 sprintf(htitle,
"Muon RPC barrel hits, R/cm");
693 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_analyze";
704 <<
"Processing run " << nrun <<
", event " << nevt
705 <<
" (" <<
count <<
" events total)";
709 <<
"Processing run " << nrun <<
", event " << nevt
710 <<
" (" <<
count <<
" events total)";
717 std::vector<const edm::StableProvenance*> AllProv;
722 <<
"Number of Provenances = " << AllProv.size();
725 TString eventout(
"\nProvenance info:\n");
727 for (
unsigned int i = 0;
i < AllProv.size(); ++
i) {
728 eventout +=
"\n ******************************";
729 eventout +=
"\n Module : ";
730 eventout += AllProv[
i]->moduleLabel();
731 eventout +=
"\n ProductID : ";
732 eventout += AllProv[
i]->productID().id();
733 eventout +=
"\n ClassName : ";
734 eventout += AllProv[
i]->className();
735 eventout +=
"\n InstanceName : ";
736 eventout += AllProv[
i]->productInstanceName();
737 eventout +=
"\n BranchName : ";
738 eventout += AllProv[
i]->branchName();
740 eventout +=
"\n ******************************\n";
761 <<
"Done gathering data from event.";
770 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillG4MC";
774 eventout =
"\nGathering info:";
780 std::vector<edm::Handle<edm::HepMCProduct> > AllHepMCEvt;
785 for (
unsigned int i = 0;
i < AllHepMCEvt.size(); ++
i) {
786 HepMCEvt = AllHepMCEvt[
i];
793 <<
"Unable to find HepMCProduct in event!";
796 eventout +=
"\n Using HepMCProduct: ";
805 eventout +=
"\n Number of Raw Particles collected:......... ";
829 if (!G4VtxContainer.
isValid()) {
831 <<
"Unable to find SimVertex in event!";
836 edm::SimVertexContainer::const_iterator itVtx;
837 for (itVtx = G4VtxContainer->begin(); itVtx != G4VtxContainer->end();
843 itVtx->position().y(),
844 itVtx->position().z(),
845 itVtx->position().e());
848 G4Vtx1.GetCoordinates(G4Vtx);
866 if ( G4TrkContainer.
isValid() ) {
867 edm::SimTrackContainer::const_iterator itTrk;
868 for (itTrk = G4TrkContainer->begin(); itTrk != G4TrkContainer->end();
870 if ( (*itTrk).vertIndex() ==
i ) { multi++; }
879 eventout +=
"\n Number of G4Vertices collected:............ ";
891 if (!G4TrkContainer.
isValid()) {
893 <<
"Unable to find SimTrack in event!";
898 edm::SimTrackContainer::const_iterator itTrk;
899 for (itTrk = G4TrkContainer->begin(); itTrk != G4TrkContainer->end();
905 itTrk->momentum().y(),
906 itTrk->momentum().z(),
907 itTrk->momentum().e());
909 G4Trk1.GetCoordinates(G4Trk);
917 eventout +=
"\n Number of G4Tracks collected:.............. ";
936 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillTrk";
940 eventout =
"\nGathering info:";
945 if (!theTrackerGeometry.
isValid()) {
947 <<
"Unable to find TrackerDigiGeometryRecord in event!";
953 edm::PSimHitContainer::const_iterator itHit;
962 if (!PxlBrlLowContainer.
isValid()) {
964 <<
"Unable to find TrackerHitsPixelBarrelLowTof in event!";
970 if (!PxlBrlHighContainer.
isValid()) {
972 <<
"Unable to find TrackerHitsPixelBarrelHighTof in event!";
977 thePxlBrlHits.insert(thePxlBrlHits.end(),PxlBrlLowContainer->begin(),
978 PxlBrlLowContainer->end());
980 thePxlBrlHits.insert(thePxlBrlHits.end(),PxlBrlHighContainer->begin(),
981 PxlBrlHighContainer->end());
985 for (itHit = thePxlBrlHits.begin(); itHit != thePxlBrlHits.end(); ++itHit) {
990 DetId theDetUnitId(itHit->detUnitId());
1002 <<
"Unable to get GeomDetUnit from PxlBrlHits for Hit " <<
i;
1021 <<
"PxlBrl PSimHit " << i
1022 <<
" is expected to be (det,subdet) = (" 1024 <<
"); value returned is: (" 1025 << detector <<
"," << subdetector <<
")";
1031 eventout +=
"\n Number of Pixel Barrel Hits collected:..... ";
1044 if (!PxlFwdLowContainer.
isValid()) {
1046 <<
"Unable to find TrackerHitsPixelEndcapLowTof in event!";
1052 if (!PxlFwdHighContainer.
isValid()) {
1053 LogDebug(
"GlobalHitsAnalyzer_fillTrk")
1054 <<
"Unable to find TrackerHitsPixelEndcapHighTof in event!";
1059 thePxlFwdHits.insert(thePxlFwdHits.end(),PxlFwdLowContainer->begin(),
1060 PxlFwdLowContainer->end());
1062 thePxlFwdHits.insert(thePxlFwdHits.end(),PxlFwdHighContainer->begin(),
1063 PxlFwdHighContainer->end());
1067 for (itHit = thePxlFwdHits.begin(); itHit != thePxlFwdHits.end(); ++itHit) {
1072 DetId theDetUnitId(itHit->detUnitId());
1084 <<
"Unable to get GeomDetUnit from PxlFwdHits for Hit " <<
i;;
1103 <<
"PxlFwd PSimHit " << i
1104 <<
" is expected to be (det,subdet) = (" 1106 <<
"); value returned is: (" 1107 << detector <<
"," << subdetector <<
")";
1113 eventout +=
"\n Number of Pixel Forward Hits collected:.... ";
1130 if (!SiTIBLowContainer.
isValid()) {
1132 <<
"Unable to find TrackerHitsTIBLowTof in event!";
1138 if (!SiTIBHighContainer.
isValid()) {
1140 <<
"Unable to find TrackerHitsTIBHighTof in event!";
1146 if (!SiTOBLowContainer.
isValid()) {
1148 <<
"Unable to find TrackerHitsTOBLowTof in event!";
1154 if (!SiTOBHighContainer.
isValid()) {
1156 <<
"Unable to find TrackerHitsTOBHighTof in event!";
1161 theSiBrlHits.insert(theSiBrlHits.end(),SiTIBLowContainer->begin(),
1162 SiTIBLowContainer->end());
1164 theSiBrlHits.insert(theSiBrlHits.end(),SiTIBHighContainer->begin(),
1165 SiTIBHighContainer->end());
1167 theSiBrlHits.insert(theSiBrlHits.end(),SiTOBLowContainer->begin(),
1168 SiTOBLowContainer->end());
1170 theSiBrlHits.insert(theSiBrlHits.end(),SiTOBHighContainer->begin(),
1171 SiTOBHighContainer->end());
1175 for (itHit = theSiBrlHits.begin(); itHit != theSiBrlHits.end(); ++itHit) {
1180 DetId theDetUnitId(itHit->detUnitId());
1185 if ((detector ==
dTrk) &&
1194 <<
"Unable to get GeomDetUnit from SiBrlHits for Hit " <<
i;
1213 <<
"SiBrl PSimHit " << i
1214 <<
" is expected to be (det,subdet) = (" 1216 <<
" || " <<
sdSiTOB <<
"); value returned is: (" 1217 << detector <<
"," << subdetector <<
")";
1223 eventout +=
"\n Number of Silicon Barrel Hits collected:... ";
1236 if (!SiTIDLowContainer.
isValid()) {
1238 <<
"Unable to find TrackerHitsTIDLowTof in event!";
1244 if (!SiTIDHighContainer.
isValid()) {
1245 LogDebug(
"GlobalHitsAnalyzer_fillTrk")
1246 <<
"Unable to find TrackerHitsTIDHighTof in event!";
1252 if (!SiTECLowContainer.
isValid()) {
1254 <<
"Unable to find TrackerHitsTECLowTof in event!";
1260 if (!SiTECHighContainer.
isValid()) {
1262 <<
"Unable to find TrackerHitsTECHighTof in event!";
1267 theSiFwdHits.insert(theSiFwdHits.end(),SiTIDLowContainer->begin(),
1268 SiTIDLowContainer->end());
1270 theSiFwdHits.insert(theSiFwdHits.end(),SiTIDHighContainer->begin(),
1271 SiTIDHighContainer->end());
1273 theSiFwdHits.insert(theSiFwdHits.end(),SiTECLowContainer->begin(),
1274 SiTECLowContainer->end());
1276 theSiFwdHits.insert(theSiFwdHits.end(),SiTECHighContainer->begin(),
1277 SiTECHighContainer->end());
1281 for (itHit = theSiFwdHits.begin(); itHit != theSiFwdHits.end(); ++itHit) {
1286 DetId theDetUnitId(itHit->detUnitId());
1291 if ((detector ==
dTrk) &&
1300 <<
"Unable to get GeomDetUnit from SiFwdHits Hit " <<
i;
1319 <<
"SiFwd PSimHit " << i
1320 <<
" is expected to be (det,subdet) = (" 1322 <<
" || " <<
sdSiTEC <<
"); value returned is: (" 1323 << detector <<
"," << subdetector <<
")";
1329 eventout +=
"\n Number of Silicon Forward Hits collected:.. ";
1348 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillMuon";
1352 eventout =
"\nGathering info:";
1355 edm::PSimHitContainer::const_iterator itHit;
1363 if (!theCSCGeometry.
isValid()) {
1365 <<
"Unable to find MuonGeometryRecord for the CSCGeometry in event!";
1373 if (!MuonCSCContainer.
isValid()) {
1375 <<
"Unable to find MuonCSCHits in event!";
1382 for (itHit = MuonCSCContainer->begin(); itHit != MuonCSCContainer->end();
1388 DetId theDetUnitId(itHit->detUnitId());
1393 if ((detector ==
dMuon) &&
1401 <<
"Unable to get GeomDetUnit from theCSCMuon for hit " <<
i;
1421 <<
"MuonCsc PSimHit " << i
1422 <<
" is expected to be (det,subdet) = (" 1424 <<
"); value returned is: (" 1425 << detector <<
"," << subdetector <<
")";
1431 eventout +=
"\n Number of CSC muon Hits collected:......... ";
1444 if (!theDTGeometry.
isValid()) {
1446 <<
"Unable to find MuonGeometryRecord for the DTGeometry in event!";
1454 if (!MuonDtContainer.
isValid()) {
1456 <<
"Unable to find MuonDTHits in event!";
1463 for (itHit = MuonDtContainer->begin(); itHit != MuonDtContainer->end();
1469 DetId theDetUnitId(itHit->detUnitId());
1474 if ((detector ==
dMuon) &&
1479 DTWireId wireId(itHit->detUnitId());
1482 const DTLayer *theDet = theDTMuon.
layer(wireId.layerId());
1486 <<
"Unable to get GeomDetUnit from theDtMuon for hit " <<
i;
1493 const BoundPlane& bSurface = theDet->surface();
1506 <<
"MuonDt PSimHit " << i
1507 <<
" is expected to be (det,subdet) = (" 1509 <<
"); value returned is: (" 1510 << detector <<
"," << subdetector <<
")";
1516 eventout +=
"\n Number of DT muon Hits collected:.......... ";
1530 if (!theRPCGeometry.
isValid()) {
1532 <<
"Unable to find MuonGeometryRecord for the RPCGeometry in event!";
1540 if (!MuonRPCContainer.
isValid()) {
1542 <<
"Unable to find MuonRPCHits in event!";
1549 int RPCBrl =0, RPCFwd = 0;
1550 for (itHit = MuonRPCContainer->begin(); itHit != MuonRPCContainer->end();
1556 DetId theDetUnitId(itHit->detUnitId());
1561 if ((detector ==
dMuon) &&
1565 RPCDetId RPCId(itHit->detUnitId());
1568 int region = RPCId.
region();
1575 <<
"Unable to get GeomDetUnit from theRPCMuon for hit " <<
i;
1604 localPosition()).perp());
1612 <<
"Invalid region for RPC Muon hit" <<
i;
1617 <<
"MuonRpc PSimHit " << i
1618 <<
" is expected to be (det,subdet) = (" 1620 <<
"); value returned is: (" 1621 << detector <<
"," << subdetector <<
")";
1627 eventout +=
"\n Number of RPC muon Hits collected:......... ";
1629 eventout +=
"\n RPC Barrel muon Hits:............ ";
1631 eventout +=
"\n RPC Forward muon Hits:........... ";
1650 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillECal";
1654 eventout =
"\nGathering info:";
1659 if (!theCaloGeometry.
isValid()) {
1661 <<
"Unable to find CaloGeometryRecord in event!";
1667 edm::PCaloHitContainer::const_iterator itHit;
1678 <<
"Unable to find EcalHitsEB in event!";
1686 <<
"Unable to find EcalHitsEE in event!";
1691 theECalHits.insert(theECalHits.end(),EBContainer->begin(),
1692 EBContainer->end());
1694 theECalHits.insert(theECalHits.end(),EEContainer->begin(),
1695 EEContainer->end());
1699 for (itHit = theECalHits.begin(); itHit != theECalHits.end(); ++itHit) {
1704 DetId theDetUnitId(itHit->id());
1709 if ((detector ==
dEcal) &&
1715 getSubdetectorGeometry(theDetUnitId)->
getGeometry(theDetUnitId);
1719 <<
"Unable to get CaloCellGeometry from ECalHits for Hit " <<
i;
1737 <<
"ECal PCaloHit " << i
1738 <<
" is expected to be (det,subdet) = (" 1740 <<
" || " <<
sdEcalFwd <<
"); value returned is: (" 1741 << detector <<
"," << subdetector <<
")";
1747 eventout +=
"\n Number of ECal Hits collected:............. ";
1760 if (!PreShContainer.
isValid()) {
1762 <<
"Unable to find EcalHitsES in event!";
1769 for (itHit = PreShContainer->begin();
1770 itHit != PreShContainer->end(); ++itHit) {
1775 DetId theDetUnitId(itHit->id());
1780 if ((detector ==
dEcal) &&
1785 getSubdetectorGeometry(theDetUnitId)->
getGeometry(theDetUnitId);
1789 <<
"Unable to get CaloCellGeometry from PreShContainer for Hit " 1808 <<
"PreSh PCaloHit " << i
1809 <<
" is expected to be (det,subdet) = (" 1811 <<
"); value returned is: (" 1812 << detector <<
"," << subdetector <<
")";
1818 eventout +=
"\n Number of PreSh Hits collected:............ ";
1835 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillHCal";
1839 eventout =
"\nGathering info:";
1844 if (!theCaloGeometry.
isValid()) {
1846 <<
"Unable to find CaloGeometryRecord in event!";
1856 edm::PCaloHitContainer::const_iterator itHit;
1864 if (!HCalContainer.
isValid()) {
1866 <<
"Unable to find HCalHits in event!";
1873 for (itHit = HCalContainer->begin();
1874 itHit != HCalContainer->end(); ++itHit) {
1880 unsigned int id_ = itHit->id();
1882 else theDetUnitId = id_;
1888 if ((detector ==
dHcal) &&
1900 <<
"Unable to get HcalGeometry from HCalContainer for Hit " 1919 <<
"HCal PCaloHit " << i
1920 <<
" is expected to be (det,subdet) = (" 1923 <<
"); value returned is: (" 1924 << detector <<
"," << subdetector <<
")";
1930 eventout +=
"\n Number of HCal Hits collected:............. ";
MonitorElement * meTrackerSiPhi
void getManyByType(std::vector< Handle< PROD > > &results) const
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 > SiTIDLowSrc_Token_
void fillG4MC(const edm::Event &)
std::vector< PCaloHit > PCaloHitContainer
edm::InputTag SiTECLowSrc_
edm::EDGetTokenT< edm::PSimHitContainer > SiTECHighSrc_Token_
~GlobalHitsAnalyzer() override
const GeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
edm::InputTag PxlBrlLowSrc_
static const int sdMuonRPCRgnFwdn
static const int sdHcalOut
MonitorElement * meMuonDtToF[2]
static const int sdMuonDT
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * meGeantVtxRad[2]
MonitorElement * meCaloHcal[2]
virtual const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
MonitorElement * meMCG4Trk[2]
MonitorElement * meTrackerPxPhi
Geom::Phi< T > phi() const
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
void fillHCal(const edm::Event &, const edm::EventSetup &)
MonitorElement * meTrackerSiBToF
static const int sdMuonRPC
MonitorElement * meTrackerSi[2]
edm::EDGetTokenT< edm::SimTrackContainer > G4TrkSrc_Token_
const Plane & surface() const
The nominal surface of the GeomDet.
edm::EDGetTokenT< edm::PSimHitContainer > SiTIBHighSrc_Token_
MonitorElement * meMCG4Vtx[2]
edm::InputTag SiTIBHighSrc_
MonitorElement * meGeantVtxY[2]
MonitorElement * meGeantVtxMulti
MonitorElement * meTrackerPxFZ
edm::InputTag MuonCscSrc_
edm::InputTag PxlBrlHighSrc_
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
MonitorElement * meMuonCscToF[2]
MonitorElement * meCaloPreShPhi
MonitorElement * meGeantTrkE
MonitorElement * meCaloEcalEta
static const int sdPxlBrl
MonitorElement * meTrackerPxBR
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 * book1D(Args &&...args)
MonitorElement * meCaloEcalPhi
edm::EDGetTokenT< edm::PSimHitContainer > SiTIBLowSrc_Token_
MonitorElement * meTrackerPx[2]
MonitorElement * meGeantTrkPt
MonitorElement * meGeantVtxEta
edm::InputTag PxlFwdHighSrc_
MonitorElement * meMuonRpcFZ
edm::EDGetTokenT< edm::PSimHitContainer > PxlBrlHighSrc_Token_
static const int sdEcalBrl
edm::InputTag SiTECHighSrc_
static const int sdMuonRPCRgnFwdp
static const int sdMuonRPCRgnBrl
edm::EDGetTokenT< edm::PCaloHitContainer > ECalEBSrc_Token_
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
void fillTrk(const edm::Event &, const edm::EventSetup &)
MonitorElement * meMCRGP[2]
edm::EDGetTokenT< edm::PSimHitContainer > PxlBrlLowSrc_Token_
GlobalPoint getPosition(const DetId &id) const
MonitorElement * meMuonRpcBToF[2]
MonitorElement * meCaloHcalE[2]
MonitorElement * meMuonCscZ
MonitorElement * meGeantVtxX[2]
void fillMuon(const edm::Event &, const edm::EventSetup &)
edm::EDGetTokenT< edm::PSimHitContainer > SiTOBLowSrc_Token_
void setCurrentFolder(const std::string &fullpath)
const HepMC::GenEvent * GetEvent() const
BranchDescription const & branchDescription() const
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
const GeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
edm::InputTag MuonRpcSrc_
edm::EDGetTokenT< edm::SimVertexContainer > G4VtxSrc_Token_
T perp() const
Magnitude of transverse component.
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * meMuonEta
const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id.
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
const DTLayer * layer(const DTLayerId &id) const
Return a layer given its id.
DetId relabel(const uint32_t testId) const
edm::InputTag SiTIBLowSrc_
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
edm::EDGetTokenT< edm::PCaloHitContainer > ECalESSrc_Token_
std::vector< SimTrack > SimTrackContainer
MonitorElement * meCaloHcalEta
static const int sdHcalEC
MonitorElement * meMuonPhi
GlobalHitsAnalyzer(const edm::ParameterSet &)
edm::EDGetTokenT< edm::PSimHitContainer > MuonDtSrc_Token_
Provenance const * provenance() const
edm::EDGetTokenT< edm::PSimHitContainer > SiTECLowSrc_Token_
MonitorElement * meTrackerSiBR
void analyze(const edm::Event &, const edm::EventSetup &) override
void getAllStableProvenance(std::vector< StableProvenance const * > &provenances) const
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
MonitorElement * meCaloEcalE[2]