CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
MuonShowerInformationFiller Class Reference

#include <MuonShowerInformationFiller.h>

Classes

struct  AbsLessDPhi
 
struct  AbsLessDTheta
 
struct  LessAbsMag
 
struct  LessDPhi
 
struct  LessMag
 
struct  LessPerp
 
struct  LessPhi
 

Public Types

typedef MuonTransientTrackingRecHit::ConstMuonRecHitPointer ConstMuonRecHitPointer
 
typedef TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer
 
typedef MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer
 

Public Member Functions

void fillHitsByStation (const reco::Muon &)
 
reco::MuonShower fillShowerInformation (const reco::Muon &muon, const edm::Event &, const edm::EventSetup &)
 fill muon shower variables More...
 
 MuonShowerInformationFiller ()
 constructors More...
 
 MuonShowerInformationFiller (const edm::ParameterSet &, edm::ConsumesCollector &)
 
virtual void setEvent (const edm::Event &)
 pass the Event to the algorithm at each event More...
 
void setServices (const edm::EventSetup &)
 set the services needed More...
 
virtual ~MuonShowerInformationFiller ()
 destructor More...
 

Protected Member Functions

const MuonServiceProxygetService () const
 

Private Member Functions

GlobalPoint crossingPoint (const GlobalPoint &, const GlobalPoint &, const BarrelDetLayer *) const
 
GlobalPoint crossingPoint (const GlobalPoint &, const GlobalPoint &, const Cylinder &) const
 
GlobalPoint crossingPoint (const GlobalPoint &, const GlobalPoint &, const Disk &) const
 
GlobalPoint crossingPoint (const GlobalPoint &, const GlobalPoint &, const ForwardDetLayer *) const
 
std::vector< const GeomDet * > cscPositionToDets (const GlobalPoint &) const
 
std::vector< const GeomDet * > dtPositionToDets (const GlobalPoint &) const
 
MuonRecHitContainer findPerpCluster (MuonRecHitContainer &muonRecHits) const
 
TransientTrackingRecHit::ConstRecHitContainer findThetaCluster (TransientTrackingRecHit::ConstRecHitContainer &, const GlobalPoint &) const
 
std::vector< const GeomDet * > getCompatibleDets (const reco::Track &) const
 
TransientTrackingRecHit::ConstRecHitContainer hitsFromSegments (const GeomDet *, edm::Handle< DTRecSegment4DCollection >, edm::Handle< CSCSegmentCollection >) const
 

Private Attributes

std::string category_
 
std::vector< int > theAllStationHits
 
unsigned long long theCacheId_MT
 
unsigned long long theCacheId_TRH
 
std::vector< int > theCorrelatedStationHits
 
edm::ESHandle< CSCGeometrytheCSCGeometry
 
edm::InputTag theCSCRecHitLabel
 
edm::Handle< CSCRecHit2DCollectiontheCSCRecHits
 
edm::EDGetTokenT< CSCRecHit2DCollectiontheCSCRecHitToken
 
edm::Handle< CSCSegmentCollectiontheCSCSegments
 
edm::InputTag theCSCSegmentsLabel
 
edm::EDGetTokenT< CSCSegmentCollectiontheCSCSegmentsToken
 
edm::InputTag theDT4DRecSegmentLabel
 
edm::Handle< DTRecSegment4DCollectiontheDT4DRecSegments
 
edm::EDGetTokenT< DTRecSegment4DCollectiontheDT4DRecSegmentToken
 
edm::ESHandle< DTGeometrytheDTGeometry
 
edm::InputTag theDTRecHitLabel
 
edm::Handle< DTRecHitCollectiontheDTRecHits
 
edm::EDGetTokenT< DTRecHitCollectiontheDTRecHitToken
 
edm::ESHandle< MagneticFieldtheField
 
edm::ESHandle< TransientTrackingRecHitBuildertheMuonRecHitBuilder
 
std::string theMuonRecHitBuilderName
 
MuonServiceProxytheService
 
std::vector< float > theStationShowerDeltaR
 
std::vector< float > theStationShowerTSize
 
edm::ESHandle< GeometricSearchTrackertheTracker
 
edm::ESHandle< TransientTrackingRecHitBuildertheTrackerRecHitBuilder
 
std::string theTrackerRecHitBuilderName
 
edm::ESHandle< GlobalTrackingGeometrytheTrackingGeometry
 

Detailed Description

Description: class for muon shower identification

Author
: A. Svyatkovskiy, Purdue University

Definition at line 63 of file MuonShowerInformationFiller.h.

Member Typedef Documentation

◆ ConstMuonRecHitPointer

Definition at line 67 of file MuonShowerInformationFiller.h.

◆ ConstRecHitContainer

Definition at line 65 of file MuonShowerInformationFiller.h.

◆ MuonRecHitContainer

Definition at line 66 of file MuonShowerInformationFiller.h.

Constructor & Destructor Documentation

◆ MuonShowerInformationFiller() [1/2]

MuonShowerInformationFiller::MuonShowerInformationFiller ( )
inline

constructors

Definition at line 71 of file MuonShowerInformationFiller.h.

71 {};

◆ MuonShowerInformationFiller() [2/2]

MuonShowerInformationFiller::MuonShowerInformationFiller ( const edm::ParameterSet par,
edm::ConsumesCollector iC 
)

Definition at line 68 of file MuonShowerInformationFiller.cc.

69  : theService(nullptr),
70  theDTRecHitLabel(par.getParameter<InputTag>("DTRecSegmentLabel")),
71  theCSCRecHitLabel(par.getParameter<InputTag>("CSCRecSegmentLabel")),
72  theCSCSegmentsLabel(par.getParameter<InputTag>("CSCSegmentLabel")),
73  theDT4DRecSegmentLabel(par.getParameter<InputTag>("DT4DRecSegmentLabel")) {
78 
79  edm::ParameterSet serviceParameters = par.getParameter<edm::ParameterSet>("ServiceParameters");
80  theService = new MuonServiceProxy(serviceParameters, edm::ConsumesCollector(iC));
81 
82  theTrackerRecHitBuilderName = par.getParameter<string>("TrackerRecHitBuilder");
83  theMuonRecHitBuilderName = par.getParameter<string>("MuonRecHitBuilder");
84 
85  theCacheId_TRH = 0;
86  theCacheId_MT = 0;
87 
88  category_ = "MuonShowerInformationFiller";
89 
90  for (int istat = 0; istat < 4; istat++) {
91  theStationShowerDeltaR.push_back(0.);
92  theStationShowerTSize.push_back(0.);
93  theAllStationHits.push_back(0);
94  theCorrelatedStationHits.push_back(0);
95  }
96 }

References category_, edm::ConsumesCollector::consumes(), edm::ParameterSet::getParameter(), MuonServiceProxy_cff::MuonServiceProxy, theAllStationHits, theCacheId_MT, theCacheId_TRH, theCorrelatedStationHits, theCSCRecHitLabel, theCSCRecHitToken, theCSCSegmentsLabel, theCSCSegmentsToken, theDT4DRecSegmentLabel, theDT4DRecSegmentToken, theDTRecHitLabel, theDTRecHitToken, theMuonRecHitBuilderName, theService, theStationShowerDeltaR, theStationShowerTSize, and theTrackerRecHitBuilderName.

◆ ~MuonShowerInformationFiller()

MuonShowerInformationFiller::~MuonShowerInformationFiller ( )
virtual

destructor

Definition at line 101 of file MuonShowerInformationFiller.cc.

101  {
102  if (theService)
103  delete theService;
104 }

References theService.

Member Function Documentation

◆ crossingPoint() [1/4]

GlobalPoint MuonShowerInformationFiller::crossingPoint ( const GlobalPoint p1,
const GlobalPoint p2,
const BarrelDetLayer dl 
) const
private

Definition at line 396 of file MuonShowerInformationFiller.cc.

398  {
399  const BoundCylinder& bc = dl->specificSurface();
400  return crossingPoint(p1, p2, bc);
401 }

References p1, p2, and BarrelDetLayer::specificSurface().

Referenced by crossingPoint(), and getCompatibleDets().

◆ crossingPoint() [2/4]

GlobalPoint MuonShowerInformationFiller::crossingPoint ( const GlobalPoint p1,
const GlobalPoint p2,
const Cylinder cyl 
) const
private

Definition at line 403 of file MuonShowerInformationFiller.cc.

