14 getAllProvenances(
false), printProvenanceInfo(
false),
19 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_GlobalHitsAnalyzer";
29 m_Prov.getUntrackedParameter<
bool>(
"GetAllProvenances");
31 m_Prov.getUntrackedParameter<
bool>(
"PrintProvenanceInfo");
113 if (verbosity >= 0) {
115 <<
"\n===============================\n"
116 <<
"Initialized as EDAnalyzer with parameter values:\n"
117 <<
" Name = " <<
fName <<
"\n"
118 <<
" Verbosity = " << verbosity <<
"\n"
119 <<
" Frequency = " << frequency <<
"\n"
120 <<
" VtxUnit = " << vtxunit <<
"\n"
121 <<
" GetProv = " << getAllProvenances <<
"\n"
122 <<
" PrintProv = " << printProvenanceInfo <<
"\n"
123 <<
" PxlBrlLowSrc = " << PxlBrlLowSrc_.label()
124 <<
":" << PxlBrlLowSrc_.instance() <<
"\n"
125 <<
" PxlBrlHighSrc = " << PxlBrlHighSrc_.
label()
126 <<
":" << PxlBrlHighSrc_.
instance() <<
"\n"
127 <<
" PxlFwdLowSrc = " << PxlFwdLowSrc_.
label()
128 <<
":" << PxlBrlLowSrc_.instance() <<
"\n"
129 <<
" PxlFwdHighSrc = " << PxlFwdHighSrc_.
label()
130 <<
":" << PxlBrlHighSrc_.
instance() <<
"\n"
131 <<
" SiTIBLowSrc = " << SiTIBLowSrc_.
label()
132 <<
":" << SiTIBLowSrc_.
instance() <<
"\n"
133 <<
" SiTIBHighSrc = " << SiTIBHighSrc_.
label()
134 <<
":" << SiTIBHighSrc_.
instance() <<
"\n"
135 <<
" SiTOBLowSrc = " << SiTOBLowSrc_.
label()
136 <<
":" << SiTOBLowSrc_.
instance() <<
"\n"
137 <<
" SiTOBHighSrc = " << SiTOBHighSrc_.
label()
138 <<
":" << SiTOBHighSrc_.
instance() <<
"\n"
139 <<
" SiTIDLowSrc = " << SiTIDLowSrc_.
label()
140 <<
":" << SiTIDLowSrc_.
instance() <<
"\n"
141 <<
" SiTIDHighSrc = " << SiTIDHighSrc_.
label()
142 <<
":" << SiTIDHighSrc_.
instance() <<
"\n"
143 <<
" SiTECLowSrc = " << SiTECLowSrc_.
label()
144 <<
":" << SiTECLowSrc_.
instance() <<
"\n"
145 <<
" SiTECHighSrc = " << SiTECHighSrc_.
label()
146 <<
":" << SiTECHighSrc_.
instance() <<
"\n"
147 <<
" MuonCscSrc = " << MuonCscSrc_.
label()
148 <<
":" << MuonCscSrc_.
instance() <<
"\n"
149 <<
" MuonDtSrc = " << MuonDtSrc_.
label()
150 <<
":" << MuonDtSrc_.
instance() <<
"\n"
151 <<
" MuonRpcSrc = " << MuonRpcSrc_.
label()
152 <<
":" << MuonRpcSrc_.
instance() <<
"\n"
153 <<
" ECalEBSrc = " << ECalEBSrc_.
label()
154 <<
":" << ECalEBSrc_.
instance() <<
"\n"
155 <<
" ECalEESrc = " << ECalEESrc_.
label()
156 <<
":" << ECalEESrc_.
instance() <<
"\n"
157 <<
" ECalESSrc = " << ECalESSrc_.
label()
158 <<
":" << ECalESSrc_.
instance() <<
"\n"
159 <<
" HCalSrc = " << HCalSrc_.
label()
160 <<
":" << HCalSrc_.
instance() <<
"\n"
162 <<
" validHepMCevt = "
164 <<
" validG4VtxContainer = "
165 <<
":" << validG4VtxContainer <<
"\n"
166 <<
" validG4trkContainer = "
167 <<
":" << validG4trkContainer <<
"\n"
168 <<
" validPxlBrlLow = "
169 <<
":" << validPxlBrlLow <<
"\n"
170 <<
" validPxlBrlHigh = "
171 <<
":" << validPxlBrlHigh <<
"\n"
172 <<
" validPxlFwdLow = "
173 <<
":" << validPxlFwdLow <<
"\n"
174 <<
" validPxlFwdHigh = "
175 <<
":" << validPxlFwdHigh <<
"\n"
176 <<
" validSiTIBLow = "
177 <<
":" << validSiTIBLow <<
"\n"
178 <<
" validSiTIBHigh = "
179 <<
":" << validSiTIBHigh <<
"\n"
180 <<
" validSiTOBLow = "
181 <<
":" << validSiTOBLow <<
"\n"
182 <<
" validSiTOBHigh = "
183 <<
":" << validSiTOBHigh <<
"\n"
184 <<
" validSiTIDLow = "
185 <<
":" << validSiTIDLow <<
"\n"
186 <<
" validSiTIDHigh = "
187 <<
":" << validSiTIDHigh <<
"\n"
188 <<
" validSiTECLow = "
189 <<
":" << validSiTECLow <<
"\n"
190 <<
" validSiTECHigh = "
191 <<
":" << validSiTECHigh <<
"\n"
192 <<
" validMuonCSC = "
193 <<
":" << validMuonCSC <<
"\n"
195 <<
":" << validMuonDt <<
"\n"
196 <<
" validMuonRPC = "
197 <<
":" << validMuonRPC <<
"\n"
199 <<
":" << validEB <<
"\n"
201 <<
":" << validEE <<
"\n"
203 <<
":" << validPresh <<
"\n"
205 <<
":" << validHcal <<
"\n"
206 <<
"===============================\n";
210 for (Int_t
i = 0;
i < 2; ++
i) {
276 sprintf(hname,
"hMCRGP1");
277 sprintf(htitle,
"RawGenParticles");
279 sprintf(hname,
"hMCRGP2");
281 for (Int_t
i = 0;
i < 2; ++
i) {
286 sprintf(hname,
"hMCG4Vtx1");
287 sprintf(htitle,
"G4 Vertices");
289 sprintf(hname,
"hMCG4Vtx2");
291 for (Int_t
i = 0;
i < 2; ++
i) {
296 sprintf(hname,
"hMCG4Trk1");
297 sprintf(htitle,
"G4 Tracks");
299 sprintf(hname,
"hMCG4Trk2");
301 for (Int_t
i = 0;
i < 2; ++
i) {
306 sprintf(hname,
"hGeantVtxX1");
307 sprintf(htitle,
"Geant vertex x/micrometer");
309 sprintf(hname,
"hGeantVtxX2");
311 for (Int_t
i = 0;
i < 2; ++
i) {
316 sprintf(hname,
"hGeantVtxY1");
317 sprintf(htitle,
"Geant vertex y/micrometer");
319 sprintf(hname,
"hGeantVtxY2");
321 for (Int_t
i = 0;
i < 2; ++
i) {
326 sprintf(hname,
"hGeantVtxZ1");
327 sprintf(htitle,
"Geant vertex z/millimeter");
329 sprintf(hname,
"hGeantVtxZ2");
332 for (Int_t
i = 0;
i < 2; ++
i) {
337 sprintf(hname,
"hGeantTrkPt");
338 sprintf(htitle,
"Log10 Geant track pt/GeV");
343 sprintf(hname,
"hGeantTrkE");
344 sprintf(htitle,
"Log10 Geant track E/GeV");
349 sprintf(hname,
"hGeantVtxEta");
350 sprintf(htitle,
"Geant vertices eta");
355 sprintf(hname,
"hGeantVtxPhi");
356 sprintf(htitle,
"Geant vertices phi/rad");
361 sprintf(hname,
"hGeantVtxRad1");
362 sprintf(htitle,
"Geant vertices radius/cm");
364 sprintf(hname,
"hGeantVtxRad2");
366 for (Int_t
i = 0;
i < 2; ++
i) {
371 sprintf(hname,
"hGeantVtxMulti");
372 sprintf(htitle,
"Geant vertices outgoing multiplicity");
379 sprintf(hname,
"hCaloEcal1");
380 sprintf(htitle,
"Ecal hits");
382 sprintf(hname,
"hCaloEcal2");
385 sprintf(hname,
"hCaloEcalE1");
386 sprintf(htitle,
"Ecal hits, energy/GeV");
388 sprintf(hname,
"hCaloEcalE2");
390 sprintf(hname,
"hCaloEcalToF1");
391 sprintf(htitle,
"Ecal hits, ToF/ns");
393 sprintf(hname,
"hCaloEcalToF2");
396 for (Int_t
i = 0;
i < 2; ++
i) {
405 sprintf(hname,
"hCaloEcalPhi");
406 sprintf(htitle,
"Ecal hits, phi/rad");
411 sprintf(hname,
"hCaloEcalEta");
412 sprintf(htitle,
"Ecal hits, eta");
417 sprintf(hname,
"hCaloPreSh1");
418 sprintf(htitle,
"PreSh hits");
420 sprintf(hname,
"hCaloPreSh2");
423 sprintf(hname,
"hCaloPreShE1");
424 sprintf(htitle,
"PreSh hits, energy/GeV");
426 sprintf(hname,
"hCaloPreShE2");
429 sprintf(hname,
"hCaloPreShToF1");
430 sprintf(htitle,
"PreSh hits, ToF/ns");
432 sprintf(hname,
"hCaloPreShToF2");
435 for (Int_t
i = 0;
i < 2; ++
i) {
444 sprintf(hname,
"hCaloPreShPhi");
445 sprintf(htitle,
"PreSh hits, phi/rad");
450 sprintf(hname,
"hCaloPreShEta");
451 sprintf(htitle,
"PreSh hits, eta");
458 sprintf(hname,
"hCaloHcal1");
459 sprintf(htitle,
"Hcal hits");
461 sprintf(hname,
"hCaloHcal2");
464 sprintf(hname,
"hCaloHcalE1");
465 sprintf(htitle,
"Hcal hits, energy/GeV");
467 sprintf(hname,
"hCaloHcalE2");
470 sprintf(hname,
"hCaloHcalToF1");
471 sprintf(htitle,
"Hcal hits, ToF/ns");
473 sprintf(hname,
"hCaloHcalToF2");
476 for (Int_t
i = 0;
i < 2; ++
i) {
485 sprintf(hname,
"hCaloHcalPhi");
486 sprintf(htitle,
"Hcal hits, phi/rad");
491 sprintf(hname,
"hCaloHcalEta");
492 sprintf(htitle,
"Hcal hits, eta");
499 sprintf(hname,
"hTrackerPx1");
500 sprintf(htitle,
"Pixel hits");
502 sprintf(hname,
"hTrackerPx2");
504 for (Int_t
i = 0;
i < 2; ++
i) {
509 sprintf(hname,
"hTrackerPxPhi");
510 sprintf(htitle,
"Pixel hits phi/rad");
515 sprintf(hname,
"hTrackerPxEta");
516 sprintf(htitle,
"Pixel hits eta");
521 sprintf(hname,
"hTrackerPxBToF");
522 sprintf(htitle,
"Pixel barrel hits, ToF/ns");
527 sprintf(hname,
"hTrackerPxBR");
528 sprintf(htitle,
"Pixel barrel hits, R/cm");
533 sprintf(hname,
"hTrackerPxFToF");
534 sprintf(htitle,
"Pixel forward hits, ToF/ns");
539 sprintf(hname,
"hTrackerPxFZ");
540 sprintf(htitle,
"Pixel forward hits, Z/cm");
542 iBooker.
book1D(hname,htitle,200,-100.,100.);
548 sprintf(hname,
"hTrackerSi1");
549 sprintf(htitle,
"Silicon hits");
551 sprintf(hname,
"hTrackerSi2");
553 for (Int_t
i = 0;
i < 2; ++
i) {
558 sprintf(hname,
"hTrackerSiPhi");
559 sprintf(htitle,
"Silicon hits phi/rad");
564 sprintf(hname,
"hTrackerSiEta");
565 sprintf(htitle,
"Silicon hits eta");
570 sprintf(hname,
"hTrackerSiBToF");
571 sprintf(htitle,
"Silicon barrel hits, ToF/ns");
576 sprintf(hname,
"hTrackerSiBR");
577 sprintf(htitle,
"Silicon barrel hits, R/cm");
582 sprintf(hname,
"hTrackerSiFToF");
583 sprintf(htitle,
"Silicon forward hits, ToF/ns");
588 sprintf(hname,
"hTrackerSiFZ");
589 sprintf(htitle,
"Silicon forward hits, Z/cm");
596 sprintf(hname,
"hMuon1");
597 sprintf(htitle,
"Muon hits");
599 sprintf(hname,
"hMuon2");
601 for (Int_t
i = 0;
i < 2; ++
i) {
606 sprintf(hname,
"hMuonPhi");
607 sprintf(htitle,
"Muon hits phi/rad");
612 sprintf(hname,
"hMuonEta");
613 sprintf(htitle,
"Muon hits eta");
618 sprintf(hname,
"hMuonCscToF1");
619 sprintf(htitle,
"Muon CSC hits, ToF/ns");
621 sprintf(hname,
"hMuonCscToF2");
623 for (Int_t
i = 0;
i < 2; ++
i) {
628 sprintf(hname,
"hMuonCscZ");
629 sprintf(htitle,
"Muon CSC hits, Z/cm");
634 sprintf(hname,
"hMuonDtToF1");
635 sprintf(htitle,
"Muon DT hits, ToF/ns");
637 sprintf(hname,
"hMuonDtToF2");
639 for (Int_t
i = 0;
i < 2; ++
i) {
644 sprintf(hname,
"hMuonDtR");
645 sprintf(htitle,
"Muon DT hits, R/cm");
650 sprintf(hname,
"hMuonRpcFToF1");
651 sprintf(htitle,
"Muon RPC forward hits, ToF/ns");
653 sprintf(hname,
"hMuonRpcFToF2");
655 for (Int_t
i = 0;
i < 2; ++
i) {
659 sprintf(hname,
"hMuonRpcFZ");
660 sprintf(htitle,
"Muon RPC forward hits, Z/cm");
665 sprintf(hname,
"hMuonRpcBToF1");
666 sprintf(htitle,
"Muon RPC barrel hits, ToF/ns");
668 sprintf(hname,
"hMuonRpcBToF2");
670 for (Int_t
i = 0;
i < 2; ++
i) {
675 sprintf(hname,
"hMuonRpcBR");
676 sprintf(htitle,
"Muon RPC barrel hits, R/cm");
685 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_analyze";
696 <<
"Processing run " << nrun <<
", event " << nevt
697 <<
" (" <<
count <<
" events total)";
701 <<
"Processing run " << nrun <<
", event " << nevt
702 <<
" (" <<
count <<
" events total)";
709 std::vector<const edm::Provenance*> AllProv;
714 <<
"Number of Provenances = " << AllProv.size();
717 TString eventout(
"\nProvenance info:\n");
719 for (
unsigned int i = 0;
i < AllProv.size(); ++
i) {
720 eventout +=
"\n ******************************";
721 eventout +=
"\n Module : ";
722 eventout += AllProv[
i]->moduleLabel();
723 eventout +=
"\n ProductID : ";
724 eventout += AllProv[
i]->productID().id();
725 eventout +=
"\n ClassName : ";
726 eventout += AllProv[
i]->className();
727 eventout +=
"\n InstanceName : ";
728 eventout += AllProv[
i]->productInstanceName();
729 eventout +=
"\n BranchName : ";
730 eventout += AllProv[
i]->branchName();
732 eventout +=
"\n ******************************\n";
753 <<
"Done gathering data from event.";
762 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillG4MC";
766 eventout =
"\nGathering info:";
772 std::vector<edm::Handle<edm::HepMCProduct> > AllHepMCEvt;
777 for (
unsigned int i = 0;
i < AllHepMCEvt.size(); ++
i) {
778 HepMCEvt = AllHepMCEvt[
i];
785 <<
"Unable to find HepMCProduct in event!";
788 eventout +=
"\n Using HepMCProduct: ";
792 const HepMC::GenEvent* MCEvt = HepMCEvt->GetEvent();
797 eventout +=
"\n Number of Raw Particles collected:......... ";
821 if (!G4VtxContainer.
isValid()) {
823 <<
"Unable to find SimVertex in event!";
828 edm::SimVertexContainer::const_iterator itVtx;
829 for (itVtx = G4VtxContainer->begin(); itVtx != G4VtxContainer->end();
835 itVtx->position().y(),
836 itVtx->position().z(),
837 itVtx->position().e());
840 G4Vtx1.GetCoordinates(G4Vtx);
858 if ( G4TrkContainer.
isValid() ) {
859 edm::SimTrackContainer::const_iterator itTrk;
860 for (itTrk = G4TrkContainer->begin(); itTrk != G4TrkContainer->end();
862 if ( (*itTrk).vertIndex() ==
i ) { multi++; }
871 eventout +=
"\n Number of G4Vertices collected:............ ";
883 if (!G4TrkContainer.
isValid()) {
885 <<
"Unable to find SimTrack in event!";
890 edm::SimTrackContainer::const_iterator itTrk;
891 for (itTrk = G4TrkContainer->begin(); itTrk != G4TrkContainer->end();
897 itTrk->momentum().y(),
898 itTrk->momentum().z(),
899 itTrk->momentum().e());
901 G4Trk1.GetCoordinates(G4Trk);
909 eventout +=
"\n Number of G4Tracks collected:.............. ";
928 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillTrk";
932 eventout =
"\nGathering info:";
937 if (!theTrackerGeometry.
isValid()) {
939 <<
"Unable to find TrackerDigiGeometryRecord in event!";
945 edm::PSimHitContainer::const_iterator itHit;
954 if (!PxlBrlLowContainer.
isValid()) {
956 <<
"Unable to find TrackerHitsPixelBarrelLowTof in event!";
962 if (!PxlBrlHighContainer.
isValid()) {
964 <<
"Unable to find TrackerHitsPixelBarrelHighTof in event!";
969 thePxlBrlHits.insert(thePxlBrlHits.end(),PxlBrlLowContainer->begin(),
970 PxlBrlLowContainer->end());
972 thePxlBrlHits.insert(thePxlBrlHits.end(),PxlBrlHighContainer->begin(),
973 PxlBrlHighContainer->end());
977 for (itHit = thePxlBrlHits.begin(); itHit != thePxlBrlHits.end(); ++itHit) {
982 DetId theDetUnitId(itHit->detUnitId());
983 int detector = theDetUnitId.
det();
984 int subdetector = theDetUnitId.subdetId();
994 <<
"Unable to get GeomDetUnit from PxlBrlHits for Hit " <<
i;
1013 <<
"PxlBrl PSimHit " << i
1014 <<
" is expected to be (det,subdet) = ("
1016 <<
"); value returned is: ("
1017 << detector <<
"," << subdetector <<
")";
1023 eventout +=
"\n Number of Pixel Barrel Hits collected:..... ";
1036 if (!PxlFwdLowContainer.
isValid()) {
1038 <<
"Unable to find TrackerHitsPixelEndcapLowTof in event!";
1044 if (!PxlFwdHighContainer.
isValid()) {
1045 LogDebug(
"GlobalHitsAnalyzer_fillTrk")
1046 <<
"Unable to find TrackerHitsPixelEndcapHighTof in event!";
1051 thePxlFwdHits.insert(thePxlFwdHits.end(),PxlFwdLowContainer->begin(),
1052 PxlFwdLowContainer->end());
1054 thePxlFwdHits.insert(thePxlFwdHits.end(),PxlFwdHighContainer->begin(),
1055 PxlFwdHighContainer->end());
1059 for (itHit = thePxlFwdHits.begin(); itHit != thePxlFwdHits.end(); ++itHit) {
1064 DetId theDetUnitId(itHit->detUnitId());
1065 int detector = theDetUnitId.
det();
1066 int subdetector = theDetUnitId.subdetId();
1076 <<
"Unable to get GeomDetUnit from PxlFwdHits for Hit " <<
i;;
1095 <<
"PxlFwd PSimHit " << i
1096 <<
" is expected to be (det,subdet) = ("
1098 <<
"); value returned is: ("
1099 << detector <<
"," << subdetector <<
")";
1105 eventout +=
"\n Number of Pixel Forward Hits collected:.... ";
1122 if (!SiTIBLowContainer.
isValid()) {
1124 <<
"Unable to find TrackerHitsTIBLowTof in event!";
1130 if (!SiTIBHighContainer.
isValid()) {
1132 <<
"Unable to find TrackerHitsTIBHighTof in event!";
1138 if (!SiTOBLowContainer.
isValid()) {
1140 <<
"Unable to find TrackerHitsTOBLowTof in event!";
1146 if (!SiTOBHighContainer.
isValid()) {
1148 <<
"Unable to find TrackerHitsTOBHighTof in event!";
1153 theSiBrlHits.insert(theSiBrlHits.end(),SiTIBLowContainer->begin(),
1154 SiTIBLowContainer->end());
1156 theSiBrlHits.insert(theSiBrlHits.end(),SiTIBHighContainer->begin(),
1157 SiTIBHighContainer->end());
1159 theSiBrlHits.insert(theSiBrlHits.end(),SiTOBLowContainer->begin(),
1160 SiTOBLowContainer->end());
1162 theSiBrlHits.insert(theSiBrlHits.end(),SiTOBHighContainer->begin(),
1163 SiTOBHighContainer->end());
1167 for (itHit = theSiBrlHits.begin(); itHit != theSiBrlHits.end(); ++itHit) {
1172 DetId theDetUnitId(itHit->detUnitId());
1173 int detector = theDetUnitId.
det();
1174 int subdetector = theDetUnitId.subdetId();
1177 if ((detector ==
dTrk) &&
1186 <<
"Unable to get GeomDetUnit from SiBrlHits for Hit " <<
i;
1205 <<
"SiBrl PSimHit " << i
1206 <<
" is expected to be (det,subdet) = ("
1208 <<
" || " <<
sdSiTOB <<
"); value returned is: ("
1209 << detector <<
"," << subdetector <<
")";
1215 eventout +=
"\n Number of Silicon Barrel Hits collected:... ";
1228 if (!SiTIDLowContainer.
isValid()) {
1230 <<
"Unable to find TrackerHitsTIDLowTof in event!";
1236 if (!SiTIDHighContainer.
isValid()) {
1237 LogDebug(
"GlobalHitsAnalyzer_fillTrk")
1238 <<
"Unable to find TrackerHitsTIDHighTof in event!";
1244 if (!SiTECLowContainer.
isValid()) {
1246 <<
"Unable to find TrackerHitsTECLowTof in event!";
1252 if (!SiTECHighContainer.
isValid()) {
1254 <<
"Unable to find TrackerHitsTECHighTof in event!";
1259 theSiFwdHits.insert(theSiFwdHits.end(),SiTIDLowContainer->begin(),
1260 SiTIDLowContainer->end());
1262 theSiFwdHits.insert(theSiFwdHits.end(),SiTIDHighContainer->begin(),
1263 SiTIDHighContainer->end());
1265 theSiFwdHits.insert(theSiFwdHits.end(),SiTECLowContainer->begin(),
1266 SiTECLowContainer->end());
1268 theSiFwdHits.insert(theSiFwdHits.end(),SiTECHighContainer->begin(),
1269 SiTECHighContainer->end());
1273 for (itHit = theSiFwdHits.begin(); itHit != theSiFwdHits.end(); ++itHit) {
1278 DetId theDetUnitId(itHit->detUnitId());
1279 int detector = theDetUnitId.
det();
1280 int subdetector = theDetUnitId.subdetId();
1283 if ((detector ==
dTrk) &&
1292 <<
"Unable to get GeomDetUnit from SiFwdHits Hit " <<
i;
1311 <<
"SiFwd PSimHit " << i
1312 <<
" is expected to be (det,subdet) = ("
1314 <<
" || " <<
sdSiTEC <<
"); value returned is: ("
1315 << detector <<
"," << subdetector <<
")";
1321 eventout +=
"\n Number of Silicon Forward Hits collected:.. ";
1340 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillMuon";
1344 eventout =
"\nGathering info:";
1347 edm::PSimHitContainer::const_iterator itHit;
1355 if (!theCSCGeometry.
isValid()) {
1357 <<
"Unable to find MuonGeometryRecord for the CSCGeometry in event!";
1365 if (!MuonCSCContainer.
isValid()) {
1367 <<
"Unable to find MuonCSCHits in event!";
1374 for (itHit = MuonCSCContainer->begin(); itHit != MuonCSCContainer->end();
1380 DetId theDetUnitId(itHit->detUnitId());
1381 int detector = theDetUnitId.
det();
1382 int subdetector = theDetUnitId.subdetId();
1385 if ((detector ==
dMuon) &&
1393 <<
"Unable to get GeomDetUnit from theCSCMuon for hit " <<
i;
1413 <<
"MuonCsc PSimHit " << i
1414 <<
" is expected to be (det,subdet) = ("
1416 <<
"); value returned is: ("
1417 << detector <<
"," << subdetector <<
")";
1423 eventout +=
"\n Number of CSC muon Hits collected:......... ";
1436 if (!theDTGeometry.
isValid()) {
1438 <<
"Unable to find MuonGeometryRecord for the DTGeometry in event!";
1446 if (!MuonDtContainer.
isValid()) {
1448 <<
"Unable to find MuonDTHits in event!";
1455 for (itHit = MuonDtContainer->begin(); itHit != MuonDtContainer->end();
1461 DetId theDetUnitId(itHit->detUnitId());
1462 int detector = theDetUnitId.
det();
1463 int subdetector = theDetUnitId.subdetId();
1466 if ((detector ==
dMuon) &&
1471 DTWireId wireId(itHit->detUnitId());
1474 const DTLayer *theDet = theDTMuon.
layer(wireId.layerId());
1478 <<
"Unable to get GeomDetUnit from theDtMuon for hit " <<
i;
1485 const BoundPlane& bSurface = theDet->surface();
1498 <<
"MuonDt PSimHit " << i
1499 <<
" is expected to be (det,subdet) = ("
1501 <<
"); value returned is: ("
1502 << detector <<
"," << subdetector <<
")";
1508 eventout +=
"\n Number of DT muon Hits collected:.......... ";
1522 if (!theRPCGeometry.
isValid()) {
1524 <<
"Unable to find MuonGeometryRecord for the RPCGeometry in event!";
1532 if (!MuonRPCContainer.
isValid()) {
1534 <<
"Unable to find MuonRPCHits in event!";
1541 int RPCBrl =0, RPCFwd = 0;
1542 for (itHit = MuonRPCContainer->begin(); itHit != MuonRPCContainer->end();
1548 DetId theDetUnitId(itHit->detUnitId());
1549 int detector = theDetUnitId.
det();
1550 int subdetector = theDetUnitId.subdetId();
1553 if ((detector ==
dMuon) &&
1557 RPCDetId RPCId(itHit->detUnitId());
1560 int region = RPCId.
region();
1567 <<
"Unable to get GeomDetUnit from theRPCMuon for hit " <<
i;
1596 localPosition()).perp());
1604 <<
"Invalid region for RPC Muon hit" <<
i;
1609 <<
"MuonRpc PSimHit " << i
1610 <<
" is expected to be (det,subdet) = ("
1612 <<
"); value returned is: ("
1613 << detector <<
"," << subdetector <<
")";
1619 eventout +=
"\n Number of RPC muon Hits collected:......... ";
1621 eventout +=
"\n RPC Barrel muon Hits:............ ";
1623 eventout +=
"\n RPC Forward muon Hits:........... ";
1642 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillECal";
1646 eventout =
"\nGathering info:";
1651 if (!theCaloGeometry.
isValid()) {
1653 <<
"Unable to find CaloGeometryRecord in event!";
1659 edm::PCaloHitContainer::const_iterator itHit;
1670 <<
"Unable to find EcalHitsEB in event!";
1678 <<
"Unable to find EcalHitsEE in event!";
1683 theECalHits.insert(theECalHits.end(),EBContainer->begin(),
1684 EBContainer->end());
1686 theECalHits.insert(theECalHits.end(),EEContainer->begin(),
1687 EEContainer->end());
1691 for (itHit = theECalHits.begin(); itHit != theECalHits.end(); ++itHit) {
1696 DetId theDetUnitId(itHit->id());
1697 int detector = theDetUnitId.
det();
1698 int subdetector = theDetUnitId.subdetId();
1701 if ((detector ==
dEcal) &&
1707 getSubdetectorGeometry(theDetUnitId)->
getGeometry(theDetUnitId);
1711 <<
"Unable to get CaloCellGeometry from ECalHits for Hit " <<
i;
1729 <<
"ECal PCaloHit " << i
1730 <<
" is expected to be (det,subdet) = ("
1732 <<
" || " <<
sdEcalFwd <<
"); value returned is: ("
1733 << detector <<
"," << subdetector <<
")";
1739 eventout +=
"\n Number of ECal Hits collected:............. ";
1752 if (!PreShContainer.
isValid()) {
1754 <<
"Unable to find EcalHitsES in event!";
1761 for (itHit = PreShContainer->begin();
1762 itHit != PreShContainer->end(); ++itHit) {
1767 DetId theDetUnitId(itHit->id());
1768 int detector = theDetUnitId.
det();
1769 int subdetector = theDetUnitId.subdetId();
1772 if ((detector ==
dEcal) &&
1777 getSubdetectorGeometry(theDetUnitId)->
getGeometry(theDetUnitId);
1781 <<
"Unable to get CaloCellGeometry from PreShContainer for Hit "
1800 <<
"PreSh PCaloHit " << i
1801 <<
" is expected to be (det,subdet) = ("
1803 <<
"); value returned is: ("
1804 << detector <<
"," << subdetector <<
")";
1810 eventout +=
"\n Number of PreSh Hits collected:............ ";
1827 std::string MsgLoggerCat =
"GlobalHitsAnalyzer_fillHCal";
1831 eventout =
"\nGathering info:";
1836 if (!theCaloGeometry.
isValid()) {
1838 <<
"Unable to find CaloGeometryRecord in event!";
1844 edm::PCaloHitContainer::const_iterator itHit;
1852 if (!HCalContainer.
isValid()) {
1854 <<
"Unable to find HCalHits in event!";
1861 for (itHit = HCalContainer->begin();
1862 itHit != HCalContainer->end(); ++itHit) {
1867 DetId theDetUnitId(itHit->id());
1868 int detector = theDetUnitId.
det();
1869 int subdetector = theDetUnitId.subdetId();
1872 if ((detector ==
dHcal) &&
1880 getSubdetectorGeometry(theDetUnitId)->
getGeometry(theDetUnitId);
1884 <<
"Unable to get CaloCellGeometry from HCalContainer for Hit "
1903 <<
"HCal PCaloHit " << i
1904 <<
" is expected to be (det,subdet) = ("
1907 <<
"); value returned is: ("
1908 << detector <<
"," << subdetector <<
")";
1914 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.
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
MonitorElement * meCaloEcalE[2]