24 consumesMany<edm::HepMCProduct>();
25 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_GlobalHitsAnalyzer";
35 m_Prov.getUntrackedParameter<
bool>(
"GetAllProvenances");
37 m_Prov.getUntrackedParameter<
bool>(
"PrintProvenanceInfo");
120 if (verbosity >= 0) {
122 <<
"\n===============================\n" 123 <<
"Initialized as EDAnalyzer with parameter values:\n" 124 <<
" Name = " <<
fName <<
"\n" 125 <<
" Verbosity = " << verbosity <<
"\n" 126 <<
" Frequency = " << frequency <<
"\n" 127 <<
" VtxUnit = " << vtxunit <<
"\n" 128 <<
" GetProv = " << getAllProvenances <<
"\n" 129 <<
" PrintProv = " << printProvenanceInfo <<
"\n" 130 <<
" PxlBrlLowSrc = " << PxlBrlLowSrc_.label()
131 <<
":" << PxlBrlLowSrc_.instance() <<
"\n" 132 <<
" PxlBrlHighSrc = " << PxlBrlHighSrc_.
label()
133 <<
":" << PxlBrlHighSrc_.
instance() <<
"\n" 134 <<
" PxlFwdLowSrc = " << PxlFwdLowSrc_.
label()
135 <<
":" << PxlBrlLowSrc_.instance() <<
"\n" 136 <<
" PxlFwdHighSrc = " << PxlFwdHighSrc_.
label()
137 <<
":" << PxlBrlHighSrc_.
instance() <<
"\n" 138 <<
" SiTIBLowSrc = " << SiTIBLowSrc_.
label()
139 <<
":" << SiTIBLowSrc_.
instance() <<
"\n" 140 <<
" SiTIBHighSrc = " << SiTIBHighSrc_.
label()
141 <<
":" << SiTIBHighSrc_.
instance() <<
"\n" 142 <<
" SiTOBLowSrc = " << SiTOBLowSrc_.
label()
143 <<
":" << SiTOBLowSrc_.
instance() <<
"\n" 144 <<
" SiTOBHighSrc = " << SiTOBHighSrc_.
label()
145 <<
":" << SiTOBHighSrc_.
instance() <<
"\n" 146 <<
" SiTIDLowSrc = " << SiTIDLowSrc_.
label()
147 <<
":" << SiTIDLowSrc_.
instance() <<
"\n" 148 <<
" SiTIDHighSrc = " << SiTIDHighSrc_.
label()
149 <<
":" << SiTIDHighSrc_.
instance() <<
"\n" 150 <<
" SiTECLowSrc = " << SiTECLowSrc_.
label()
151 <<
":" << SiTECLowSrc_.
instance() <<
"\n" 152 <<
" SiTECHighSrc = " << SiTECHighSrc_.
label()
153 <<
":" << SiTECHighSrc_.
instance() <<
"\n" 154 <<
" MuonCscSrc = " << MuonCscSrc_.
label()
155 <<
":" << MuonCscSrc_.
instance() <<
"\n" 156 <<
" MuonDtSrc = " << MuonDtSrc_.
label()
157 <<
":" << MuonDtSrc_.
instance() <<
"\n" 158 <<
" MuonRpcSrc = " << MuonRpcSrc_.
label()
159 <<
":" << MuonRpcSrc_.
instance() <<
"\n" 160 <<
" ECalEBSrc = " << ECalEBSrc_.
label()
161 <<
":" << ECalEBSrc_.
instance() <<
"\n" 162 <<
" ECalEESrc = " << ECalEESrc_.
label()
163 <<
":" << ECalEESrc_.
instance() <<
"\n" 164 <<
" ECalESSrc = " << ECalESSrc_.
label()
165 <<
":" << ECalESSrc_.
instance() <<
"\n" 166 <<
" HCalSrc = " << HCalSrc_.
label()
167 <<
":" << HCalSrc_.
instance() <<
"\n" 169 <<
" validHepMCevt = " 171 <<
" validG4VtxContainer = " 172 <<
":" << validG4VtxContainer <<
"\n" 173 <<
" validG4trkContainer = " 174 <<
":" << validG4trkContainer <<
"\n" 175 <<
" validPxlBrlLow = " 176 <<
":" << validPxlBrlLow <<
"\n" 177 <<
" validPxlBrlHigh = " 178 <<
":" << validPxlBrlHigh <<
"\n" 179 <<
" validPxlFwdLow = " 180 <<
":" << validPxlFwdLow <<
"\n" 181 <<
" validPxlFwdHigh = " 182 <<
":" << validPxlFwdHigh <<
"\n" 183 <<
" validSiTIBLow = " 184 <<
":" << validSiTIBLow <<
"\n" 185 <<
" validSiTIBHigh = " 186 <<
":" << validSiTIBHigh <<
"\n" 187 <<
" validSiTOBLow = " 188 <<
":" << validSiTOBLow <<
"\n" 189 <<
" validSiTOBHigh = " 190 <<
":" << validSiTOBHigh <<
"\n" 191 <<
" validSiTIDLow = " 192 <<
":" << validSiTIDLow <<
"\n" 193 <<
" validSiTIDHigh = " 194 <<
":" << validSiTIDHigh <<
"\n" 195 <<
" validSiTECLow = " 196 <<
":" << validSiTECLow <<
"\n" 197 <<
" validSiTECHigh = " 198 <<
":" << validSiTECHigh <<
"\n" 199 <<
" validMuonCSC = " 200 <<
":" << validMuonCSC <<
"\n" 202 <<
":" << validMuonDt <<
"\n" 203 <<
" validMuonRPC = " 204 <<
":" << validMuonRPC <<
"\n" 206 <<
":" << validEB <<
"\n" 208 <<
":" << validEE <<
"\n" 210 <<
":" << validPresh <<
"\n" 212 <<
":" << validHcal <<
"\n" 213 <<
"===============================\n";
217 for (Int_t
i = 0;
i < 2; ++
i) {
283 sprintf(hname,
"hMCRGP1");
284 sprintf(htitle,
"RawGenParticles");
286 sprintf(hname,
"hMCRGP2");
288 for (Int_t
i = 0;
i < 2; ++
i) {
293 sprintf(hname,
"hMCG4Vtx1");
294 sprintf(htitle,
"G4 Vertices");
296 sprintf(hname,
"hMCG4Vtx2");
298 for (Int_t
i = 0;
i < 2; ++
i) {
303 sprintf(hname,
"hMCG4Trk1");
304 sprintf(htitle,
"G4 Tracks");
306 sprintf(hname,
"hMCG4Trk2");
308 for (Int_t
i = 0;
i < 2; ++
i) {
313 sprintf(hname,
"hGeantVtxX1");
314 sprintf(htitle,
"Geant vertex x/micrometer");
316 sprintf(hname,
"hGeantVtxX2");
318 for (Int_t
i = 0;
i < 2; ++
i) {
323 sprintf(hname,
"hGeantVtxY1");
324 sprintf(htitle,
"Geant vertex y/micrometer");
326 sprintf(hname,
"hGeantVtxY2");
328 for (Int_t
i = 0;
i < 2; ++
i) {
333 sprintf(hname,
"hGeantVtxZ1");
334 sprintf(htitle,
"Geant vertex z/millimeter");
336 sprintf(hname,
"hGeantVtxZ2");
339 for (Int_t
i = 0;
i < 2; ++
i) {
344 sprintf(hname,
"hGeantTrkPt");
345 sprintf(htitle,
"Log10 Geant track pt/GeV");
350 sprintf(hname,
"hGeantTrkE");
351 sprintf(htitle,
"Log10 Geant track E/GeV");
356 sprintf(hname,
"hGeantVtxEta");
357 sprintf(htitle,
"Geant vertices eta");
362 sprintf(hname,
"hGeantVtxPhi");
363 sprintf(htitle,
"Geant vertices phi/rad");
368 sprintf(hname,
"hGeantVtxRad1");
369 sprintf(htitle,
"Geant vertices radius/cm");
371 sprintf(hname,
"hGeantVtxRad2");
373 for (Int_t
i = 0;
i < 2; ++
i) {
378 sprintf(hname,
"hGeantVtxMulti");
379 sprintf(htitle,
"Geant vertices outgoing multiplicity");
386 sprintf(hname,
"hCaloEcal1");
387 sprintf(htitle,
"Ecal hits");
389 sprintf(hname,
"hCaloEcal2");
392 sprintf(hname,
"hCaloEcalE1");
393 sprintf(htitle,
"Ecal hits, energy/GeV");
395 sprintf(hname,
"hCaloEcalE2");
397 sprintf(hname,
"hCaloEcalToF1");
398 sprintf(htitle,
"Ecal hits, ToF/ns");
400 sprintf(hname,
"hCaloEcalToF2");
403 for (Int_t
i = 0;
i < 2; ++
i) {
412 sprintf(hname,
"hCaloEcalPhi");
413 sprintf(htitle,
"Ecal hits, phi/rad");
418 sprintf(hname,
"hCaloEcalEta");
419 sprintf(htitle,
"Ecal hits, eta");
424 sprintf(hname,
"hCaloPreSh1");
425 sprintf(htitle,
"PreSh hits");
427 sprintf(hname,
"hCaloPreSh2");
430 sprintf(hname,
"hCaloPreShE1");
431 sprintf(htitle,
"PreSh hits, energy/GeV");
433 sprintf(hname,
"hCaloPreShE2");
436 sprintf(hname,
"hCaloPreShToF1");
437 sprintf(htitle,
"PreSh hits, ToF/ns");
439 sprintf(hname,
"hCaloPreShToF2");
442 for (Int_t
i = 0;
i < 2; ++
i) {
451 sprintf(hname,
"hCaloPreShPhi");
452 sprintf(htitle,
"PreSh hits, phi/rad");
457 sprintf(hname,
"hCaloPreShEta");
458 sprintf(htitle,
"PreSh hits, eta");
465 sprintf(hname,
"hCaloHcal1");
466 sprintf(htitle,
"Hcal hits");
468 sprintf(hname,
"hCaloHcal2");
471 sprintf(hname,
"hCaloHcalE1");
472 sprintf(htitle,
"Hcal hits, energy/GeV");
474 sprintf(hname,
"hCaloHcalE2");
477 sprintf(hname,
"hCaloHcalToF1");
478 sprintf(htitle,
"Hcal hits, ToF/ns");
480 sprintf(hname,
"hCaloHcalToF2");
483 for (Int_t
i = 0;
i < 2; ++
i) {
492 sprintf(hname,
"hCaloHcalPhi");
493 sprintf(htitle,
"Hcal hits, phi/rad");
498 sprintf(hname,
"hCaloHcalEta");
499 sprintf(htitle,
"Hcal hits, eta");
506 sprintf(hname,
"hTrackerPx1");
507 sprintf(htitle,
"Pixel hits");
509 sprintf(hname,
"hTrackerPx2");
511 for (Int_t
i = 0;
i < 2; ++
i) {
516 sprintf(hname,
"hTrackerPxPhi");
517 sprintf(htitle,
"Pixel hits phi/rad");
522 sprintf(hname,
"hTrackerPxEta");
523 sprintf(htitle,
"Pixel hits eta");
528 sprintf(hname,
"hTrackerPxBToF");
529 sprintf(htitle,
"Pixel barrel hits, ToF/ns");
534 sprintf(hname,
"hTrackerPxBR");
535 sprintf(htitle,
"Pixel barrel hits, R/cm");
540 sprintf(hname,
"hTrackerPxFToF");
541 sprintf(htitle,
"Pixel forward hits, ToF/ns");
546 sprintf(hname,
"hTrackerPxFZ");
547 sprintf(htitle,
"Pixel forward hits, Z/cm");
549 iBooker.
book1D(hname,htitle,200,-100.,100.);
555 sprintf(hname,
"hTrackerSi1");
556 sprintf(htitle,
"Silicon hits");
558 sprintf(hname,
"hTrackerSi2");
560 for (Int_t
i = 0;
i < 2; ++
i) {
565 sprintf(hname,
"hTrackerSiPhi");
566 sprintf(htitle,
"Silicon hits phi/rad");
571 sprintf(hname,
"hTrackerSiEta");
572 sprintf(htitle,
"Silicon hits eta");
577 sprintf(hname,
"hTrackerSiBToF");
578 sprintf(htitle,
"Silicon barrel hits, ToF/ns");
583 sprintf(hname,
"hTrackerSiBR");
584 sprintf(htitle,
"Silicon barrel hits, R/cm");
589 sprintf(hname,
"hTrackerSiFToF");
590 sprintf(htitle,
"Silicon forward hits, ToF/ns");
595 sprintf(hname,
"hTrackerSiFZ");
596 sprintf(htitle,
"Silicon forward hits, Z/cm");
603 sprintf(hname,
"hMuon1");
604 sprintf(htitle,
"Muon hits");
606 sprintf(hname,
"hMuon2");
608 for (Int_t
i = 0;
i < 2; ++
i) {
613 sprintf(hname,
"hMuonPhi");
614 sprintf(htitle,
"Muon hits phi/rad");
619 sprintf(hname,
"hMuonEta");
620 sprintf(htitle,
"Muon hits eta");
625 sprintf(hname,
"hMuonCscToF1");
626 sprintf(htitle,
"Muon CSC hits, ToF/ns");
628 sprintf(hname,
"hMuonCscToF2");
630 for (Int_t
i = 0;
i < 2; ++
i) {
635 sprintf(hname,
"hMuonCscZ");
636 sprintf(htitle,
"Muon CSC hits, Z/cm");
641 sprintf(hname,
"hMuonDtToF1");
642 sprintf(htitle,
"Muon DT hits, ToF/ns");
644 sprintf(hname,
"hMuonDtToF2");
646 for (Int_t
i = 0;
i < 2; ++
i) {
651 sprintf(hname,
"hMuonDtR");
652 sprintf(htitle,
"Muon DT hits, R/cm");
657 sprintf(hname,
"hMuonRpcFToF1");
658 sprintf(htitle,
"Muon RPC forward hits, ToF/ns");
660 sprintf(hname,
"hMuonRpcFToF2");
662 for (Int_t
i = 0;
i < 2; ++
i) {
666 sprintf(hname,
"hMuonRpcFZ");
667 sprintf(htitle,
"Muon RPC forward hits, Z/cm");
672 sprintf(hname,
"hMuonRpcBToF1");
673 sprintf(htitle,
"Muon RPC barrel hits, ToF/ns");
675 sprintf(hname,
"hMuonRpcBToF2");
677 for (Int_t
i = 0;
i < 2; ++
i) {
682 sprintf(hname,
"hMuonRpcBR");
683 sprintf(htitle,
"Muon RPC barrel hits, R/cm");
692 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_analyze";
703 <<
"Processing run " << nrun <<
", event " << nevt
704 <<
" (" <<
count <<
" events total)";
708 <<
"Processing run " << nrun <<
", event " << nevt
709 <<
" (" <<
count <<
" events total)";
716 std::vector<const edm::StableProvenance*> AllProv;
721 <<
"Number of Provenances = " << AllProv.size();
724 TString eventout(
"\nProvenance info:\n");
726 for (
unsigned int i = 0;
i < AllProv.size(); ++
i) {
727 eventout +=
"\n ******************************";
728 eventout +=
"\n Module : ";
729 eventout += AllProv[
i]->moduleLabel();
730 eventout +=
"\n ProductID : ";
731 eventout += AllProv[
i]->productID().id();
732 eventout +=
"\n ClassName : ";
733 eventout += AllProv[
i]->className();
734 eventout +=
"\n InstanceName : ";
735 eventout += AllProv[
i]->productInstanceName();
736 eventout +=
"\n BranchName : ";
737 eventout += AllProv[
i]->branchName();
739 eventout +=
"\n ******************************\n";
760 <<
"Done gathering data from event.";
769 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillG4MC";
773 eventout =
"\nGathering info:";
779 std::vector<edm::Handle<edm::HepMCProduct> > AllHepMCEvt;
784 for (
unsigned int i = 0;
i < AllHepMCEvt.size(); ++
i) {
785 HepMCEvt = AllHepMCEvt[
i];
792 <<
"Unable to find HepMCProduct in event!";
795 eventout +=
"\n Using HepMCProduct: ";
799 const HepMC::GenEvent* MCEvt = HepMCEvt->
GetEvent();
804 eventout +=
"\n Number of Raw Particles collected:......... ";
828 if (!G4VtxContainer.
isValid()) {
830 <<
"Unable to find SimVertex in event!";
835 edm::SimVertexContainer::const_iterator itVtx;
836 for (itVtx = G4VtxContainer->begin(); itVtx != G4VtxContainer->end();
842 itVtx->position().y(),
843 itVtx->position().z(),
844 itVtx->position().e());
847 G4Vtx1.GetCoordinates(G4Vtx);
865 if ( G4TrkContainer.
isValid() ) {
866 edm::SimTrackContainer::const_iterator itTrk;
867 for (itTrk = G4TrkContainer->begin(); itTrk != G4TrkContainer->end();
869 if ( (*itTrk).vertIndex() ==
i ) { multi++; }
878 eventout +=
"\n Number of G4Vertices collected:............ ";
890 if (!G4TrkContainer.
isValid()) {
892 <<
"Unable to find SimTrack in event!";
897 edm::SimTrackContainer::const_iterator itTrk;
898 for (itTrk = G4TrkContainer->begin(); itTrk != G4TrkContainer->end();
904 itTrk->momentum().y(),
905 itTrk->momentum().z(),
906 itTrk->momentum().e());
908 G4Trk1.GetCoordinates(G4Trk);
916 eventout +=
"\n Number of G4Tracks collected:.............. ";
935 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillTrk";
939 eventout =
"\nGathering info:";
944 if (!theTrackerGeometry.
isValid()) {
946 <<
"Unable to find TrackerDigiGeometryRecord in event!";
952 edm::PSimHitContainer::const_iterator itHit;
961 if (!PxlBrlLowContainer.
isValid()) {
963 <<
"Unable to find TrackerHitsPixelBarrelLowTof in event!";
969 if (!PxlBrlHighContainer.
isValid()) {
971 <<
"Unable to find TrackerHitsPixelBarrelHighTof in event!";
976 thePxlBrlHits.insert(thePxlBrlHits.end(),PxlBrlLowContainer->begin(),
977 PxlBrlLowContainer->end());
979 thePxlBrlHits.insert(thePxlBrlHits.end(),PxlBrlHighContainer->begin(),
980 PxlBrlHighContainer->end());
984 for (itHit = thePxlBrlHits.begin(); itHit != thePxlBrlHits.end(); ++itHit) {
989 DetId theDetUnitId(itHit->detUnitId());
1001 <<
"Unable to get GeomDetUnit from PxlBrlHits for Hit " <<
i;
1020 <<
"PxlBrl PSimHit " << i
1021 <<
" is expected to be (det,subdet) = (" 1023 <<
"); value returned is: (" 1024 << detector <<
"," << subdetector <<
")";
1030 eventout +=
"\n Number of Pixel Barrel Hits collected:..... ";
1043 if (!PxlFwdLowContainer.
isValid()) {
1045 <<
"Unable to find TrackerHitsPixelEndcapLowTof in event!";
1051 if (!PxlFwdHighContainer.
isValid()) {
1052 LogDebug(
"GlobalHitsAnalyzer_fillTrk")
1053 <<
"Unable to find TrackerHitsPixelEndcapHighTof in event!";
1058 thePxlFwdHits.insert(thePxlFwdHits.end(),PxlFwdLowContainer->begin(),
1059 PxlFwdLowContainer->end());
1061 thePxlFwdHits.insert(thePxlFwdHits.end(),PxlFwdHighContainer->begin(),
1062 PxlFwdHighContainer->end());
1066 for (itHit = thePxlFwdHits.begin(); itHit != thePxlFwdHits.end(); ++itHit) {
1071 DetId theDetUnitId(itHit->detUnitId());
1083 <<
"Unable to get GeomDetUnit from PxlFwdHits for Hit " <<
i;;
1102 <<
"PxlFwd PSimHit " << i
1103 <<
" is expected to be (det,subdet) = (" 1105 <<
"); value returned is: (" 1106 << detector <<
"," << subdetector <<
")";
1112 eventout +=
"\n Number of Pixel Forward Hits collected:.... ";
1129 if (!SiTIBLowContainer.
isValid()) {
1131 <<
"Unable to find TrackerHitsTIBLowTof in event!";
1137 if (!SiTIBHighContainer.
isValid()) {
1139 <<
"Unable to find TrackerHitsTIBHighTof in event!";
1145 if (!SiTOBLowContainer.
isValid()) {
1147 <<
"Unable to find TrackerHitsTOBLowTof in event!";
1153 if (!SiTOBHighContainer.
isValid()) {
1155 <<
"Unable to find TrackerHitsTOBHighTof in event!";
1160 theSiBrlHits.insert(theSiBrlHits.end(),SiTIBLowContainer->begin(),
1161 SiTIBLowContainer->end());
1163 theSiBrlHits.insert(theSiBrlHits.end(),SiTIBHighContainer->begin(),
1164 SiTIBHighContainer->end());
1166 theSiBrlHits.insert(theSiBrlHits.end(),SiTOBLowContainer->begin(),
1167 SiTOBLowContainer->end());
1169 theSiBrlHits.insert(theSiBrlHits.end(),SiTOBHighContainer->begin(),
1170 SiTOBHighContainer->end());
1174 for (itHit = theSiBrlHits.begin(); itHit != theSiBrlHits.end(); ++itHit) {
1179 DetId theDetUnitId(itHit->detUnitId());
1184 if ((detector ==
dTrk) &&
1193 <<
"Unable to get GeomDetUnit from SiBrlHits for Hit " <<
i;
1212 <<
"SiBrl PSimHit " << i
1213 <<
" is expected to be (det,subdet) = (" 1215 <<
" || " <<
sdSiTOB <<
"); value returned is: (" 1216 << detector <<
"," << subdetector <<
")";
1222 eventout +=
"\n Number of Silicon Barrel Hits collected:... ";
1235 if (!SiTIDLowContainer.
isValid()) {
1237 <<
"Unable to find TrackerHitsTIDLowTof in event!";
1243 if (!SiTIDHighContainer.
isValid()) {
1244 LogDebug(
"GlobalHitsAnalyzer_fillTrk")
1245 <<
"Unable to find TrackerHitsTIDHighTof in event!";
1251 if (!SiTECLowContainer.
isValid()) {
1253 <<
"Unable to find TrackerHitsTECLowTof in event!";
1259 if (!SiTECHighContainer.
isValid()) {
1261 <<
"Unable to find TrackerHitsTECHighTof in event!";
1266 theSiFwdHits.insert(theSiFwdHits.end(),SiTIDLowContainer->begin(),
1267 SiTIDLowContainer->end());
1269 theSiFwdHits.insert(theSiFwdHits.end(),SiTIDHighContainer->begin(),
1270 SiTIDHighContainer->end());
1272 theSiFwdHits.insert(theSiFwdHits.end(),SiTECLowContainer->begin(),
1273 SiTECLowContainer->end());
1275 theSiFwdHits.insert(theSiFwdHits.end(),SiTECHighContainer->begin(),
1276 SiTECHighContainer->end());
1280 for (itHit = theSiFwdHits.begin(); itHit != theSiFwdHits.end(); ++itHit) {
1285 DetId theDetUnitId(itHit->detUnitId());
1290 if ((detector ==
dTrk) &&
1299 <<
"Unable to get GeomDetUnit from SiFwdHits Hit " <<
i;
1318 <<
"SiFwd PSimHit " << i
1319 <<
" is expected to be (det,subdet) = (" 1321 <<
" || " <<
sdSiTEC <<
"); value returned is: (" 1322 << detector <<
"," << subdetector <<
")";
1328 eventout +=
"\n Number of Silicon Forward Hits collected:.. ";
1347 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillMuon";
1351 eventout =
"\nGathering info:";
1354 edm::PSimHitContainer::const_iterator itHit;
1362 if (!theCSCGeometry.
isValid()) {
1364 <<
"Unable to find MuonGeometryRecord for the CSCGeometry in event!";
1372 if (!MuonCSCContainer.
isValid()) {
1374 <<
"Unable to find MuonCSCHits in event!";
1381 for (itHit = MuonCSCContainer->begin(); itHit != MuonCSCContainer->end();
1387 DetId theDetUnitId(itHit->detUnitId());
1392 if ((detector ==
dMuon) &&
1400 <<
"Unable to get GeomDetUnit from theCSCMuon for hit " <<
i;
1420 <<
"MuonCsc PSimHit " << i
1421 <<
" is expected to be (det,subdet) = (" 1423 <<
"); value returned is: (" 1424 << detector <<
"," << subdetector <<
")";
1430 eventout +=
"\n Number of CSC muon Hits collected:......... ";
1443 if (!theDTGeometry.
isValid()) {
1445 <<
"Unable to find MuonGeometryRecord for the DTGeometry in event!";
1453 if (!MuonDtContainer.
isValid()) {
1455 <<
"Unable to find MuonDTHits in event!";
1462 for (itHit = MuonDtContainer->begin(); itHit != MuonDtContainer->end();
1468 DetId theDetUnitId(itHit->detUnitId());
1473 if ((detector ==
dMuon) &&
1478 DTWireId wireId(itHit->detUnitId());
1481 const DTLayer *theDet = theDTMuon.
layer(wireId.layerId());
1485 <<
"Unable to get GeomDetUnit from theDtMuon for hit " <<
i;
1492 const BoundPlane& bSurface = theDet->surface();
1505 <<
"MuonDt PSimHit " << i
1506 <<
" is expected to be (det,subdet) = (" 1508 <<
"); value returned is: (" 1509 << detector <<
"," << subdetector <<
")";
1515 eventout +=
"\n Number of DT muon Hits collected:.......... ";
1529 if (!theRPCGeometry.
isValid()) {
1531 <<
"Unable to find MuonGeometryRecord for the RPCGeometry in event!";
1539 if (!MuonRPCContainer.
isValid()) {
1541 <<
"Unable to find MuonRPCHits in event!";
1548 int RPCBrl =0, RPCFwd = 0;
1549 for (itHit = MuonRPCContainer->begin(); itHit != MuonRPCContainer->end();
1555 DetId theDetUnitId(itHit->detUnitId());
1560 if ((detector ==
dMuon) &&
1564 RPCDetId RPCId(itHit->detUnitId());
1567 int region = RPCId.
region();
1574 <<
"Unable to get GeomDetUnit from theRPCMuon for hit " <<
i;
1603 localPosition()).perp());
1611 <<
"Invalid region for RPC Muon hit" <<
i;
1616 <<
"MuonRpc PSimHit " << i
1617 <<
" is expected to be (det,subdet) = (" 1619 <<
"); value returned is: (" 1620 << detector <<
"," << subdetector <<
")";
1626 eventout +=
"\n Number of RPC muon Hits collected:......... ";
1628 eventout +=
"\n RPC Barrel muon Hits:............ ";
1630 eventout +=
"\n RPC Forward muon Hits:........... ";
1649 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillECal";
1653 eventout =
"\nGathering info:";
1658 if (!theCaloGeometry.
isValid()) {
1660 <<
"Unable to find CaloGeometryRecord in event!";
1666 edm::PCaloHitContainer::const_iterator itHit;
1677 <<
"Unable to find EcalHitsEB in event!";
1685 <<
"Unable to find EcalHitsEE in event!";
1690 theECalHits.insert(theECalHits.end(),EBContainer->begin(),
1691 EBContainer->end());
1693 theECalHits.insert(theECalHits.end(),EEContainer->begin(),
1694 EEContainer->end());
1698 for (itHit = theECalHits.begin(); itHit != theECalHits.end(); ++itHit) {
1703 DetId theDetUnitId(itHit->id());
1708 if ((detector ==
dEcal) &&
1714 getSubdetectorGeometry(theDetUnitId)->
getGeometry(theDetUnitId);
1718 <<
"Unable to get CaloCellGeometry from ECalHits for Hit " <<
i;
1736 <<
"ECal PCaloHit " << i
1737 <<
" is expected to be (det,subdet) = (" 1739 <<
" || " <<
sdEcalFwd <<
"); value returned is: (" 1740 << detector <<
"," << subdetector <<
")";
1746 eventout +=
"\n Number of ECal Hits collected:............. ";
1759 if (!PreShContainer.
isValid()) {
1761 <<
"Unable to find EcalHitsES in event!";
1768 for (itHit = PreShContainer->begin();
1769 itHit != PreShContainer->end(); ++itHit) {
1774 DetId theDetUnitId(itHit->id());
1779 if ((detector ==
dEcal) &&
1784 getSubdetectorGeometry(theDetUnitId)->
getGeometry(theDetUnitId);
1788 <<
"Unable to get CaloCellGeometry from PreShContainer for Hit " 1807 <<
"PreSh PCaloHit " << i
1808 <<
" is expected to be (det,subdet) = (" 1810 <<
"); value returned is: (" 1811 << detector <<
"," << subdetector <<
")";
1817 eventout +=
"\n Number of PreSh Hits collected:............ ";
1834 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillHCal";
1838 eventout =
"\nGathering info:";
1843 if (!theCaloGeometry.
isValid()) {
1845 <<
"Unable to find CaloGeometryRecord in event!";
1855 edm::PCaloHitContainer::const_iterator itHit;
1863 if (!HCalContainer.
isValid()) {
1865 <<
"Unable to find HCalHits in event!";
1872 for (itHit = HCalContainer->begin();
1873 itHit != HCalContainer->end(); ++itHit) {
1879 unsigned int id_ = itHit->id();
1881 else theDetUnitId = id_;
1887 if ((detector ==
dHcal) &&
1895 getSubdetectorGeometry(theDetUnitId)->
getGeometry(theDetUnitId);
1899 <<
"Unable to get CaloCellGeometry from HCalContainer for Hit " 1918 <<
"HCal PCaloHit " << i
1919 <<
" is expected to be (det,subdet) = (" 1922 <<
"); value returned is: (" 1923 << detector <<
"," << subdetector <<
")";
1929 eventout +=
"\n Number of HCal Hits collected:............. ";
MonitorElement * meTrackerSiPhi
void getManyByType(std::vector< Handle< PROD > > &results) const
T getParameter(std::string const &) const
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_
virtual ~GlobalHitsAnalyzer()
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]
const GeomDetUnit * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
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_
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
const GeomDetUnit * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
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
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
virtual 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]