405  {
406  float radius = cyl.radius();
407 
408  GlobalVector dp = p1 - p2;
409  float slope = dp.x() / dp.y();
410  float a = p1.x() - slope * p1.y();
411 
412  float n2 = (1 + slope * slope);
413  float n1 = 2 * a * slope;
414  float n0 = a * a - radius * radius;
415 
416  float y1 = 9999;
417  float y2 = 9999;
418  if (n1 * n1 - 4 * n2 * n0 > 0) {
419  y1 = (-n1 + sqrt(n1 * n1 - 4 * n2 * n0)) / (2 * n2);
420  y2 = (-n1 - sqrt(n1 * n1 - 4 * n2 * n0)) / (2 * n2);
421  }
422 
423  float x1 = p1.x() + slope * (y1 - p1.y());
424  float x2 = p1.x() + slope * (y2 - p1.y());
425 
426  float slopeZ = dp.z() / dp.y();
427 
428  float z1 = p1.z() + slopeZ * (y1 - p1.y());
429  float z2 = p1.z() + slopeZ * (y2 - p1.y());
430 
431  // there are two crossing points, return the one that is in the same quadrant as point of extrapolation
432  if ((p2.x() * x1 > 0) && (y1 * p2.y() > 0) && (z1 * p2.z() > 0)) {
433  return GlobalPoint(x1, y1, z1);
434  } else {
435  return GlobalPoint(x2, y2, z2);
436  }
437 }

References a, Calorimetry_cff::dp, n0, p1, p2, Cylinder::radius(), CosmicsPD_Skims::radius, slope, mathSSE::sqrt(), testProducerWithPsetDescEmpty_cfi::x1, testProducerWithPsetDescEmpty_cfi::x2, testProducerWithPsetDescEmpty_cfi::y1, testProducerWithPsetDescEmpty_cfi::y2, and testProducerWithPsetDescEmpty_cfi::z2.

◆ crossingPoint() [3/4]

GlobalPoint MuonShowerInformationFiller::crossingPoint ( const GlobalPoint ,
const GlobalPoint ,
const Disk  
) const
private

◆ crossingPoint() [4/4]

GlobalPoint MuonShowerInformationFiller::crossingPoint ( const GlobalPoint p1,
const GlobalPoint p2,
const ForwardDetLayer dl 
) const
private

Definition at line 442 of file MuonShowerInformationFiller.cc.

444  {
445  const BoundDisk& bc = dl->specificSurface();
446  return crossingPoint(p1, p2, bc);
447 }

References crossingPoint(), p1, p2, and ForwardDetLayer::specificSurface().

◆ cscPositionToDets()

vector< const GeomDet * > MuonShowerInformationFiller::cscPositionToDets ( const GlobalPoint gp) const
private

Definition at line 576 of file MuonShowerInformationFiller.cc.

576  {
577  // determine the endcap side
578  int endcap = 0;
579  if (gp.z() > 0) {
580  endcap = 1;
581  } else {
582  endcap = 2;
583  }
584 
585  // determine the csc station and range of rings
586  int station = 5;
587 
588  // check all rings in a station
589  if (fabs(gp.z()) > 1000. && fabs(gp.z()) < 1055.0) {
590  station = 4;
591  } else if (fabs(gp.z()) > 910.0 && fabs(gp.z()) < 965.0) {
592  station = 3;
593  } else if (fabs(gp.z()) > 800.0 && fabs(gp.z()) < 860.0) {
594  station = 2;
595  } else if (fabs(gp.z()) > 570.0 && fabs(gp.z()) < 730.0) {
596  station = 1;
597  }
598 
599  vector<int> sectors;
600 
601  float phistep1 = M_PI / 18.; //for all the rings except first rings for stations > 1
602  float phistep2 = M_PI / 9.;
603  float phigp = (float)gp.barePhi();
604 
605  int ring = -1;
606 
607  // determine the ring
608  if (station == 1) {
609  //FIX ME!!!
610  if (gp.perp() > 100 && gp.perp() < 270)
611  ring = 1;
612  else if (gp.perp() > 270 && gp.perp() < 450)
613  ring = 2;
614  else if (gp.perp() > 450 && gp.perp() < 695)
615  ring = 3;
616  else if (gp.perp() > 100 && gp.perp() < 270)
617  ring = 4;
618 
619  } else if (station == 2) {
620  if (gp.perp() > 140 && gp.perp() < 350)
621  ring = 1;
622  else if (gp.perp() > 350 && gp.perp() < 700)
623  ring = 2;
624 
625  } else if (station == 3) {
626  if (gp.perp() > 160 && gp.perp() < 350)
627  ring = 1;
628  else if (gp.perp() > 350 && gp.perp() < 700)
629  ring = 2;
630 
631  } else if (station == 4) {
632  if (gp.perp() > 175 && gp.perp() < 350)
633  ring = 1;
634  else if (gp.perp() > 350 && gp.perp() < 700)
635  ring = 2;
636  }
637 
638  if (station > 1 && ring == 1) {
639  // we have 18 sectors in that case
640  for (int i = 0; i < 18; i++) {
641  if (fabs(deltaPhi(phigp, i * phistep2)) < phistep2)
642  sectors.push_back(i + 1);
643  }
644 
645  } else {
646  // we have 36 sectors in that case
647  for (int i = 0; i < 36; i++) {
648  if (fabs(deltaPhi(phigp, i * phistep1)) < phistep1)
649  sectors.push_back(i + 1);
650  }
651  }
652 
653  LogTrace(category_) << "CSC position to dets" << endl;
654  LogTrace(category_) << "ring: " << ring << endl;
655  LogTrace(category_) << "endcap: " << endcap << endl;
656  LogTrace(category_) << "station: " << station << endl;
657  LogTrace(category_) << "CSC number of sectors to consider: " << sectors.size() << endl;
658 
659  // check exceptional cases
660  vector<const GeomDet*> result;
661  if (station > 4 || station < 1)
662  return result;
663  if (endcap == 0)
664  return result;
665  if (ring == -1)
666  return result;
667 
668  int minlayer = 1;
669  int maxlayer = 6;
670 
671  for (vector<int>::const_iterator isector = sectors.begin(); isector != sectors.end(); ++isector) {
672  for (int ilayer = minlayer; ilayer != maxlayer + 1; ++ilayer) {
673  CSCDetId cscid(endcap, station, ring, (*isector), ilayer);
674  result.push_back(theService->trackingGeometry()->idToDet(cscid));
675  }
676  }
677 
678  return result;
679 }

References category_, SiPixelRawToDigiRegional_cfi::deltaPhi, makeMuonMisalignmentScenario::endcap, dqmMemoryStats::float, runTauDisplay::gp, mps_fire::i, LogTrace, M_PI, mps_fire::result, relativeConstraints::ring, volumeBasedMagneticField_160812_cfi::sectors, relativeConstraints::station, and theService.

Referenced by getCompatibleDets().

◆ dtPositionToDets()

vector< const GeomDet * > MuonShowerInformationFiller::dtPositionToDets ( const GlobalPoint gp) const
private

Definition at line 476 of file MuonShowerInformationFiller.cc.

