16 getAllProvenances(
false), printProvenanceInfo(
false),
17 G4VtxSrc_(iPSet.getParameter<edm::InputTag>(
"G4VtxSrc")),
18 G4TrkSrc_(iPSet.getParameter<edm::InputTag>(
"G4TrkSrc")),
21 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_GlobalHitsAnalyzer";
31 m_Prov.getUntrackedParameter<
bool>(
"GetAllProvenances");
33 m_Prov.getUntrackedParameter<
bool>(
"PrintProvenanceInfo");
93 <<
"\n===============================\n"
94 <<
"Initialized as EDAnalyzer with parameter values:\n"
95 <<
" Name = " <<
fName <<
"\n"
96 <<
" Verbosity = " << verbosity <<
"\n"
97 <<
" Frequency = " << frequency <<
"\n"
98 <<
" VtxUnit = " << vtxunit <<
"\n"
99 <<
" GetProv = " << getAllProvenances <<
"\n"
100 <<
" PrintProv = " << printProvenanceInfo <<
"\n"
101 <<
" PxlBrlLowSrc = " << PxlBrlLowSrc_.label()
102 <<
":" << PxlBrlLowSrc_.instance() <<
"\n"
103 <<
" PxlBrlHighSrc = " << PxlBrlHighSrc_.
label()
104 <<
":" << PxlBrlHighSrc_.
instance() <<
"\n"
105 <<
" PxlFwdLowSrc = " << PxlFwdLowSrc_.
label()
106 <<
":" << PxlBrlLowSrc_.instance() <<
"\n"
107 <<
" PxlFwdHighSrc = " << PxlFwdHighSrc_.
label()
108 <<
":" << PxlBrlHighSrc_.
instance() <<
"\n"
109 <<
" SiTIBLowSrc = " << SiTIBLowSrc_.
label()
110 <<
":" << SiTIBLowSrc_.
instance() <<
"\n"
111 <<
" SiTIBHighSrc = " << SiTIBHighSrc_.
label()
112 <<
":" << SiTIBHighSrc_.
instance() <<
"\n"
113 <<
" SiTOBLowSrc = " << SiTOBLowSrc_.
label()
114 <<
":" << SiTOBLowSrc_.
instance() <<
"\n"
115 <<
" SiTOBHighSrc = " << SiTOBHighSrc_.
label()
116 <<
":" << SiTOBHighSrc_.
instance() <<
"\n"
117 <<
" SiTIDLowSrc = " << SiTIDLowSrc_.
label()
118 <<
":" << SiTIDLowSrc_.
instance() <<
"\n"
119 <<
" SiTIDHighSrc = " << SiTIDHighSrc_.
label()
120 <<
":" << SiTIDHighSrc_.
instance() <<
"\n"
121 <<
" SiTECLowSrc = " << SiTECLowSrc_.
label()
122 <<
":" << SiTECLowSrc_.
instance() <<
"\n"
123 <<
" SiTECHighSrc = " << SiTECHighSrc_.
label()
124 <<
":" << SiTECHighSrc_.
instance() <<
"\n"
125 <<
" MuonCscSrc = " << MuonCscSrc_.
label()
126 <<
":" << MuonCscSrc_.
instance() <<
"\n"
127 <<
" MuonDtSrc = " << MuonDtSrc_.
label()
128 <<
":" << MuonDtSrc_.
instance() <<
"\n"
129 <<
" MuonRpcSrc = " << MuonRpcSrc_.
label()
130 <<
":" << MuonRpcSrc_.
instance() <<
"\n"
131 <<
" ECalEBSrc = " << ECalEBSrc_.
label()
132 <<
":" << ECalEBSrc_.
instance() <<
"\n"
133 <<
" ECalEESrc = " << ECalEESrc_.
label()
134 <<
":" << ECalEESrc_.
instance() <<
"\n"
135 <<
" ECalESSrc = " << ECalESSrc_.
label()
136 <<
":" << ECalESSrc_.
instance() <<
"\n"
137 <<
" HCalSrc = " << HCalSrc_.
label()
138 <<
":" << HCalSrc_.
instance() <<
"\n"
140 <<
" validHepMCevt = "
141 <<
":" << validHepMCevt <<
"\n"
142 <<
" validG4VtxContainer = "
143 <<
":" << validG4VtxContainer <<
"\n"
144 <<
" validG4trkContainer = "
145 <<
":" << validG4trkContainer <<
"\n"
146 <<
" validPxlBrlLow = "
147 <<
":" << validPxlBrlLow <<
"\n"
148 <<
" validPxlBrlHigh = "
149 <<
":" << validPxlBrlHigh <<
"\n"
150 <<
" validPxlFwdLow = "
151 <<
":" << validPxlFwdLow <<
"\n"
152 <<
" validPxlFwdHigh = "
153 <<
":" << validPxlFwdHigh <<
"\n"
154 <<
" validSiTIBLow = "
155 <<
":" << validSiTIBLow <<
"\n"
156 <<
" validSiTIBHigh = "
157 <<
":" << validSiTIBHigh <<
"\n"
158 <<
" validSiTOBLow = "
159 <<
":" << validSiTOBLow <<
"\n"
160 <<
" validSiTOBHigh = "
161 <<
":" << validSiTOBHigh <<
"\n"
162 <<
" validSiTIDLow = "
163 <<
":" << validSiTIDLow <<
"\n"
164 <<
" validSiTIDHigh = "
165 <<
":" << validSiTIDHigh <<
"\n"
166 <<
" validSiTECLow = "
167 <<
":" << validSiTECLow <<
"\n"
168 <<
" validSiTECHigh = "
169 <<
":" << validSiTECHigh <<
"\n"
170 <<
" validMuonCSC = "
171 <<
":" << validMuonCSC <<
"\n"
173 <<
":" << validMuonDt <<
"\n"
174 <<
" validMuonRPC = "
175 <<
":" << validMuonRPC <<
"\n"
177 <<
":" << validEB <<
"\n"
179 <<
":" << validEE <<
"\n"
181 <<
":" << validPresh <<
"\n"
183 <<
":" << validHcal <<
"\n"
184 <<
"===============================\n";
191 if (verbosity > 0 ) {
203 for (Int_t
i = 0;
i < 2; ++
i) {
265 sprintf(hname,
"hMCRGP1");
266 sprintf(htitle,
"RawGenParticles");
268 sprintf(hname,
"hMCRGP2");
270 for (Int_t
i = 0;
i < 2; ++
i) {
275 sprintf(hname,
"hMCG4Vtx1");
276 sprintf(htitle,
"G4 Vertices");
278 sprintf(hname,
"hMCG4Vtx2");
280 for (Int_t
i = 0;
i < 2; ++
i) {
285 sprintf(hname,
"hMCG4Trk1");
286 sprintf(htitle,
"G4 Tracks");
288 sprintf(hname,
"hMCG4Trk2");
290 for (Int_t
i = 0;
i < 2; ++
i) {
295 sprintf(hname,
"hGeantVtxX1");
296 sprintf(htitle,
"Geant vertex x/micrometer");
298 sprintf(hname,
"hGeantVtxX2");
300 for (Int_t
i = 0;
i < 2; ++
i) {
305 sprintf(hname,
"hGeantVtxY1");
306 sprintf(htitle,
"Geant vertex y/micrometer");
308 sprintf(hname,
"hGeantVtxY2");
310 for (Int_t
i = 0;
i < 2; ++
i) {
315 sprintf(hname,
"hGeantVtxZ1");
316 sprintf(htitle,
"Geant vertex z/millimeter");
318 sprintf(hname,
"hGeantVtxZ2");
321 for (Int_t
i = 0;
i < 2; ++
i) {
326 sprintf(hname,
"hGeantTrkPt");
327 sprintf(htitle,
"Log10 Geant track pt/GeV");
332 sprintf(hname,
"hGeantTrkE");
333 sprintf(htitle,
"Log10 Geant track E/GeV");
338 sprintf(hname,
"hGeantVtxEta");
339 sprintf(htitle,
"Geant vertices eta");
344 sprintf(hname,
"hGeantVtxPhi");
345 sprintf(htitle,
"Geant vertices phi/rad");
350 sprintf(hname,
"hGeantVtxRad1");
351 sprintf(htitle,
"Geant vertices radius/cm");
353 sprintf(hname,
"hGeantVtxRad2");
355 for (Int_t
i = 0;
i < 2; ++
i) {
360 sprintf(hname,
"hGeantVtxMulti");
361 sprintf(htitle,
"Geant vertices outgoing multiplicity");
368 sprintf(hname,
"hCaloEcal1");
369 sprintf(htitle,
"Ecal hits");
371 sprintf(hname,
"hCaloEcal2");
374 sprintf(hname,
"hCaloEcalE1");
375 sprintf(htitle,
"Ecal hits, energy/GeV");
377 sprintf(hname,
"hCaloEcalE2");
379 sprintf(hname,
"hCaloEcalToF1");
380 sprintf(htitle,
"Ecal hits, ToF/ns");
382 sprintf(hname,
"hCaloEcalToF2");
385 for (Int_t
i = 0;
i < 2; ++
i) {
394 sprintf(hname,
"hCaloEcalPhi");
395 sprintf(htitle,
"Ecal hits, phi/rad");
400 sprintf(hname,
"hCaloEcalEta");
401 sprintf(htitle,
"Ecal hits, eta");
406 sprintf(hname,
"hCaloPreSh1");
407 sprintf(htitle,
"PreSh hits");
409 sprintf(hname,
"hCaloPreSh2");
412 sprintf(hname,
"hCaloPreShE1");
413 sprintf(htitle,
"PreSh hits, energy/GeV");
415 sprintf(hname,
"hCaloPreShE2");
418 sprintf(hname,
"hCaloPreShToF1");
419 sprintf(htitle,
"PreSh hits, ToF/ns");
421 sprintf(hname,
"hCaloPreShToF2");
424 for (Int_t
i = 0;
i < 2; ++
i) {
433 sprintf(hname,
"hCaloPreShPhi");
434 sprintf(htitle,
"PreSh hits, phi/rad");
439 sprintf(hname,
"hCaloPreShEta");
440 sprintf(htitle,
"PreSh hits, eta");
447 sprintf(hname,
"hCaloHcal1");
448 sprintf(htitle,
"Hcal hits");
450 sprintf(hname,
"hCaloHcal2");
453 sprintf(hname,
"hCaloHcalE1");
454 sprintf(htitle,
"Hcal hits, energy/GeV");
456 sprintf(hname,
"hCaloHcalE2");
459 sprintf(hname,
"hCaloHcalToF1");
460 sprintf(htitle,
"Hcal hits, ToF/ns");
462 sprintf(hname,
"hCaloHcalToF2");
465 for (Int_t
i = 0;
i < 2; ++
i) {
474 sprintf(hname,
"hCaloHcalPhi");
475 sprintf(htitle,
"Hcal hits, phi/rad");
480 sprintf(hname,
"hCaloHcalEta");
481 sprintf(htitle,
"Hcal hits, eta");
488 sprintf(hname,
"hTrackerPx1");
489 sprintf(htitle,
"Pixel hits");
491 sprintf(hname,
"hTrackerPx2");
493 for (Int_t
i = 0;
i < 2; ++
i) {
498 sprintf(hname,
"hTrackerPxPhi");
499 sprintf(htitle,
"Pixel hits phi/rad");
504 sprintf(hname,
"hTrackerPxEta");
505 sprintf(htitle,
"Pixel hits eta");
510 sprintf(hname,
"hTrackerPxBToF");
511 sprintf(htitle,
"Pixel barrel hits, ToF/ns");
516 sprintf(hname,
"hTrackerPxBR");
517 sprintf(htitle,
"Pixel barrel hits, R/cm");
522 sprintf(hname,
"hTrackerPxFToF");
523 sprintf(htitle,
"Pixel forward hits, ToF/ns");
528 sprintf(hname,
"hTrackerPxFZ");
529 sprintf(htitle,
"Pixel forward hits, Z/cm");
531 dbe->
book1D(hname,htitle,200,-100.,100.);
537 sprintf(hname,
"hTrackerSi1");
538 sprintf(htitle,
"Silicon hits");
540 sprintf(hname,
"hTrackerSi2");
542 for (Int_t
i = 0;
i < 2; ++
i) {
547 sprintf(hname,
"hTrackerSiPhi");
548 sprintf(htitle,
"Silicon hits phi/rad");
553 sprintf(hname,
"hTrackerSiEta");
554 sprintf(htitle,
"Silicon hits eta");
559 sprintf(hname,
"hTrackerSiBToF");
560 sprintf(htitle,
"Silicon barrel hits, ToF/ns");
565 sprintf(hname,
"hTrackerSiBR");
566 sprintf(htitle,
"Silicon barrel hits, R/cm");
571 sprintf(hname,
"hTrackerSiFToF");
572 sprintf(htitle,
"Silicon forward hits, ToF/ns");
577 sprintf(hname,
"hTrackerSiFZ");
578 sprintf(htitle,
"Silicon forward hits, Z/cm");
585 sprintf(hname,
"hMuon1");
586 sprintf(htitle,
"Muon hits");
588 sprintf(hname,
"hMuon2");
590 for (Int_t
i = 0;
i < 2; ++
i) {
595 sprintf(hname,
"hMuonPhi");
596 sprintf(htitle,
"Muon hits phi/rad");
601 sprintf(hname,
"hMuonEta");
602 sprintf(htitle,
"Muon hits eta");
607 sprintf(hname,
"hMuonCscToF1");
608 sprintf(htitle,
"Muon CSC hits, ToF/ns");
610 sprintf(hname,
"hMuonCscToF2");
612 for (Int_t
i = 0;
i < 2; ++
i) {
617 sprintf(hname,
"hMuonCscZ");
618 sprintf(htitle,
"Muon CSC hits, Z/cm");
623 sprintf(hname,
"hMuonDtToF1");
624 sprintf(htitle,
"Muon DT hits, ToF/ns");
626 sprintf(hname,
"hMuonDtToF2");
628 for (Int_t
i = 0;
i < 2; ++
i) {
633 sprintf(hname,
"hMuonDtR");
634 sprintf(htitle,
"Muon DT hits, R/cm");
639 sprintf(hname,
"hMuonRpcFToF1");
640 sprintf(htitle,
"Muon RPC forward hits, ToF/ns");
642 sprintf(hname,
"hMuonRpcFToF2");
644 for (Int_t
i = 0;
i < 2; ++
i) {
648 sprintf(hname,
"hMuonRpcFZ");
649 sprintf(htitle,
"Muon RPC forward hits, Z/cm");
654 sprintf(hname,
"hMuonRpcBToF1");
655 sprintf(htitle,
"Muon RPC barrel hits, ToF/ns");
657 sprintf(hname,
"hMuonRpcBToF2");
659 for (Int_t
i = 0;
i < 2; ++
i) {
664 sprintf(hname,
"hMuonRpcBR");
665 sprintf(htitle,
"Muon RPC barrel hits, R/cm");
681 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_endJob";
684 <<
"Terminating having processed " <<
count <<
" events.";
691 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_analyze";
697 int nrun = iEvent.
id().
run();
702 <<
"Processing run " << nrun <<
", event " << nevt
703 <<
" (" <<
count <<
" events total)";
707 <<
"Processing run " << nrun <<
", event " << nevt
708 <<
" (" <<
count <<
" events total)";
715 std::vector<const edm::Provenance*> AllProv;
720 <<
"Number of Provenances = " << AllProv.size();
723 TString eventout(
"\nProvenance info:\n");
725 for (
unsigned int i = 0;
i < AllProv.size(); ++
i) {
726 eventout +=
"\n ******************************";
727 eventout +=
"\n Module : ";
728 eventout += AllProv[
i]->moduleLabel();
729 eventout +=
"\n ProductID : ";
730 eventout += AllProv[
i]->productID().id();
731 eventout +=
"\n ClassName : ";
732 eventout += AllProv[
i]->className();
733 eventout +=
"\n InstanceName : ";
734 eventout += AllProv[
i]->productInstanceName();
735 eventout +=
"\n BranchName : ";
736 eventout += AllProv[
i]->branchName();
738 eventout +=
"\n ******************************\n";
759 <<
"Done gathering data from event.";
768 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillG4MC";
772 eventout =
"\nGathering info:";
778 std::vector<edm::Handle<edm::HepMCProduct> > AllHepMCEvt;
783 for (
unsigned int i = 0;
i < AllHepMCEvt.size(); ++
i) {
784 HepMCEvt = AllHepMCEvt[
i];
791 <<
"Unable to find HepMCProduct in event!";
794 eventout +=
"\n Using HepMCProduct: ";
798 const HepMC::GenEvent* MCEvt = HepMCEvt->GetEvent();
803 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());
990 int detector = theDetUnitId.
det();
991 int subdetector = theDetUnitId.subdetId();
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());
1072 int detector = theDetUnitId.
det();
1073 int subdetector = theDetUnitId.subdetId();
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());
1180 int detector = theDetUnitId.
det();
1181 int subdetector = theDetUnitId.subdetId();
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());
1286 int detector = theDetUnitId.
det();
1287 int subdetector = theDetUnitId.subdetId();
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());
1388 int detector = theDetUnitId.
det();
1389 int subdetector = theDetUnitId.subdetId();
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());
1469 int detector = theDetUnitId.
det();
1470 int subdetector = theDetUnitId.subdetId();
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());
1556 int detector = theDetUnitId.
det();
1557 int subdetector = theDetUnitId.subdetId();
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());
1704 int detector = theDetUnitId.
det();
1705 int subdetector = theDetUnitId.subdetId();
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());
1775 int detector = theDetUnitId.
det();
1776 int subdetector = theDetUnitId.subdetId();
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!";
1851 edm::PCaloHitContainer::const_iterator itHit;
1859 if (!HCalContainer.
isValid()) {
1861 <<
"Unable to find HCalHits in event!";
1868 for (itHit = HCalContainer->begin();
1869 itHit != HCalContainer->end(); ++itHit) {
1874 DetId theDetUnitId(itHit->id());
1875 int detector = theDetUnitId.
det();
1876 int subdetector = theDetUnitId.subdetId();
1879 if ((detector ==
dHcal) &&
1887 getSubdetectorGeometry(theDetUnitId)->
getGeometry(theDetUnitId);
1891 <<
"Unable to get CaloCellGeometry from HCalContainer for Hit "
1910 <<
"HCal PCaloHit " << i
1911 <<
" is expected to be (det,subdet) = ("
1914 <<
"); value returned is: ("
1915 << detector <<
"," << subdetector <<
")";
1921 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
void getAllProvenance(std::vector< Provenance const * > &provenances) const
void fillG4MC(const edm::Event &)
std::vector< PCaloHit > PCaloHitContainer
edm::InputTag SiTECLowSrc_
virtual ~GlobalHitsAnalyzer()
edm::InputTag PxlBrlLowSrc_
static const int sdMuonRPCRgnFwdn
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
static const int sdHcalOut
MonitorElement * meMuonDtToF[2]
static const int sdMuonDT
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
MonitorElement * meGeantVtxRad[2]
MonitorElement * meCaloHcal[2]
MonitorElement * meMCG4Trk[2]
MonitorElement * meTrackerPxPhi
Geom::Phi< T > phi() const
MonitorElement * meCaloHcalToF[2]
MonitorElement * meCaloPreSh[2]
static const int sdEcalPS
MonitorElement * meTrackerSiEta
void fillHCal(const edm::Event &, const edm::EventSetup &)
MonitorElement * meTrackerSiBToF
static const int sdMuonRPC
MonitorElement * meTrackerSi[2]
const Plane & surface() const
The nominal surface of the GeomDet.
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
const T & max(const T &a, const T &b)
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
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 * meCaloEcalPhi
MonitorElement * meTrackerPx[2]
MonitorElement * meGeantTrkPt
MonitorElement * meGeantVtxEta
edm::InputTag PxlFwdHighSrc_
MonitorElement * meMuonRpcFZ
static const int sdEcalBrl
void setVerbose(unsigned level)
BranchDescription const & product() const
edm::InputTag SiTECHighSrc_
static const int sdMuonRPCRgnFwdp
static const int sdMuonRPCRgnBrl
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void fillTrk(const edm::Event &, const edm::EventSetup &)
MonitorElement * meMCRGP[2]
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 &)
MonitorElement * meCaloEcal[2]
MonitorElement * meTrackerSiFZ
MonitorElement * meGeantVtxZ[2]
MonitorElement * meCaloEcalToF[2]
static const int sdHcalFwd
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
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
MonitorElement * meTrackerPxFToF
edm::InputTag MuonRpcSrc_
T perp() const
Magnitude of transverse component.
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
std::vector< PSimHit > PSimHitContainer
static const int sdPxlFwd
edm::InputTag SiTIBLowSrc_
void showDirStructure(void) const
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
MonitorElement * meCaloHcalEta
virtual void beginJob(void)
static const int sdHcalEC
MonitorElement * meMuonPhi
void setCurrentFolder(const std::string &fullpath)
GlobalHitsAnalyzer(const edm::ParameterSet &)
Provenance const * provenance() const
MonitorElement * meTrackerSiBR
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
MonitorElement * meCaloEcalE[2]