Analyze.
336 edm::LogInfo(
"EventInfo") <<
" Run = " <<
e.id().run() <<
" Event = " <<
e.id().event();
339 edm::PSimHitContainer::const_iterator itHit;
346 if (!PxlBrlLowContainer.
isValid()) {
347 edm::LogError(
"TrackerHitAnalyzer::analyze") <<
"Unable to find TrackerHitsPixelBarrelLowTof in event!";
353 if (!PxlBrlHighContainer.
isValid()) {
354 edm::LogError(
"TrackerHitAnalyzer::analyze") <<
"Unable to find TrackerHitsPixelBarrelHighTof in event!";
363 if (!PxlFwdLowContainer.
isValid()) {
364 edm::LogError(
"TrackerHitAnalyzer::analyze") <<
"Unable to find TrackerHitsPixelEndcapLowTof in event!";
370 if (!PxlFwdHighContainer.
isValid()) {
371 edm::LogError(
"TrackerHitAnalyzer::analyze") <<
"Unable to find TrackerHitsPixelEndcapHighTof in event!";
380 if (!SiTIBLowContainer.
isValid()) {
381 edm::LogError(
"TrackerHitProducer::analyze") <<
"Unable to find TrackerHitsTIBLowTof in event!";
388 if (!SiTIBHighContainer.
isValid()) {
389 edm::LogError(
"TrackerHitProducer::analyze") <<
"Unable to find TrackerHitsTIBHighTof in event!";
398 if (!SiTOBLowContainer.
isValid()) {
399 edm::LogError(
"TrackerHitProducer::analyze") <<
"Unable to find TrackerHitsTOBLowTof in event!";
406 if (!SiTOBHighContainer.
isValid()) {
407 edm::LogError(
"TrackerHitProducer::analyze") <<
"Unable to find TrackerHitsTOBHighTof in event!";
417 if (!SiTIDLowContainer.
isValid()) {
418 edm::LogError(
"TrackerHitProducer::analyze") <<
"Unable to find TrackerHitsTIDLowTof in event!";
425 if (!SiTIDHighContainer.
isValid()) {
426 edm::LogError(
"TrackerHitProducer::analyze") <<
"Unable to find TrackerHitsTIDHighTof in event!";
435 if (!SiTECLowContainer.
isValid()) {
436 edm::LogError(
"TrackerHitProducer::analyze") <<
"Unable to find TrackerHitsTECLowTof in event!";
443 if (!SiTECHighContainer.
isValid()) {
444 edm::LogError(
"TrackerHitProducer::analyze") <<
"Unable to find TrackerHitsTECHighTof in event!";
454 if (!G4TrkContainer.
isValid()) {
455 edm::LogError(
"TrackerHitAnalyzer::analyze") <<
"Unable to find SimTrack in event!";
465 edm::SimTrackContainer::const_iterator itTrk;
466 for (itTrk = G4TrkContainer->begin(); itTrk != G4TrkContainer->end(); ++itTrk) {
468 double eta = 0,
p = 0;
469 const CLHEP::HepLorentzVector &G4Trk = CLHEP::HepLorentzVector(
470 itTrk->momentum().x(), itTrk->momentum().y(), itTrk->momentum().z(), itTrk->momentum().e());
471 p =
sqrt(G4Trk[0] * G4Trk[0] + G4Trk[1] * G4Trk[1] + G4Trk[2] * G4Trk[2]);
473 edm::LogError(
"TrackerHitAnalyzer::analyze") <<
"TrackerTest::INFO: Primary has p = 0 ";
475 double costheta = G4Trk[2] /
p;
479 if (
eta > 0.0 &&
eta <= 0.5)
481 if (
eta > 0.5 &&
eta <= 1.0)
483 if (
eta > 1.0 &&
eta <= 1.5)
485 if (
eta > 1.5 &&
eta <= 2.0)
487 if (
eta > 2.0 &&
eta <= 2.5)
492 if (
eta > -0.5 &&
eta <= 0.0)
494 if (
eta > -1.0 &&
eta <= -0.5)
496 if (
eta > -1.5 &&
eta <= -1.0)
498 if (
eta > -2.0 &&
eta <= -1.5)
500 if (
eta > -2.5 &&
eta <= -2.0)
517 for (itHit = PxlBrlLowContainer->begin(); itHit != PxlBrlLowContainer->end(); ++itHit) {
520 GlobalPoint gpos = det->toGlobal(itHit->localPosition());
526 h5e[ir]->
Fill(itHit->energyLoss());
527 h5ex[ir]->
Fill(itHit->entryPoint().x() - itHit->exitPoint().x());
528 h5ey[ir]->
Fill(itHit->entryPoint().y() - itHit->exitPoint().y());
529 h5ez[ir]->
Fill(std::fabs(itHit->entryPoint().z() - itHit->exitPoint().z()));
530 h5lx[ir]->
Fill(itHit->localPosition().x());
531 h5ly[ir]->
Fill(itHit->localPosition().y());
533 for (itHit = PxlBrlHighContainer->begin(); itHit != PxlBrlHighContainer->end(); ++itHit) {
536 GlobalPoint gpos = det->toGlobal(itHit->localPosition());
542 h5e[ir]->
Fill(itHit->energyLoss());
543 h5ex[ir]->
Fill(itHit->entryPoint().x() - itHit->exitPoint().x());
544 h5ey[ir]->
Fill(itHit->entryPoint().y() - itHit->exitPoint().y());
545 h5ez[ir]->
Fill(std::fabs(itHit->entryPoint().z() - itHit->exitPoint().z()));
546 h5lx[ir]->
Fill(itHit->localPosition().x());
547 h5ly[ir]->
Fill(itHit->localPosition().y());
549 for (itHit = PxlFwdLowContainer->begin(); itHit != PxlFwdLowContainer->end(); ++itHit) {
552 GlobalPoint gpos = det->toGlobal(itHit->localPosition());
558 h6e[ir]->
Fill(itHit->energyLoss());
559 h6ex[ir]->
Fill(itHit->entryPoint().x() - itHit->exitPoint().x());
560 h6ey[ir]->
Fill(itHit->entryPoint().y() - itHit->exitPoint().y());
561 h6ez[ir]->
Fill(std::fabs(itHit->entryPoint().z() - itHit->exitPoint().z()));
562 h6lx[ir]->
Fill(itHit->localPosition().x());
563 h6ly[ir]->
Fill(itHit->localPosition().y());
565 for (itHit = PxlFwdHighContainer->begin(); itHit != PxlFwdHighContainer->end(); ++itHit) {
568 GlobalPoint gpos = det->toGlobal(itHit->localPosition());
574 h6e[ir]->
Fill(itHit->energyLoss());
575 h6ex[ir]->
Fill(itHit->entryPoint().x() - itHit->exitPoint().x());
576 h6ey[ir]->
Fill(itHit->entryPoint().y() - itHit->exitPoint().y());
577 h6ez[ir]->
Fill(std::fabs(itHit->entryPoint().z() - itHit->exitPoint().z()));
578 h6lx[ir]->
Fill(itHit->localPosition().x());
579 h6ly[ir]->
Fill(itHit->localPosition().y());
585 for (itHit = SiTIBLowContainer->begin(); itHit != SiTIBLowContainer->end(); ++itHit) {
588 GlobalPoint gpos = det->toGlobal(itHit->localPosition());
594 h1e[ir]->
Fill(itHit->energyLoss());
595 h1ex[ir]->
Fill(itHit->entryPoint().x() - itHit->exitPoint().x());
596 h1ey[ir]->
Fill(itHit->entryPoint().y() - itHit->exitPoint().y());
597 h1ez[ir]->
Fill(std::fabs(itHit->entryPoint().z() - itHit->exitPoint().z()));
598 h1lx[ir]->
Fill(itHit->localPosition().x());
599 h1ly[ir]->
Fill(itHit->localPosition().y());
601 for (itHit = SiTIBHighContainer->begin(); itHit != SiTIBHighContainer->end(); ++itHit) {
604 GlobalPoint gpos = det->toGlobal(itHit->localPosition());
610 h1e[ir]->
Fill(itHit->energyLoss());
611 h1ex[ir]->
Fill(itHit->entryPoint().x() - itHit->exitPoint().x());
612 h1ey[ir]->
Fill(itHit->entryPoint().y() - itHit->exitPoint().y());
613 h1ez[ir]->
Fill(std::fabs(itHit->entryPoint().z() - itHit->exitPoint().z()));
614 h1lx[ir]->
Fill(itHit->localPosition().x());
615 h1ly[ir]->
Fill(itHit->localPosition().y());
620 for (itHit = SiTOBLowContainer->begin(); itHit != SiTOBLowContainer->end(); ++itHit) {
623 GlobalPoint gpos = det->toGlobal(itHit->localPosition());
629 h2e[ir]->
Fill(itHit->energyLoss());
630 h2ex[ir]->
Fill(itHit->entryPoint().x() - itHit->exitPoint().x());
631 h2ey[ir]->
Fill(itHit->entryPoint().y() - itHit->exitPoint().y());
632 h2ez[ir]->
Fill(std::fabs(itHit->entryPoint().z() - itHit->exitPoint().z()));
633 h2lx[ir]->
Fill(itHit->localPosition().x());
634 h2ly[ir]->
Fill(itHit->localPosition().y());
636 for (itHit = SiTOBHighContainer->begin(); itHit != SiTOBHighContainer->end(); ++itHit) {
639 GlobalPoint gpos = det->toGlobal(itHit->localPosition());
645 h2e[ir]->
Fill(itHit->energyLoss());
646 h2ex[ir]->
Fill(itHit->entryPoint().x() - itHit->exitPoint().x());
647 h2ey[ir]->
Fill(itHit->entryPoint().y() - itHit->exitPoint().y());
648 h2ez[ir]->
Fill(std::fabs(itHit->entryPoint().z() - itHit->exitPoint().z()));
649 h2lx[ir]->
Fill(itHit->localPosition().x());
650 h2ly[ir]->
Fill(itHit->localPosition().y());
655 for (itHit = SiTIDLowContainer->begin(); itHit != SiTIDLowContainer->end(); ++itHit) {
658 GlobalPoint gpos = det->toGlobal(itHit->localPosition());
664 h3e[ir]->
Fill(itHit->energyLoss());
665 h3ex[ir]->
Fill(itHit->entryPoint().x() - itHit->exitPoint().x());
666 h3ey[ir]->
Fill(itHit->entryPoint().y() - itHit->exitPoint().y());
667 h3ez[ir]->
Fill(std::fabs(itHit->entryPoint().z() - itHit->exitPoint().z()));
668 h3lx[ir]->
Fill(itHit->localPosition().x());
669 h3ly[ir]->
Fill(itHit->localPosition().y());
671 for (itHit = SiTIDHighContainer->begin(); itHit != SiTIDHighContainer->end(); ++itHit) {
674 GlobalPoint gpos = det->toGlobal(itHit->localPosition());
680 h3e[ir]->
Fill(itHit->energyLoss());
681 h3ex[ir]->
Fill(itHit->entryPoint().x() - itHit->exitPoint().x());
682 h3ey[ir]->
Fill(itHit->entryPoint().y() - itHit->exitPoint().y());
683 h3ez[ir]->
Fill(std::fabs(itHit->entryPoint().z() - itHit->exitPoint().z()));
684 h3lx[ir]->
Fill(itHit->localPosition().x());
685 h3ly[ir]->
Fill(itHit->localPosition().y());
690 for (itHit = SiTECLowContainer->begin(); itHit != SiTECLowContainer->end(); ++itHit) {
693 GlobalPoint gpos = det->toGlobal(itHit->localPosition());
699 h4e[ir]->
Fill(itHit->energyLoss());
700 h4ex[ir]->
Fill(itHit->entryPoint().x() - itHit->exitPoint().x());
701 h4ey[ir]->
Fill(itHit->entryPoint().y() - itHit->exitPoint().y());
702 h4ez[ir]->
Fill(std::fabs(itHit->entryPoint().z() - itHit->exitPoint().z()));
703 h4lx[ir]->
Fill(itHit->localPosition().x());
704 h4ly[ir]->
Fill(itHit->localPosition().y());
706 for (itHit = SiTECHighContainer->begin(); itHit != SiTECHighContainer->end(); ++itHit) {
709 GlobalPoint gpos = det->toGlobal(itHit->localPosition());
715 h4e[ir]->
Fill(itHit->energyLoss());
716 h4ex[ir]->
Fill(itHit->entryPoint().x() - itHit->exitPoint().x());
717 h4ey[ir]->
Fill(itHit->entryPoint().y() - itHit->exitPoint().y());
718 h4ez[ir]->
Fill(std::fabs(itHit->entryPoint().z() - itHit->exitPoint().z()));
719 h4lx[ir]->
Fill(itHit->localPosition().x());
720 h4ly[ir]->
Fill(itHit->localPosition().y());