476  {
477  int minwheel = -3;
478  int maxwheel = -3;
479  if (gp.z() < -680.0) {
480  minwheel = -3;
481  maxwheel = -3;
482  } else if (gp.z() < -396.0) {
483  minwheel = -2;
484  maxwheel = -1;
485  } else if (gp.z() < -126.8) {
486  minwheel = -2;
487  maxwheel = 0;
488  } else if (gp.z() < 126.8) {
489  minwheel = -1;
490  maxwheel = 1;
491  } else if (gp.z() < 396.0) {
492  minwheel = 0;
493  maxwheel = 2;
494  } else if (gp.z() < 680.0) {
495  minwheel = 1;
496  maxwheel = 2;
497  } else {
498  minwheel = 3;
499  maxwheel = 3;
500  }
501 
502  int station = 5;
503  if (gp.perp() > 680.0 && gp.perp() < 755.0)
504  station = 4;
505  else if (gp.perp() > 580.0)
506  station = 3;
507  else if (gp.perp() > 480.0)
508  station = 2;
509  else if (gp.perp() > 380.0)
510  station = 1;
511  else
512  station = 0;
513 
514  vector<int> sectors;
515 
516  float phistep = M_PI / 6;
517 
518  float phigp = (float)gp.barePhi();
519 
520  if (fabs(deltaPhi(phigp, 0 * phistep)) < phistep)
521  sectors.push_back(1);
522  if (fabs(deltaPhi(phigp, phistep)) < phistep)
523  sectors.push_back(2);
524  if (fabs(deltaPhi(phigp, 2 * phistep)) < phistep)
525  sectors.push_back(3);
526  if (fabs(deltaPhi(phigp, 3 * phistep)) < phistep) {
527  sectors.push_back(4);
528  if (station == 4)
529  sectors.push_back(13);
530  }
531  if (fabs(deltaPhi(phigp, 4 * phistep)) < phistep)
532  sectors.push_back(5);
533  if (fabs(deltaPhi(phigp, 5 * phistep)) < phistep)
534  sectors.push_back(6);
535  if (fabs(deltaPhi(phigp, 6 * phistep)) < phistep)
536  sectors.push_back(7);
537  if (fabs(deltaPhi(phigp, 7 * phistep)) < phistep)
538  sectors.push_back(8);
539  if (fabs(deltaPhi(phigp, 8 * phistep)) < phistep)
540  sectors.push_back(9);
541  if (fabs(deltaPhi(phigp, 9 * phistep)) < phistep) {
542  sectors.push_back(10);
543  if (station == 4)
544  sectors.push_back(14);
545  }
546  if (fabs(deltaPhi(phigp, 10 * phistep)) < phistep)
547  sectors.push_back(11);
548  if (fabs(deltaPhi(phigp, 11 * phistep)) < phistep)
549  sectors.push_back(12);
550 
551  LogTrace(category_) << "DT position to dets" << endl;
552  LogTrace(category_) << "number of sectors to consider: " << sectors.size() << endl;
553  LogTrace(category_) << "station: " << station << " wheels: " << minwheel << " " << maxwheel << endl;
554 
555  vector<const GeomDet*> result;
556  if (station > 4 || station < 1)
557  return result;
558  if (minwheel > 2 || maxwheel < -2)
559  return result;
560 
561  for (vector<int>::const_iterator isector = sectors.begin(); isector != sectors.end(); ++isector) {
562  for (int iwheel = minwheel; iwheel != maxwheel + 1; ++iwheel) {
563  DTChamberId chamberid(iwheel, station, (*isector));
564  result.push_back(theService->trackingGeometry()->idToDet(chamberid));
565  }
566  }
567 
568  LogTrace(category_) << "number of GeomDets for this track: " << result.size() << endl;
569 
570  return result;
571 }

References category_, SiPixelRawToDigiRegional_cfi::deltaPhi, dqmMemoryStats::float, runTauDisplay::gp, LogTrace, M_PI, mps_fire::result, volumeBasedMagneticField_160812_cfi::sectors, relativeConstraints::station, and theService.

Referenced by getCompatibleDets().

◆ fillHitsByStation()

void MuonShowerInformationFiller::fillHitsByStation ( const reco::Muon muon)

Definition at line 684 of file MuonShowerInformationFiller.cc.

