14 getAllProvenances(
false), printProvenanceInfo(
false),
19 consumesMany<edm::HepMCProduct>();
20 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_GlobalHitsAnalyzer";
30 m_Prov.getUntrackedParameter<
bool>(
"GetAllProvenances");
32 m_Prov.getUntrackedParameter<
bool>(
"PrintProvenanceInfo");
114 if (verbosity >= 0) {
116 <<
"\n===============================\n"
117 <<
"Initialized as EDAnalyzer with parameter values:\n"
118 <<
" Name = " <<
fName <<
"\n"
119 <<
" Verbosity = " << verbosity <<
"\n"
120 <<
" Frequency = " << frequency <<
"\n"
121 <<
" VtxUnit = " << vtxunit <<
"\n"
122 <<
" GetProv = " << getAllProvenances <<
"\n"
123 <<
" PrintProv = " << printProvenanceInfo <<
"\n"
124 <<
" PxlBrlLowSrc = " << PxlBrlLowSrc_.label()
125 <<
":" << PxlBrlLowSrc_.instance() <<
"\n"
126 <<
" PxlBrlHighSrc = " << PxlBrlHighSrc_.
label()
127 <<
":" << PxlBrlHighSrc_.
instance() <<
"\n"
128 <<
" PxlFwdLowSrc = " << PxlFwdLowSrc_.
label()
129 <<
":" << PxlBrlLowSrc_.instance() <<
"\n"
130 <<
" PxlFwdHighSrc = " << PxlFwdHighSrc_.
label()
131 <<
":" << PxlBrlHighSrc_.
instance() <<
"\n"
132 <<
" SiTIBLowSrc = " << SiTIBLowSrc_.
label()
133 <<
":" << SiTIBLowSrc_.
instance() <<
"\n"
134 <<
" SiTIBHighSrc = " << SiTIBHighSrc_.
label()
135 <<
":" << SiTIBHighSrc_.
instance() <<
"\n"
136 <<
" SiTOBLowSrc = " << SiTOBLowSrc_.
label()
137 <<
":" << SiTOBLowSrc_.
instance() <<
"\n"
138 <<
" SiTOBHighSrc = " << SiTOBHighSrc_.
label()
139 <<
":" << SiTOBHighSrc_.
instance() <<
"\n"
140 <<
" SiTIDLowSrc = " << SiTIDLowSrc_.
label()
141 <<
":" << SiTIDLowSrc_.
instance() <<
"\n"
142 <<
" SiTIDHighSrc = " << SiTIDHighSrc_.
label()
143 <<
":" << SiTIDHighSrc_.
instance() <<
"\n"
144 <<
" SiTECLowSrc = " << SiTECLowSrc_.
label()
145 <<
":" << SiTECLowSrc_.
instance() <<
"\n"
146 <<
" SiTECHighSrc = " << SiTECHighSrc_.
label()
147 <<
":" << SiTECHighSrc_.
instance() <<
"\n"
148 <<
" MuonCscSrc = " << MuonCscSrc_.
label()
149 <<
":" << MuonCscSrc_.
instance() <<
"\n"
150 <<
" MuonDtSrc = " << MuonDtSrc_.
label()
151 <<
":" << MuonDtSrc_.
instance() <<
"\n"
152 <<
" MuonRpcSrc = " << MuonRpcSrc_.
label()
153 <<
":" << MuonRpcSrc_.
instance() <<
"\n"
154 <<
" ECalEBSrc = " << ECalEBSrc_.
label()
155 <<
":" << ECalEBSrc_.
instance() <<
"\n"
156 <<
" ECalEESrc = " << ECalEESrc_.
label()
157 <<
":" << ECalEESrc_.
instance() <<
"\n"
158 <<
" ECalESSrc = " << ECalESSrc_.
label()
159 <<
":" << ECalESSrc_.
instance() <<
"\n"
160 <<
" HCalSrc = " << HCalSrc_.
label()
161 <<
":" << HCalSrc_.
instance() <<
"\n"
163 <<
" validHepMCevt = "
165 <<
" validG4VtxContainer = "
166 <<
":" << validG4VtxContainer <<
"\n"
167 <<
" validG4trkContainer = "
168 <<
":" << validG4trkContainer <<
"\n"
169 <<
" validPxlBrlLow = "
170 <<
":" << validPxlBrlLow <<
"\n"
171 <<
" validPxlBrlHigh = "
172 <<
":" << validPxlBrlHigh <<
"\n"
173 <<
" validPxlFwdLow = "
174 <<
":" << validPxlFwdLow <<
"\n"
175 <<
" validPxlFwdHigh = "
176 <<
":" << validPxlFwdHigh <<
"\n"
177 <<
" validSiTIBLow = "
178 <<
":" << validSiTIBLow <<
"\n"
179 <<
" validSiTIBHigh = "
180 <<
":" << validSiTIBHigh <<
"\n"
181 <<
" validSiTOBLow = "
182 <<
":" << validSiTOBLow <<
"\n"
183 <<
" validSiTOBHigh = "
184 <<
":" << validSiTOBHigh <<
"\n"
185 <<
" validSiTIDLow = "
186 <<
":" << validSiTIDLow <<
"\n"
187 <<
" validSiTIDHigh = "
188 <<
":" << validSiTIDHigh <<
"\n"
189 <<
" validSiTECLow = "
190 <<
":" << validSiTECLow <<
"\n"
191 <<
" validSiTECHigh = "
192 <<
":" << validSiTECHigh <<
"\n"
193 <<
" validMuonCSC = "
194 <<
":" << validMuonCSC <<
"\n"
196 <<
":" << validMuonDt <<
"\n"
197 <<
" validMuonRPC = "
198 <<
":" << validMuonRPC <<
"\n"
200 <<
":" << validEB <<
"\n"
202 <<
":" << validEE <<
"\n"
204 <<
":" << validPresh <<
"\n"
206 <<
":" << validHcal <<
"\n"
207 <<
"===============================\n";
211 for (Int_t
i = 0;
i < 2; ++
i) {
277 sprintf(hname,
"hMCRGP1");
278 sprintf(htitle,
"RawGenParticles");
280 sprintf(hname,
"hMCRGP2");
282 for (Int_t
i = 0;
i < 2; ++
i) {
287 sprintf(hname,
"hMCG4Vtx1");
288 sprintf(htitle,
"G4 Vertices");
290 sprintf(hname,
"hMCG4Vtx2");
292 for (Int_t
i = 0;
i < 2; ++
i) {
297 sprintf(hname,
"hMCG4Trk1");
298 sprintf(htitle,
"G4 Tracks");
300 sprintf(hname,
"hMCG4Trk2");
302 for (Int_t
i = 0;
i < 2; ++
i) {
307 sprintf(hname,
"hGeantVtxX1");
308 sprintf(htitle,
"Geant vertex x/micrometer");
310 sprintf(hname,
"hGeantVtxX2");
312 for (Int_t
i = 0;
i < 2; ++
i) {
317 sprintf(hname,
"hGeantVtxY1");
318 sprintf(htitle,
"Geant vertex y/micrometer");
320 sprintf(hname,
"hGeantVtxY2");
322 for (Int_t
i = 0;
i < 2; ++
i) {
327 sprintf(hname,
"hGeantVtxZ1");
328 sprintf(htitle,
"Geant vertex z/millimeter");
330 sprintf(hname,
"hGeantVtxZ2");
333 for (Int_t
i = 0;
i < 2; ++
i) {
338 sprintf(hname,
"hGeantTrkPt");
339 sprintf(htitle,
"Log10 Geant track pt/GeV");
344 sprintf(hname,
"hGeantTrkE");
345 sprintf(htitle,
"Log10 Geant track E/GeV");
350 sprintf(hname,
"hGeantVtxEta");
351 sprintf(htitle,
"Geant vertices eta");
356 sprintf(hname,
"hGeantVtxPhi");
357 sprintf(htitle,
"Geant vertices phi/rad");
362 sprintf(hname,
"hGeantVtxRad1");
363 sprintf(htitle,
"Geant vertices radius/cm");
365 sprintf(hname,
"hGeantVtxRad2");
367 for (Int_t
i = 0;
i < 2; ++
i) {
372 sprintf(hname,
"hGeantVtxMulti");
373 sprintf(htitle,
"Geant vertices outgoing multiplicity");
380 sprintf(hname,
"hCaloEcal1");
381 sprintf(htitle,
"Ecal hits");
383 sprintf(hname,
"hCaloEcal2");
386 sprintf(hname,
"hCaloEcalE1");
387 sprintf(htitle,
"Ecal hits, energy/GeV");
389 sprintf(hname,
"hCaloEcalE2");
391 sprintf(hname,
"hCaloEcalToF1");
392 sprintf(htitle,
"Ecal hits, ToF/ns");
394 sprintf(hname,
"hCaloEcalToF2");
397 for (Int_t
i = 0;
i < 2; ++
i) {
406 sprintf(hname,
"hCaloEcalPhi");
407 sprintf(htitle,
"Ecal hits, phi/rad");
412 sprintf(hname,
"hCaloEcalEta");
413 sprintf(htitle,
"Ecal hits, eta");
418 sprintf(hname,
"hCaloPreSh1");
419 sprintf(htitle,
"PreSh hits");
421 sprintf(hname,
"hCaloPreSh2");
424 sprintf(hname,
"hCaloPreShE1");
425 sprintf(htitle,
"PreSh hits, energy/GeV");
427 sprintf(hname,
"hCaloPreShE2");
430 sprintf(hname,
"hCaloPreShToF1");
431 sprintf(htitle,
"PreSh hits, ToF/ns");
433 sprintf(hname,
"hCaloPreShToF2");
436 for (Int_t
i = 0;
i < 2; ++
i) {
445 sprintf(hname,
"hCaloPreShPhi");
446 sprintf(htitle,
"PreSh hits, phi/rad");
451 sprintf(hname,
"hCaloPreShEta");
452 sprintf(htitle,
"PreSh hits, eta");
459 sprintf(hname,
"hCaloHcal1");
460 sprintf(htitle,
"Hcal hits");
462 sprintf(hname,
"hCaloHcal2");
465 sprintf(hname,
"hCaloHcalE1");
466 sprintf(htitle,
"Hcal hits, energy/GeV");
468 sprintf(hname,
"hCaloHcalE2");
471 sprintf(hname,
"hCaloHcalToF1");
472 sprintf(htitle,
"Hcal hits, ToF/ns");
474 sprintf(hname,
"hCaloHcalToF2");
477 for (Int_t
i = 0;
i < 2; ++
i) {
486 sprintf(hname,
"hCaloHcalPhi");
487 sprintf(htitle,
"Hcal hits, phi/rad");
492 sprintf(hname,
"hCaloHcalEta");
493 sprintf(htitle,
"Hcal hits, eta");
500 sprintf(hname,
"hTrackerPx1");
501 sprintf(htitle,
"Pixel hits");
503 sprintf(hname,
"hTrackerPx2");
505 for (Int_t
i = 0;
i < 2; ++
i) {
510 sprintf(hname,
"hTrackerPxPhi");
511 sprintf(htitle,
"Pixel hits phi/rad");
516 sprintf(hname,
"hTrackerPxEta");
517 sprintf(htitle,
"Pixel hits eta");
522 sprintf(hname,
"hTrackerPxBToF");
523 sprintf(htitle,
"Pixel barrel hits, ToF/ns");
528 sprintf(hname,
"hTrackerPxBR");
529 sprintf(htitle,
"Pixel barrel hits, R/cm");
534 sprintf(hname,
"hTrackerPxFToF");
535 sprintf(htitle,
"Pixel forward hits, ToF/ns");
540 sprintf(hname,
"hTrackerPxFZ");
541 sprintf(htitle,
"Pixel forward hits, Z/cm");
543 iBooker.
book1D(hname,htitle,200,-100.,100.);
549 sprintf(hname,
"hTrackerSi1");
550 sprintf(htitle,
"Silicon hits");
552 sprintf(hname,
"hTrackerSi2");
554 for (Int_t
i = 0;
i < 2; ++
i) {
559 sprintf(hname,
"hTrackerSiPhi");
560 sprintf(htitle,
"Silicon hits phi/rad");
565 sprintf(hname,
"hTrackerSiEta");
566 sprintf(htitle,
"Silicon hits eta");
571 sprintf(hname,
"hTrackerSiBToF");
572 sprintf(htitle,
"Silicon barrel hits, ToF/ns");
577 sprintf(hname,
"hTrackerSiBR");
578 sprintf(htitle,
"Silicon barrel hits, R/cm");
583 sprintf(hname,
"hTrackerSiFToF");
584 sprintf(htitle,
"Silicon forward hits, ToF/ns");
589 sprintf(hname,
"hTrackerSiFZ");
590 sprintf(htitle,
"Silicon forward hits, Z/cm");
597 sprintf(hname,
"hMuon1");
598 sprintf(htitle,
"Muon hits");
600 sprintf(hname,
"hMuon2");
602 for (Int_t
i = 0;
i < 2; ++
i) {
607 sprintf(hname,
"hMuonPhi");
608 sprintf(htitle,
"Muon hits phi/rad");
613 sprintf(hname,
"hMuonEta");
614 sprintf(htitle,
"Muon hits eta");
619 sprintf(hname,
"hMuonCscToF1");
620 sprintf(htitle,
"Muon CSC hits, ToF/ns");
622 sprintf(hname,
"hMuonCscToF2");
624 for (Int_t
i = 0;
i < 2; ++
i) {
629 sprintf(hname,
"hMuonCscZ");
630 sprintf(htitle,
"Muon CSC hits, Z/cm");
635 sprintf(hname,
"hMuonDtToF1");
636 sprintf(htitle,
"Muon DT hits, ToF/ns");
638 sprintf(hname,
"hMuonDtToF2");
640 for (Int_t
i = 0;
i < 2; ++
i) {
645 sprintf(hname,
"hMuonDtR");
646 sprintf(htitle,
"Muon DT hits, R/cm");
651 sprintf(hname,
"hMuonRpcFToF1");
652 sprintf(htitle,
"Muon RPC forward hits, ToF/ns");
654 sprintf(hname,
"hMuonRpcFToF2");
656 for (Int_t
i = 0;
i < 2; ++
i) {
660 sprintf(hname,
"hMuonRpcFZ");
661 sprintf(htitle,
"Muon RPC forward hits, Z/cm");
666 sprintf(hname,
"hMuonRpcBToF1");
667 sprintf(htitle,
"Muon RPC barrel hits, ToF/ns");
669 sprintf(hname,
"hMuonRpcBToF2");
671 for (Int_t
i = 0;
i < 2; ++
i) {
676 sprintf(hname,
"hMuonRpcBR");
677 sprintf(htitle,
"Muon RPC barrel hits, R/cm");
686 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_analyze";
697 <<
"Processing run " << nrun <<
", event " << nevt
698 <<
" (" <<
count <<
" events total)";
702 <<
"Processing run " << nrun <<
", event " << nevt
703 <<
" (" <<
count <<
" events total)";
710 std::vector<const edm::Provenance*> AllProv;
715 <<
"Number of Provenances = " << AllProv.size();
718 TString eventout(
"\nProvenance info:\n");
720 for (
unsigned int i = 0;
i < AllProv.size(); ++
i) {
721 eventout +=
"\n ******************************";
722 eventout +=
"\n Module : ";
723 eventout += AllProv[
i]->moduleLabel();
724 eventout +=
"\n ProductID : ";
725 eventout += AllProv[
i]->productID().id();
726 eventout +=
"\n ClassName : ";
727 eventout += AllProv[
i]->className();
728 eventout +=
"\n InstanceName : ";
729 eventout += AllProv[
i]->productInstanceName();
730 eventout +=
"\n BranchName : ";
731 eventout += AllProv[
i]->branchName();
733 eventout +=
"\n ******************************\n";
754 <<
"Done gathering data from event.";
763 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillG4MC";
767 eventout =
"\nGathering info:";
773 std::vector<edm::Handle<edm::HepMCProduct> > AllHepMCEvt;
778 for (
unsigned int i = 0;
i < AllHepMCEvt.size(); ++
i) {
779 HepMCEvt = AllHepMCEvt[
i];
786 <<
"Unable to find HepMCProduct in event!";
789 eventout +=
"\n Using HepMCProduct: ";
793 const HepMC::GenEvent* MCEvt = HepMCEvt->GetEvent();
798 eventout +=
"\n Number of Raw Particles collected:......... ";
822 if (!G4VtxContainer.
isValid()) {
824 <<
"Unable to find SimVertex in event!";
829 edm::SimVertexContainer::const_iterator itVtx;
830 for (itVtx = G4VtxContainer->begin(); itVtx != G4VtxContainer->end();
836 itVtx->position().y(),
837 itVtx->position().z(),
838 itVtx->position().e());
841 G4Vtx1.GetCoordinates(G4Vtx);
859 if ( G4TrkContainer.
isValid() ) {
860 edm::SimTrackContainer::const_iterator itTrk;
861 for (itTrk = G4TrkContainer->begin(); itTrk != G4TrkContainer->end();
863 if ( (*itTrk).vertIndex() ==
i ) { multi++; }
872 eventout +=
"\n Number of G4Vertices collected:............ ";
884 if (!G4TrkContainer.
isValid()) {
886 <<
"Unable to find SimTrack in event!";
891 edm::SimTrackContainer::const_iterator itTrk;
892 for (itTrk = G4TrkContainer->begin(); itTrk != G4TrkContainer->end();
898 itTrk->momentum().y(),
899 itTrk->momentum().z(),
900 itTrk->momentum().e());
902 G4Trk1.GetCoordinates(G4Trk);
910 eventout +=
"\n Number of G4Tracks collected:.............. ";
929 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillTrk";
933 eventout =
"\nGathering info:";
938 if (!theTrackerGeometry.
isValid()) {
940 <<
"Unable to find TrackerDigiGeometryRecord in event!";
946 edm::PSimHitContainer::const_iterator itHit;
955 if (!PxlBrlLowContainer.
isValid()) {
957 <<
"Unable to find TrackerHitsPixelBarrelLowTof in event!";
963 if (!PxlBrlHighContainer.
isValid()) {
965 <<
"Unable to find TrackerHitsPixelBarrelHighTof in event!";
970 thePxlBrlHits.insert(thePxlBrlHits.end(),PxlBrlLowContainer->begin(),
971 PxlBrlLowContainer->end());
973 thePxlBrlHits.insert(thePxlBrlHits.end(),PxlBrlHighContainer->begin(),
974 PxlBrlHighContainer->end());
978 for (itHit = thePxlBrlHits.begin(); itHit != thePxlBrlHits.end(); ++itHit) {
983 DetId theDetUnitId(itHit->detUnitId());
984 int detector = theDetUnitId.
det();
995 <<
"Unable to get GeomDetUnit from PxlBrlHits for Hit " <<
i;
1014 <<
"PxlBrl PSimHit " << i
1015 <<
" is expected to be (det,subdet) = ("
1017 <<
"); value returned is: ("
1018 << detector <<
"," << subdetector <<
")";
1024 eventout +=
"\n Number of Pixel Barrel Hits collected:..... ";
1037 if (!PxlFwdLowContainer.
isValid()) {
1039 <<
"Unable to find TrackerHitsPixelEndcapLowTof in event!";
1045 if (!PxlFwdHighContainer.
isValid()) {
1046 LogDebug(
"GlobalHitsAnalyzer_fillTrk")
1047 <<
"Unable to find TrackerHitsPixelEndcapHighTof in event!";
1052 thePxlFwdHits.insert(thePxlFwdHits.end(),PxlFwdLowContainer->begin(),
1053 PxlFwdLowContainer->end());
1055 thePxlFwdHits.insert(thePxlFwdHits.end(),PxlFwdHighContainer->begin(),
1056 PxlFwdHighContainer->end());
1060 for (itHit = thePxlFwdHits.begin(); itHit != thePxlFwdHits.end(); ++itHit) {
1065 DetId theDetUnitId(itHit->detUnitId());
1066 int detector = theDetUnitId.
det();
1077 <<
"Unable to get GeomDetUnit from PxlFwdHits for Hit " <<
i;;
1096 <<
"PxlFwd PSimHit " << i
1097 <<
" is expected to be (det,subdet) = ("
1099 <<
"); value returned is: ("
1100 << detector <<
"," << subdetector <<
")";
1106 eventout +=
"\n Number of Pixel Forward Hits collected:.... ";
1123 if (!SiTIBLowContainer.
isValid()) {
1125 <<
"Unable to find TrackerHitsTIBLowTof in event!";
1131 if (!SiTIBHighContainer.
isValid()) {
1133 <<
"Unable to find TrackerHitsTIBHighTof in event!";
1139 if (!SiTOBLowContainer.
isValid()) {
1141 <<
"Unable to find TrackerHitsTOBLowTof in event!";
1147 if (!SiTOBHighContainer.
isValid()) {
1149 <<
"Unable to find TrackerHitsTOBHighTof in event!";
1154 theSiBrlHits.insert(theSiBrlHits.end(),SiTIBLowContainer->begin(),
1155 SiTIBLowContainer->end());
1157 theSiBrlHits.insert(theSiBrlHits.end(),SiTIBHighContainer->begin(),
1158 SiTIBHighContainer->end());
1160 theSiBrlHits.insert(theSiBrlHits.end(),SiTOBLowContainer->begin(),
1161 SiTOBLowContainer->end());
1163 theSiBrlHits.insert(theSiBrlHits.end(),SiTOBHighContainer->begin(),
1164 SiTOBHighContainer->end());
1168 for (itHit = theSiBrlHits.begin(); itHit != theSiBrlHits.end(); ++itHit) {
1173 DetId theDetUnitId(itHit->detUnitId());
1174 int detector = theDetUnitId.
det();
1178 if ((detector ==
dTrk) &&
1187 <<
"Unable to get GeomDetUnit from SiBrlHits for Hit " <<
i;
1206 <<
"SiBrl PSimHit " << i
1207 <<
" is expected to be (det,subdet) = ("
1209 <<
" || " <<
sdSiTOB <<
"); value returned is: ("
1210 << detector <<
"," << subdetector <<
")";
1216 eventout +=
"\n Number of Silicon Barrel Hits collected:... ";
1229 if (!SiTIDLowContainer.
isValid()) {
1231 <<
"Unable to find TrackerHitsTIDLowTof in event!";
1237 if (!SiTIDHighContainer.
isValid()) {
1238 LogDebug(
"GlobalHitsAnalyzer_fillTrk")
1239 <<
"Unable to find TrackerHitsTIDHighTof in event!";
1245 if (!SiTECLowContainer.
isValid()) {
1247 <<
"Unable to find TrackerHitsTECLowTof in event!";
1253 if (!SiTECHighContainer.
isValid()) {
1255 <<
"Unable to find TrackerHitsTECHighTof in event!";
1260 theSiFwdHits.insert(theSiFwdHits.end(),SiTIDLowContainer->begin(),
1261 SiTIDLowContainer->end());
1263 theSiFwdHits.insert(theSiFwdHits.end(),SiTIDHighContainer->begin(),
1264 SiTIDHighContainer->end());
1266 theSiFwdHits.insert(theSiFwdHits.end(),SiTECLowContainer->begin(),
1267 SiTECLowContainer->end());
1269 theSiFwdHits.insert(theSiFwdHits.end(),SiTECHighContainer->begin(),
1270 SiTECHighContainer->end());
1274 for (itHit = theSiFwdHits.begin(); itHit != theSiFwdHits.end(); ++itHit) {
1279 DetId theDetUnitId(itHit->detUnitId());
1280 int detector = theDetUnitId.
det();
1284 if ((detector ==
dTrk) &&
1293 <<
"Unable to get GeomDetUnit from SiFwdHits Hit " <<
i;
1312 <<
"SiFwd PSimHit " << i
1313 <<
" is expected to be (det,subdet) = ("
1315 <<
" || " <<
sdSiTEC <<
"); value returned is: ("
1316 << detector <<
"," << subdetector <<
")";
1322 eventout +=
"\n Number of Silicon Forward Hits collected:.. ";
1341 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillMuon";
1345 eventout =
"\nGathering info:";
1348 edm::PSimHitContainer::const_iterator itHit;
1356 if (!theCSCGeometry.
isValid()) {
1358 <<
"Unable to find MuonGeometryRecord for the CSCGeometry in event!";
1366 if (!MuonCSCContainer.
isValid()) {
1368 <<
"Unable to find MuonCSCHits in event!";
1375 for (itHit = MuonCSCContainer->begin(); itHit != MuonCSCContainer->end();
1381 DetId theDetUnitId(itHit->detUnitId());
1382 int detector = theDetUnitId.
det();
1386 if ((detector ==
dMuon) &&
1394 <<
"Unable to get GeomDetUnit from theCSCMuon for hit " <<
i;
1414 <<
"MuonCsc PSimHit " << i
1415 <<
" is expected to be (det,subdet) = ("
1417 <<
"); value returned is: ("
1418 << detector <<
"," << subdetector <<
")";
1424 eventout +=
"\n Number of CSC muon Hits collected:......... ";
1437 if (!theDTGeometry.
isValid()) {
1439 <<
"Unable to find MuonGeometryRecord for the DTGeometry in event!";
1447 if (!MuonDtContainer.
isValid()) {
1449 <<
"Unable to find MuonDTHits in event!";
1456 for (itHit = MuonDtContainer->begin(); itHit != MuonDtContainer->end();
1462 DetId theDetUnitId(itHit->detUnitId());
1463 int detector = theDetUnitId.
det();
1467 if ((detector ==
dMuon) &&
1472 DTWireId wireId(itHit->detUnitId());
1475 const DTLayer *theDet = theDTMuon.
layer(wireId.layerId());
1479 <<
"Unable to get GeomDetUnit from theDtMuon for hit " <<
i;
1486 const BoundPlane& bSurface = theDet->surface();
1499 <<
"MuonDt PSimHit " << i
1500 <<
" is expected to be (det,subdet) = ("
1502 <<
"); value returned is: ("
1503 << detector <<
"," << subdetector <<
")";
1509 eventout +=
"\n Number of DT muon Hits collected:.......... ";
1523 if (!theRPCGeometry.
isValid()) {
1525 <<
"Unable to find MuonGeometryRecord for the RPCGeometry in event!";
1533 if (!MuonRPCContainer.
isValid()) {
1535 <<
"Unable to find MuonRPCHits in event!";
1542 int RPCBrl =0, RPCFwd = 0;
1543 for (itHit = MuonRPCContainer->begin(); itHit != MuonRPCContainer->end();
1549 DetId theDetUnitId(itHit->detUnitId());
1550 int detector = theDetUnitId.
det();
1554 if ((detector ==
dMuon) &&
1558 RPCDetId RPCId(itHit->detUnitId());
1561 int region = RPCId.region();
1568 <<
"Unable to get GeomDetUnit from theRPCMuon for hit " <<
i;
1597 localPosition()).perp());
1605 <<
"Invalid region for RPC Muon hit" <<
i;
1610 <<
"MuonRpc PSimHit " << i
1611 <<
" is expected to be (det,subdet) = ("
1613 <<
"); value returned is: ("
1614 << detector <<
"," << subdetector <<
")";
1620 eventout +=
"\n Number of RPC muon Hits collected:......... ";
1622 eventout +=
"\n RPC Barrel muon Hits:............ ";
1624 eventout +=
"\n RPC Forward muon Hits:........... ";
1643 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillECal";
1647 eventout =
"\nGathering info:";
1652 if (!theCaloGeometry.
isValid()) {
1654 <<
"Unable to find CaloGeometryRecord in event!";
1660 edm::PCaloHitContainer::const_iterator itHit;
1671 <<
"Unable to find EcalHitsEB in event!";
1679 <<
"Unable to find EcalHitsEE in event!";
1684 theECalHits.insert(theECalHits.end(),EBContainer->begin(),
1685 EBContainer->end());
1687 theECalHits.insert(theECalHits.end(),EEContainer->begin(),
1688 EEContainer->end());
1692 for (itHit = theECalHits.begin(); itHit != theECalHits.end(); ++itHit) {
1697 DetId theDetUnitId(itHit->id());
1698 int detector = theDetUnitId.
det();
1702 if ((detector ==
dEcal) &&
1708 getSubdetectorGeometry(theDetUnitId)->
getGeometry(theDetUnitId);
1712 <<
"Unable to get CaloCellGeometry from ECalHits for Hit " <<
i;
1730 <<
"ECal PCaloHit " << i
1731 <<
" is expected to be (det,subdet) = ("
1733 <<
" || " <<
sdEcalFwd <<
"); value returned is: ("
1734 << detector <<
"," << subdetector <<
")";
1740 eventout +=
"\n Number of ECal Hits collected:............. ";
1753 if (!PreShContainer.
isValid()) {
1755 <<
"Unable to find EcalHitsES in event!";
1762 for (itHit = PreShContainer->begin();
1763 itHit != PreShContainer->end(); ++itHit) {
1768 DetId theDetUnitId(itHit->id());
1769 int detector = theDetUnitId.
det();
1773 if ((detector ==
dEcal) &&
1778 getSubdetectorGeometry(theDetUnitId)->
getGeometry(theDetUnitId);
1782 <<
"Unable to get CaloCellGeometry from PreShContainer for Hit "
1801 <<
"PreSh PCaloHit " << i
1802 <<
" is expected to be (det,subdet) = ("
1804 <<
"); value returned is: ("
1805 << detector <<
"," << subdetector <<
")";
1811 eventout +=
"\n Number of PreSh Hits collected:............ ";
1828 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillHCal";
1832 eventout =
"\nGathering info:";
1837 if (!theCaloGeometry.
isValid()) {
1839 <<
"Unable to find CaloGeometryRecord in event!";
1845 edm::PCaloHitContainer::const_iterator itHit;
1853 if (!HCalContainer.
isValid()) {
1855 <<
"Unable to find HCalHits in event!";
1862 for (itHit = HCalContainer->begin();
1863 itHit != HCalContainer->end(); ++itHit) {
1868 DetId theDetUnitId(itHit->id());
1869 int detector = theDetUnitId.
det();
1873 if ((detector ==
dHcal) &&
1881 getSubdetectorGeometry(theDetUnitId)->
getGeometry(theDetUnitId);
1885 <<
"Unable to get CaloCellGeometry from HCalContainer for Hit "
1904 <<
"HCal PCaloHit " << i
1905 <<
" is expected to be (det,subdet) = ("
1908 <<
"); value returned is: ("
1909 << detector <<
"," << subdetector <<
")";
1915 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
virtual const TrackerGeomDet * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< edm::PSimHitContainer > SiTIDLowSrc_Token_
void getAllProvenance(std::vector< Provenance const * > &provenances) const
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]
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
const DTLayer * layer(DTLayerId id) const
Return a layer given its id.
edm::InputTag MuonCscSrc_
edm::InputTag PxlBrlHighSrc_
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
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
BranchDescription const & product() const
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_
MonitorElement * meMuonRpcBToF[2]
MonitorElement * meCaloHcalE[2]
MonitorElement * meMuonCscZ
MonitorElement * meGeantVtxX[2]
void fillMuon(const edm::Event &, const edm::EventSetup &)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
edm::EDGetTokenT< edm::PSimHitContainer > SiTOBLowSrc_Token_
void setCurrentFolder(const std::string &fullpath)
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
virtual const GeomDetUnit * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
edm::EDGetTokenT< edm::PCaloHitContainer > HCalSrc_Token_
std::vector< PSimHit > PSimHitContainer
edm::EDGetTokenT< edm::PSimHitContainer > PxlFwdHighSrc_Token_
static const int sdPxlFwd
edm::InputTag SiTIBLowSrc_
volatile std::atomic< bool > shutdown_flag false
MonitorElement * meCaloHcalPhi
Detector det() const
get the detector field from this detid
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
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 const GeomDetUnit * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
MonitorElement * meCaloEcalE[2]