24 getAllProvenances(
false),
25 printProvenanceInfo(
false),
30 consumesMany<edm::HepMCProduct>();
31 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_GlobalHitsAnalyzer";
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() <<
":" << PxlBrlLowSrc_.instance() <<
"\n" 132 <<
" PxlBrlHighSrc = " << PxlBrlHighSrc_.
label() <<
":" << PxlBrlHighSrc_.
instance() <<
"\n" 133 <<
" PxlFwdLowSrc = " << PxlFwdLowSrc_.
label() <<
":" << PxlBrlLowSrc_.instance() <<
"\n" 134 <<
" PxlFwdHighSrc = " << PxlFwdHighSrc_.
label() <<
":" << PxlBrlHighSrc_.
instance() <<
"\n" 135 <<
" SiTIBLowSrc = " << SiTIBLowSrc_.
label() <<
":" << SiTIBLowSrc_.
instance() <<
"\n" 136 <<
" SiTIBHighSrc = " << SiTIBHighSrc_.
label() <<
":" << SiTIBHighSrc_.
instance() <<
"\n" 137 <<
" SiTOBLowSrc = " << SiTOBLowSrc_.
label() <<
":" << SiTOBLowSrc_.
instance() <<
"\n" 138 <<
" SiTOBHighSrc = " << SiTOBHighSrc_.
label() <<
":" << SiTOBHighSrc_.
instance() <<
"\n" 139 <<
" SiTIDLowSrc = " << SiTIDLowSrc_.
label() <<
":" << SiTIDLowSrc_.
instance() <<
"\n" 140 <<
" SiTIDHighSrc = " << SiTIDHighSrc_.
label() <<
":" << SiTIDHighSrc_.
instance() <<
"\n" 141 <<
" SiTECLowSrc = " << SiTECLowSrc_.
label() <<
":" << SiTECLowSrc_.
instance() <<
"\n" 142 <<
" SiTECHighSrc = " << SiTECHighSrc_.
label() <<
":" << SiTECHighSrc_.
instance() <<
"\n" 143 <<
" MuonCscSrc = " << MuonCscSrc_.
label() <<
":" << MuonCscSrc_.
instance() <<
"\n" 144 <<
" MuonDtSrc = " << MuonDtSrc_.
label() <<
":" << MuonDtSrc_.
instance() <<
"\n" 145 <<
" MuonRpcSrc = " << MuonRpcSrc_.
label() <<
":" << MuonRpcSrc_.
instance() <<
"\n" 146 <<
" ECalEBSrc = " << ECalEBSrc_.
label() <<
":" << ECalEBSrc_.
instance() <<
"\n" 147 <<
" ECalEESrc = " << ECalEESrc_.
label() <<
":" << ECalEESrc_.
instance() <<
"\n" 148 <<
" ECalESSrc = " << ECalESSrc_.
label() <<
":" << ECalESSrc_.
instance() <<
"\n" 149 <<
" HCalSrc = " << HCalSrc_.
label() <<
":" << HCalSrc_.
instance() <<
"\n" 151 <<
" validHepMCevt = " 153 <<
" validG4VtxContainer = " 154 <<
":" << validG4VtxContainer <<
"\n" 155 <<
" validG4trkContainer = " 156 <<
":" << validG4trkContainer <<
"\n" 157 <<
" validPxlBrlLow = " 158 <<
":" << validPxlBrlLow <<
"\n" 159 <<
" validPxlBrlHigh = " 160 <<
":" << validPxlBrlHigh <<
"\n" 161 <<
" validPxlFwdLow = " 162 <<
":" << validPxlFwdLow <<
"\n" 163 <<
" validPxlFwdHigh = " 164 <<
":" << validPxlFwdHigh <<
"\n" 165 <<
" validSiTIBLow = " 166 <<
":" << validSiTIBLow <<
"\n" 167 <<
" validSiTIBHigh = " 168 <<
":" << validSiTIBHigh <<
"\n" 169 <<
" validSiTOBLow = " 170 <<
":" << validSiTOBLow <<
"\n" 171 <<
" validSiTOBHigh = " 172 <<
":" << validSiTOBHigh <<
"\n" 173 <<
" validSiTIDLow = " 174 <<
":" << validSiTIDLow <<
"\n" 175 <<
" validSiTIDHigh = " 176 <<
":" << validSiTIDHigh <<
"\n" 177 <<
" validSiTECLow = " 178 <<
":" << validSiTECLow <<
"\n" 179 <<
" validSiTECHigh = " 180 <<
":" << validSiTECHigh <<
"\n" 181 <<
" validMuonCSC = " 182 <<
":" << validMuonCSC <<
"\n" 184 <<
":" << validMuonDt <<
"\n" 185 <<
" validMuonRPC = " 186 <<
":" << validMuonRPC <<
"\n" 188 <<
":" << validEB <<
"\n" 190 <<
":" << validEE <<
"\n" 192 <<
":" << validPresh <<
"\n" 194 <<
":" << validHcal <<
"\n" 195 <<
"===============================\n";
199 for (Int_t
i = 0;
i < 2; ++
i) {
264 sprintf(hname,
"hMCRGP1");
265 sprintf(htitle,
"RawGenParticles");
267 sprintf(hname,
"hMCRGP2");
269 for (Int_t
i = 0;
i < 2; ++
i) {
274 sprintf(hname,
"hMCG4Vtx1");
275 sprintf(htitle,
"G4 Vertices");
277 sprintf(hname,
"hMCG4Vtx2");
279 for (Int_t
i = 0;
i < 2; ++
i) {
284 sprintf(hname,
"hMCG4Trk1");
285 sprintf(htitle,
"G4 Tracks");
287 sprintf(hname,
"hMCG4Trk2");
289 for (Int_t
i = 0;
i < 2; ++
i) {
294 sprintf(hname,
"hGeantVtxX1");
295 sprintf(htitle,
"Geant vertex x/micrometer");
297 sprintf(hname,
"hGeantVtxX2");
299 for (Int_t
i = 0;
i < 2; ++
i) {
304 sprintf(hname,
"hGeantVtxY1");
305 sprintf(htitle,
"Geant vertex y/micrometer");
307 sprintf(hname,
"hGeantVtxY2");
309 for (Int_t
i = 0;
i < 2; ++
i) {
314 sprintf(hname,
"hGeantVtxZ1");
315 sprintf(htitle,
"Geant vertex z/millimeter");
317 sprintf(hname,
"hGeantVtxZ2");
320 for (Int_t
i = 0;
i < 2; ++
i) {
325 sprintf(hname,
"hGeantTrkPt");
326 sprintf(htitle,
"Log10 Geant track pt/GeV");
331 sprintf(hname,
"hGeantTrkE");
332 sprintf(htitle,
"Log10 Geant track E/GeV");
337 sprintf(hname,
"hGeantVtxEta");
338 sprintf(htitle,
"Geant vertices eta");
343 sprintf(hname,
"hGeantVtxPhi");
344 sprintf(htitle,
"Geant vertices phi/rad");
349 sprintf(hname,
"hGeantVtxRad1");
350 sprintf(htitle,
"Geant vertices radius/cm");
352 sprintf(hname,
"hGeantVtxRad2");
354 for (Int_t
i = 0;
i < 2; ++
i) {
359 sprintf(hname,
"hGeantVtxMulti");
360 sprintf(htitle,
"Geant vertices outgoing multiplicity");
367 sprintf(hname,
"hCaloEcal1");
368 sprintf(htitle,
"Ecal hits");
370 sprintf(hname,
"hCaloEcal2");
373 sprintf(hname,
"hCaloEcalE1");
374 sprintf(htitle,
"Ecal hits, energy/GeV");
376 sprintf(hname,
"hCaloEcalE2");
378 sprintf(hname,
"hCaloEcalToF1");
379 sprintf(htitle,
"Ecal hits, ToF/ns");
381 sprintf(hname,
"hCaloEcalToF2");
384 for (Int_t
i = 0;
i < 2; ++
i) {
393 sprintf(hname,
"hCaloEcalPhi");
394 sprintf(htitle,
"Ecal hits, phi/rad");
399 sprintf(hname,
"hCaloEcalEta");
400 sprintf(htitle,
"Ecal hits, eta");
405 sprintf(hname,
"hCaloPreSh1");
406 sprintf(htitle,
"PreSh hits");
408 sprintf(hname,
"hCaloPreSh2");
411 sprintf(hname,
"hCaloPreShE1");
412 sprintf(htitle,
"PreSh hits, energy/GeV");
414 sprintf(hname,
"hCaloPreShE2");
417 sprintf(hname,
"hCaloPreShToF1");
418 sprintf(htitle,
"PreSh hits, ToF/ns");
420 sprintf(hname,
"hCaloPreShToF2");
423 for (Int_t
i = 0;
i < 2; ++
i) {
432 sprintf(hname,
"hCaloPreShPhi");
433 sprintf(htitle,
"PreSh hits, phi/rad");
438 sprintf(hname,
"hCaloPreShEta");
439 sprintf(htitle,
"PreSh hits, eta");
446 sprintf(hname,
"hCaloHcal1");
447 sprintf(htitle,
"Hcal hits");
449 sprintf(hname,
"hCaloHcal2");
452 sprintf(hname,
"hCaloHcalE1");
453 sprintf(htitle,
"Hcal hits, energy/GeV");
455 sprintf(hname,
"hCaloHcalE2");
458 sprintf(hname,
"hCaloHcalToF1");
459 sprintf(htitle,
"Hcal hits, ToF/ns");
461 sprintf(hname,
"hCaloHcalToF2");
464 for (Int_t
i = 0;
i < 2; ++
i) {
473 sprintf(hname,
"hCaloHcalPhi");
474 sprintf(htitle,
"Hcal hits, phi/rad");
479 sprintf(hname,
"hCaloHcalEta");
480 sprintf(htitle,
"Hcal hits, eta");
487 sprintf(hname,
"hTrackerPx1");
488 sprintf(htitle,
"Pixel hits");
490 sprintf(hname,
"hTrackerPx2");
492 for (Int_t
i = 0;
i < 2; ++
i) {
497 sprintf(hname,
"hTrackerPxPhi");
498 sprintf(htitle,
"Pixel hits phi/rad");
503 sprintf(hname,
"hTrackerPxEta");
504 sprintf(htitle,
"Pixel hits eta");
509 sprintf(hname,
"hTrackerPxBToF");
510 sprintf(htitle,
"Pixel barrel hits, ToF/ns");
515 sprintf(hname,
"hTrackerPxBR");
516 sprintf(htitle,
"Pixel barrel hits, R/cm");
521 sprintf(hname,
"hTrackerPxFToF");
522 sprintf(htitle,
"Pixel forward hits, ToF/ns");
527 sprintf(hname,
"hTrackerPxFZ");
528 sprintf(htitle,
"Pixel forward hits, Z/cm");
535 sprintf(hname,
"hTrackerSi1");
536 sprintf(htitle,
"Silicon hits");
538 sprintf(hname,
"hTrackerSi2");
540 for (Int_t
i = 0;
i < 2; ++
i) {
545 sprintf(hname,
"hTrackerSiPhi");
546 sprintf(htitle,
"Silicon hits phi/rad");
551 sprintf(hname,
"hTrackerSiEta");
552 sprintf(htitle,
"Silicon hits eta");
557 sprintf(hname,
"hTrackerSiBToF");
558 sprintf(htitle,
"Silicon barrel hits, ToF/ns");
563 sprintf(hname,
"hTrackerSiBR");
564 sprintf(htitle,
"Silicon barrel hits, R/cm");
569 sprintf(hname,
"hTrackerSiFToF");
570 sprintf(htitle,
"Silicon forward hits, ToF/ns");
575 sprintf(hname,
"hTrackerSiFZ");
576 sprintf(htitle,
"Silicon forward hits, Z/cm");
583 sprintf(hname,
"hMuon1");
584 sprintf(htitle,
"Muon hits");
585 meMuon[0] = iBooker.
book1D(hname, htitle, 100, 0., 10000.);
586 sprintf(hname,
"hMuon2");
587 meMuon[1] = iBooker.
book1D(hname, htitle, 100, -0.5, 99.5);
588 for (Int_t
i = 0;
i < 2; ++
i) {
593 sprintf(hname,
"hMuonPhi");
594 sprintf(htitle,
"Muon hits phi/rad");
599 sprintf(hname,
"hMuonEta");
600 sprintf(htitle,
"Muon hits eta");
605 sprintf(hname,
"hMuonCscToF1");
606 sprintf(htitle,
"Muon CSC hits, ToF/ns");
608 sprintf(hname,
"hMuonCscToF2");
610 for (Int_t
i = 0;
i < 2; ++
i) {
615 sprintf(hname,
"hMuonCscZ");
616 sprintf(htitle,
"Muon CSC hits, Z/cm");
621 sprintf(hname,
"hMuonDtToF1");
622 sprintf(htitle,
"Muon DT hits, ToF/ns");
624 sprintf(hname,
"hMuonDtToF2");
626 for (Int_t
i = 0;
i < 2; ++
i) {
631 sprintf(hname,
"hMuonDtR");
632 sprintf(htitle,
"Muon DT hits, R/cm");
637 sprintf(hname,
"hMuonRpcFToF1");
638 sprintf(htitle,
"Muon RPC forward hits, ToF/ns");
640 sprintf(hname,
"hMuonRpcFToF2");
642 for (Int_t
i = 0;
i < 2; ++
i) {
646 sprintf(hname,
"hMuonRpcFZ");
647 sprintf(htitle,
"Muon RPC forward hits, Z/cm");
652 sprintf(hname,
"hMuonRpcBToF1");
653 sprintf(htitle,
"Muon RPC barrel hits, ToF/ns");
655 sprintf(hname,
"hMuonRpcBToF2");
657 for (Int_t
i = 0;
i < 2; ++
i) {
662 sprintf(hname,
"hMuonRpcBR");
663 sprintf(htitle,
"Muon RPC barrel hits, R/cm");
670 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_analyze";
680 edm::LogInfo(MsgLoggerCat) <<
"Processing run " << nrun <<
", event " << nevt <<
" (" <<
count <<
" events total)";
682 if (nevt %
frequency == 0 || nevt == 1) {
683 edm::LogInfo(MsgLoggerCat) <<
"Processing run " << nrun <<
", event " << nevt <<
" (" <<
count 690 std::vector<const edm::StableProvenance *> AllProv;
694 edm::LogInfo(MsgLoggerCat) <<
"Number of Provenances = " << AllProv.size();
697 TString eventout(
"\nProvenance info:\n");
699 for (
unsigned int i = 0;
i < AllProv.size(); ++
i) {
700 eventout +=
"\n ******************************";
701 eventout +=
"\n Module : ";
702 eventout += AllProv[
i]->moduleLabel();
703 eventout +=
"\n ProductID : ";
704 eventout += AllProv[
i]->productID().id();
705 eventout +=
"\n ClassName : ";
706 eventout += AllProv[
i]->className();
707 eventout +=
"\n InstanceName : ";
708 eventout += AllProv[
i]->productInstanceName();
709 eventout +=
"\n BranchName : ";
710 eventout += AllProv[
i]->branchName();
712 eventout +=
"\n ******************************\n";
732 edm::LogInfo(MsgLoggerCat) <<
"Done gathering data from event.";
739 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillG4MC";
743 eventout =
"\nGathering info:";
749 std::vector<edm::Handle<edm::HepMCProduct>> AllHepMCEvt;
754 for (
unsigned int i = 0;
i < AllHepMCEvt.size(); ++
i) {
755 HepMCEvt = AllHepMCEvt[
i];
761 LogDebug(MsgLoggerCat) <<
"Unable to find HepMCProduct in event!";
764 eventout +=
"\n Using HepMCProduct: ";
772 eventout +=
"\n Number of Raw Particles collected:......... ";
799 if (!G4VtxContainer.
isValid()) {
800 LogDebug(MsgLoggerCat) <<
"Unable to find SimVertex in event!";
805 edm::SimVertexContainer::const_iterator itVtx;
806 for (itVtx = G4VtxContainer->begin(); itVtx != G4VtxContainer->end(); ++itVtx) {
810 itVtx->position().x(), itVtx->position().y(), itVtx->position().z(), itVtx->position().e());
813 G4Vtx1.GetCoordinates(G4Vtx);
841 if (G4TrkContainer.
isValid()) {
842 edm::SimTrackContainer::const_iterator itTrk;
843 for (itTrk = G4TrkContainer->begin(); itTrk != G4TrkContainer->end(); ++itTrk) {
844 if ((*itTrk).vertIndex() ==
i) {
854 eventout +=
"\n Number of G4Vertices collected:............ ";
867 if (!G4TrkContainer.
isValid()) {
868 LogDebug(MsgLoggerCat) <<
"Unable to find SimTrack in event!";
873 edm::SimTrackContainer::const_iterator itTrk;
874 for (itTrk = G4TrkContainer->begin(); itTrk != G4TrkContainer->end(); ++itTrk) {
878 itTrk->momentum().x(), itTrk->momentum().y(), itTrk->momentum().z(), itTrk->momentum().e());
880 G4Trk1.GetCoordinates(G4Trk);
889 eventout +=
"\n Number of G4Tracks collected:.............. ";
907 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillTrk";
911 eventout =
"\nGathering info:";
916 if (!theTrackerGeometry.
isValid()) {
917 edm::LogWarning(MsgLoggerCat) <<
"Unable to find TrackerDigiGeometryRecord in event!";
923 edm::PSimHitContainer::const_iterator itHit;
932 if (!PxlBrlLowContainer.
isValid()) {
933 LogDebug(MsgLoggerCat) <<
"Unable to find TrackerHitsPixelBarrelLowTof in event!";
939 if (!PxlBrlHighContainer.
isValid()) {
940 LogDebug(MsgLoggerCat) <<
"Unable to find TrackerHitsPixelBarrelHighTof in event!";
945 thePxlBrlHits.insert(thePxlBrlHits.end(), PxlBrlLowContainer->begin(), PxlBrlLowContainer->end());
947 thePxlBrlHits.insert(thePxlBrlHits.end(), PxlBrlHighContainer->begin(), PxlBrlHighContainer->end());
951 for (itHit = thePxlBrlHits.begin(); itHit != thePxlBrlHits.end(); ++itHit) {
955 DetId theDetUnitId(itHit->detUnitId());
965 edm::LogWarning(MsgLoggerCat) <<
"Unable to get GeomDetUnit from PxlBrlHits for Hit " <<
i;
984 edm::LogWarning(MsgLoggerCat) <<
"PxlBrl PSimHit " << i <<
" is expected to be (det,subdet) = (" <<
dTrk <<
"," 985 <<
sdPxlBrl <<
"); value returned is: (" << detector <<
"," << subdetector <<
")";
991 eventout +=
"\n Number of Pixel Barrel Hits collected:..... ";
1004 if (!PxlFwdLowContainer.
isValid()) {
1005 LogDebug(MsgLoggerCat) <<
"Unable to find TrackerHitsPixelEndcapLowTof in event!";
1011 if (!PxlFwdHighContainer.
isValid()) {
1012 LogDebug(
"GlobalHitsAnalyzer_fillTrk") <<
"Unable to find TrackerHitsPixelEndcapHighTof in event!";
1017 thePxlFwdHits.insert(thePxlFwdHits.end(), PxlFwdLowContainer->begin(), PxlFwdLowContainer->end());
1019 thePxlFwdHits.insert(thePxlFwdHits.end(), PxlFwdHighContainer->begin(), PxlFwdHighContainer->end());
1024 for (itHit = thePxlFwdHits.begin(); itHit != thePxlFwdHits.end(); ++itHit) {
1028 DetId theDetUnitId(itHit->detUnitId());
1038 edm::LogWarning(MsgLoggerCat) <<
"Unable to get GeomDetUnit from PxlFwdHits for Hit " <<
i;
1058 edm::LogWarning(MsgLoggerCat) <<
"PxlFwd PSimHit " << i <<
" is expected to be (det,subdet) = (" <<
dTrk <<
"," 1059 <<
sdPxlFwd <<
"); value returned is: (" << detector <<
"," << subdetector <<
")";
1065 eventout +=
"\n Number of Pixel Forward Hits collected:.... ";
1084 if (!SiTIBLowContainer.
isValid()) {
1085 LogDebug(MsgLoggerCat) <<
"Unable to find TrackerHitsTIBLowTof in event!";
1091 if (!SiTIBHighContainer.
isValid()) {
1092 LogDebug(MsgLoggerCat) <<
"Unable to find TrackerHitsTIBHighTof in event!";
1098 if (!SiTOBLowContainer.
isValid()) {
1099 LogDebug(MsgLoggerCat) <<
"Unable to find TrackerHitsTOBLowTof in event!";
1105 if (!SiTOBHighContainer.
isValid()) {
1106 LogDebug(MsgLoggerCat) <<
"Unable to find TrackerHitsTOBHighTof in event!";
1111 theSiBrlHits.insert(theSiBrlHits.end(), SiTIBLowContainer->begin(), SiTIBLowContainer->end());
1113 theSiBrlHits.insert(theSiBrlHits.end(), SiTIBHighContainer->begin(), SiTIBHighContainer->end());
1115 theSiBrlHits.insert(theSiBrlHits.end(), SiTOBLowContainer->begin(), SiTOBLowContainer->end());
1117 theSiBrlHits.insert(theSiBrlHits.end(), SiTOBHighContainer->begin(), SiTOBHighContainer->end());
1122 for (itHit = theSiBrlHits.begin(); itHit != theSiBrlHits.end(); ++itHit) {
1126 DetId theDetUnitId(itHit->detUnitId());
1136 edm::LogWarning(MsgLoggerCat) <<
"Unable to get GeomDetUnit from SiBrlHits for Hit " <<
i;
1155 edm::LogWarning(MsgLoggerCat) <<
"SiBrl PSimHit " << i <<
" is expected to be (det,subdet) = (" <<
dTrk <<
"," 1156 <<
sdSiTIB <<
" || " <<
sdSiTOB <<
"); value returned is: (" << detector <<
"," 1157 << subdetector <<
")";
1163 eventout +=
"\n Number of Silicon Barrel Hits collected:... ";
1176 if (!SiTIDLowContainer.
isValid()) {
1177 LogDebug(MsgLoggerCat) <<
"Unable to find TrackerHitsTIDLowTof in event!";
1183 if (!SiTIDHighContainer.
isValid()) {
1184 LogDebug(
"GlobalHitsAnalyzer_fillTrk") <<
"Unable to find TrackerHitsTIDHighTof in event!";
1190 if (!SiTECLowContainer.
isValid()) {
1191 LogDebug(MsgLoggerCat) <<
"Unable to find TrackerHitsTECLowTof in event!";
1197 if (!SiTECHighContainer.
isValid()) {
1198 LogDebug(MsgLoggerCat) <<
"Unable to find TrackerHitsTECHighTof in event!";
1203 theSiFwdHits.insert(theSiFwdHits.end(), SiTIDLowContainer->begin(), SiTIDLowContainer->end());
1205 theSiFwdHits.insert(theSiFwdHits.end(), SiTIDHighContainer->begin(), SiTIDHighContainer->end());
1207 theSiFwdHits.insert(theSiFwdHits.end(), SiTECLowContainer->begin(), SiTECLowContainer->end());
1209 theSiFwdHits.insert(theSiFwdHits.end(), SiTECHighContainer->begin(), SiTECHighContainer->end());
1214 for (itHit = theSiFwdHits.begin(); itHit != theSiFwdHits.end(); ++itHit) {
1218 DetId theDetUnitId(itHit->detUnitId());
1228 edm::LogWarning(MsgLoggerCat) <<
"Unable to get GeomDetUnit from SiFwdHits Hit " <<
i;
1247 edm::LogWarning(MsgLoggerCat) <<
"SiFwd PSimHit " << i <<
" is expected to be (det,subdet) = (" <<
dTrk <<
"," 1248 <<
sdSiTOB <<
" || " <<
sdSiTEC <<
"); value returned is: (" << detector <<
"," 1249 << subdetector <<
")";
1255 eventout +=
"\n Number of Silicon Forward Hits collected:.. ";
1274 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillMuon";
1278 eventout =
"\nGathering info:";
1281 edm::PSimHitContainer::const_iterator itHit;
1289 if (!theCSCGeometry.
isValid()) {
1290 edm::LogWarning(MsgLoggerCat) <<
"Unable to find MuonGeometryRecord for the CSCGeometry in event!";
1298 if (!MuonCSCContainer.
isValid()) {
1299 LogDebug(MsgLoggerCat) <<
"Unable to find MuonCSCHits in event!";
1306 for (itHit = MuonCSCContainer->begin(); itHit != MuonCSCContainer->end(); ++itHit) {
1310 DetId theDetUnitId(itHit->detUnitId());
1320 edm::LogWarning(MsgLoggerCat) <<
"Unable to get GeomDetUnit from theCSCMuon for hit " <<
i;
1341 edm::LogWarning(MsgLoggerCat) <<
"MuonCsc PSimHit " << i <<
" is expected to be (det,subdet) = (" <<
dMuon 1342 <<
"," <<
sdMuonCSC <<
"); value returned is: (" << detector <<
"," << subdetector
1349 eventout +=
"\n Number of CSC muon Hits collected:......... ";
1362 if (!theDTGeometry.
isValid()) {
1363 edm::LogWarning(MsgLoggerCat) <<
"Unable to find MuonGeometryRecord for the DTGeometry in event!";
1371 if (!MuonDtContainer.
isValid()) {
1372 LogDebug(MsgLoggerCat) <<
"Unable to find MuonDTHits in event!";
1379 for (itHit = MuonDtContainer->begin(); itHit != MuonDtContainer->end(); ++itHit) {
1383 DetId theDetUnitId(itHit->detUnitId());
1391 DTWireId wireId(itHit->detUnitId());
1394 const DTLayer *theDet = theDTMuon.
layer(wireId.layerId());
1397 edm::LogWarning(MsgLoggerCat) <<
"Unable to get GeomDetUnit from theDtMuon for hit " <<
i;
1404 const BoundPlane &bSurface = theDet->surface();
1418 edm::LogWarning(MsgLoggerCat) <<
"MuonDt PSimHit " << i <<
" is expected to be (det,subdet) = (" <<
dMuon <<
"," 1419 <<
sdMuonDT <<
"); value returned is: (" << detector <<
"," << subdetector <<
")";
1425 eventout +=
"\n Number of DT muon Hits collected:.......... ";
1439 if (!theRPCGeometry.
isValid()) {
1440 edm::LogWarning(MsgLoggerCat) <<
"Unable to find MuonGeometryRecord for the RPCGeometry in event!";
1448 if (!MuonRPCContainer.
isValid()) {
1449 LogDebug(MsgLoggerCat) <<
"Unable to find MuonRPCHits in event!";
1456 int RPCBrl = 0, RPCFwd = 0;
1457 for (itHit = MuonRPCContainer->begin(); itHit != MuonRPCContainer->end(); ++itHit) {
1461 DetId theDetUnitId(itHit->detUnitId());
1468 RPCDetId RPCId(itHit->detUnitId());
1471 int region = RPCId.
region();
1477 edm::LogWarning(MsgLoggerCat) <<
"Unable to get GeomDetUnit from theRPCMuon for hit " <<
i;
1520 edm::LogWarning(MsgLoggerCat) <<
"MuonRpc PSimHit " << i <<
" is expected to be (det,subdet) = (" <<
dMuon 1521 <<
"," <<
sdMuonRPC <<
"); value returned is: (" << detector <<
"," << subdetector
1528 eventout +=
"\n Number of RPC muon Hits collected:......... ";
1530 eventout +=
"\n RPC Barrel muon Hits:............ ";
1532 eventout +=
"\n RPC Forward muon Hits:........... ";
1551 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillECal";
1555 eventout =
"\nGathering info:";
1560 if (!theCaloGeometry.
isValid()) {
1561 edm::LogWarning(MsgLoggerCat) <<
"Unable to find CaloGeometryRecord in event!";
1567 edm::PCaloHitContainer::const_iterator itHit;
1577 LogDebug(MsgLoggerCat) <<
"Unable to find EcalHitsEB in event!";
1584 LogDebug(MsgLoggerCat) <<
"Unable to find EcalHitsEE in event!";
1589 theECalHits.insert(theECalHits.end(), EBContainer->begin(), EBContainer->end());
1591 theECalHits.insert(theECalHits.end(), EEContainer->begin(), EEContainer->end());
1595 for (itHit = theECalHits.begin(); itHit != theECalHits.end(); ++itHit) {
1599 DetId theDetUnitId(itHit->id());
1609 edm::LogWarning(MsgLoggerCat) <<
"Unable to get CaloCellGeometry from ECalHits for Hit " <<
i;
1616 const GlobalPoint &globalposition = theDet->getPosition();
1632 edm::LogWarning(MsgLoggerCat) <<
"ECal PCaloHit " << i <<
" is expected to be (det,subdet) = (" <<
dEcal <<
"," 1634 << subdetector <<
")";
1640 eventout +=
"\n Number of ECal Hits collected:............. ";
1655 if (!PreShContainer.
isValid()) {
1656 LogDebug(MsgLoggerCat) <<
"Unable to find EcalHitsES in event!";
1663 for (itHit = PreShContainer->begin(); itHit != PreShContainer->end(); ++itHit) {
1667 DetId theDetUnitId(itHit->id());
1677 edm::LogWarning(MsgLoggerCat) <<
"Unable to get CaloCellGeometry from PreShContainer for Hit " <<
i;
1684 const GlobalPoint &globalposition = theDet->getPosition();
1700 edm::LogWarning(MsgLoggerCat) <<
"PreSh PCaloHit " << i <<
" is expected to be (det,subdet) = (" <<
dEcal <<
"," 1701 <<
sdEcalPS <<
"); value returned is: (" << detector <<
"," << subdetector <<
")";
1707 eventout +=
"\n Number of PreSh Hits collected:............ ";
1724 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillHCal";
1728 eventout =
"\nGathering info:";
1733 if (!theCaloGeometry.
isValid()) {
1734 edm::LogWarning(MsgLoggerCat) <<
"Unable to find CaloGeometryRecord in event!";
1744 edm::PCaloHitContainer::const_iterator itHit;
1752 if (!HCalContainer.
isValid()) {
1753 LogDebug(MsgLoggerCat) <<
"Unable to find HCalHits in event!";
1760 for (itHit = HCalContainer->begin(); itHit != HCalContainer->end(); ++itHit) {
1765 unsigned int id_ = itHit->id();
1781 edm::LogWarning(MsgLoggerCat) <<
"Unable to get HcalGeometry from HCalContainer for Hit " <<
i;
1804 edm::LogWarning(MsgLoggerCat) <<
"HCal PCaloHit " << i <<
" is expected to be (det,subdet) = (" <<
dHcal <<
"," 1806 <<
"); value returned is: (" << detector <<
"," << subdetector <<
")";
1812 eventout +=
"\n Number of HCal Hits collected:............. ";
MonitorElement * meTrackerSiPhi
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]
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 getManyByType(std::vector< Handle< PROD >> &results) const
void fillHCal(const edm::Event &, const edm::EventSetup &)
MonitorElement * meTrackerSiBToF
static const int sdMuonRPC
MonitorElement * meTrackerSi[2]
edm::EDGetTokenT< edm::SimTrackContainer > G4TrkSrc_Token_
CaloGeometry const * getGeometry()
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
void setCurrentFolder(std::string const &fullpath)
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_
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
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_
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_
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
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
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
constexpr Detector det() const
get the detector field from this detid
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]