684  {
686  if (muon.isGlobalMuon())
687  track = muon.globalTrack();
688  else if (muon.isStandAloneMuon())
689  track = muon.outerTrack();
690  else
691  return;
692 
693  // split 1D rechits by station
694  vector<MuonRecHitContainer> muonRecHits(4);
695 
696  // split rechits from segs by station
697  vector<TransientTrackingRecHit::ConstRecHitContainer> muonCorrelatedHits(4);
698 
699  // get vector of GeomDets compatible with a track
700  vector<const GeomDet*> compatibleLayers = getCompatibleDets(*track);
701 
702  // for special cases: CSC station 1
703  MuonRecHitContainer tmpCSC1;
704  bool dtOverlapToCheck = false;
705  bool cscOverlapToCheck = false;
706 
707  for (vector<const GeomDet*>::const_iterator igd = compatibleLayers.begin(); igd != compatibleLayers.end(); igd++) {
708  // get det id
709  DetId geoId = (*igd)->geographicalId();
710 
711  // skip tracker hits
712  if (geoId.det() != DetId::Muon)
713  continue;
714 
715  // DT
716  if (geoId.subdetId() == MuonSubdetId::DT) {
717  // get station
718  DTChamberId detid(geoId.rawId());
719  int station = detid.station();
720  int wheel = detid.wheel();
721 
722  // get rechits from segments per station
723  TransientTrackingRecHit::ConstRecHitContainer muonCorrelatedHitsTmp =
725  TransientTrackingRecHit::ConstRecHitContainer::const_iterator hits_begin = muonCorrelatedHitsTmp.begin();
726  TransientTrackingRecHit::ConstRecHitContainer::const_iterator hits_end = muonCorrelatedHitsTmp.end();
727 
728  for (; hits_begin != hits_end; ++hits_begin) {
729  muonCorrelatedHits.at(station - 1).push_back(*hits_begin);
730  }
731 
732  //check overlap certain wheels and stations
733  if (abs(wheel) == 2 && station != 4 && station != 1)
734  dtOverlapToCheck = true;
735 
736  // loop over all superlayers of a DT chamber
737  for (int isuperlayer = DTChamberId::minSuperLayerId; isuperlayer != DTChamberId::maxSuperLayerId + 1;
738  ++isuperlayer) {
739  // loop over all layers inside the superlayer
740  for (int ilayer = DTChamberId::minLayerId; ilayer != DTChamberId::maxLayerId + 1; ++ilayer) {
741  DTLayerId lid(detid, isuperlayer, ilayer);
742  DTRecHitCollection::range dRecHits = theDTRecHits->get(lid);
743  for (DTRecHitCollection::const_iterator rechit = dRecHits.first; rechit != dRecHits.second; ++rechit) {
744  vector<const TrackingRecHit*> subrechits = (*rechit).recHits();
745  for (vector<const TrackingRecHit*>::iterator irechit = subrechits.begin(); irechit != subrechits.end();
746  ++irechit) {
747  muonRecHits.at(station - 1).push_back(MuonTransientTrackingRecHit::specificBuild((&**igd), &**irechit));
748  }
749  }
750  }
751  }
752  } else if (geoId.subdetId() == MuonSubdetId::CSC) {
753  // get station
754  CSCDetId did(geoId.rawId());
755  int station = did.station();
756  int ring = did.ring();
757 
758  //get rechits from segments by station
759  TransientTrackingRecHit::ConstRecHitContainer muonCorrelatedHitsTmp =
761  TransientTrackingRecHit::ConstRecHitContainer::const_iterator hits_begin = muonCorrelatedHitsTmp.begin();
762  TransientTrackingRecHit::ConstRecHitContainer::const_iterator hits_end = muonCorrelatedHitsTmp.end();
763 
764  for (; hits_begin != hits_end; ++hits_begin) {
765  muonCorrelatedHits.at(station - 1).push_back(*hits_begin);
766  }
767 
768  if ((station == 1 && ring == 3) && dtOverlapToCheck)
769  cscOverlapToCheck = true;
770 
771  // split 1D rechits by station
772  CSCRecHit2DCollection::range dRecHits = theCSCRecHits->get(did);
773  for (CSCRecHit2DCollection::const_iterator rechit = dRecHits.first; rechit != dRecHits.second; ++rechit) {
774  if (!cscOverlapToCheck) {
775  muonRecHits.at(station - 1).push_back(MuonTransientTrackingRecHit::specificBuild((&**igd), &*rechit));
776  } else {
777  tmpCSC1.push_back(MuonTransientTrackingRecHit::specificBuild((&**igd), &*rechit));
778 
779  //sort by perp, then insert to appropriate container
781  if (temp.empty())
782  continue;
783 
784  float center;
785  if (temp.size() > 1) {
786  center = (temp.front()->globalPosition().perp() + temp.back()->globalPosition().perp()) / 2.;
787  } else {
788  center = temp.front()->globalPosition().perp();
789  }
790  temp.clear();
791 
792  if (center > 550.) {
793  muonRecHits.at(2).insert(muonRecHits.at(2).end(), tmpCSC1.begin(), tmpCSC1.end());
794  } else {
795  muonRecHits.at(1).insert(muonRecHits.at(1).end(), tmpCSC1.begin(), tmpCSC1.end());
796  }
797  tmpCSC1.clear();
798  }
799  }
800  } else if (geoId.subdetId() == MuonSubdetId::RPC) {
801  LogTrace(category_) << "Wrong subdet id" << endl;
802  }
803  } //loop over GeomDets compatible with a track
804 
805  // calculate number of all and correlated hits
806  for (int stat = 0; stat < 4; stat++) {
807  theCorrelatedStationHits[stat] = muonCorrelatedHits.at(stat).size();
808  theAllStationHits[stat] = muonRecHits[stat].size();
809  }
810  LogTrace(category_) << "Hits used by the segments, by station " << theCorrelatedStationHits.at(0) << " "
811  << theCorrelatedStationHits.at(1) << " " << theCorrelatedStationHits.at(2) << " "
812  << theCorrelatedStationHits.at(3) << endl;
813 
814  LogTrace(category_) << "All DT 1D/CSC 2D hits, by station " << theAllStationHits.at(0) << " "
815  << theAllStationHits.at(1) << " " << theAllStationHits.at(2) << " " << theAllStationHits.at(3)
816  << endl;
817 
818  //station shower sizes
820  TransientTrackingRecHit::ConstRecHitContainer muonRecHitsThetaTemp, muonRecHitsThetaBest;
821  // send station hits to the clustering algorithm
822  for (int stat = 0; stat != 4; stat++) {
823  const size_t nhit = muonRecHits[stat].size();
824  if (nhit < 2)
825  continue; // Require at least 2 hits
826  muonRecHitsPhiBest.clear();
827  muonRecHitsPhiBest.reserve(nhit);
828 
829  // Cluster seeds by global position phi. Best cluster is chosen to give greatest dphi
830  // Sort by phi (complexity = NLogN with enough memory, or = NLog^2N for insufficient mem)
831  stable_sort(muonRecHits[stat].begin(), muonRecHits[stat].end(), LessPhi());
832 
833  // Search for gaps (complexity = N)
834  std::vector<size_t> clUppers;
835  for (size_t ihit = 0; ihit < nhit; ++ihit) {
836  const size_t jhit = (ihit + 1) % nhit;
837  const double phi1 = muonRecHits[stat].at(ihit)->globalPosition().barePhi();
838  const double phi2 = muonRecHits[stat].at(jhit)->globalPosition().barePhi();
839 
840  const double dphi = std::abs(deltaPhi(phi1, phi2));
841  if (dphi >= 0.05)
842  clUppers.push_back(ihit);
843  }
844 
845  //station shower sizes
846  double dphimax = 0;
847  if (clUppers.empty()) {
848  // No gaps - there is only one cluster. Take all of them
849  const double refPhi = muonRecHits[stat].at(0)->globalPosition().barePhi();
850  double dphilo = 0, dphihi = 0;
851  for (auto& hit : muonRecHits[stat]) {
852  muonRecHitsPhiBest.push_back(hit);
853  const double phi = hit->globalPosition().barePhi();
854  dphilo = std::min(dphilo, deltaPhi(refPhi, phi));
855  dphihi = std::max(dphihi, deltaPhi(refPhi, phi));
856  }
857  dphimax = std::abs(dphihi + dphilo);
858  } else {
859  // Loop over gaps to find the one with maximum dphi(begin, end)
860  // By construction, number of gap must be greater than 1.
861  size_t bestUpper = 0, bestLower = 0;
862  for (auto icl = clUppers.begin(); icl != clUppers.end(); ++icl) {
863  // upper bound of this cluster
864  const size_t upper = *icl;
865  // lower bound is +1 of preceeding upper bound
866  const auto prevCl = (icl == clUppers.begin()) ? clUppers.end() : icl;
867  const size_t lower = (*(prevCl - 1) + 1) % nhit;
868 
869  // At least two hit for a cluster
870  if (upper == lower)
871  continue;
872 
873  const double phi1 = muonRecHits[stat].at(upper)->globalPosition().barePhi();
874  const double phi2 = muonRecHits[stat].at(lower)->globalPosition().barePhi();
875 
876  const double dphi = std::abs(deltaPhi(phi1, phi2));
877  if (dphimax < dphi) {
878  dphimax = dphi;
879  bestUpper = upper;
880  bestLower = lower;
881  }
882  }
883 
884  if (bestUpper > bestLower) {
885  muonRecHitsPhiBest.reserve(bestUpper - bestLower + 1);
886  std::copy(muonRecHits[stat].begin() + bestLower,
887  muonRecHits[stat].begin() + bestUpper + 1,
888  std::back_inserter(muonRecHitsPhiBest));
889  } else if (bestUpper < bestLower) {
890  muonRecHitsPhiBest.reserve(bestUpper + (nhit - bestLower) + 1);
891  std::copy(muonRecHits[stat].begin(),
892  muonRecHits[stat].begin() + bestUpper + 1,
893  std::back_inserter(muonRecHitsPhiBest));
894  std::copy(
895  muonRecHits[stat].begin() + bestLower, muonRecHits[stat].end(), std::back_inserter(muonRecHitsPhiBest));
896  }
897  }
898 
899  //fill showerTs
900  if (!muonRecHitsPhiBest.empty()) {
901  muonRecHits[stat] = muonRecHitsPhiBest;
902  stable_sort(muonRecHits[stat].begin(), muonRecHits[stat].end(), LessAbsMag());
903  muonRecHits[stat].front();
904  GlobalPoint refpoint = muonRecHits[stat].front()->globalPosition();
905  theStationShowerTSize.at(stat) = refpoint.mag() * dphimax;
906  }
907 
908  //for theta
909  if (!muonCorrelatedHits.at(stat).empty()) {
910  float dthetamax = 0;
911  for (TransientTrackingRecHit::ConstRecHitContainer::const_iterator iseed = muonCorrelatedHits.at(stat).begin();
912  iseed != muonCorrelatedHits.at(stat).end();
913  ++iseed) {
914  if (!(*iseed)->isValid())
915  continue;
916  GlobalPoint refpoint = (*iseed)->globalPosition(); //starting from the one with smallest value of phi
917  muonRecHitsThetaTemp.clear();
918  muonRecHitsThetaTemp = findThetaCluster(muonCorrelatedHits.at(stat), refpoint);
919  if (muonRecHitsThetaTemp.size() > 1) {
920  float dtheta = fabs((float)muonRecHitsThetaTemp.back()->globalPosition().theta() -
921  (float)muonRecHitsThetaTemp.front()->globalPosition().theta());
922  if (dtheta > dthetamax) {
923  dthetamax = dtheta;
924  muonRecHitsThetaBest = muonRecHitsThetaTemp;
925  }
926  } //at least two hits
927  } //loop over seeds
928  } //not empty container2
929 
930  //fill deltaRs
931  if (muonRecHitsThetaBest.size() > 1 && muonRecHitsPhiBest.size() > 1)
932  theStationShowerDeltaR.at(stat) = sqrt(pow(deltaPhi(muonRecHitsPhiBest.front()->globalPosition().barePhi(),
933  muonRecHitsPhiBest.back()->globalPosition().barePhi()),
934  2) +
935  pow(muonRecHitsThetaBest.front()->globalPosition().theta() -
936  muonRecHitsThetaBest.back()->globalPosition().theta(),
937  2));
938 
939  } //loop over station
940 
941  LogTrace(category_) << "deltaR around a track containing all the station hits, by station "
942  << theStationShowerDeltaR.at(0) << " " << theStationShowerDeltaR.at(1) << " "
943  << theStationShowerDeltaR.at(2) << " " << theStationShowerDeltaR.at(3) << endl;
944 
945  LogTrace(category_) << "Transverse cluster size, by station " << theStationShowerTSize.at(0) << " "
946  << theStationShowerTSize.at(1) << " " << theStationShowerTSize.at(2) << " "
947  << theStationShowerTSize.at(3) << endl;
948 
949  return;
950 }

References funct::abs(), category_, filterCSVwithJSON::copy, MuonSubdetId::CSC, SiPixelRawToDigiRegional_cfi::deltaPhi, DetId::det(), MuonSubdetId::DT, mps_fire::end, findPerpCluster(), findThetaCluster(), dqmMemoryStats::float, getCompatibleDets(), hitsFromSegments(), iseed, LogTrace, PV3DBase< T, PVType, FrameType >::mag(), SiStripPI::max, DTChamberId::maxLayerId, DTChamberId::maxSuperLayerId, min(), DTChamberId::minLayerId, DTChamberId::minSuperLayerId, DetId::Muon, phi, funct::pow(), DetId::rawId(), relativeConstraints::ring, MuonSubdetId::RPC, MuonTransientTrackingRecHit::specificBuild(), mathSSE::sqrt(), edm_modernize_messagelogger::stat, relativeConstraints::station, DetId::subdetId(), groupFilesInBlocks::temp, theAllStationHits, theCorrelatedStationHits, theCSCRecHits, theCSCSegments, theDT4DRecSegments, theDTRecHits, theStationShowerDeltaR, theStationShowerTSize, HLT_FULL_cff::track, pileupCalc::upper, and makeMuonMisalignmentScenario::wheel.

Referenced by fillShowerInformation().

◆ fillShowerInformation()

reco::MuonShower MuonShowerInformationFiller::fillShowerInformation ( const reco::Muon muon,
const edm::Event iEvent,
const edm::EventSetup iSetup 
)

fill muon shower variables

Definition at line 109 of file MuonShowerInformationFiller.cc.

