Analyze.
366 edm::PSimHitContainer::const_iterator itHit;
373 if (!PxlBrlLowContainer.
isValid()) {
374 edm::LogError(
"TrackerHitAnalyzer::analyze") <<
"Unable to find TrackerHitsPixelBarrelLowTof in event!";
380 if (!PxlBrlHighContainer.
isValid()) {
381 edm::LogError(
"TrackerHitAnalyzer::analyze") <<
"Unable to find TrackerHitsPixelBarrelHighTof in event!";
390 if (!PxlFwdLowContainer.
isValid()) {
391 edm::LogError(
"TrackerHitAnalyzer::analyze") <<
"Unable to find TrackerHitsPixelEndcapLowTof in event!";
397 if (!PxlFwdHighContainer.
isValid()) {
398 edm::LogError(
"TrackerHitAnalyzer::analyze") <<
"Unable to find TrackerHitsPixelEndcapHighTof in event!";
407 if (!SiTIBLowContainer.
isValid()) {
408 edm::LogError(
"TrackerHitProducer::analyze") <<
"Unable to find TrackerHitsTIBLowTof in event!";
415 if (!SiTIBHighContainer.
isValid()) {
416 edm::LogError(
"TrackerHitProducer::analyze") <<
"Unable to find TrackerHitsTIBHighTof in event!";
425 if (!SiTOBLowContainer.
isValid()) {
426 edm::LogError(
"TrackerHitProducer::analyze") <<
"Unable to find TrackerHitsTOBLowTof in event!";
433 if (!SiTOBHighContainer.
isValid()) {
434 edm::LogError(
"TrackerHitProducer::analyze") <<
"Unable to find TrackerHitsTOBHighTof in event!";
444 if (!SiTIDLowContainer.
isValid()) {
445 edm::LogError(
"TrackerHitProducer::analyze") <<
"Unable to find TrackerHitsTIDLowTof in event!";
452 if (!SiTIDHighContainer.
isValid()) {
453 edm::LogError(
"TrackerHitProducer::analyze") <<
"Unable to find TrackerHitsTIDHighTof in event!";
462 if (!SiTECLowContainer.
isValid()) {
463 edm::LogError(
"TrackerHitProducer::analyze") <<
"Unable to find TrackerHitsTECLowTof in event!";
470 if (!SiTECHighContainer.
isValid()) {
471 edm::LogError(
"TrackerHitProducer::analyze") <<
"Unable to find TrackerHitsTECHighTof in event!";
481 if (!G4TrkContainer.
isValid()) {
482 edm::LogError(
"TrackerHitAnalyzer::analyze") <<
"Unable to find SimTrack in event!";
492 edm::SimTrackContainer::const_iterator itTrk;
493 for (itTrk = G4TrkContainer->begin(); itTrk != G4TrkContainer->end(); ++itTrk) {
495 double eta = 0,
p = 0;
496 const CLHEP::HepLorentzVector &G4Trk = CLHEP::HepLorentzVector(
497 itTrk->momentum().x(), itTrk->momentum().y(), itTrk->momentum().z(), itTrk->momentum().e());
498 p =
sqrt(G4Trk[0] * G4Trk[0] + G4Trk[1] * G4Trk[1] + G4Trk[2] * G4Trk[2]);
500 edm::LogError(
"TrackerHitAnalyzer::analyze") <<
"TrackerTest::INFO: Primary has p = 0 ";
502 double costheta = G4Trk[2] /
p;
504 eta = -
log(
tan(theta / 2));
506 if (eta > 0.0 && eta <= 0.5)
508 if (eta > 0.5 && eta <= 1.0)
510 if (eta > 1.0 && eta <= 1.5)
512 if (eta > 1.5 && eta <= 2.0)
514 if (eta > 2.0 && eta <= 2.5)
519 if (eta > -0.5 && eta <= 0.0)
521 if (eta > -1.0 && eta <= -0.5)
523 if (eta > -1.5 && eta <= -1.0)
525 if (eta > -2.0 && eta <= -1.5)
527 if (eta > -2.5 && eta <= -2.0)
544 for (itHit = PxlBrlLowContainer->begin(); itHit != PxlBrlLowContainer->end(); ++itHit) {
547 GlobalPoint gpos = det->toGlobal(itHit->localPosition());
553 h5e[ir]->
Fill(itHit->energyLoss());
554 h5ex[ir]->
Fill(itHit->entryPoint().x() - itHit->exitPoint().x());
555 h5ey[ir]->
Fill(itHit->entryPoint().y() - itHit->exitPoint().y());
556 h5ez[ir]->
Fill(std::fabs(itHit->entryPoint().z() - itHit->exitPoint().z()));
557 h5lx[ir]->
Fill(itHit->localPosition().x());
558 h5ly[ir]->
Fill(itHit->localPosition().y());
560 for (itHit = PxlBrlHighContainer->begin(); itHit != PxlBrlHighContainer->end(); ++itHit) {
563 GlobalPoint gpos = det->toGlobal(itHit->localPosition());
569 h5e[ir]->
Fill(itHit->energyLoss());
570 h5ex[ir]->
Fill(itHit->entryPoint().x() - itHit->exitPoint().x());
571 h5ey[ir]->
Fill(itHit->entryPoint().y() - itHit->exitPoint().y());
572 h5ez[ir]->
Fill(std::fabs(itHit->entryPoint().z() - itHit->exitPoint().z()));
573 h5lx[ir]->
Fill(itHit->localPosition().x());
574 h5ly[ir]->
Fill(itHit->localPosition().y());
576 for (itHit = PxlFwdLowContainer->begin(); itHit != PxlFwdLowContainer->end(); ++itHit) {
579 GlobalPoint gpos = det->toGlobal(itHit->localPosition());
585 h6e[ir]->
Fill(itHit->energyLoss());
586 h6ex[ir]->
Fill(itHit->entryPoint().x() - itHit->exitPoint().x());
587 h6ey[ir]->
Fill(itHit->entryPoint().y() - itHit->exitPoint().y());
588 h6ez[ir]->
Fill(std::fabs(itHit->entryPoint().z() - itHit->exitPoint().z()));
589 h6lx[ir]->
Fill(itHit->localPosition().x());
590 h6ly[ir]->
Fill(itHit->localPosition().y());
592 for (itHit = PxlFwdHighContainer->begin(); itHit != PxlFwdHighContainer->end(); ++itHit) {
595 GlobalPoint gpos = det->toGlobal(itHit->localPosition());
601 h6e[ir]->
Fill(itHit->energyLoss());
602 h6ex[ir]->
Fill(itHit->entryPoint().x() - itHit->exitPoint().x());
603 h6ey[ir]->
Fill(itHit->entryPoint().y() - itHit->exitPoint().y());
604 h6ez[ir]->
Fill(std::fabs(itHit->entryPoint().z() - itHit->exitPoint().z()));
605 h6lx[ir]->
Fill(itHit->localPosition().x());
606 h6ly[ir]->
Fill(itHit->localPosition().y());
612 for (itHit = SiTIBLowContainer->begin(); itHit != SiTIBLowContainer->end(); ++itHit) {
615 GlobalPoint gpos = det->toGlobal(itHit->localPosition());
621 h1e[ir]->
Fill(itHit->energyLoss());
622 h1ex[ir]->
Fill(itHit->entryPoint().x() - itHit->exitPoint().x());
623 h1ey[ir]->
Fill(itHit->entryPoint().y() - itHit->exitPoint().y());
624 h1ez[ir]->
Fill(std::fabs(itHit->entryPoint().z() - itHit->exitPoint().z()));
625 h1lx[ir]->
Fill(itHit->localPosition().x());
626 h1ly[ir]->
Fill(itHit->localPosition().y());
628 for (itHit = SiTIBHighContainer->begin(); itHit != SiTIBHighContainer->end(); ++itHit) {
631 GlobalPoint gpos = det->toGlobal(itHit->localPosition());
637 h1e[ir]->
Fill(itHit->energyLoss());
638 h1ex[ir]->
Fill(itHit->entryPoint().x() - itHit->exitPoint().x());
639 h1ey[ir]->
Fill(itHit->entryPoint().y() - itHit->exitPoint().y());
640 h1ez[ir]->
Fill(std::fabs(itHit->entryPoint().z() - itHit->exitPoint().z()));
641 h1lx[ir]->
Fill(itHit->localPosition().x());
642 h1ly[ir]->
Fill(itHit->localPosition().y());
647 for (itHit = SiTOBLowContainer->begin(); itHit != SiTOBLowContainer->end(); ++itHit) {
650 GlobalPoint gpos = det->toGlobal(itHit->localPosition());
656 h2e[ir]->
Fill(itHit->energyLoss());
657 h2ex[ir]->
Fill(itHit->entryPoint().x() - itHit->exitPoint().x());
658 h2ey[ir]->
Fill(itHit->entryPoint().y() - itHit->exitPoint().y());
659 h2ez[ir]->
Fill(std::fabs(itHit->entryPoint().z() - itHit->exitPoint().z()));
660 h2lx[ir]->
Fill(itHit->localPosition().x());
661 h2ly[ir]->
Fill(itHit->localPosition().y());
663 for (itHit = SiTOBHighContainer->begin(); itHit != SiTOBHighContainer->end(); ++itHit) {
666 GlobalPoint gpos = det->toGlobal(itHit->localPosition());
672 h2e[ir]->
Fill(itHit->energyLoss());
673 h2ex[ir]->
Fill(itHit->entryPoint().x() - itHit->exitPoint().x());
674 h2ey[ir]->
Fill(itHit->entryPoint().y() - itHit->exitPoint().y());
675 h2ez[ir]->
Fill(std::fabs(itHit->entryPoint().z() - itHit->exitPoint().z()));
676 h2lx[ir]->
Fill(itHit->localPosition().x());
677 h2ly[ir]->
Fill(itHit->localPosition().y());
682 for (itHit = SiTIDLowContainer->begin(); itHit != SiTIDLowContainer->end(); ++itHit) {
685 GlobalPoint gpos = det->toGlobal(itHit->localPosition());
691 h3e[ir]->
Fill(itHit->energyLoss());
692 h3ex[ir]->
Fill(itHit->entryPoint().x() - itHit->exitPoint().x());
693 h3ey[ir]->
Fill(itHit->entryPoint().y() - itHit->exitPoint().y());
694 h3ez[ir]->
Fill(std::fabs(itHit->entryPoint().z() - itHit->exitPoint().z()));
695 h3lx[ir]->
Fill(itHit->localPosition().x());
696 h3ly[ir]->
Fill(itHit->localPosition().y());
698 for (itHit = SiTIDHighContainer->begin(); itHit != SiTIDHighContainer->end(); ++itHit) {
701 GlobalPoint gpos = det->toGlobal(itHit->localPosition());
707 h3e[ir]->
Fill(itHit->energyLoss());
708 h3ex[ir]->
Fill(itHit->entryPoint().x() - itHit->exitPoint().x());
709 h3ey[ir]->
Fill(itHit->entryPoint().y() - itHit->exitPoint().y());
710 h3ez[ir]->
Fill(std::fabs(itHit->entryPoint().z() - itHit->exitPoint().z()));
711 h3lx[ir]->
Fill(itHit->localPosition().x());
712 h3ly[ir]->
Fill(itHit->localPosition().y());
717 for (itHit = SiTECLowContainer->begin(); itHit != SiTECLowContainer->end(); ++itHit) {
720 GlobalPoint gpos = det->toGlobal(itHit->localPosition());
726 h4e[ir]->
Fill(itHit->energyLoss());
727 h4ex[ir]->
Fill(itHit->entryPoint().x() - itHit->exitPoint().x());
728 h4ey[ir]->
Fill(itHit->entryPoint().y() - itHit->exitPoint().y());
729 h4ez[ir]->
Fill(std::fabs(itHit->entryPoint().z() - itHit->exitPoint().z()));
730 h4lx[ir]->
Fill(itHit->localPosition().x());
731 h4ly[ir]->
Fill(itHit->localPosition().y());
733 for (itHit = SiTECHighContainer->begin(); itHit != SiTECHighContainer->end(); ++itHit) {
736 GlobalPoint gpos = det->toGlobal(itHit->localPosition());
742 h4e[ir]->
Fill(itHit->energyLoss());
743 h4ex[ir]->
Fill(itHit->entryPoint().x() - itHit->exitPoint().x());
744 h4ey[ir]->
Fill(itHit->entryPoint().y() - itHit->exitPoint().y());
745 h4ez[ir]->
Fill(std::fabs(itHit->entryPoint().z() - itHit->exitPoint().z()));
746 h4lx[ir]->
Fill(itHit->localPosition().x());
747 h4ly[ir]->
Fill(itHit->localPosition().y());
EventNumber_t event() const
MonitorElement * h2lx[12]
MonitorElement * h1lx[12]
MonitorElement * h6ex[12]
MonitorElement * h1ey[12]
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_siTECLow_Token_
MonitorElement * h3ly[12]
MonitorElement * h5ez[12]
MonitorElement * h4ex[12]
edm::EDGetTokenT< edm::SimTrackContainer > edmSimTrackContainerToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * h1ez[12]
MonitorElement * h3ez[12]
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_pxlBrlLow_Token_
Geom::Phi< T > phi() const
Geom::Theta< T > theta() const
MonitorElement * h5ey[12]
MonitorElement * h3lx[12]
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_siTOBLow_Token_
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_pxlFwdLow_Token_
MonitorElement * h6ly[12]
MonitorElement * h5ex[12]
MonitorElement * h5ly[12]
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_siTIBLow_Token_
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_siTOBHigh_Token_
MonitorElement * h1ex[12]
MonitorElement * h6ey[12]
Tan< T >::type tan(const T &t)
MonitorElement * h4lx[12]
MonitorElement * h2ex[12]
MonitorElement * h6ez[12]
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_siTIDLow_Token_
MonitorElement * h2ez[12]
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_pxlBrlHigh_Token_
MonitorElement * h5lx[12]
MonitorElement * h4ey[12]
MonitorElement * h1ly[12]
MonitorElement * h4ly[12]
MonitorElement * h3ex[12]
MonitorElement * h3ey[12]
MonitorElement * h2ey[12]
MonitorElement * h2ly[12]
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_siTIBHigh_Token_
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_pxlFwdHigh_Token_
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_siTECHigh_Token_
edm::EDGetTokenT< edm::PSimHitContainer > edmPSimHitContainer_siTIDHigh_Token_
MonitorElement * h6lx[12]
MonitorElement * h4ez[12]