23 consumesMany<edm::HepMCProduct>();
24 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_GlobalHitsAnalyzer";
34 m_Prov.getUntrackedParameter<
bool>(
"GetAllProvenances");
36 m_Prov.getUntrackedParameter<
bool>(
"PrintProvenanceInfo");
119 if (verbosity >= 0) {
121 <<
"\n===============================\n"
122 <<
"Initialized as EDAnalyzer with parameter values:\n"
123 <<
" Name = " <<
fName <<
"\n"
124 <<
" Verbosity = " << verbosity <<
"\n"
125 <<
" Frequency = " << frequency <<
"\n"
126 <<
" VtxUnit = " << vtxunit <<
"\n"
127 <<
" GetProv = " << getAllProvenances <<
"\n"
128 <<
" PrintProv = " << printProvenanceInfo <<
"\n"
129 <<
" PxlBrlLowSrc = " << PxlBrlLowSrc_.label()
130 <<
":" << PxlBrlLowSrc_.instance() <<
"\n"
131 <<
" PxlBrlHighSrc = " << PxlBrlHighSrc_.
label()
132 <<
":" << PxlBrlHighSrc_.
instance() <<
"\n"
133 <<
" PxlFwdLowSrc = " << PxlFwdLowSrc_.
label()
134 <<
":" << PxlBrlLowSrc_.instance() <<
"\n"
135 <<
" PxlFwdHighSrc = " << PxlFwdHighSrc_.
label()
136 <<
":" << PxlBrlHighSrc_.
instance() <<
"\n"
137 <<
" SiTIBLowSrc = " << SiTIBLowSrc_.
label()
138 <<
":" << SiTIBLowSrc_.
instance() <<
"\n"
139 <<
" SiTIBHighSrc = " << SiTIBHighSrc_.
label()
140 <<
":" << SiTIBHighSrc_.
instance() <<
"\n"
141 <<
" SiTOBLowSrc = " << SiTOBLowSrc_.
label()
142 <<
":" << SiTOBLowSrc_.
instance() <<
"\n"
143 <<
" SiTOBHighSrc = " << SiTOBHighSrc_.
label()
144 <<
":" << SiTOBHighSrc_.
instance() <<
"\n"
145 <<
" SiTIDLowSrc = " << SiTIDLowSrc_.
label()
146 <<
":" << SiTIDLowSrc_.
instance() <<
"\n"
147 <<
" SiTIDHighSrc = " << SiTIDHighSrc_.
label()
148 <<
":" << SiTIDHighSrc_.
instance() <<
"\n"
149 <<
" SiTECLowSrc = " << SiTECLowSrc_.
label()
150 <<
":" << SiTECLowSrc_.
instance() <<
"\n"
151 <<
" SiTECHighSrc = " << SiTECHighSrc_.
label()
152 <<
":" << SiTECHighSrc_.
instance() <<
"\n"
153 <<
" MuonCscSrc = " << MuonCscSrc_.
label()
154 <<
":" << MuonCscSrc_.
instance() <<
"\n"
155 <<
" MuonDtSrc = " << MuonDtSrc_.
label()
156 <<
":" << MuonDtSrc_.
instance() <<
"\n"
157 <<
" MuonRpcSrc = " << MuonRpcSrc_.
label()
158 <<
":" << MuonRpcSrc_.
instance() <<
"\n"
159 <<
" ECalEBSrc = " << ECalEBSrc_.
label()
160 <<
":" << ECalEBSrc_.
instance() <<
"\n"
161 <<
" ECalEESrc = " << ECalEESrc_.
label()
162 <<
":" << ECalEESrc_.
instance() <<
"\n"
163 <<
" ECalESSrc = " << ECalESSrc_.
label()
164 <<
":" << ECalESSrc_.
instance() <<
"\n"
165 <<
" HCalSrc = " << HCalSrc_.
label()
166 <<
":" << HCalSrc_.
instance() <<
"\n"
168 <<
" validHepMCevt = "
170 <<
" validG4VtxContainer = "
171 <<
":" << validG4VtxContainer <<
"\n"
172 <<
" validG4trkContainer = "
173 <<
":" << validG4trkContainer <<
"\n"
174 <<
" validPxlBrlLow = "
175 <<
":" << validPxlBrlLow <<
"\n"
176 <<
" validPxlBrlHigh = "
177 <<
":" << validPxlBrlHigh <<
"\n"
178 <<
" validPxlFwdLow = "
179 <<
":" << validPxlFwdLow <<
"\n"
180 <<
" validPxlFwdHigh = "
181 <<
":" << validPxlFwdHigh <<
"\n"
182 <<
" validSiTIBLow = "
183 <<
":" << validSiTIBLow <<
"\n"
184 <<
" validSiTIBHigh = "
185 <<
":" << validSiTIBHigh <<
"\n"
186 <<
" validSiTOBLow = "
187 <<
":" << validSiTOBLow <<
"\n"
188 <<
" validSiTOBHigh = "
189 <<
":" << validSiTOBHigh <<
"\n"
190 <<
" validSiTIDLow = "
191 <<
":" << validSiTIDLow <<
"\n"
192 <<
" validSiTIDHigh = "
193 <<
":" << validSiTIDHigh <<
"\n"
194 <<
" validSiTECLow = "
195 <<
":" << validSiTECLow <<
"\n"
196 <<
" validSiTECHigh = "
197 <<
":" << validSiTECHigh <<
"\n"
198 <<
" validMuonCSC = "
199 <<
":" << validMuonCSC <<
"\n"
201 <<
":" << validMuonDt <<
"\n"
202 <<
" validMuonRPC = "
203 <<
":" << validMuonRPC <<
"\n"
205 <<
":" << validEB <<
"\n"
207 <<
":" << validEE <<
"\n"
209 <<
":" << validPresh <<
"\n"
211 <<
":" << validHcal <<
"\n"
212 <<
"===============================\n";
216 for (Int_t
i = 0;
i < 2; ++
i) {
286 sprintf(hname,
"hMCRGP1");
287 sprintf(htitle,
"RawGenParticles");
289 sprintf(hname,
"hMCRGP2");
291 for (Int_t
i = 0;
i < 2; ++
i) {
296 sprintf(hname,
"hMCG4Vtx1");
297 sprintf(htitle,
"G4 Vertices");
299 sprintf(hname,
"hMCG4Vtx2");
301 for (Int_t
i = 0;
i < 2; ++
i) {
306 sprintf(hname,
"hMCG4Trk1");
307 sprintf(htitle,
"G4 Tracks");
309 sprintf(hname,
"hMCG4Trk2");
311 for (Int_t
i = 0;
i < 2; ++
i) {
316 sprintf(hname,
"hGeantVtxX1");
317 sprintf(htitle,
"Geant vertex x/micrometer");
319 sprintf(hname,
"hGeantVtxX2");
321 for (Int_t
i = 0;
i < 2; ++
i) {
326 sprintf(hname,
"hGeantVtxY1");
327 sprintf(htitle,
"Geant vertex y/micrometer");
329 sprintf(hname,
"hGeantVtxY2");
331 for (Int_t
i = 0;
i < 2; ++
i) {
336 sprintf(hname,
"hGeantVtxZ1");
337 sprintf(htitle,
"Geant vertex z/millimeter");
339 sprintf(hname,
"hGeantVtxZ2");
342 for (Int_t
i = 0;
i < 2; ++
i) {
347 sprintf(hname,
"hGeantTrkPt");
348 sprintf(htitle,
"Log10 Geant track pt/GeV");
353 sprintf(hname,
"hGeantTrkE");
354 sprintf(htitle,
"Log10 Geant track E/GeV");
359 sprintf(hname,
"hGeantVtxEta");
360 sprintf(htitle,
"Geant vertices eta");
365 sprintf(hname,
"hGeantVtxPhi");
366 sprintf(htitle,
"Geant vertices phi/rad");
371 sprintf(hname,
"hGeantVtxRad1");
372 sprintf(htitle,
"Geant vertices radius/cm");
374 sprintf(hname,
"hGeantVtxRad2");
376 for (Int_t
i = 0;
i < 2; ++
i) {
381 sprintf(hname,
"hGeantVtxMulti");
382 sprintf(htitle,
"Geant vertices outgoing multiplicity");
389 sprintf(hname,
"hCaloEcal1");
390 sprintf(htitle,
"Ecal hits");
392 sprintf(hname,
"hCaloEcal2");
395 sprintf(hname,
"hCaloEcalE1");
396 sprintf(htitle,
"Ecal hits, energy/GeV");
398 sprintf(hname,
"hCaloEcalE2");
400 sprintf(hname,
"hCaloEcalToF1");
401 sprintf(htitle,
"Ecal hits, ToF/ns");
403 sprintf(hname,
"hCaloEcalToF2");
406 for (Int_t
i = 0;
i < 2; ++
i) {
415 sprintf(hname,
"hCaloEcalPhi");
416 sprintf(htitle,
"Ecal hits, phi/rad");
421 sprintf(hname,
"hCaloEcalEta");
422 sprintf(htitle,
"Ecal hits, eta");
427 sprintf(hname,
"hCaloPreSh1");
428 sprintf(htitle,
"PreSh hits");
430 sprintf(hname,
"hCaloPreSh2");
433 sprintf(hname,
"hCaloPreShE1");
434 sprintf(htitle,
"PreSh hits, energy/GeV");
436 sprintf(hname,
"hCaloPreShE2");
439 sprintf(hname,
"hCaloPreShToF1");
440 sprintf(htitle,
"PreSh hits, ToF/ns");
442 sprintf(hname,
"hCaloPreShToF2");
445 for (Int_t
i = 0;
i < 2; ++
i) {
454 sprintf(hname,
"hCaloPreShPhi");
455 sprintf(htitle,
"PreSh hits, phi/rad");
460 sprintf(hname,
"hCaloPreShEta");
461 sprintf(htitle,
"PreSh hits, eta");
468 sprintf(hname,
"hCaloHcal1");
469 sprintf(htitle,
"Hcal hits");
471 sprintf(hname,
"hCaloHcal2");
474 sprintf(hname,
"hCaloHcalE1");
475 sprintf(htitle,
"Hcal hits, energy/GeV");
477 sprintf(hname,
"hCaloHcalE2");
480 sprintf(hname,
"hCaloHcalToF1");
481 sprintf(htitle,
"Hcal hits, ToF/ns");
483 sprintf(hname,
"hCaloHcalToF2");
486 for (Int_t
i = 0;
i < 2; ++
i) {
495 sprintf(hname,
"hCaloHcalPhi");
496 sprintf(htitle,
"Hcal hits, phi/rad");
501 sprintf(hname,
"hCaloHcalEta");
502 sprintf(htitle,
"Hcal hits, eta");
509 sprintf(hname,
"hTrackerPx1");
510 sprintf(htitle,
"Pixel hits");
512 sprintf(hname,
"hTrackerPx2");
514 for (Int_t
i = 0;
i < 2; ++
i) {
519 sprintf(hname,
"hTrackerPxPhi");
520 sprintf(htitle,
"Pixel hits phi/rad");
525 sprintf(hname,
"hTrackerPxEta");
526 sprintf(htitle,
"Pixel hits eta");
531 sprintf(hname,
"hTrackerPxBToF");
532 sprintf(htitle,
"Pixel barrel hits, ToF/ns");
537 sprintf(hname,
"hTrackerPxBR");
538 sprintf(htitle,
"Pixel barrel hits, R/cm");
543 sprintf(hname,
"hTrackerPxFToF");
544 sprintf(htitle,
"Pixel forward hits, ToF/ns");
549 sprintf(hname,
"hTrackerPxFZ");
550 sprintf(htitle,
"Pixel forward hits, Z/cm");
552 iBooker.
book1D(hname,htitle,200,-100.,100.);
558 sprintf(hname,
"hTrackerSi1");
559 sprintf(htitle,
"Silicon hits");
561 sprintf(hname,
"hTrackerSi2");
563 for (Int_t
i = 0;
i < 2; ++
i) {
568 sprintf(hname,
"hTrackerSiPhi");
569 sprintf(htitle,
"Silicon hits phi/rad");
574 sprintf(hname,
"hTrackerSiEta");
575 sprintf(htitle,
"Silicon hits eta");
580 sprintf(hname,
"hTrackerSiBToF");
581 sprintf(htitle,
"Silicon barrel hits, ToF/ns");
586 sprintf(hname,
"hTrackerSiBR");
587 sprintf(htitle,
"Silicon barrel hits, R/cm");
592 sprintf(hname,
"hTrackerSiFToF");
593 sprintf(htitle,
"Silicon forward hits, ToF/ns");
598 sprintf(hname,
"hTrackerSiFZ");
599 sprintf(htitle,
"Silicon forward hits, Z/cm");
606 sprintf(hname,
"hMuon1");
607 sprintf(htitle,
"Muon hits");
609 sprintf(hname,
"hMuon2");
611 for (Int_t
i = 0;
i < 2; ++
i) {
616 sprintf(hname,
"hMuonPhi");
617 sprintf(htitle,
"Muon hits phi/rad");
622 sprintf(hname,
"hMuonEta");
623 sprintf(htitle,
"Muon hits eta");
628 sprintf(hname,
"hMuonCscToF1");
629 sprintf(htitle,
"Muon CSC hits, ToF/ns");
631 sprintf(hname,
"hMuonCscToF2");
633 for (Int_t
i = 0;
i < 2; ++
i) {
638 sprintf(hname,
"hMuonCscZ");
639 sprintf(htitle,
"Muon CSC hits, Z/cm");
644 sprintf(hname,
"hMuonDtToF1");
645 sprintf(htitle,
"Muon DT hits, ToF/ns");
647 sprintf(hname,
"hMuonDtToF2");
649 for (Int_t
i = 0;
i < 2; ++
i) {
654 sprintf(hname,
"hMuonDtR");
655 sprintf(htitle,
"Muon DT hits, R/cm");
660 sprintf(hname,
"hMuonRpcFToF1");
661 sprintf(htitle,
"Muon RPC forward hits, ToF/ns");
663 sprintf(hname,
"hMuonRpcFToF2");
665 for (Int_t
i = 0;
i < 2; ++
i) {
669 sprintf(hname,
"hMuonRpcFZ");
670 sprintf(htitle,
"Muon RPC forward hits, Z/cm");
675 sprintf(hname,
"hMuonRpcBToF1");
676 sprintf(htitle,
"Muon RPC barrel hits, ToF/ns");
678 sprintf(hname,
"hMuonRpcBToF2");
680 for (Int_t
i = 0;
i < 2; ++
i) {
685 sprintf(hname,
"hMuonRpcBR");
686 sprintf(htitle,
"Muon RPC barrel hits, R/cm");
695 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_analyze";
706 <<
"Processing run " << nrun <<
", event " << nevt
707 <<
" (" <<
count <<
" events total)";
711 <<
"Processing run " << nrun <<
", event " << nevt
712 <<
" (" <<
count <<
" events total)";
719 std::vector<const edm::StableProvenance*> AllProv;
724 <<
"Number of Provenances = " << AllProv.size();
727 TString eventout(
"\nProvenance info:\n");
729 for (
unsigned int i = 0;
i < AllProv.size(); ++
i) {
730 eventout +=
"\n ******************************";
731 eventout +=
"\n Module : ";
732 eventout += AllProv[
i]->moduleLabel();
733 eventout +=
"\n ProductID : ";
734 eventout += AllProv[
i]->productID().id();
735 eventout +=
"\n ClassName : ";
736 eventout += AllProv[
i]->className();
737 eventout +=
"\n InstanceName : ";
738 eventout += AllProv[
i]->productInstanceName();
739 eventout +=
"\n BranchName : ";
740 eventout += AllProv[
i]->branchName();
742 eventout +=
"\n ******************************\n";
763 <<
"Done gathering data from event.";
772 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillG4MC";
776 eventout =
"\nGathering info:";
782 std::vector<edm::Handle<edm::HepMCProduct> > AllHepMCEvt;
787 for (
unsigned int i = 0;
i < AllHepMCEvt.size(); ++
i) {
788 HepMCEvt = AllHepMCEvt[
i];
795 <<
"Unable to find HepMCProduct in event!";
798 eventout +=
"\n Using HepMCProduct: ";
802 const HepMC::GenEvent* MCEvt = HepMCEvt->GetEvent();
807 eventout +=
"\n Number of Raw Particles collected:......... ";
831 if (!G4VtxContainer.
isValid()) {
833 <<
"Unable to find SimVertex in event!";
838 edm::SimVertexContainer::const_iterator itVtx;
839 for (itVtx = G4VtxContainer->begin(); itVtx != G4VtxContainer->end();
845 itVtx->position().y(),
846 itVtx->position().z(),
847 itVtx->position().e());
850 G4Vtx1.GetCoordinates(G4Vtx);
868 if ( G4TrkContainer.
isValid() ) {
869 edm::SimTrackContainer::const_iterator itTrk;
870 for (itTrk = G4TrkContainer->begin(); itTrk != G4TrkContainer->end();
872 if ( (*itTrk).vertIndex() ==
i ) { multi++; }
881 eventout +=
"\n Number of G4Vertices collected:............ ";
893 if (!G4TrkContainer.
isValid()) {
895 <<
"Unable to find SimTrack in event!";
900 edm::SimTrackContainer::const_iterator itTrk;
901 for (itTrk = G4TrkContainer->begin(); itTrk != G4TrkContainer->end();
907 itTrk->momentum().y(),
908 itTrk->momentum().z(),
909 itTrk->momentum().e());
911 G4Trk1.GetCoordinates(G4Trk);
919 eventout +=
"\n Number of G4Tracks collected:.............. ";
938 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillTrk";
942 eventout =
"\nGathering info:";
947 if (!theTrackerGeometry.
isValid()) {
949 <<
"Unable to find TrackerDigiGeometryRecord in event!";
955 edm::PSimHitContainer::const_iterator itHit;
964 if (!PxlBrlLowContainer.
isValid()) {
966 <<
"Unable to find TrackerHitsPixelBarrelLowTof in event!";
972 if (!PxlBrlHighContainer.
isValid()) {
974 <<
"Unable to find TrackerHitsPixelBarrelHighTof in event!";
979 thePxlBrlHits.insert(thePxlBrlHits.end(),PxlBrlLowContainer->begin(),
980 PxlBrlLowContainer->end());
982 thePxlBrlHits.insert(thePxlBrlHits.end(),PxlBrlHighContainer->begin(),
983 PxlBrlHighContainer->end());
987 for (itHit = thePxlBrlHits.begin(); itHit != thePxlBrlHits.end(); ++itHit) {
992 DetId theDetUnitId(itHit->detUnitId());
993 int detector = theDetUnitId.
det();
1004 <<
"Unable to get GeomDetUnit from PxlBrlHits for Hit " <<
i;
1023 <<
"PxlBrl PSimHit " << i
1024 <<
" is expected to be (det,subdet) = ("
1026 <<
"); value returned is: ("
1027 << detector <<
"," << subdetector <<
")";
1033 eventout +=
"\n Number of Pixel Barrel Hits collected:..... ";
1046 if (!PxlFwdLowContainer.
isValid()) {
1048 <<
"Unable to find TrackerHitsPixelEndcapLowTof in event!";
1054 if (!PxlFwdHighContainer.
isValid()) {
1055 LogDebug(
"GlobalHitsAnalyzer_fillTrk")
1056 <<
"Unable to find TrackerHitsPixelEndcapHighTof in event!";
1061 thePxlFwdHits.insert(thePxlFwdHits.end(),PxlFwdLowContainer->begin(),
1062 PxlFwdLowContainer->end());
1064 thePxlFwdHits.insert(thePxlFwdHits.end(),PxlFwdHighContainer->begin(),
1065 PxlFwdHighContainer->end());
1069 for (itHit = thePxlFwdHits.begin(); itHit != thePxlFwdHits.end(); ++itHit) {
1074 DetId theDetUnitId(itHit->detUnitId());
1075 int detector = theDetUnitId.
det();
1086 <<
"Unable to get GeomDetUnit from PxlFwdHits for Hit " <<
i;;
1105 <<
"PxlFwd PSimHit " << i
1106 <<
" is expected to be (det,subdet) = ("
1108 <<
"); value returned is: ("
1109 << detector <<
"," << subdetector <<
")";
1115 eventout +=
"\n Number of Pixel Forward Hits collected:.... ";
1132 if (!SiTIBLowContainer.
isValid()) {
1134 <<
"Unable to find TrackerHitsTIBLowTof in event!";
1140 if (!SiTIBHighContainer.
isValid()) {
1142 <<
"Unable to find TrackerHitsTIBHighTof in event!";
1148 if (!SiTOBLowContainer.
isValid()) {
1150 <<
"Unable to find TrackerHitsTOBLowTof in event!";
1156 if (!SiTOBHighContainer.
isValid()) {
1158 <<
"Unable to find TrackerHitsTOBHighTof in event!";
1163 theSiBrlHits.insert(theSiBrlHits.end(),SiTIBLowContainer->begin(),
1164 SiTIBLowContainer->end());
1166 theSiBrlHits.insert(theSiBrlHits.end(),SiTIBHighContainer->begin(),
1167 SiTIBHighContainer->end());
1169 theSiBrlHits.insert(theSiBrlHits.end(),SiTOBLowContainer->begin(),
1170 SiTOBLowContainer->end());
1172 theSiBrlHits.insert(theSiBrlHits.end(),SiTOBHighContainer->begin(),
1173 SiTOBHighContainer->end());
1177 for (itHit = theSiBrlHits.begin(); itHit != theSiBrlHits.end(); ++itHit) {
1182 DetId theDetUnitId(itHit->detUnitId());
1183 int detector = theDetUnitId.
det();
1187 if ((detector ==
dTrk) &&
1196 <<
"Unable to get GeomDetUnit from SiBrlHits for Hit " <<
i;
1215 <<
"SiBrl PSimHit " << i
1216 <<
" is expected to be (det,subdet) = ("
1218 <<
" || " <<
sdSiTOB <<
"); value returned is: ("
1219 << detector <<
"," << subdetector <<
")";
1225 eventout +=
"\n Number of Silicon Barrel Hits collected:... ";
1238 if (!SiTIDLowContainer.
isValid()) {
1240 <<
"Unable to find TrackerHitsTIDLowTof in event!";
1246 if (!SiTIDHighContainer.
isValid()) {
1247 LogDebug(
"GlobalHitsAnalyzer_fillTrk")
1248 <<
"Unable to find TrackerHitsTIDHighTof in event!";
1254 if (!SiTECLowContainer.
isValid()) {
1256 <<
"Unable to find TrackerHitsTECLowTof in event!";
1262 if (!SiTECHighContainer.
isValid()) {
1264 <<
"Unable to find TrackerHitsTECHighTof in event!";
1269 theSiFwdHits.insert(theSiFwdHits.end(),SiTIDLowContainer->begin(),
1270 SiTIDLowContainer->end());
1272 theSiFwdHits.insert(theSiFwdHits.end(),SiTIDHighContainer->begin(),
1273 SiTIDHighContainer->end());
1275 theSiFwdHits.insert(theSiFwdHits.end(),SiTECLowContainer->begin(),
1276 SiTECLowContainer->end());
1278 theSiFwdHits.insert(theSiFwdHits.end(),SiTECHighContainer->begin(),
1279 SiTECHighContainer->end());
1283 for (itHit = theSiFwdHits.begin(); itHit != theSiFwdHits.end(); ++itHit) {
1288 DetId theDetUnitId(itHit->detUnitId());
1289 int detector = theDetUnitId.
det();
1293 if ((detector ==
dTrk) &&
1302 <<
"Unable to get GeomDetUnit from SiFwdHits Hit " <<
i;
1321 <<
"SiFwd PSimHit " << i
1322 <<
" is expected to be (det,subdet) = ("
1324 <<
" || " <<
sdSiTEC <<
"); value returned is: ("
1325 << detector <<
"," << subdetector <<
")";
1331 eventout +=
"\n Number of Silicon Forward Hits collected:.. ";
1350 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillMuon";
1354 eventout =
"\nGathering info:";
1357 edm::PSimHitContainer::const_iterator itHit;
1365 if (!theCSCGeometry.
isValid()) {
1367 <<
"Unable to find MuonGeometryRecord for the CSCGeometry in event!";
1375 if (!MuonCSCContainer.
isValid()) {
1377 <<
"Unable to find MuonCSCHits in event!";
1384 for (itHit = MuonCSCContainer->begin(); itHit != MuonCSCContainer->end();
1390 DetId theDetUnitId(itHit->detUnitId());
1391 int detector = theDetUnitId.
det();
1395 if ((detector ==
dMuon) &&
1403 <<
"Unable to get GeomDetUnit from theCSCMuon for hit " <<
i;
1423 <<
"MuonCsc PSimHit " << i
1424 <<
" is expected to be (det,subdet) = ("
1426 <<
"); value returned is: ("
1427 << detector <<
"," << subdetector <<
")";
1433 eventout +=
"\n Number of CSC muon Hits collected:......... ";
1446 if (!theDTGeometry.
isValid()) {
1448 <<
"Unable to find MuonGeometryRecord for the DTGeometry in event!";
1456 if (!MuonDtContainer.
isValid()) {
1458 <<
"Unable to find MuonDTHits in event!";
1465 for (itHit = MuonDtContainer->begin(); itHit != MuonDtContainer->end();
1471 DetId theDetUnitId(itHit->detUnitId());
1472 int detector = theDetUnitId.
det();
1476 if ((detector ==
dMuon) &&
1481 DTWireId wireId(itHit->detUnitId());
1484 const DTLayer *theDet = theDTMuon.
layer(wireId.layerId());
1488 <<
"Unable to get GeomDetUnit from theDtMuon for hit " <<
i;
1495 const BoundPlane& bSurface = theDet->surface();
1508 <<
"MuonDt PSimHit " << i
1509 <<
" is expected to be (det,subdet) = ("
1511 <<
"); value returned is: ("
1512 << detector <<
"," << subdetector <<
")";
1518 eventout +=
"\n Number of DT muon Hits collected:.......... ";
1532 if (!theRPCGeometry.
isValid()) {
1534 <<
"Unable to find MuonGeometryRecord for the RPCGeometry in event!";
1542 if (!MuonRPCContainer.
isValid()) {
1544 <<
"Unable to find MuonRPCHits in event!";
1551 int RPCBrl =0, RPCFwd = 0;
1552 for (itHit = MuonRPCContainer->begin(); itHit != MuonRPCContainer->end();
1558 DetId theDetUnitId(itHit->detUnitId());
1559 int detector = theDetUnitId.
det();
1563 if ((detector ==
dMuon) &&
1567 RPCDetId RPCId(itHit->detUnitId());
1570 int region = RPCId.region();
1577 <<
"Unable to get GeomDetUnit from theRPCMuon for hit " <<
i;
1606 localPosition()).perp());
1614 <<
"Invalid region for RPC Muon hit" <<
i;
1619 <<
"MuonRpc PSimHit " << i
1620 <<
" is expected to be (det,subdet) = ("
1622 <<
"); value returned is: ("
1623 << detector <<
"," << subdetector <<
")";
1629 eventout +=
"\n Number of RPC muon Hits collected:......... ";
1631 eventout +=
"\n RPC Barrel muon Hits:............ ";
1633 eventout +=
"\n RPC Forward muon Hits:........... ";
1652 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillECal";
1656 eventout =
"\nGathering info:";
1661 if (!theCaloGeometry.
isValid()) {
1663 <<
"Unable to find CaloGeometryRecord in event!";
1669 edm::PCaloHitContainer::const_iterator itHit;
1680 <<
"Unable to find EcalHitsEB in event!";
1688 <<
"Unable to find EcalHitsEE in event!";
1693 theECalHits.insert(theECalHits.end(),EBContainer->begin(),
1694 EBContainer->end());
1696 theECalHits.insert(theECalHits.end(),EEContainer->begin(),
1697 EEContainer->end());
1701 for (itHit = theECalHits.begin(); itHit != theECalHits.end(); ++itHit) {
1706 DetId theDetUnitId(itHit->id());
1707 int detector = theDetUnitId.
det();
1711 if ((detector ==
dEcal) &&
1717 getSubdetectorGeometry(theDetUnitId)->
getGeometry(theDetUnitId);
1721 <<
"Unable to get CaloCellGeometry from ECalHits for Hit " <<
i;
1739 <<
"ECal PCaloHit " << i
1740 <<
" is expected to be (det,subdet) = ("
1742 <<
" || " <<
sdEcalFwd <<
"); value returned is: ("
1743 << detector <<
"," << subdetector <<
")";
1749 eventout +=
"\n Number of ECal Hits collected:............. ";
1762 if (!PreShContainer.
isValid()) {
1764 <<
"Unable to find EcalHitsES in event!";
1771 for (itHit = PreShContainer->begin();
1772 itHit != PreShContainer->end(); ++itHit) {
1777 DetId theDetUnitId(itHit->id());
1778 int detector = theDetUnitId.
det();
1782 if ((detector ==
dEcal) &&
1787 getSubdetectorGeometry(theDetUnitId)->
getGeometry(theDetUnitId);
1791 <<
"Unable to get CaloCellGeometry from PreShContainer for Hit "
1810 <<
"PreSh PCaloHit " << i
1811 <<
" is expected to be (det,subdet) = ("
1813 <<
"); value returned is: ("
1814 << detector <<
"," << subdetector <<
")";
1820 eventout +=
"\n Number of PreSh Hits collected:............ ";
1837 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillHCal";
1841 eventout =
"\nGathering info:";
1846 if (!theCaloGeometry.
isValid()) {
1848 <<
"Unable to find CaloGeometryRecord in event!";
1854 edm::PCaloHitContainer::const_iterator itHit;
1862 if (!HCalContainer.
isValid()) {
1864 <<
"Unable to find HCalHits in event!";
1871 for (itHit = HCalContainer->begin();
1872 itHit != HCalContainer->end(); ++itHit) {
1878 unsigned int id_ = itHit->id();
1880 int sub,
depth, ieta, iphi,
z, lay;
1882 int sign = (z==0) ? (-1):(1);
1886 else theDetUnitId = itHit->id();
1888 int detector = theDetUnitId.
det();
1892 if ((detector ==
dHcal) &&
1900 getSubdetectorGeometry(theDetUnitId)->
getGeometry(theDetUnitId);
1904 <<
"Unable to get CaloCellGeometry from HCalContainer for Hit "
1923 <<
"HCal PCaloHit " << i
1924 <<
" is expected to be (det,subdet) = ("
1927 <<
"); value returned is: ("
1928 << detector <<
"," << subdetector <<
")";
1934 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
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 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_
HcalID getHCID(int subdet, int ieta, int iphi, int lay, int idepth) const
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
static void unpackHcalIndex(const uint32_t &idx, int &det, int &z, int &depth, int &eta, int &phi, int &lay)
MonitorElement * meGeantVtxEta
edm::InputTag PxlFwdHighSrc_
MonitorElement * meMuonRpcFZ
edm::EDGetTokenT< edm::PSimHitContainer > PxlBrlHighSrc_Token_
const HcalDDDRecConstants * hcons
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)
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
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 void analyze(const edm::Event &, const edm::EventSetup &) override
void getAllStableProvenance(std::vector< StableProvenance const * > &provenances) const
virtual const GeomDetUnit * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
MonitorElement * meCaloEcalE[2]