111  {
112  reco::MuonShower returnShower;
113 
114  // Update the services
115  theService->update(iSetup);
116  setEvent(iEvent);
117  setServices(theService->eventSetup());
118 
120  std::vector<int> nStationHits = theAllStationHits;
121  std::vector<int> nStationCorrelatedHits = theCorrelatedStationHits;
122  std::vector<float> stationShowerSizeT = theStationShowerTSize;
123  std::vector<float> stationShowerDeltaR = theStationShowerDeltaR;
124 
125  returnShower.nStationHits = nStationHits;
126  returnShower.nStationCorrelatedHits = nStationCorrelatedHits;
127  returnShower.stationShowerSizeT = stationShowerSizeT;
128  returnShower.stationShowerDeltaR = stationShowerDeltaR;
129 
130  return returnShower;
131 }

References fillHitsByStation(), iEvent, reco::MuonShower::nStationCorrelatedHits, reco::MuonShower::nStationHits, setEvent(), setServices(), reco::MuonShower::stationShowerDeltaR, reco::MuonShower::stationShowerSizeT, theAllStationHits, theCorrelatedStationHits, theService, theStationShowerDeltaR, and theStationShowerTSize.

Referenced by MuonShowerInformationProducer::produce().

◆ findPerpCluster()

MuonTransientTrackingRecHit::MuonRecHitContainer MuonShowerInformationFiller::findPerpCluster ( MuonTransientTrackingRecHit::MuonRecHitContainer muonRecHits) const
private

Definition at line 294 of file MuonShowerInformationFiller.cc.

295  {
296  if (muonRecHits.empty())
297  return muonRecHits;
298 
299  stable_sort(muonRecHits.begin(), muonRecHits.end(), LessPerp());
300 
301  MuonTransientTrackingRecHit::MuonRecHitContainer::const_iterator seedhit =
302  min_element(muonRecHits.begin(), muonRecHits.end(), LessPerp());
303 
304  MuonTransientTrackingRecHit::MuonRecHitContainer::const_iterator ihigh = seedhit;
305  MuonTransientTrackingRecHit::MuonRecHitContainer::const_iterator ilow = seedhit;
306 
307  float step = 0.1;
308  while (ihigh != muonRecHits.end() - 1 &&
309  (fabs((*(ihigh + 1))->globalPosition().perp() - (*ihigh)->globalPosition().perp()) < step)) {
310  ihigh++;
311  }
312  while (ilow != muonRecHits.begin() &&
313  (fabs((*ilow)->globalPosition().perp() - (*(ilow - 1))->globalPosition().perp()) < step)) {
314  ilow--;
315  }
316 
318 
319  return result;
320 }

References perp(), and mps_fire::result.

Referenced by fillHitsByStation().

◆ findThetaCluster()

TransientTrackingRecHit::ConstRecHitContainer MuonShowerInformationFiller::findThetaCluster ( TransientTrackingRecHit::ConstRecHitContainer muonRecHits,
const GlobalPoint refpoint 
) const
private

Definition at line 267 of file MuonShowerInformationFiller.cc.

268  {
269  if (muonRecHits.empty())
270  return muonRecHits;
271 
272  //clustering step by theta
273  float step = 0.05;
275 
276  stable_sort(muonRecHits.begin(), muonRecHits.end(), AbsLessDTheta(refpoint));
277 
278  for (TransientTrackingRecHit::ConstRecHitContainer::const_iterator ihit = muonRecHits.begin();
279  ihit != muonRecHits.end() - 1;
280  ++ihit) {
281  if (fabs((*(ihit + 1))->globalPosition().theta() - (*ihit)->globalPosition().theta()) < step) {
282  result.push_back(*ihit);
283  } else {
284  break;
285  }
286  }
287 
288  return result;
289 }

References mps_fire::result, and theta().

Referenced by fillHitsByStation().

◆ getCompatibleDets()

vector< const GeomDet * > MuonShowerInformationFiller::getCompatibleDets ( const reco::Track track) const
private

Definition at line 325 of file MuonShowerInformationFiller.cc.

325  {
326  vector<const GeomDet*> total;
327  total.reserve(1000);
328 
329  LogTrace(category_) << "Consider a track " << track.p() << " eta: " << track.eta() << " phi " << track.phi() << endl;
330 
332  track, *theService->trackingGeometry(), &*theService->magneticField());
334  track, *theService->trackingGeometry(), &*theService->magneticField());
335 
336  GlobalPoint innerPos = innerTsos.globalPosition();
337  GlobalPoint outerPos = outerTsos.globalPosition();
338 
339  vector<GlobalPoint> allCrossingPoints;
340 
341  const vector<const DetLayer*>& dtlayers = theService->detLayerGeometry()->allDTLayers();
342 
343  for (auto iLayer = dtlayers.begin(); iLayer != dtlayers.end(); ++iLayer) {
344  // crossing points of track with cylinder
345  GlobalPoint xPoint = crossingPoint(innerPos, outerPos, dynamic_cast<const BarrelDetLayer*>(*iLayer));
346 
347  // check if point is inside the detector
348  if ((fabs(xPoint.y()) < 1000.0) && (fabs(xPoint.z()) < 1500) &&
349  (!(xPoint.y() == 0 && xPoint.x() == 0 && xPoint.z() == 0)))
350  allCrossingPoints.push_back(xPoint);
351  }
352 
353  stable_sort(allCrossingPoints.begin(), allCrossingPoints.end(), LessMag(innerPos));
354 
355  vector<const GeomDet*> tempDT;
356 
357  for (vector<GlobalPoint>::const_iterator ipos = allCrossingPoints.begin(); ipos != allCrossingPoints.end(); ++ipos) {
358  tempDT = dtPositionToDets(*ipos);
359  vector<const GeomDet*>::const_iterator begin = tempDT.begin();
360  vector<const GeomDet*>::const_iterator end = tempDT.end();
361 
362  for (; begin != end; ++begin) {
363  total.push_back(*begin);
364  }
365  }
366  allCrossingPoints.clear();
367 
368  const vector<const DetLayer*>& csclayers = theService->detLayerGeometry()->allCSCLayers();
369  for (auto iLayer = csclayers.begin(); iLayer != csclayers.end(); ++iLayer) {
370  GlobalPoint xPoint = crossingPoint(innerPos, outerPos, dynamic_cast<const ForwardDetLayer*>(*iLayer));
371 
372  // check if point is inside the detector
373  if ((fabs(xPoint.y()) < 1000.0) && (fabs(xPoint.z()) < 1500.0) &&
374  (!(xPoint.y() == 0 && xPoint.x() == 0 && xPoint.z() == 0)))
375  allCrossingPoints.push_back(xPoint);
376  }
377  stable_sort(allCrossingPoints.begin(), allCrossingPoints.end(), LessMag(innerPos));
378 
379  vector<const GeomDet*> tempCSC;
380  for (vector<GlobalPoint>::const_iterator ipos = allCrossingPoints.begin(); ipos != allCrossingPoints.end(); ++ipos) {
381  tempCSC = cscPositionToDets(*ipos);
382  vector<const GeomDet*>::const_iterator begin = tempCSC.begin();
383  vector<const GeomDet*>::const_iterator end = tempCSC.end();
384 
385  for (; begin != end; ++begin) {
386  total.push_back(*begin);
387  }
388  }
389 
390  return total;
391 }

References category_, crossingPoint(), cscPositionToDets(), dtPositionToDets(), mps_fire::end, TrajectoryStateOnSurface::globalPosition(), trajectoryStateTransform::innerStateOnSurface(), LogTrace, trajectoryStateTransform::outerStateOnSurface(), theService, dqmMemoryStats::total, HLT_FULL_cff::track, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by fillHitsByStation().

◆ getService()

const MuonServiceProxy* MuonShowerInformationFiller::getService ( ) const
inlineprotected

Definition at line 90 of file MuonShowerInformationFiller.h.

90 { return theService; }

References theService.

◆ hitsFromSegments()

TransientTrackingRecHit::ConstRecHitContainer MuonShowerInformationFiller::hitsFromSegments ( const GeomDet geomDet,
edm::Handle< DTRecSegment4DCollection dtSegments,
edm::Handle< CSCSegmentCollection cscSegments 
) const
private

Definition at line 173 of file MuonShowerInformationFiller.cc.

176  {
178 
179  DetId geoId = geomDet->geographicalId();
180 
181  if (geoId.subdetId() == MuonSubdetId::DT) {
182  DTChamberId chamberId(geoId.rawId());
183 
184  // loop on segments 4D
186  for (chamberIdIt = dtSegments->id_begin(); chamberIdIt != dtSegments->id_end(); ++chamberIdIt) {
187  if (*chamberIdIt != chamberId)
188  continue;
189 
190  // Get the range for the corresponding ChamberId
191  DTRecSegment4DCollection::range range = dtSegments->get((*chamberIdIt));
192 
193  for (DTRecSegment4DCollection::const_iterator iseg = range.first; iseg != range.second; ++iseg) {
194  if (iseg->dimension() != 4)
195  continue;
196  segments.push_back(MuonTransientTrackingRecHit::specificBuild(geomDet, &*iseg));
197  }
198  }
199  } else if (geoId.subdetId() == MuonSubdetId::CSC) {
200  CSCDetId did(geoId.rawId());
201 
202  for (CSCSegmentCollection::id_iterator chamberId = cscSegments->id_begin(); chamberId != cscSegments->id_end();
203  ++chamberId) {
204  if ((*chamberId).chamber() != did.chamber())
205  continue;
206 
207  // Get the range for the corresponding ChamberId
208  CSCSegmentCollection::range range = cscSegments->get((*chamberId));
209 
210  for (CSCSegmentCollection::const_iterator iseg = range.first; iseg != range.second; ++iseg) {
211  if (iseg->dimension() != 3)
212  continue;
213  segments.push_back(MuonTransientTrackingRecHit::specificBuild(geomDet, &*iseg));
214  }
215  }
216  } else {
217  LogTrace(category_) << "Segments are not built in RPCs" << endl;
218  }
219 
221 
222  if (segments.empty())
223  return allhitscorrelated;
224 
225  TransientTrackingRecHit::ConstRecHitPointer muonRecHit(segments.front());
226  allhitscorrelated = MuonTransientTrackingRecHitBreaker::breakInSubRecHits(muonRecHit, 2);
227 
228  if (segments.size() == 1)
229  return allhitscorrelated;
230 
231  for (MuonTransientTrackingRecHit::MuonRecHitContainer::const_iterator iseg = segments.begin() + 1;
232  iseg != segments.end();
233  ++iseg) {
237 
238  for (TransientTrackingRecHit::ConstRecHitContainer::const_iterator ihit1 = hits1.begin(); ihit1 != hits1.end();
239  ++ihit1) {
240  bool usedbefore = false;
241  //unused DetId thisID = (*ihit1)->geographicalId();
242  //LocalPoint lp1dinsegHit = (*ihit1)->localPosition();
243  GlobalPoint gp1dinsegHit = (*ihit1)->globalPosition();
244 
245  for (TransientTrackingRecHit::ConstRecHitContainer::const_iterator ihit2 = allhitscorrelated.begin();
246  ihit2 != allhitscorrelated.end();
247  ++ihit2) {
248  //unused DetId thisID2 = (*ihit2)->geographicalId();
249  //LocalPoint lp1dinsegHit2 = (*ihit2)->localPosition();
250  GlobalPoint gp1dinsegHit2 = (*ihit2)->globalPosition();
251 
252  if ((gp1dinsegHit2 - gp1dinsegHit).mag() < 1.0)
253  usedbefore = true;
254  }
255  if (!usedbefore)
256  allhitscorrelated.push_back(*ihit1);
257  }
258  }
259 
260  return allhitscorrelated;
261 }

References MuonTransientTrackingRecHitBreaker::breakInSubRecHits(), category_, MuonSubdetId::CSC, dtChamberEfficiency_cfi::cscSegments, MuonSubdetId::DT, GeomDet::geographicalId(), LogTrace, mag(), FastTimerService_cff::range, DetId::rawId(), MuonTransientTrackingRecHit::specificBuild(), and DetId::subdetId().

Referenced by fillHitsByStation().

◆ setEvent()

void MuonShowerInformationFiller::setEvent ( const edm::Event event)
virtual

pass the Event to the algorithm at each event

Definition at line 136 of file MuonShowerInformationFiller.cc.

136  {
137  // get all the necesary products
138  event.getByToken(theDTRecHitToken, theDTRecHits);
139  event.getByToken(theCSCRecHitToken, theCSCRecHits);
140  event.getByToken(theCSCSegmentsToken, theCSCSegments);
141  event.getByToken(theDT4DRecSegmentToken, theDT4DRecSegments);
142 
143  for (int istat = 0; istat < 4; istat++) {
144  theStationShowerDeltaR.at(istat) = 0.;
145  theStationShowerTSize.at(istat) = 0.;
146  theAllStationHits.at(istat) = 0;
147  theCorrelatedStationHits.at(istat) = 0;
148  }
149 }

References theAllStationHits, theCorrelatedStationHits, theCSCRecHits, theCSCRecHitToken, theCSCSegments, theCSCSegmentsToken, theDT4DRecSegments, theDT4DRecSegmentToken, theDTRecHits, theDTRecHitToken, theStationShowerDeltaR, and theStationShowerTSize.

Referenced by fillShowerInformation().

◆ setServices()

void MuonShowerInformationFiller::setServices ( const edm::EventSetup setup)

Member Data Documentation

◆ category_

std::string MuonShowerInformationFiller::category_
private

◆ theAllStationHits

std::vector<int> MuonShowerInformationFiller::theAllStationHits
private

◆ theCacheId_MT

unsigned long long MuonShowerInformationFiller::theCacheId_MT
private

Definition at line 186 of file MuonShowerInformationFiller.h.

Referenced by MuonShowerInformationFiller().

◆ theCacheId_TRH

unsigned long long MuonShowerInformationFiller::theCacheId_TRH
private

Definition at line 185 of file MuonShowerInformationFiller.h.

Referenced by MuonShowerInformationFiller(), and setServices().

◆ theCorrelatedStationHits

std::vector<int> MuonShowerInformationFiller::theCorrelatedStationHits
private

◆ theCSCGeometry

edm::ESHandle<CSCGeometry> MuonShowerInformationFiller::theCSCGeometry
private

Definition at line 213 of file MuonShowerInformationFiller.h.

Referenced by setServices().

◆ theCSCRecHitLabel

edm::InputTag MuonShowerInformationFiller::theCSCRecHitLabel
private

Definition at line 195 of file MuonShowerInformationFiller.h.

Referenced by MuonShowerInformationFiller().

◆ theCSCRecHits

edm::Handle<CSCRecHit2DCollection> MuonShowerInformationFiller::theCSCRecHits
private

Definition at line 200 of file MuonShowerInformationFiller.h.

Referenced by fillHitsByStation(), and setEvent().

◆ theCSCRecHitToken

edm::EDGetTokenT<CSCRecHit2DCollection> MuonShowerInformationFiller::theCSCRecHitToken
private

Definition at line 205 of file MuonShowerInformationFiller.h.

Referenced by MuonShowerInformationFiller(), and setEvent().

◆ theCSCSegments

edm::Handle<CSCSegmentCollection> MuonShowerInformationFiller::theCSCSegments
private

Definition at line 201 of file MuonShowerInformationFiller.h.

Referenced by fillHitsByStation(), and setEvent().

◆ theCSCSegmentsLabel

edm::InputTag MuonShowerInformationFiller::theCSCSegmentsLabel
private

Definition at line 196 of file MuonShowerInformationFiller.h.

Referenced by MuonShowerInformationFiller().

◆ theCSCSegmentsToken

edm::EDGetTokenT<CSCSegmentCollection> MuonShowerInformationFiller::theCSCSegmentsToken
private

Definition at line 206 of file MuonShowerInformationFiller.h.

Referenced by MuonShowerInformationFiller(), and setEvent().

◆ theDT4DRecSegmentLabel

edm::InputTag MuonShowerInformationFiller::theDT4DRecSegmentLabel
private

Definition at line 197 of file MuonShowerInformationFiller.h.

Referenced by MuonShowerInformationFiller().

◆ theDT4DRecSegments

edm::Handle<DTRecSegment4DCollection> MuonShowerInformationFiller::theDT4DRecSegments
private

Definition at line 202 of file MuonShowerInformationFiller.h.

Referenced by fillHitsByStation(), and setEvent().

◆ theDT4DRecSegmentToken

edm::EDGetTokenT<DTRecSegment4DCollection> MuonShowerInformationFiller::theDT4DRecSegmentToken
private

Definition at line 207 of file MuonShowerInformationFiller.h.

Referenced by MuonShowerInformationFiller(), and setEvent().

◆ theDTGeometry

edm::ESHandle<DTGeometry> MuonShowerInformationFiller::theDTGeometry
private

Definition at line 214 of file MuonShowerInformationFiller.h.

Referenced by setServices().

◆ theDTRecHitLabel

edm::InputTag MuonShowerInformationFiller::theDTRecHitLabel
private

Definition at line 194 of file MuonShowerInformationFiller.h.

Referenced by MuonShowerInformationFiller().

◆ theDTRecHits

edm::Handle<DTRecHitCollection> MuonShowerInformationFiller::theDTRecHits
private

Definition at line 199 of file MuonShowerInformationFiller.h.

Referenced by fillHitsByStation(), and setEvent().

◆ theDTRecHitToken

edm::EDGetTokenT<DTRecHitCollection> MuonShowerInformationFiller::theDTRecHitToken
private

Definition at line 204 of file MuonShowerInformationFiller.h.

Referenced by MuonShowerInformationFiller(), and setEvent().

◆ theField

edm::ESHandle<MagneticField> MuonShowerInformationFiller::theField
private

Definition at line 212 of file MuonShowerInformationFiller.h.

Referenced by setServices().

◆ theMuonRecHitBuilder

edm::ESHandle<TransientTrackingRecHitBuilder> MuonShowerInformationFiller::theMuonRecHitBuilder
private

Definition at line 192 of file MuonShowerInformationFiller.h.

Referenced by setServices().

◆ theMuonRecHitBuilderName

std::string MuonShowerInformationFiller::theMuonRecHitBuilderName
private

Definition at line 191 of file MuonShowerInformationFiller.h.

Referenced by MuonShowerInformationFiller(), and setServices().

◆ theService

MuonServiceProxy* MuonShowerInformationFiller::theService
private

◆ theStationShowerDeltaR

std::vector<float> MuonShowerInformationFiller::theStationShowerDeltaR
private

◆ theStationShowerTSize

std::vector<float> MuonShowerInformationFiller::theStationShowerTSize
private

◆ theTracker

edm::ESHandle<GeometricSearchTracker> MuonShowerInformationFiller::theTracker
private

Definition at line 210 of file MuonShowerInformationFiller.h.

Referenced by setServices().

◆ theTrackerRecHitBuilder

edm::ESHandle<TransientTrackingRecHitBuilder> MuonShowerInformationFiller::theTrackerRecHitBuilder
private

Definition at line 189 of file MuonShowerInformationFiller.h.

Referenced by setServices().

◆ theTrackerRecHitBuilderName

std::string MuonShowerInformationFiller::theTrackerRecHitBuilderName
private

Definition at line 188 of file MuonShowerInformationFiller.h.

Referenced by MuonShowerInformationFiller(), and setServices().

◆ theTrackingGeometry

edm::ESHandle<GlobalTrackingGeometry> MuonShowerInformationFiller::theTrackingGeometry
private

Definition at line 211 of file MuonShowerInformationFiller.h.

Referenced by setServices().

Vector3DBase
Definition: Vector3DBase.h:8
MuonShowerInformationFiller::theCSCSegmentsLabel
edm::InputTag theCSCSegmentsLabel
Definition: MuonShowerInformationFiller.h:196
MuonShowerInformationFiller::findPerpCluster
MuonRecHitContainer findPerpCluster(MuonRecHitContainer &muonRecHits) const
Definition: MuonShowerInformationFiller.cc:294
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
MuonSubdetId::CSC
static constexpr int CSC
Definition: MuonSubdetId.h:12
MuonShowerInformationFiller::setEvent
virtual void setEvent(const edm::Event &)
pass the Event to the algorithm at each event
Definition: MuonShowerInformationFiller.cc:136
MuonShowerInformationFiller::theCorrelatedStationHits
std::vector< int > theCorrelatedStationHits
Definition: MuonShowerInformationFiller.h:96
CSCRecHit2DCollection
mps_fire.i
i
Definition: mps_fire.py:428
MuonShowerInformationFiller::findThetaCluster
TransientTrackingRecHit::ConstRecHitContainer findThetaCluster(TransientTrackingRecHit::ConstRecHitContainer &, const GlobalPoint &) const
Definition: MuonShowerInformationFiller.cc:267
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
MuonTransientTrackingRecHit::specificBuild
static MuonRecHitPointer specificBuild(const GeomDet *geom, const TrackingRecHit *rh)
Definition: MuonTransientTrackingRecHit.h:75
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
Cylinder::radius
Scalar radius() const
Radius of the cylinder.
Definition: Cylinder.h:64
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
MuonRecHitContainer
MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer
Definition: CosmicMuonSmoother.h:31
step
step
Definition: StallMonitor.cc:94
MuonShowerInformationFiller::getCompatibleDets
std::vector< const GeomDet * > getCompatibleDets(const reco::Track &) const
Definition: MuonShowerInformationFiller.cc:325
muon
Definition: MuonCocktails.h:17
MuonShowerInformationFiller::theMuonRecHitBuilder
edm::ESHandle< TransientTrackingRecHitBuilder > theMuonRecHitBuilder
Definition: MuonShowerInformationFiller.h:192
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
MuonShowerInformationFiller::setServices
void setServices(const edm::EventSetup &)
set the services needed
Definition: MuonShowerInformationFiller.cc:154
min
T min(T a, T b)
Definition: MathUtil.h:58
reco::MuonShower::nStationHits
std::vector< int > nStationHits
number of all the muon RecHits per chamber crossed by a track (1D hits)
Definition: MuonShower.h:9
relativeConstraints.station
station
Definition: relativeConstraints.py:67
testProducerWithPsetDescEmpty_cfi.x2
x2
Definition: testProducerWithPsetDescEmpty_cfi.py:28
DetId::det
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
MuonShowerInformationFiller::theTrackerRecHitBuilderName
std::string theTrackerRecHitBuilderName
Definition: MuonShowerInformationFiller.h:188
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition: TrajectoryStateOnSurface.h:65
MuonShowerInformationFiller::theMuonRecHitBuilderName
std::string theMuonRecHitBuilderName
Definition: MuonShowerInformationFiller.h:191
TransientRecHitRecord
Definition: TransientRecHitRecord.h:14
n0
int n0
Definition: AMPTWrapper.h:44
MuonShowerInformationFiller::theCSCSegmentsToken
edm::EDGetTokenT< CSCSegmentCollection > theCSCSegmentsToken
Definition: MuonShowerInformationFiller.h:206
GlobalTrackingGeometryRecord
Definition: GlobalTrackingGeometryRecord.h:17
MuonShowerInformationFiller::theDTRecHits
edm::Handle< DTRecHitCollection > theDTRecHits
Definition: MuonShowerInformationFiller.h:199
MuonTransientTrackingRecHit::MuonRecHitContainer
std::vector< MuonRecHitPointer > MuonRecHitContainer
Definition: MuonTransientTrackingRecHit.h:26
dtChamberEfficiency_cfi.cscSegments
cscSegments
Definition: dtChamberEfficiency_cfi.py:15
MuonShowerInformationFiller::theField
edm::ESHandle< MagneticField > theField
Definition: MuonShowerInformationFiller.h:212
TrackerRecoGeometryRecord
Definition: TrackerRecoGeometryRecord.h:14
CSCSegmentCollection
MuonShowerInformationFiller::theDT4DRecSegmentLabel
edm::InputTag theDT4DRecSegmentLabel
Definition: MuonShowerInformationFiller.h:197
MuonShowerInformationFiller::theCacheId_TRH
unsigned long long theCacheId_TRH
Definition: MuonShowerInformationFiller.h:185
makeMuonMisalignmentScenario.endcap
endcap
Definition: makeMuonMisalignmentScenario.py:320
MuonShowerInformationFiller::theCSCRecHitLabel
edm::InputTag theCSCRecHitLabel
Definition: MuonShowerInformationFiller.h:195
perp
T perp() const
Magnitude of transverse component.
Definition: Basic3DVectorLD.h:133
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
edm::RangeMap::id_iterator
identifier iterator
Definition: RangeMap.h:130
MuonShowerInformationFiller::theTracker
edm::ESHandle< GeometricSearchTracker > theTracker
Definition: MuonShowerInformationFiller.h:210
BoundDisk
MuonShowerInformationFiller::theCSCGeometry
edm::ESHandle< CSCGeometry > theCSCGeometry
Definition: MuonShowerInformationFiller.h:213
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
MuonServiceProxy_cff.MuonServiceProxy
MuonServiceProxy
Definition: MuonServiceProxy_cff.py:14
edm::Ref< TrackCollection >
trajectoryStateTransform::outerStateOnSurface
TrajectoryStateOnSurface outerStateOnSurface(const reco::Track &tk, const TrackingGeometry &geom, const MagneticField *field, bool withErr=true)
Definition: TrajectoryStateTransform.cc:118
testProducerWithPsetDescEmpty_cfi.z2
z2
Definition: testProducerWithPsetDescEmpty_cfi.py:41
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
MuonShowerInformationFiller::theTrackerRecHitBuilder
edm::ESHandle< TransientTrackingRecHitBuilder > theTrackerRecHitBuilder
Definition: MuonShowerInformationFiller.h:189
DetId
Definition: DetId.h:17
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
MuonShowerInformationFiller::theStationShowerDeltaR
std::vector< float > theStationShowerDeltaR
Definition: MuonShowerInformationFiller.h:93
testProducerWithPsetDescEmpty_cfi.y1
y1
Definition: testProducerWithPsetDescEmpty_cfi.py:29
MuonShowerInformationFiller::theCSCRecHits
edm::Handle< CSCRecHit2DCollection > theCSCRecHits
Definition: MuonShowerInformationFiller.h:200
reco::MuonShower::nStationCorrelatedHits
std::vector< int > nStationCorrelatedHits
number of the muon RecHits used by segments per chamber crossed by a track
Definition: MuonShower.h:11
MuonShowerInformationFiller::crossingPoint
GlobalPoint crossingPoint(const GlobalPoint &, const GlobalPoint &, const BarrelDetLayer *) const
Definition: MuonShowerInformationFiller.cc:396
DTRecHitCollection
SiPixelRawToDigiRegional_cfi.deltaPhi
deltaPhi
Definition: SiPixelRawToDigiRegional_cfi.py:9
Calorimetry_cff.dp
dp
Definition: Calorimetry_cff.py:158
MuonShowerInformationFiller::theTrackingGeometry
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
Definition: MuonShowerInformationFiller.h:211
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
MuonTransientTrackingRecHitBreaker::breakInSubRecHits
static TransientTrackingRecHit::ConstRecHitContainer breakInSubRecHits(TransientTrackingRecHit::ConstRecHitPointer, int granularity)
takes a muon rechit and returns its sub-rechits given a certain granularity
Definition: MuonTransientTrackingRecHitBreaker.cc:5
mps_fire.end
end
Definition: mps_fire.py:242
p2
double p2[4]
Definition: TauolaWrapper.h:90
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
theta
Geom::Theta< T > theta() const
Definition: Basic3DVectorLD.h:150
MuonSubdetId::DT
static constexpr int DT
Definition: MuonSubdetId.h:11
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Point3DBase< float, GlobalTag >
DTChamberId::minLayerId
static const int minLayerId
lowest layer id. 0 indicates a full SL
Definition: DTChamberId.h:68
MuonShowerInformationFiller::cscPositionToDets
std::vector< const GeomDet * > cscPositionToDets(const GlobalPoint &) const
Definition: MuonShowerInformationFiller.cc:576
DTRecSegment4DCollection
DTLayerId
Definition: DTLayerId.h:12
MuonShowerInformationFiller::theStationShowerTSize
std::vector< float > theStationShowerTSize
Definition: MuonShowerInformationFiller.h:94
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
testProducerWithPsetDescEmpty_cfi.y2
y2
Definition: testProducerWithPsetDescEmpty_cfi.py:30
runTauDisplay.gp
gp
Definition: runTauDisplay.py:431
GeomDet::geographicalId
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
MuonShowerInformationFiller::theAllStationHits
std::vector< int > theAllStationHits
Definition: MuonShowerInformationFiller.h:95
edm::ParameterSet
Definition: ParameterSet.h:47
MuonShowerInformationFiller::theDTRecHitLabel
edm::InputTag theDTRecHitLabel
Definition: MuonShowerInformationFiller.h:194
iseed
int iseed
Definition: AMPTWrapper.h:134
a
double a
Definition: hdecay.h:119
TrackingRecHit::ConstRecHitContainer
std::vector< ConstRecHitPointer > ConstRecHitContainer
Definition: TrackingRecHit.h:32
MuonShowerInformationFiller::fillHitsByStation
void fillHitsByStation(const reco::Muon &)
Definition: MuonShowerInformationFiller.cc:684
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
MuonShowerInformationFiller::theDT4DRecSegments
edm::Handle< DTRecSegment4DCollection > theDT4DRecSegments
Definition: MuonShowerInformationFiller.h:202
edm::RangeMap::const_iterator
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:43
CSCDetId
Definition: CSCDetId.h:26
MuonShowerInformationFiller::hitsFromSegments
TransientTrackingRecHit::ConstRecHitContainer hitsFromSegments(const GeomDet *, edm::Handle< DTRecSegment4DCollection >, edm::Handle< CSCSegmentCollection >) const
Definition: MuonShowerInformationFiller.cc:173
DTChamberId::maxLayerId
static const int maxLayerId
highest layer id
Definition: DTChamberId.h:70
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
TrackingRecHit::ConstRecHitPointer
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
Definition: TrackingRecHit.h:25
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
reco::MuonShower::stationShowerSizeT
std::vector< float > stationShowerSizeT
the transverse size of the hit cluster
Definition: MuonShower.h:13
iEvent
int iEvent
Definition: GenABIO.cc:224
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
p1
double p1[4]
Definition: TauolaWrapper.h:89
MuonShowerInformationFiller::theDTGeometry
edm::ESHandle< DTGeometry > theDTGeometry
Definition: MuonShowerInformationFiller.h:214
MuonShowerInformationFiller::theCSCSegments
edm::Handle< CSCSegmentCollection > theCSCSegments
Definition: MuonShowerInformationFiller.h:201
get
#define get
reco::MuonShower
Definition: MuonShower.h:7
MuonShowerInformationFiller::theCacheId_MT
unsigned long long theCacheId_MT
Definition: MuonShowerInformationFiller.h:186
MuonShowerInformationFiller::dtPositionToDets
std::vector< const GeomDet * > dtPositionToDets(const GlobalPoint &) const
Definition: MuonShowerInformationFiller.cc:476
DTChamberId::maxSuperLayerId
static const int maxSuperLayerId
highest superlayer id
Definition: DTChamberId.h:66
DDAxes::phi
PV3DBase::mag
T mag() const
Definition: PV3DBase.h:64
MuonShowerInformationFiller::theCSCRecHitToken
edm::EDGetTokenT< CSCRecHit2DCollection > theCSCRecHitToken
Definition: MuonShowerInformationFiller.h:205
mag
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Definition: Basic3DVectorLD.h:127
MuonShowerInformationFiller::theDTRecHitToken
edm::EDGetTokenT< DTRecHitCollection > theDTRecHitToken
Definition: MuonShowerInformationFiller.h:204
edm::RangeMap::range
std::pair< const_iterator, const_iterator > range
iterator range
Definition: RangeMap.h:50
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
MuonShowerInformationFiller::theDT4DRecSegmentToken
edm::EDGetTokenT< DTRecSegment4DCollection > theDT4DRecSegmentToken
Definition: MuonShowerInformationFiller.h:207
MuonSubdetId::RPC
static constexpr int RPC
Definition: MuonSubdetId.h:13
DTChamberId::minSuperLayerId
static const int minSuperLayerId
loweset super layer id. 0 indicates a full chamber
Definition: DTChamberId.h:64
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
CosmicsPD_Skims.radius
radius
Definition: CosmicsPD_Skims.py:135
pileupCalc.upper
upper
Definition: pileupCalc.py:214
MuonShowerInformationFiller::category_
std::string category_
Definition: MuonShowerInformationFiller.h:183
BoundCylinder
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
reco::MuonShower::stationShowerDeltaR
std::vector< float > stationShowerDeltaR
the radius of the cone containing the all the hits around the track
Definition: MuonShower.h:15
dqmMemoryStats.total
total
Definition: dqmMemoryStats.py:152
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
mps_fire.result
result
Definition: mps_fire.py:311
DetId::Muon
Definition: DetId.h:26
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
DTChamberId
Definition: DTChamberId.h:14
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
MuonShowerInformationFiller::theService
MuonServiceProxy * theService
Definition: MuonShowerInformationFiller.h:98
trajectoryStateTransform::innerStateOnSurface
TrajectoryStateOnSurface innerStateOnSurface(const reco::Track &tk, const TrackingGeometry &geom, const MagneticField *field, bool withErr=true)
Definition: TrajectoryStateTransform.cc:110
slope
static const double slope[3]
Definition: CastorTimeSlew.cc:6
edm_modernize_messagelogger.stat
stat
Definition: edm_modernize_messagelogger.py:27
volumeBasedMagneticField_160812_cfi.sectors
sectors
Definition: volumeBasedMagneticField_160812_cfi.py:59
MuonGeometryRecord
Definition: MuonGeometryRecord.h:34
BarrelDetLayer::specificSurface
virtual const BoundCylinder & specificSurface() const final
Extension of the interface.
Definition: BarrelDetLayer.h:39
edm::InputTag
Definition: InputTag.h:15
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
hit
Definition: SiStripHitEffFromCalibTree.cc:88
ForwardDetLayer::specificSurface
virtual const BoundDisk & specificSurface() const final
Definition: ForwardDetLayer.h:39