CMS 3D CMS Logo

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

#include <GlobalMuonRefitter.h>

Public Types

typedef MuonTransientTrackingRecHit::ConstMuonRecHitContainer ConstMuonRecHitContainer
 
typedef MuonTransientTrackingRecHit::ConstMuonRecHitPointer ConstMuonRecHitPointer
 
typedef TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer
 
typedef TransientTrackingRecHit::ConstRecHitPointer ConstRecHitPointer
 
typedef MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer
 
typedef MuonTransientTrackingRecHit::MuonRecHitPointer MuonRecHitPointer
 
typedef TransientTrackingRecHit::RecHitContainer RecHitContainer
 
typedef TransientTrackingRecHit::RecHitPointer RecHitPointer
 
enum  subDetector {
  PXB = 1, PXF = 2, TIB = 3, TID = 4,
  TOB = 5, TEC = 6
}
 
typedef std::vector< TrajectoryTC
 
typedef TC::const_iterator TI
 

Public Member Functions

const reco::DYTInfogetDYTInfo ()
 
ConstRecHitContainer getRidOfSelectStationHits (const ConstRecHitContainer &hits, const TrackerTopology *tTopo) const
 
 GlobalMuonRefitter (const edm::ParameterSet &, const MuonServiceProxy *, edm::ConsumesCollector &)
 constructor with Parameter Set and MuonServiceProxy More...
 
std::vector< Trajectoryrefit (const reco::Track &globalTrack, const int theMuonHitsOption, const TrackerTopology *tTopo) const
 build combined trajectory from sta Track and tracker RecHits More...
 
std::vector< Trajectoryrefit (const reco::Track &globalTrack, const reco::TransientTrack track, const TransientTrackingRecHit::ConstRecHitContainer &allRecHitsTemp, const int theMuonHitsOption, const TrackerTopology *tTopo) const
 build combined trajectory from subset of sta Track and tracker RecHits More...
 
virtual void setEvent (const edm::Event &)
 pass the Event to the algo at each event More...
 
void setServices (const edm::EventSetup &)
 set the services needed by the TrackTransformer More...
 
std::vector< Trajectorytransform (const reco::Track &newTrack, const reco::TransientTrack track, const TransientTrackingRecHit::ConstRecHitContainer &recHitsForReFit) const
 refit the track with a new set of RecHits More...
 
virtual ~GlobalMuonRefitter ()
 destructor More...
 

Protected Types

enum  RefitDirection { insideOut, outsideIn, undetermined }
 

Protected Member Functions

void checkMuonHits (const reco::Track &, ConstRecHitContainer &, std::map< DetId, int > &) const
 check muon RecHits, calculate chamber occupancy and select hits to be used in the final fit More...
 
RefitDirection checkRecHitsOrdering (const ConstRecHitContainer &) const
 
void getFirstHits (const reco::Track &, ConstRecHitContainer &, ConstRecHitContainer &) const
 get the RecHits in the tracker and the first muon chamber with hits More...
 
void printHits (const ConstRecHitContainer &) const
 print all RecHits of a trajectory More...
 
ConstRecHitContainer selectMuonHits (const Trajectory &, const std::map< DetId, int > &) const
 select muon hits compatible with trajectory; check hits in chambers with showers More...
 
const MuonServiceProxyservice () const
 

Protected Attributes

std::string theCategory
 
float thePtCut
 
bool theTkTrajsAvailableFlag
 

Private Attributes

edm::Handle< DTRecSegment4DCollectionall4DSegments
 
edm::EDGetTokenT< DTRecSegment4DCollectionall4DSegmentsToken
 
edm::Handle< CSCSegmentCollectionCSCSegments
 
edm::EDGetTokenT< CSCSegmentCollectionCSCSegmentsToken
 
reco::DYTInfodytInfo
 
TkClonerImpl hitCloner
 
unsigned long long theCacheId_TRH
 
bool theCosmicFlag
 
float theCSCChi2Cut
 
edm::InputTag theCSCRecHitLabel
 
edm::Handle< CSCRecHit2DCollectiontheCSCRecHits
 
edm::EDGetTokenT< CSCRecHit2DCollectiontheCSCRecHitToken
 
float theDTChi2Cut
 
edm::InputTag theDTRecHitLabel
 
edm::Handle< DTRecHitCollectiontheDTRecHits
 
edm::EDGetTokenT< DTRecHitCollectiontheDTRecHitToken
 
bool theDYTParThrsMode
 
int theDYTselector
 
std::vector< int > theDYTthrs
 
edm::ParameterSet theDYTthrsParameters
 
bool theDYTupdator
 
bool theDYTuseAPE
 
const edm::EventtheEvent
 
std::unique_ptr< TrajectoryFittertheFitter
 
edm::ESGetToken< TrajectoryFitter, TrajectoryFitterRecordtheFitterToken
 
float theGEMChi2Cut
 
edm::InputTag theGEMRecHitLabel
 
edm::Handle< GEMRecHitCollectiontheGEMRecHits
 
edm::EDGetTokenT< GEMRecHitCollectiontheGEMRecHitToken
 
int theHitThreshold
 
float theME0Chi2Cut
 
edm::InputTag theME0RecHitLabel
 
edm::Handle< ME0SegmentCollectiontheME0RecHits
 
edm::EDGetTokenT< ME0SegmentCollectiontheME0RecHitToken
 
int theMuonHitsOption
 
const TransientTrackingRecHitBuildertheMuonRecHitBuilder
 
edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecordtheMuonRecHitBuilderToken
 
float theProbCut
 
std::string thePropagatorName
 
RefitDirection theRefitDirection
 
double theRescaleErrorFactor
 
float theRPCChi2Cut
 
bool theRPCInTheFit
 
const MuonServiceProxytheService
 
int theSkipStation
 
const TransientTrackingRecHitBuildertheTrackerRecHitBuilder
 
edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecordtheTrackerRecHitBuilderToken
 
int theTrackerSkipSection
 
int theTrackerSkipSystem
 

Detailed Description

class to build muon trajectory

Author
N. Neumeister Purdue University
C. Liu Purdue University
A. Everett Purdue University

\modified by C. Calabria INFN & Universita Bari \modified by D. Nash Northeastern University \modified by C. Caputo UCLouvain

Definition at line 51 of file GlobalMuonRefitter.h.

Member Typedef Documentation

◆ ConstMuonRecHitContainer

Definition at line 61 of file GlobalMuonRefitter.h.

◆ ConstMuonRecHitPointer

Definition at line 59 of file GlobalMuonRefitter.h.

◆ ConstRecHitContainer

Definition at line 54 of file GlobalMuonRefitter.h.

◆ ConstRecHitPointer

Definition at line 56 of file GlobalMuonRefitter.h.

◆ MuonRecHitContainer

Definition at line 60 of file GlobalMuonRefitter.h.

◆ MuonRecHitPointer

Definition at line 58 of file GlobalMuonRefitter.h.

◆ RecHitContainer

Definition at line 53 of file GlobalMuonRefitter.h.

◆ RecHitPointer

Definition at line 55 of file GlobalMuonRefitter.h.

◆ TC

typedef std::vector<Trajectory> GlobalMuonRefitter::TC

Definition at line 63 of file GlobalMuonRefitter.h.

◆ TI

typedef TC::const_iterator GlobalMuonRefitter::TI

Definition at line 64 of file GlobalMuonRefitter.h.

Member Enumeration Documentation

◆ RefitDirection

Enumerator
insideOut 
outsideIn 
undetermined 

Definition at line 105 of file GlobalMuonRefitter.h.

◆ subDetector

Enumerator
PXB 
PXF 
TIB 
TID 
TOB 
TEC 

Definition at line 66 of file GlobalMuonRefitter.h.

66 { PXB = 1, PXF = 2, TIB = 3, TID = 4, TOB = 5, TEC = 6 };

Constructor & Destructor Documentation

◆ GlobalMuonRefitter()

GlobalMuonRefitter::GlobalMuonRefitter ( const edm::ParameterSet par,
const MuonServiceProxy service,
edm::ConsumesCollector iC 
)

constructor with Parameter Set and MuonServiceProxy

Definition at line 75 of file GlobalMuonRefitter.cc.

78  : theCosmicFlag(par.getParameter<bool>("PropDirForCosmics")),
79  theDTRecHitLabel(par.getParameter<InputTag>("DTRecSegmentLabel")),
80  theCSCRecHitLabel(par.getParameter<InputTag>("CSCRecSegmentLabel")),
81  theGEMRecHitLabel(par.getParameter<InputTag>("GEMRecHitLabel")),
82  theME0RecHitLabel(par.getParameter<InputTag>("ME0RecHitLabel")),
84  theCategory = par.getUntrackedParameter<string>("Category", "Muon|RecoMuon|GlobalMuon|GlobalMuonRefitter");
85 
86  theHitThreshold = par.getParameter<int>("HitThreshold");
87  theDTChi2Cut = par.getParameter<double>("Chi2CutDT");
88  theCSCChi2Cut = par.getParameter<double>("Chi2CutCSC");
89  theRPCChi2Cut = par.getParameter<double>("Chi2CutRPC");
90  theGEMChi2Cut = par.getParameter<double>("Chi2CutGEM");
91  theME0Chi2Cut = par.getParameter<double>("Chi2CutME0");
92 
93  // Refit direction
94  string refitDirectionName = par.getParameter<string>("RefitDirection");
95 
96  if (refitDirectionName == "insideOut")
98  else if (refitDirectionName == "outsideIn")
100  else
101  throw cms::Exception("TrackTransformer constructor")
102  << "Wrong refit direction chosen in TrackTransformer ParameterSet"
103  << "\n"
104  << "Possible choices are:"
105  << "\n"
106  << "RefitDirection = insideOut or RefitDirection = outsideIn";
107 
108  theFitterToken = iC.esConsumes(edm::ESInputTag("", par.getParameter<string>("Fitter")));
109  thePropagatorName = par.getParameter<string>("Propagator");
110 
111  theSkipStation = par.getParameter<int>("SkipStation");
112  theTrackerSkipSystem = par.getParameter<int>("TrackerSkipSystem");
113  theTrackerSkipSection = par.getParameter<int>("TrackerSkipSection"); //layer, wheel, or disk depending on the system
114 
115  theTrackerRecHitBuilderToken = iC.esConsumes(edm::ESInputTag("", par.getParameter<string>("TrackerRecHitBuilder")));
116  theMuonRecHitBuilderToken = iC.esConsumes(edm::ESInputTag("", par.getParameter<string>("MuonRecHitBuilder")));
117 
118  theRPCInTheFit = par.getParameter<bool>("RefitRPCHits");
119 
120  theDYTthrs = par.getParameter<std::vector<int> >("DYTthrs");
121  theDYTselector = par.getParameter<int>("DYTselector");
122  theDYTupdator = par.getParameter<bool>("DYTupdator");
123  theDYTuseAPE = par.getParameter<bool>("DYTuseAPE");
124  theDYTParThrsMode = par.getParameter<bool>("DYTuseThrsParametrization");
125  if (theDYTParThrsMode)
126  theDYTthrsParameters = par.getParameter<edm::ParameterSet>("DYTthrsParameters");
127  dytInfo = new reco::DYTInfo();
128 
129  if (par.existsAs<double>("RescaleErrorFactor")) {
130  theRescaleErrorFactor = par.getParameter<double>("RescaleErrorFactor");
131  edm::LogWarning("GlobalMuonRefitter") << "using error rescale factor " << theRescaleErrorFactor;
132  } else
133  theRescaleErrorFactor = 1000.;
134 
135  theCacheId_TRH = 0;
142 }

References all4DSegmentsToken, edm::ConsumesCollector::consumes(), CSCSegmentsToken, dytInfo, edm::ConsumesCollector::esConsumes(), Exception, edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), HLT_FULL_cff::InputTag, insideOut, outsideIn, theCacheId_TRH, theCategory, theCSCChi2Cut, theCSCRecHitLabel, theCSCRecHitToken, theDTChi2Cut, theDTRecHitLabel, theDTRecHitToken, theDYTParThrsMode, theDYTselector, theDYTthrs, theDYTthrsParameters, theDYTupdator, theDYTuseAPE, theFitterToken, theGEMChi2Cut, theGEMRecHitLabel, theGEMRecHitToken, theHitThreshold, theME0Chi2Cut, theME0RecHitLabel, theME0RecHitToken, theMuonRecHitBuilderToken, thePropagatorName, theRefitDirection, theRescaleErrorFactor, theRPCChi2Cut, theRPCInTheFit, theSkipStation, theTrackerRecHitBuilderToken, theTrackerSkipSection, and theTrackerSkipSystem.

◆ ~GlobalMuonRefitter()

GlobalMuonRefitter::~GlobalMuonRefitter ( )
virtual

destructor

Definition at line 148 of file GlobalMuonRefitter.cc.

148 { delete dytInfo; }

References dytInfo.

Member Function Documentation

◆ checkMuonHits()

void GlobalMuonRefitter::checkMuonHits ( const reco::Track muon,
ConstRecHitContainer all,
std::map< DetId, int > &  hitMap 
) const
protected

check muon RecHits, calculate chamber occupancy and select hits to be used in the final fit

Definition at line 304 of file GlobalMuonRefitter.cc.

306  {
307  LogTrace(theCategory) << " GlobalMuonRefitter::checkMuonHits " << endl;
308 
309  float coneSize = 20.0;
310 
311  // loop through all muon hits and calculate the maximum # of hits in each chamber
312  for (ConstRecHitContainer::const_iterator imrh = all.begin(); imrh != all.end(); imrh++) {
313  if ((*imrh != nullptr) && !(*imrh)->isValid())
314  continue;
315 
316  int detRecHits = 0;
317  MuonRecHitContainer dRecHits;
318 
319  DetId id = (*imrh)->geographicalId();
320  DetId chamberId;
321 
322  // Skip tracker hits
323  if (id.det() != DetId::Muon)
324  continue;
325 
326  if (id.subdetId() == MuonSubdetId::DT) {
327  DTChamberId did(id.rawId());
328  chamberId = did;
329 
330  if ((*imrh)->dimension() > 1) {
331  std::vector<const TrackingRecHit*> hits2d = (*imrh)->recHits();
332  for (std::vector<const TrackingRecHit*>::const_iterator hit2d = hits2d.begin(); hit2d != hits2d.end();
333  hit2d++) {
334  if ((*hit2d)->dimension() > 1) {
335  std::vector<const TrackingRecHit*> hits1d = (*hit2d)->recHits();
336  for (std::vector<const TrackingRecHit*>::const_iterator hit1d = hits1d.begin(); hit1d != hits1d.end();
337  hit1d++) {
338  DetId id1 = (*hit1d)->geographicalId();
339  DTLayerId lid(id1.rawId());
340  // Get the 1d DT RechHits from this layer
341  DTRecHitCollection::range dRecHits = theDTRecHits->get(lid);
342  int layerHits = 0;
343  for (DTRecHitCollection::const_iterator ir = dRecHits.first; ir != dRecHits.second; ir++) {
344  double rhitDistance = fabs(ir->localPosition().x() - (**hit1d).localPosition().x());
345  if (rhitDistance < coneSize)
346  layerHits++;
347  LogTrace(theCategory) << " " << (ir)->localPosition() << " " << (**hit1d).localPosition()
348  << " Distance: " << rhitDistance << " recHits: " << layerHits
349  << " SL: " << lid.superLayer() << endl;
350  }
351  if (layerHits > detRecHits)
352  detRecHits = layerHits;
353  }
354  } else {
355  DTLayerId lid(id.rawId());
356  // Get the 1d DT RechHits from this layer
357  DTRecHitCollection::range dRecHits = theDTRecHits->get(lid);
358  for (DTRecHitCollection::const_iterator ir = dRecHits.first; ir != dRecHits.second; ir++) {
359  double rhitDistance = fabs(ir->localPosition().x() - (**imrh).localPosition().x());
360  if (rhitDistance < coneSize)
361  detRecHits++;
362  LogTrace(theCategory) << " " << (ir)->localPosition() << " " << (**imrh).localPosition()
363  << " Distance: " << rhitDistance << " recHits: " << detRecHits << endl;
364  }
365  }
366  }
367 
368  } else {
369  DTLayerId lid(id.rawId());
370 
371  // Get the 1d DT RechHits from this layer
372  DTRecHitCollection::range dRecHits = theDTRecHits->get(lid);
373 
374  for (DTRecHitCollection::const_iterator ir = dRecHits.first; ir != dRecHits.second; ir++) {
375  double rhitDistance = fabs(ir->localPosition().x() - (**imrh).localPosition().x());
376  if (rhitDistance < coneSize)
377  detRecHits++;
378  LogTrace(theCategory) << " " << (ir)->localPosition() << " " << (**imrh).localPosition()
379  << " Distance: " << rhitDistance << " recHits: " << detRecHits << endl;
380  }
381  }
382  } // end of if DT
383  else if (id.subdetId() == MuonSubdetId::CSC) {
384  CSCDetId did(id.rawId());
385  chamberId = did.chamberId();
386 
387  if ((*imrh)->recHits().size() > 1) {
388  std::vector<const TrackingRecHit*> hits2d = (*imrh)->recHits();
389  for (std::vector<const TrackingRecHit*>::const_iterator hit2d = hits2d.begin(); hit2d != hits2d.end();
390  hit2d++) {
391  DetId id1 = (*hit2d)->geographicalId();
392  CSCDetId lid(id1.rawId());
393 
394  // Get the CSC Rechits from this layer
395  CSCRecHit2DCollection::range dRecHits = theCSCRecHits->get(lid);
396  int layerHits = 0;
397 
398  for (CSCRecHit2DCollection::const_iterator ir = dRecHits.first; ir != dRecHits.second; ir++) {
399  double rhitDistance = (ir->localPosition() - (**hit2d).localPosition()).mag();
400  if (rhitDistance < coneSize)
401  layerHits++;
402  LogTrace(theCategory) << ir->localPosition() << " " << (**hit2d).localPosition()
403  << " Distance: " << rhitDistance << " recHits: " << layerHits << endl;
404  }
405  if (layerHits > detRecHits)
406  detRecHits = layerHits;
407  }
408  } else {
409  // Get the CSC Rechits from this layer
410  CSCRecHit2DCollection::range dRecHits = theCSCRecHits->get(did);
411 
412  for (CSCRecHit2DCollection::const_iterator ir = dRecHits.first; ir != dRecHits.second; ir++) {
413  double rhitDistance = (ir->localPosition() - (**imrh).localPosition()).mag();
414  if (rhitDistance < coneSize)
415  detRecHits++;
416  LogTrace(theCategory) << ir->localPosition() << " " << (**imrh).localPosition()
417  << " Distance: " << rhitDistance << " recHits: " << detRecHits << endl;
418  }
419  }
420  } //end of CSC if
421  else if (id.subdetId() == MuonSubdetId::GEM) {
422  GEMDetId did(id.rawId());
423  chamberId = did.chamberId();
424 
425  if ((*imrh)->recHits().size() > 1) {
426  std::vector<const TrackingRecHit*> hits2d = (*imrh)->recHits();
427  for (std::vector<const TrackingRecHit*>::const_iterator hit2d = hits2d.begin(); hit2d != hits2d.end();
428  hit2d++) {
429  DetId id1 = (*hit2d)->geographicalId();
430  GEMDetId lid(id1.rawId());
431 
432  // Get the GEM Rechits from this layer
433  GEMRecHitCollection::range dRecHits = theGEMRecHits->get(lid);
434  int layerHits = 0;
435 
436  for (GEMRecHitCollection::const_iterator ir = dRecHits.first; ir != dRecHits.second; ir++) {
437  double rhitDistance = (ir->localPosition() - (**hit2d).localPosition()).mag();
438  if (rhitDistance < coneSize)
439  layerHits++;
440  LogTrace(theCategory) << ir->localPosition() << " " << (**hit2d).localPosition()
441  << " Distance: " << rhitDistance << " recHits: " << layerHits << endl;
442  }
443  if (layerHits > detRecHits)
444  detRecHits = layerHits;
445  }
446  } else {
447  // Get the GEM Rechits from this layer
448  GEMRecHitCollection::range dRecHits = theGEMRecHits->get(did);
449 
450  for (GEMRecHitCollection::const_iterator ir = dRecHits.first; ir != dRecHits.second; ir++) {
451  double rhitDistance = (ir->localPosition() - (**imrh).localPosition()).mag();
452  if (rhitDistance < coneSize)
453  detRecHits++;
454  LogTrace(theCategory) << ir->localPosition() << " " << (**imrh).localPosition()
455  << " Distance: " << rhitDistance << " recHits: " << detRecHits << endl;
456  }
457  }
458  } //end of GEM if
459  else if (id.subdetId() == MuonSubdetId::ME0) {
460  ME0DetId did(id.rawId());
461  chamberId = did.chamberId();
462 
463  if ((*imrh)->recHits().size() > 1) {
464  std::vector<const TrackingRecHit*> hits2d = (*imrh)->recHits();
465  for (std::vector<const TrackingRecHit*>::const_iterator hit2d = hits2d.begin(); hit2d != hits2d.end();
466  hit2d++) {
467  DetId id1 = (*hit2d)->geographicalId();
468  ME0DetId lid(id1.rawId());
469 
470  // Get the ME0 Rechits from this layer
471  ME0SegmentCollection::range dRecHits = theME0RecHits->get(lid);
472  int layerHits = 0;
473 
474  for (ME0SegmentCollection::const_iterator ir = dRecHits.first; ir != dRecHits.second; ir++) {
475  double rhitDistance = (ir->localPosition() - (**hit2d).localPosition()).mag();
476  if (rhitDistance < coneSize)
477  layerHits++;
478  LogTrace(theCategory) << ir->localPosition() << " " << (**hit2d).localPosition()
479  << " Distance: " << rhitDistance << " recHits: " << layerHits << endl;
480  }
481  if (layerHits > detRecHits)
482  detRecHits = layerHits;
483  }
484  } else {
485  // Get the ME0 Rechits from this layer
486  ME0SegmentCollection::range dRecHits = theME0RecHits->get(did);
487 
488  for (ME0SegmentCollection::const_iterator ir = dRecHits.first; ir != dRecHits.second; ir++) {
489  double rhitDistance = (ir->localPosition() - (**imrh).localPosition()).mag();
490  if (rhitDistance < coneSize)
491  detRecHits++;
492  LogTrace(theCategory) << ir->localPosition() << " " << (**imrh).localPosition()
493  << " Distance: " << rhitDistance << " recHits: " << detRecHits << endl;
494  }
495  }
496  } //end of ME0 if
497  else {
498  if (id.subdetId() != MuonSubdetId::RPC)
499  LogError(theCategory) << " Wrong Hit Type ";
500  continue;
501  }
502 
503  map<DetId, int>::iterator imap = hitMap.find(chamberId);
504  if (imap != hitMap.end()) {
505  if (detRecHits > imap->second)
506  imap->second = detRecHits;
507  } else
508  hitMap[chamberId] = detRecHits;
509 
510  } // end of loop over muon rechits
511 
512  for (map<DetId, int>::iterator imap = hitMap.begin(); imap != hitMap.end(); imap++)
513  LogTrace(theCategory) << " Station " << imap->first.rawId() << ": " << imap->second << endl;
514 
515  LogTrace(theCategory) << "CheckMuonHits: " << all.size();
516 
517  // check order of muon measurements
518  if ((all.size() > 1) && (all.front()->globalPosition().mag() > all.back()->globalPosition().mag())) {
519  LogTrace(theCategory) << "reverse order: ";
520  stable_sort(all.begin(), all.end(), RecHitLessByDet(alongMomentum));
521  }
522 }

References python.cmstools::all(), alongMomentum, CSCDetId::chamberId(), ME0DetId::chamberId(), GEMDetId::chamberId(), HLT_FULL_cff::coneSize, MuonSubdetId::CSC, MuonSubdetId::DT, MuonSubdetId::GEM, globals_cff::id1, LogTrace, mag(), MuonSubdetId::ME0, DetId::Muon, MuonSubdetId::RPC, theCategory, theCSCRecHits, theDTRecHits, theGEMRecHits, and theME0RecHits.

Referenced by refit().

◆ checkRecHitsOrdering()

GlobalMuonRefitter::RefitDirection GlobalMuonRefitter::checkRecHitsOrdering ( const ConstRecHitContainer recHits) const
protected

Definition at line 693 of file GlobalMuonRefitter.cc.

694  {
695  if (!recHits.empty()) {
696  ConstRecHitContainer::const_iterator frontHit = recHits.begin();
697  ConstRecHitContainer::const_iterator backHit = recHits.end() - 1;
698  while (!(*frontHit)->isValid() && frontHit != backHit) {
699  frontHit++;
700  }
701  while (!(*backHit)->isValid() && backHit != frontHit) {
702  backHit--;
703  }
704 
705  double rFirst = (*frontHit)->globalPosition().mag();
706  double rLast = (*backHit)->globalPosition().mag();
707 
708  if (rFirst < rLast)
709  return insideOut;
710  else if (rFirst > rLast)
711  return outsideIn;
712  else {
713  LogError(theCategory) << "Impossible determine the rechits order" << endl;
714  return undetermined;
715  }
716  } else {
717  LogError(theCategory) << "Impossible determine the rechits order" << endl;
718  return undetermined;
719  }
720 }

References insideOut, outsideIn, FastTrackerRecHitMaskProducer_cfi::recHits, theCategory, and undetermined.

Referenced by transform().

◆ getDYTInfo()

const reco::DYTInfo* GlobalMuonRefitter::getDYTInfo ( )
inline

Definition at line 102 of file GlobalMuonRefitter.h.

102 { return dytInfo; }

References dytInfo.

◆ getFirstHits()

void GlobalMuonRefitter::getFirstHits ( const reco::Track muon,
ConstRecHitContainer all,
ConstRecHitContainer first 
) const
protected

get the RecHits in the tracker and the first muon chamber with hits

Definition at line 527 of file GlobalMuonRefitter.cc.

529  {
530  LogTrace(theCategory) << " GlobalMuonRefitter::getFirstHits\nall rechits length:" << all.size() << endl;
531  first.clear();
532 
533  int station_to_keep = 999;
534  vector<int> stations;
535  for (ConstRecHitContainer::const_iterator ihit = all.begin(); ihit != all.end(); ++ihit) {
536  int station = 0;
537  bool use_it = true;
538  DetId id = (*ihit)->geographicalId();
539  unsigned raw_id = id.rawId();
540  if (!(*ihit)->isValid())
541  station = -1;
542  else {
543  if (id.det() == DetId::Muon) {
544  switch (id.subdetId()) {
545  case MuonSubdetId::DT:
546  station = DTChamberId(raw_id).station();
547  break;
548  case MuonSubdetId::CSC:
549  station = CSCDetId(raw_id).station();
550  break;
551  case MuonSubdetId::GEM:
552  station = GEMDetId(raw_id).station();
553  break;
554  case MuonSubdetId::ME0:
555  station = ME0DetId(raw_id).station();
556  break;
557  case MuonSubdetId::RPC:
558  station = RPCDetId(raw_id).station();
559  use_it = false;
560  break;
561  }
562  }
563  }
564 
565  if (use_it && station > 0 && station < station_to_keep)
566  station_to_keep = station;
567  stations.push_back(station);
568  LogTrace(theCategory) << "rawId: " << raw_id << " station = " << station << " station_to_keep is now "
569  << station_to_keep;
570  }
571 
572  if (station_to_keep <= 0 || station_to_keep > 4 || stations.size() != all.size())
573  LogInfo(theCategory) << "failed to getFirstHits (all muon hits are outliers/bad ?)! station_to_keep = "
574  << station_to_keep << " stations.size " << stations.size() << " all.size " << all.size();
575 
576  for (unsigned i = 0; i < stations.size(); ++i)
577  if (stations[i] >= 0 && stations[i] <= station_to_keep)
578  first.push_back(all[i]);
579 
580  return;
581 }

References python.cmstools::all(), MuonSubdetId::CSC, MuonSubdetId::DT, dqmdumpme::first, MuonSubdetId::GEM, mps_fire::i, LogTrace, MuonSubdetId::ME0, DetId::Muon, DetId::rawId(), MuonSubdetId::RPC, DTChamberId::station(), ME0DetId::station(), relativeConstraints::station, RPCDetId::station(), CSCDetId::station(), GEMDetId::station(), and theCategory.

Referenced by refit().

◆ getRidOfSelectStationHits()

GlobalMuonRefitter::ConstRecHitContainer GlobalMuonRefitter::getRidOfSelectStationHits ( const ConstRecHitContainer hits,
const TrackerTopology tTopo 
) const

Definition at line 881 of file GlobalMuonRefitter.cc.

882  {
884  ConstRecHitContainer::const_iterator it = hits.begin();
885  for (; it != hits.end(); it++) {
886  DetId id = (*it)->geographicalId();
887 
888  //Check that this is a Muon hit that we're toying with -- else pass on this because the hacker is a moron / not careful
889 
890  if (id.det() == DetId::Tracker && theTrackerSkipSystem > 0) {
891  int layer = -999;
892  int disk = -999;
893  int wheel = -999;
894  if (id.subdetId() == theTrackerSkipSystem) {
895  // continue; //caveat that just removes the whole system from refitting
896 
897  if (theTrackerSkipSystem == PXB) {
898  layer = tTopo->pxbLayer(id);
899  }
900  if (theTrackerSkipSystem == TIB) {
901  layer = tTopo->tibLayer(id);
902  }
903 
904  if (theTrackerSkipSystem == TOB) {
905  layer = tTopo->tobLayer(id);
906  }
907  if (theTrackerSkipSystem == PXF) {
908  disk = tTopo->pxfDisk(id);
909  }
910  if (theTrackerSkipSystem == TID) {
911  wheel = tTopo->tidWheel(id);
912  }
913  if (theTrackerSkipSystem == TEC) {
914  wheel = tTopo->tecWheel(id);
915  }
916  if (theTrackerSkipSection >= 0 && layer == theTrackerSkipSection)
917  continue;
918  if (theTrackerSkipSection >= 0 && disk == theTrackerSkipSection)
919  continue;
921  continue;
922  }
923  }
924 
925  if (id.det() == DetId::Muon && theSkipStation) {
926  int station = -999;
927  //UNUSED: int wheel = -999;
928  if (id.subdetId() == MuonSubdetId::DT) {
929  DTChamberId did(id.rawId());
930  station = did.station();
931  //UNUSED: wheel = did.wheel();
932  } else if (id.subdetId() == MuonSubdetId::CSC) {
933  CSCDetId did(id.rawId());
934  station = did.station();
935  } else if (id.subdetId() == MuonSubdetId::GEM) {
936  GEMDetId did(id.rawId());
937  station = did.station();
938  } else if (id.subdetId() == MuonSubdetId::ME0) {
939  ME0DetId did(id.rawId());
940  station = did.station();
941  } else if (id.subdetId() == MuonSubdetId::RPC) {
942  RPCDetId rpcid(id.rawId());
943  station = rpcid.station();
944  }
945  if (station == theSkipStation)
946  continue;
947  }
948  results.push_back(*it);
949  }
950  return results;
951 }

References MuonSubdetId::CSC, MuonSubdetId::DT, MuonSubdetId::GEM, hfClusterShapes_cfi::hits, MuonSubdetId::ME0, DetId::Muon, PXB, TrackerTopology::pxbLayer(), PXF, TrackerTopology::pxfDisk(), bookConverter::results, MuonSubdetId::RPC, DTChamberId::station(), ME0DetId::station(), relativeConstraints::station, RPCDetId::station(), CSCDetId::station(), GEMDetId::station(), TEC, TrackerTopology::tecWheel(), theSkipStation, theTrackerSkipSection, theTrackerSkipSystem, TIB, TrackerTopology::tibLayer(), TID, TrackerTopology::tidWheel(), TOB, TrackerTopology::tobLayer(), DetId::Tracker, and makeMuonMisalignmentScenario::wheel.

Referenced by refit().

◆ printHits()

void GlobalMuonRefitter::printHits ( const ConstRecHitContainer hits) const
protected

print all RecHits of a trajectory

Definition at line 672 of file GlobalMuonRefitter.cc.

672  {
673  LogTrace(theCategory) << "Used RecHits: " << hits.size();
674  for (ConstRecHitContainer::const_iterator ir = hits.begin(); ir != hits.end(); ir++) {
675  if (!(*ir)->isValid()) {
676  LogTrace(theCategory) << "invalid RecHit";
677  continue;
678  }
679 
680  const GlobalPoint& pos = (*ir)->globalPosition();
681 
682  LogTrace(theCategory) << "r = " << sqrt(pos.x() * pos.x() + pos.y() * pos.y()) << " z = " << pos.z()
683  << " dimension = " << (*ir)->dimension()
684  << " det = " << (*ir)->det()->geographicalId().det()
685  << " subdet = " << (*ir)->det()->subDetector()
686  << " raw id = " << (*ir)->det()->geographicalId().rawId();
687  }
688 }

References hfClusterShapes_cfi::hits, LogTrace, mathSSE::sqrt(), and theCategory.

Referenced by ntuplePrintersDiff.TrackingParticlePrinter::__call__(), ntuplePrintersDiff.SeedPrinter::diff(), ntuplePrintersDiff.TrackPrinter::diff(), ntuplePrintersDiff.TrackingParticlePrinter::diff(), ntuplePrintersDiff.SeedPrinter::printSeed(), ntuplePrintersDiff.TrackPrinter::printTrack(), and transform().

◆ refit() [1/2]

vector< Trajectory > GlobalMuonRefitter::refit ( const reco::Track globalTrack,
const int  theMuonHitsOption,
const TrackerTopology tTopo 
) const

build combined trajectory from sta Track and tracker RecHits

Definition at line 180 of file GlobalMuonRefitter.cc.

182  {
183  LogTrace(theCategory) << " *** GlobalMuonRefitter *** option " << theMuonHitsOption << endl;
184 
185  ConstRecHitContainer allRecHitsTemp; // all muon rechits temp
186 
187  reco::TransientTrack track(globalTrack, &*(theService->magneticField()), theService->trackingGeometry());
188 
189  auto tkbuilder = static_cast<TkTransientTrackingRecHitBuilder const*>(theTrackerRecHitBuilder);
190 
191  for (trackingRecHit_iterator hit = track.recHitsBegin(); hit != track.recHitsEnd(); ++hit)
192  if ((*hit)->isValid()) {
193  if ((*hit)->geographicalId().det() == DetId::Tracker)
194  allRecHitsTemp.push_back((**hit).cloneForFit(*tkbuilder->geometry()->idToDet((**hit).geographicalId())));
195  else if ((*hit)->geographicalId().det() == DetId::Muon) {
196  if ((*hit)->geographicalId().subdetId() == 3 && !theRPCInTheFit) {
197  LogTrace(theCategory) << "RPC Rec Hit discarged";
198  continue;
199  }
200  allRecHitsTemp.push_back(theMuonRecHitBuilder->build(&**hit));
201  }
202  }
203  vector<Trajectory> refitted = refit(globalTrack, track, allRecHitsTemp, theMuonHitsOption, tTopo);
204  return refitted;
205 }

References TransientTrackingRecHitBuilder::build(), cutBasedMuonId_MuonPOG_V0_cff::globalTrack, LogTrace, DetId::Muon, theCategory, theMuonHitsOption, theMuonRecHitBuilder, theRPCInTheFit, theService, theTrackerRecHitBuilder, HLT_FULL_cff::track, and DetId::Tracker.

Referenced by GlobalTrajectoryBuilderBase::build(), and GlobalTrackQualityProducer::produce().

◆ refit() [2/2]

vector< Trajectory > GlobalMuonRefitter::refit ( const reco::Track globalTrack,
const reco::TransientTrack  track,
const TransientTrackingRecHit::ConstRecHitContainer allRecHitsTemp,
const int  theMuonHitsOption,
const TrackerTopology tTopo 
) const

build combined trajectory from subset of sta Track and tracker RecHits

Definition at line 210 of file GlobalMuonRefitter.cc.

214  {
215  // MuonHitsOption: 0 - tracker only
216  // 1 - include all muon hits
217  // 2 - include only first muon hit(s)
218  // 3 - include only selected muon hits
219  // 4 - redo pattern recognition with dynamic truncation
220 
221  vector<int> stationHits(4, 0);
222  map<DetId, int> hitMap;
223 
224  ConstRecHitContainer allRecHits; // all muon rechits
225  ConstRecHitContainer fmsRecHits; // only first muon rechits
226  ConstRecHitContainer selectedRecHits; // selected muon rechits
227  ConstRecHitContainer DYTRecHits; // rec hits from dynamic truncation algorithm
228 
229  LogTrace(theCategory) << " *** GlobalMuonRefitter *** option " << theMuonHitsOption << endl;
230  LogTrace(theCategory) << " Track momentum before refit: " << globalTrack.pt() << endl;
231  LogTrace(theCategory) << " Hits size before : " << allRecHitsTemp.size() << endl;
232 
233  allRecHits = getRidOfSelectStationHits(allRecHitsTemp, tTopo);
234  // printHits(allRecHits);
235  LogTrace(theCategory) << " Hits size: " << allRecHits.size() << endl;
236 
237  vector<Trajectory> outputTraj;
238 
239  if ((theMuonHitsOption == 1) || (theMuonHitsOption == 3) || (theMuonHitsOption == 4)) {
240  // refit the full track with all muon hits
241  vector<Trajectory> globalTraj = transform(globalTrack, track, allRecHits);
242 
243  if (globalTraj.empty()) {
244  LogTrace(theCategory) << "No trajectory from the TrackTransformer!" << endl;
245  return vector<Trajectory>();
246  }
247 
248  LogTrace(theCategory) << " Initial trajectory state: "
249  << globalTraj.front().lastMeasurement().updatedState().freeState()->parameters() << endl;
250 
251  if (theMuonHitsOption == 1)
252  outputTraj.push_back(globalTraj.front());
253 
254  if (theMuonHitsOption == 3) {
255  checkMuonHits(globalTrack, allRecHits, hitMap);
256  selectedRecHits = selectMuonHits(globalTraj.front(), hitMap);
257  LogTrace(theCategory) << " Selected hits size: " << selectedRecHits.size() << endl;
258  outputTraj = transform(globalTrack, track, selectedRecHits);
259  }
260 
261  if (theMuonHitsOption == 4) {
262  //
263  // DYT 2.0
264  //
266  dytRefit.setProd(all4DSegments, CSCSegments);
267  dytRefit.setSelector(theDYTselector);
268  dytRefit.setThr(theDYTthrs);
269  dytRefit.setUpdateState(theDYTupdator);
270  dytRefit.setUseAPE(theDYTuseAPE);
271  if (theDYTParThrsMode) {
272  dytRefit.setParThrsMode(theDYTParThrsMode);
273  dytRefit.setThrsMap(theDYTthrsParameters);
274  dytRefit.setRecoP(globalTrack.p());
275  dytRefit.setRecoEta(globalTrack.eta());
276  }
277  DYTRecHits = dytRefit.filter(globalTraj.front());
278  dytInfo->CopyFrom(dytRefit.getDYTInfo());
279  if ((DYTRecHits.size() > 1) &&
280  (DYTRecHits.front()->globalPosition().mag() > DYTRecHits.back()->globalPosition().mag()))
281  stable_sort(DYTRecHits.begin(), DYTRecHits.end(), RecHitLessByDet(alongMomentum));
282  outputTraj = transform(globalTrack, track, DYTRecHits);
283  }
284 
285  } else if (theMuonHitsOption == 2) {
286  getFirstHits(globalTrack, allRecHits, fmsRecHits);
287  outputTraj = transform(globalTrack, track, fmsRecHits);
288  }
289 
290  if (!outputTraj.empty()) {
291  LogTrace(theCategory) << "Refitted pt: "
292  << outputTraj.front().firstMeasurement().updatedState().globalParameters().momentum().perp()
293  << endl;
294  return outputTraj;
295  } else {
296  LogTrace(theCategory) << "No refitted Tracks... " << endl;
297  return vector<Trajectory>();
298  }
299 }

References all4DSegments, alongMomentum, checkMuonHits(), reco::DYTInfo::CopyFrom(), CSCSegments, dytInfo, DynamicTruncation::filter(), DynamicTruncation::getDYTInfo(), getFirstHits(), getRidOfSelectStationHits(), cutBasedMuonId_MuonPOG_V0_cff::globalTrack, LogTrace, selectMuonHits(), DynamicTruncation::setParThrsMode(), DynamicTruncation::setProd(), DynamicTruncation::setRecoEta(), DynamicTruncation::setRecoP(), DynamicTruncation::setSelector(), DynamicTruncation::setThr(), DynamicTruncation::setThrsMap(), DynamicTruncation::setUpdateState(), DynamicTruncation::setUseAPE(), theCategory, theDYTParThrsMode, theDYTselector, theDYTthrs, theDYTthrsParameters, theDYTupdator, theDYTuseAPE, theEvent, theMuonHitsOption, theService, HLT_FULL_cff::track, and transform().

◆ selectMuonHits()

GlobalMuonRefitter::ConstRecHitContainer GlobalMuonRefitter::selectMuonHits ( const Trajectory traj,
const std::map< DetId, int > &  hitMap 
) const
protected

select muon hits compatible with trajectory; check hits in chambers with showers

Definition at line 587 of file GlobalMuonRefitter.cc.

588  {
589  ConstRecHitContainer muonRecHits;
590  const double globalChi2Cut = 200.0;
591 
592  vector<TrajectoryMeasurement> muonMeasurements = traj.measurements();
593 
594  // loop through all muon hits and skip hits with bad chi2 in chambers with high occupancy
595  for (std::vector<TrajectoryMeasurement>::const_iterator im = muonMeasurements.begin(); im != muonMeasurements.end();
596  im++) {
597  if (!(*im).recHit()->isValid())
598  continue;
599  if ((*im).recHit()->det()->geographicalId().det() != DetId::Muon) {
600  // if ( ( chi2ndf < globalChi2Cut ) )
601  muonRecHits.push_back((*im).recHit());
602  continue;
603  }
604  const MuonTransientTrackingRecHit* immrh = dynamic_cast<const MuonTransientTrackingRecHit*>((*im).recHit().get());
605 
606  DetId id = immrh->geographicalId();
607  DetId chamberId;
608  int threshold = 0;
609  double chi2Cut = 0.0;
610 
611  // get station of hit if it is in DT
612  if ((*immrh).isDT()) {
613  DTChamberId did(id.rawId());
614  chamberId = did;
617  }
618  // get station of hit if it is in CSC
619  else if ((*immrh).isCSC()) {
620  CSCDetId did(id.rawId());
621  chamberId = did.chamberId();
624  }
625  // get station of hit if it is in GEM
626  else if ((*immrh).isGEM()) {
627  GEMDetId did(id.rawId());
628  chamberId = did.chamberId();
631  }
632  // get station of hit if it is in ME0
633  else if ((*immrh).isME0()) {
634  ME0DetId did(id.rawId());
635  chamberId = did.chamberId();
638  }
639  // get station of hit if it is in RPC
640  else if ((*immrh).isRPC()) {
641  RPCDetId rpcid(id.rawId());
642  chamberId = rpcid;
645  } else
646  continue;
647 
648  double chi2ndf = (*im).estimate() / (*im).recHit()->dimension();
649 
650  bool keep = true;
651  map<DetId, int>::const_iterator imap = hitMap.find(chamberId);
652  if (imap != hitMap.end())
653  if (imap->second > threshold)
654  keep = false;
655 
656  if ((keep || (chi2ndf < chi2Cut)) && (chi2ndf < globalChi2Cut)) {
657  muonRecHits.push_back((*im).recHit());
658  } else {
659  LogTrace(theCategory) << "Skip hit: " << id.rawId() << " chi2=" << chi2ndf << " ( threshold: " << chi2Cut
660  << ") Det: " << imap->second << endl;
661  }
662  }
663 
664  // check order of rechits
665  reverse(muonRecHits.begin(), muonRecHits.end());
666  return muonRecHits;
667 }

References CSCDetId::chamberId(), ME0DetId::chamberId(), GEMDetId::chamberId(), ZMuMuCategoriesSequences_cff::chi2Cut, TrackingRecHit::geographicalId(), keep, LogTrace, Trajectory::measurements(), DetId::Muon, groupFilesInBlocks::reverse, theCategory, theCSCChi2Cut, theDTChi2Cut, theGEMChi2Cut, theHitThreshold, theME0Chi2Cut, theRPCChi2Cut, and remoteMonitoring_LED_IterMethod_cfg::threshold.

Referenced by refit().

◆ service()

const MuonServiceProxy* GlobalMuonRefitter::service ( ) const
inlineprotected

Definition at line 121 of file GlobalMuonRefitter.h.

121 { return theService; }

References theService.

◆ setEvent()

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

◆ setServices()

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

set the services needed by the TrackTransformer

Definition at line 163 of file GlobalMuonRefitter.cc.

163  {
164  theFitter = setup.getData(theFitterToken).clone();
165 
166  // Transient Rechit Builders
167  unsigned long long newCacheId_TRH = setup.get<TransientRecHitRecord>().cacheIdentifier();
168  if (newCacheId_TRH != theCacheId_TRH) {
169  LogDebug(theCategory) << "TransientRecHitRecord changed!";
172  hitCloner = static_cast<TkTransientTrackingRecHitBuilder const*>(theTrackerRecHitBuilder)->cloner();
173  }
174  theFitter->setHitCloner(&hitCloner);
175 }

References hitCloner, LogDebug, singleTopDQM_cfi::setup, theCacheId_TRH, theCategory, theFitter, theFitterToken, theMuonRecHitBuilder, theMuonRecHitBuilderToken, theTrackerRecHitBuilder, and theTrackerRecHitBuilderToken.

Referenced by GlobalTrackQualityProducer::produce(), and GlobalTrajectoryBuilderBase::setEvent().

◆ transform()

vector< Trajectory > GlobalMuonRefitter::transform ( const reco::Track newTrack,
const reco::TransientTrack  track,
const TransientTrackingRecHit::ConstRecHitContainer recHitsForReFit 
) const

refit the track with a new set of RecHits

Definition at line 725 of file GlobalMuonRefitter.cc.

728  {
729  TransientTrackingRecHit::ConstRecHitContainer recHitsForReFit = urecHitsForReFit;
730  LogTrace(theCategory) << "GlobalMuonRefitter::transform: " << recHitsForReFit.size() << " hits:";
731  printHits(recHitsForReFit);
732 
733  if (recHitsForReFit.size() < 2)
734  return vector<Trajectory>();
735 
736  // Check the order of the rechits
737  RefitDirection recHitsOrder = checkRecHitsOrdering(recHitsForReFit);
738 
739  LogTrace(theCategory) << "checkRecHitsOrdering() returned " << recHitsOrder << ", theRefitDirection is "
740  << theRefitDirection << " (insideOut == " << insideOut << ", outsideIn == " << outsideIn << ")";
741 
742  // Reverse the order in the case of inconsistency between the fit direction and the rechit order
743  if (theRefitDirection != recHitsOrder)
744  reverse(recHitsForReFit.begin(), recHitsForReFit.end());
745 
746  // Even though we checked the rechits' ordering above, we may have
747  // already flipped them elsewhere (getFirstHits() is such a
748  // culprit). Use the global positions of the states and the desired
749  // refit direction to find the starting TSOS.
750  TrajectoryStateOnSurface firstTSOS, lastTSOS;
751  unsigned int innerId; //UNUSED: outerId;
752  bool order_swapped = track.outermostMeasurementState().globalPosition().mag() <
753  track.innermostMeasurementState().globalPosition().mag();
754  bool inner_is_first;
755  LogTrace(theCategory) << "order swapped? " << order_swapped;
756 
757  // Fill the starting state, depending on the ordering above.
758  if ((theRefitDirection == insideOut && !order_swapped) || (theRefitDirection == outsideIn && order_swapped)) {
759  innerId = newTrack.innerDetId();
760  //UNUSED: outerId = newTrack.outerDetId();
761  firstTSOS = track.innermostMeasurementState();
762  lastTSOS = track.outermostMeasurementState();
763  inner_is_first = true;
764  } else {
765  innerId = newTrack.outerDetId();
766  //UNUSED: outerId = newTrack.innerDetId();
767  firstTSOS = track.outermostMeasurementState();
768  lastTSOS = track.innermostMeasurementState();
769  inner_is_first = false;
770  }
771 
772  LogTrace(theCategory) << "firstTSOS: inner_is_first? " << inner_is_first << " globalPosition is "
773  << firstTSOS.globalPosition() << " innerId is " << innerId;
774 
775  if (!firstTSOS.isValid()) {
776  LogWarning(theCategory) << "Error wrong initial state!" << endl;
777  return vector<Trajectory>();
778  }
779 
780  firstTSOS.rescaleError(theRescaleErrorFactor);
781 
782  // This is the only way to get a TrajectorySeed with settable propagation direction
783  PTrajectoryStateOnDet garbage1;
785 
786  // These lines cause the code to ignore completely what was set
787  // above, and force propDir for tracks from collisions!
788  // if(propDir == alongMomentum && theRefitDirection == outsideIn) propDir=oppositeToMomentum;
789  // if(propDir == oppositeToMomentum && theRefitDirection == insideOut) propDir=alongMomentum;
790 
791  const TrajectoryStateOnSurface& tsosForDir = inner_is_first ? lastTSOS : firstTSOS;
792  PropagationDirection propDir =
793  (tsosForDir.globalPosition().basicVector().dot(tsosForDir.globalMomentum().basicVector()) > 0)
794  ? alongMomentum
796  LogTrace(theCategory) << "propDir based on firstTSOS x dot p is " << propDir << " (alongMomentum == " << alongMomentum
797  << ", oppositeToMomentum == " << oppositeToMomentum << ")";
798 
799  // Additional propagation diretcion determination logic for cosmic muons
800  if (theCosmicFlag) {
801  PropagationDirection propDir_first =
802  (firstTSOS.globalPosition().basicVector().dot(firstTSOS.globalMomentum().basicVector()) > 0)
803  ? alongMomentum
805  PropagationDirection propDir_last =
806  (lastTSOS.globalPosition().basicVector().dot(lastTSOS.globalMomentum().basicVector()) > 0) ? alongMomentum
808  LogTrace(theCategory) << "propDir_first " << propDir_first << ", propdir_last " << propDir_last << " : they "
809  << (propDir_first == propDir_last ? "agree" : "disagree");
810 
811  int y_count = 0;
812  for (TransientTrackingRecHit::ConstRecHitContainer::const_iterator it = recHitsForReFit.begin();
813  it != recHitsForReFit.end();
814  ++it) {
815  if ((*it)->globalPosition().y() > 0)
816  ++y_count;
817  else
818  --y_count;
819  }
820 
821  PropagationDirection propDir_ycount = alongMomentum;
822  if (y_count > 0) {
824  propDir_ycount = oppositeToMomentum;
825  else if (theRefitDirection == outsideIn)
826  propDir_ycount = alongMomentum;
827  } else {
829  propDir_ycount = alongMomentum;
830  else if (theRefitDirection == outsideIn)
831  propDir_ycount = oppositeToMomentum;
832  }
833 
834  LogTrace(theCategory) << "y_count = " << y_count << "; based on geometrically-outermost TSOS, propDir is "
835  << propDir << ": " << (propDir == propDir_ycount ? "agrees" : "disagrees")
836  << " with ycount determination";
837 
838  if (propDir_first != propDir_last) {
839  LogTrace(theCategory) << "since first/last disagreed, using y_count propDir";
840  propDir = propDir_ycount;
841  }
842  }
843 
844  TrajectorySeed seed(garbage1, garbage2, propDir);
845 
846  if (recHitsForReFit.front()->geographicalId() != DetId(innerId)) {
847  LogDebug(theCategory) << "Propagation occured" << endl;
848  LogTrace(theCategory) << "propagating firstTSOS at " << firstTSOS.globalPosition()
849  << " to first rechit with surface pos "
850  << recHitsForReFit.front()->det()->surface().toGlobal(LocalPoint(0, 0, 0));
851  firstTSOS =
852  theService->propagator(thePropagatorName)->propagate(firstTSOS, recHitsForReFit.front()->det()->surface());
853  if (!firstTSOS.isValid()) {
854  LogDebug(theCategory) << "Propagation error!" << endl;
855  return vector<Trajectory>();
856  }
857  }
858 
859  LogDebug(theCategory) << " GlobalMuonRefitter : theFitter " << propDir << endl;
860  LogDebug(theCategory) << " First TSOS: " << firstTSOS.globalPosition()
861  << " p=" << firstTSOS.globalMomentum() << " = " << firstTSOS.globalMomentum().mag() << endl;
862 
863  LogDebug(theCategory) << " Starting seed: "
864  << " nHits= " << seed.nHits() << " tsos: " << seed.startingState().parameters().position()
865  << " p=" << seed.startingState().parameters().momentum() << endl;
866 
867  LogDebug(theCategory) << " RecHits: " << recHitsForReFit.size() << endl;
868 
869  vector<Trajectory> trajectories = theFitter->fit(seed, recHitsForReFit, firstTSOS);
870 
871  if (trajectories.empty()) {
872  LogDebug(theCategory) << "No Track refitted!" << endl;
873  return vector<Trajectory>();
874  }
875  return trajectories;
876 }

References alongMomentum, PV3DBase< T, PVType, FrameType >::basicVector(), checkRecHitsOrdering(), Basic3DVector< T >::dot(), TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), reco::Track::innerDetId(), insideOut, LogDebug, LogTrace, oppositeToMomentum, reco::Track::outerDetId(), outsideIn, printHits(), groupFilesInBlocks::reverse, fileCollector::seed, theCategory, theCosmicFlag, theFitter, thePropagatorName, theRefitDirection, theRescaleErrorFactor, theService, HLT_FULL_cff::track, and FastTrackerRecHitMaskProducer_cfi::trajectories.

Referenced by refit().

Member Data Documentation

◆ all4DSegments

edm::Handle<DTRecSegment4DCollection> GlobalMuonRefitter::all4DSegments
private

Definition at line 190 of file GlobalMuonRefitter.h.

Referenced by refit(), and setEvent().

◆ all4DSegmentsToken

edm::EDGetTokenT<DTRecSegment4DCollection> GlobalMuonRefitter::all4DSegmentsToken
private

Definition at line 188 of file GlobalMuonRefitter.h.

Referenced by GlobalMuonRefitter(), and setEvent().

◆ CSCSegments

edm::Handle<CSCSegmentCollection> GlobalMuonRefitter::CSCSegments
private

Definition at line 189 of file GlobalMuonRefitter.h.

Referenced by refit(), and setEvent().

◆ CSCSegmentsToken

edm::EDGetTokenT<CSCSegmentCollection> GlobalMuonRefitter::CSCSegmentsToken
private

Definition at line 187 of file GlobalMuonRefitter.h.

Referenced by GlobalMuonRefitter(), and setEvent().

◆ dytInfo

reco::DYTInfo* GlobalMuonRefitter::dytInfo
private

Definition at line 172 of file GlobalMuonRefitter.h.

Referenced by getDYTInfo(), GlobalMuonRefitter(), refit(), and ~GlobalMuonRefitter().

◆ hitCloner

TkClonerImpl GlobalMuonRefitter::hitCloner
private

Definition at line 179 of file GlobalMuonRefitter.h.

Referenced by setServices().

◆ theCacheId_TRH

unsigned long long GlobalMuonRefitter::theCacheId_TRH
private

Definition at line 156 of file GlobalMuonRefitter.h.

Referenced by GlobalMuonRefitter(), and setServices().

◆ theCategory

std::string GlobalMuonRefitter::theCategory
protected

◆ theCosmicFlag

bool GlobalMuonRefitter::theCosmicFlag
private

Definition at line 137 of file GlobalMuonRefitter.h.

Referenced by transform().

◆ theCSCChi2Cut

float GlobalMuonRefitter::theCSCChi2Cut
private

Definition at line 133 of file GlobalMuonRefitter.h.

Referenced by GlobalMuonRefitter(), and selectMuonHits().

◆ theCSCRecHitLabel

edm::InputTag GlobalMuonRefitter::theCSCRecHitLabel
private

Definition at line 140 of file GlobalMuonRefitter.h.

Referenced by GlobalMuonRefitter().

◆ theCSCRecHits

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

Definition at line 144 of file GlobalMuonRefitter.h.

Referenced by checkMuonHits(), and setEvent().

◆ theCSCRecHitToken

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

Definition at line 148 of file GlobalMuonRefitter.h.

Referenced by GlobalMuonRefitter(), and setEvent().

◆ theDTChi2Cut

float GlobalMuonRefitter::theDTChi2Cut
private

Definition at line 132 of file GlobalMuonRefitter.h.

Referenced by GlobalMuonRefitter(), and selectMuonHits().

◆ theDTRecHitLabel

edm::InputTag GlobalMuonRefitter::theDTRecHitLabel
private

Definition at line 139 of file GlobalMuonRefitter.h.

Referenced by GlobalMuonRefitter().

◆ theDTRecHits

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

Definition at line 143 of file GlobalMuonRefitter.h.

Referenced by checkMuonHits(), and setEvent().

◆ theDTRecHitToken

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

Definition at line 147 of file GlobalMuonRefitter.h.

Referenced by GlobalMuonRefitter(), and setEvent().

◆ theDYTParThrsMode

bool GlobalMuonRefitter::theDYTParThrsMode
private

Definition at line 170 of file GlobalMuonRefitter.h.

Referenced by GlobalMuonRefitter(), and refit().

◆ theDYTselector

int GlobalMuonRefitter::theDYTselector
private

Definition at line 167 of file GlobalMuonRefitter.h.

Referenced by GlobalMuonRefitter(), and refit().

◆ theDYTthrs

std::vector<int> GlobalMuonRefitter::theDYTthrs
private

Definition at line 166 of file GlobalMuonRefitter.h.

Referenced by GlobalMuonRefitter(), and refit().

◆ theDYTthrsParameters

edm::ParameterSet GlobalMuonRefitter::theDYTthrsParameters
private

Definition at line 171 of file GlobalMuonRefitter.h.

Referenced by GlobalMuonRefitter(), and refit().

◆ theDYTupdator

bool GlobalMuonRefitter::theDYTupdator
private

Definition at line 168 of file GlobalMuonRefitter.h.

Referenced by GlobalMuonRefitter(), and refit().

◆ theDYTuseAPE

bool GlobalMuonRefitter::theDYTuseAPE
private

Definition at line 169 of file GlobalMuonRefitter.h.

Referenced by GlobalMuonRefitter(), and refit().

◆ theEvent

const edm::Event* GlobalMuonRefitter::theEvent
private

Definition at line 185 of file GlobalMuonRefitter.h.

Referenced by refit(), and setEvent().

◆ theFitter

std::unique_ptr<TrajectoryFitter> GlobalMuonRefitter::theFitter
private

Definition at line 175 of file GlobalMuonRefitter.h.

Referenced by setServices(), and transform().

◆ theFitterToken

edm::ESGetToken<TrajectoryFitter, TrajectoryFitterRecord> GlobalMuonRefitter::theFitterToken
private

Definition at line 174 of file GlobalMuonRefitter.h.

Referenced by GlobalMuonRefitter(), and setServices().

◆ theGEMChi2Cut

float GlobalMuonRefitter::theGEMChi2Cut
private

Definition at line 135 of file GlobalMuonRefitter.h.

Referenced by GlobalMuonRefitter(), and selectMuonHits().

◆ theGEMRecHitLabel

edm::InputTag GlobalMuonRefitter::theGEMRecHitLabel
private

Definition at line 141 of file GlobalMuonRefitter.h.

Referenced by GlobalMuonRefitter().

◆ theGEMRecHits

edm::Handle<GEMRecHitCollection> GlobalMuonRefitter::theGEMRecHits
private

Definition at line 145 of file GlobalMuonRefitter.h.

Referenced by checkMuonHits(), and setEvent().

◆ theGEMRecHitToken

edm::EDGetTokenT<GEMRecHitCollection> GlobalMuonRefitter::theGEMRecHitToken
private

Definition at line 149 of file GlobalMuonRefitter.h.

Referenced by GlobalMuonRefitter(), and setEvent().

◆ theHitThreshold

int GlobalMuonRefitter::theHitThreshold
private

Definition at line 131 of file GlobalMuonRefitter.h.

Referenced by GlobalMuonRefitter(), and selectMuonHits().

◆ theME0Chi2Cut

float GlobalMuonRefitter::theME0Chi2Cut
private

Definition at line 136 of file GlobalMuonRefitter.h.

Referenced by GlobalMuonRefitter(), and selectMuonHits().

◆ theME0RecHitLabel

edm::InputTag GlobalMuonRefitter::theME0RecHitLabel
private

Definition at line 142 of file GlobalMuonRefitter.h.

Referenced by GlobalMuonRefitter().

◆ theME0RecHits

edm::Handle<ME0SegmentCollection> GlobalMuonRefitter::theME0RecHits
private

Definition at line 146 of file GlobalMuonRefitter.h.

Referenced by checkMuonHits(), and setEvent().

◆ theME0RecHitToken

edm::EDGetTokenT<ME0SegmentCollection> GlobalMuonRefitter::theME0RecHitToken
private

Definition at line 150 of file GlobalMuonRefitter.h.

Referenced by GlobalMuonRefitter(), and setEvent().

◆ theMuonHitsOption

int GlobalMuonRefitter::theMuonHitsOption
private

Definition at line 129 of file GlobalMuonRefitter.h.

Referenced by refit().

◆ theMuonRecHitBuilder

const TransientTrackingRecHitBuilder* GlobalMuonRefitter::theMuonRecHitBuilder
private

Definition at line 182 of file GlobalMuonRefitter.h.

Referenced by refit(), and setServices().

◆ theMuonRecHitBuilderToken

edm::ESGetToken<TransientTrackingRecHitBuilder, TransientRecHitRecord> GlobalMuonRefitter::theMuonRecHitBuilderToken
private

Definition at line 181 of file GlobalMuonRefitter.h.

Referenced by GlobalMuonRefitter(), and setServices().

◆ theProbCut

float GlobalMuonRefitter::theProbCut
private

Definition at line 130 of file GlobalMuonRefitter.h.

◆ thePropagatorName

std::string GlobalMuonRefitter::thePropagatorName
private

Definition at line 158 of file GlobalMuonRefitter.h.

Referenced by GlobalMuonRefitter(), and transform().

◆ thePtCut

float GlobalMuonRefitter::thePtCut
protected

Definition at line 126 of file GlobalMuonRefitter.h.

◆ theRefitDirection

RefitDirection GlobalMuonRefitter::theRefitDirection
private

Definition at line 164 of file GlobalMuonRefitter.h.

Referenced by GlobalMuonRefitter(), and transform().

◆ theRescaleErrorFactor

double GlobalMuonRefitter::theRescaleErrorFactor
private

Definition at line 162 of file GlobalMuonRefitter.h.

Referenced by GlobalMuonRefitter(), and transform().

◆ theRPCChi2Cut

float GlobalMuonRefitter::theRPCChi2Cut
private

Definition at line 134 of file GlobalMuonRefitter.h.

Referenced by GlobalMuonRefitter(), and selectMuonHits().

◆ theRPCInTheFit

bool GlobalMuonRefitter::theRPCInTheFit
private

Definition at line 160 of file GlobalMuonRefitter.h.

Referenced by GlobalMuonRefitter(), and refit().

◆ theService

const MuonServiceProxy* GlobalMuonRefitter::theService
private

Definition at line 184 of file GlobalMuonRefitter.h.

Referenced by refit(), service(), and transform().

◆ theSkipStation

int GlobalMuonRefitter::theSkipStation
private

Definition at line 152 of file GlobalMuonRefitter.h.

Referenced by getRidOfSelectStationHits(), and GlobalMuonRefitter().

◆ theTkTrajsAvailableFlag

bool GlobalMuonRefitter::theTkTrajsAvailableFlag
protected

Definition at line 125 of file GlobalMuonRefitter.h.

◆ theTrackerRecHitBuilder

const TransientTrackingRecHitBuilder* GlobalMuonRefitter::theTrackerRecHitBuilder
private

Definition at line 178 of file GlobalMuonRefitter.h.

Referenced by refit(), and setServices().

◆ theTrackerRecHitBuilderToken

edm::ESGetToken<TransientTrackingRecHitBuilder, TransientRecHitRecord> GlobalMuonRefitter::theTrackerRecHitBuilderToken
private

Definition at line 177 of file GlobalMuonRefitter.h.

Referenced by GlobalMuonRefitter(), and setServices().

◆ theTrackerSkipSection

int GlobalMuonRefitter::theTrackerSkipSection
private

Definition at line 154 of file GlobalMuonRefitter.h.

Referenced by getRidOfSelectStationHits(), and GlobalMuonRefitter().

◆ theTrackerSkipSystem

int GlobalMuonRefitter::theTrackerSkipSystem
private

Definition at line 153 of file GlobalMuonRefitter.h.

Referenced by getRidOfSelectStationHits(), and GlobalMuonRefitter().

GEMRecHitCollection
MuonSubdetId::GEM
static constexpr int GEM
Definition: MuonSubdetId.h:14
service
Definition: service.py:1
GlobalMuonRefitter::theRescaleErrorFactor
double theRescaleErrorFactor
Definition: GlobalMuonRefitter.h:162
GlobalMuonRefitter::transform
std::vector< Trajectory > transform(const reco::Track &newTrack, const reco::TransientTrack track, const TransientTrackingRecHit::ConstRecHitContainer &recHitsForReFit) const
refit the track with a new set of RecHits
Definition: GlobalMuonRefitter.cc:725
cutBasedMuonId_MuonPOG_V0_cff.globalTrack
globalTrack
Definition: cutBasedMuonId_MuonPOG_V0_cff.py:135
MuonSubdetId::CSC
static constexpr int CSC
Definition: MuonSubdetId.h:12
reco::Track::outerDetId
unsigned int outerDetId() const
DetId of the detector on which surface the outermost state is located.
Definition: Track.h:79
ZMuMuCategoriesSequences_cff.chi2Cut
chi2Cut
Definition: ZMuMuCategoriesSequences_cff.py:141
CSCRecHit2DCollection
mps_fire.i
i
Definition: mps_fire.py:428
edm::ESInputTag
Definition: ESInputTag.h:87
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11779
GlobalMuonRefitter::theME0Chi2Cut
float theME0Chi2Cut
Definition: GlobalMuonRefitter.h:136
RPCDetId::station
int station() const
Definition: RPCDetId.h:78
GlobalMuonRefitter::CSCSegments
edm::Handle< CSCSegmentCollection > CSCSegments
Definition: GlobalMuonRefitter.h:189
GlobalMuonRefitter::theME0RecHitToken
edm::EDGetTokenT< ME0SegmentCollection > theME0RecHitToken
Definition: GlobalMuonRefitter.h:150
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
GlobalMuonRefitter::theCategory
std::string theCategory
Definition: GlobalMuonRefitter.h:124
MuonRecHitContainer
MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer
Definition: CosmicMuonSmoother.h:31
GlobalMuonRefitter::checkMuonHits
void checkMuonHits(const reco::Track &, ConstRecHitContainer &, std::map< DetId, int > &) const
check muon RecHits, calculate chamber occupancy and select hits to be used in the final fit
Definition: GlobalMuonRefitter.cc:304
GlobalMuonRefitter::theGEMRecHitToken
edm::EDGetTokenT< GEMRecHitCollection > theGEMRecHitToken
Definition: GlobalMuonRefitter.h:149
GlobalMuonRefitter::theFitterToken
edm::ESGetToken< TrajectoryFitter, TrajectoryFitterRecord > theFitterToken
Definition: GlobalMuonRefitter.h:174
relativeConstraints.station
station
Definition: relativeConstraints.py:67
GlobalMuonRefitter::theGEMRecHits
edm::Handle< GEMRecHitCollection > theGEMRecHits
Definition: GlobalMuonRefitter.h:145
globals_cff.id1
id1
Definition: globals_cff.py:33
RPCDetId
Definition: RPCDetId.h:16
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition: TrajectoryStateOnSurface.h:65
GlobalMuonRefitter::theDTRecHits
edm::Handle< DTRecHitCollection > theDTRecHits
Definition: GlobalMuonRefitter.h:143
pos
Definition: PixelAliasList.h:18
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89353
TransientRecHitRecord
Definition: TransientRecHitRecord.h:14
GlobalMuonRefitter::theMuonRecHitBuilderToken
edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > theMuonRecHitBuilderToken
Definition: GlobalMuonRefitter.h:181
GlobalMuonRefitter::theRPCChi2Cut
float theRPCChi2Cut
Definition: GlobalMuonRefitter.h:134
oppositeToMomentum
Definition: PropagationDirection.h:4
bookConverter.results
results
Definition: bookConverter.py:144
FastTrackerRecHitMaskProducer_cfi.trajectories
trajectories
Definition: FastTrackerRecHitMaskProducer_cfi.py:7
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
CSCSegmentCollection
edm::ParameterSet::existsAs
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:171
MuonTransientTrackingRecHit
Definition: MuonTransientTrackingRecHit.h:19
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
align::LocalPoint
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
TransientTrackingRecHitBuilder::build
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
GlobalMuonRefitter::theDYTupdator
bool theDYTupdator
Definition: GlobalMuonRefitter.h:168
edm::ConsumesCollector::esConsumes
auto esConsumes()
Definition: ConsumesCollector.h:97
GlobalMuonRefitter::getFirstHits
void getFirstHits(const reco::Track &, ConstRecHitContainer &, ConstRecHitContainer &) const
get the RecHits in the tracker and the first muon chamber with hits
Definition: GlobalMuonRefitter.cc:527
GlobalMuonRefitter::theDYTthrs
std::vector< int > theDYTthrs
Definition: GlobalMuonRefitter.h:166
GlobalMuonRefitter::theDYTParThrsMode
bool theDYTParThrsMode
Definition: GlobalMuonRefitter.h:170
dqmdumpme.first
first
Definition: dqmdumpme.py:55
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
GlobalMuonRefitter::getRidOfSelectStationHits
ConstRecHitContainer getRidOfSelectStationHits(const ConstRecHitContainer &hits, const TrackerTopology *tTopo) const
Definition: GlobalMuonRefitter.cc:881
python.cmstools.all
def all(container)
workaround iterator generators for ROOT classes
Definition: cmstools.py:26
TrackingRecHit::geographicalId
DetId geographicalId() const
Definition: TrackingRecHit.h:120
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
groupFilesInBlocks.reverse
reverse
Definition: groupFilesInBlocks.py:131
TrackerTopology::tidWheel
unsigned int tidWheel(const DetId &id) const
Definition: TrackerTopology.h:201
TrackerTopology::pxbLayer
unsigned int pxbLayer(const DetId &id) const
Definition: TrackerTopology.h:144
fileCollector.seed
seed
Definition: fileCollector.py:127
GlobalMuonRefitter::PXF
Definition: GlobalMuonRefitter.h:66
DetId
Definition: DetId.h:17
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
reco::DYTInfo::CopyFrom
void CopyFrom(const DYTInfo &)
copy from another DYTInfo
Definition: DYTInfo.cc:14
reco::DYTInfo
Definition: DYTInfo.h:11
DTRecHitCollection
GlobalMuonRefitter::theDYTselector
int theDYTselector
Definition: GlobalMuonRefitter.h:167
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
GlobalMuonRefitter::theFitter
std::unique_ptr< TrajectoryFitter > theFitter
Definition: GlobalMuonRefitter.h:175
GlobalMuonRefitter::theTrackerRecHitBuilderToken
edm::ESGetToken< TransientTrackingRecHitBuilder, TransientRecHitRecord > theTrackerRecHitBuilderToken
Definition: GlobalMuonRefitter.h:177
Basic3DVector::dot
T dot(const Basic3DVector &rh) const
Scalar product, or "dot" product, with a vector of same type.
Definition: extBasic3DVector.h:189
GlobalMuonRefitter::theCSCRecHitToken
edm::EDGetTokenT< CSCRecHit2DCollection > theCSCRecHitToken
Definition: GlobalMuonRefitter.h:148
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
MuonSubdetId::DT
static constexpr int DT
Definition: MuonSubdetId.h:11
Point3DBase< float, GlobalTag >
DTRecSegment4DCollection
GlobalMuonRefitter::theTrackerSkipSection
int theTrackerSkipSection
Definition: GlobalMuonRefitter.h:154
DTLayerId
Definition: DTLayerId.h:12
edm::OwnVector::const_iterator
Definition: OwnVector.h:41
GlobalMuonRefitter::theCSCRecHitLabel
edm::InputTag theCSCRecHitLabel
Definition: GlobalMuonRefitter.h:140
GlobalMuonRefitter::theMuonRecHitBuilder
const TransientTrackingRecHitBuilder * theMuonRecHitBuilder
Definition: GlobalMuonRefitter.h:182
GlobalMuonRefitter::theDTChi2Cut
float theDTChi2Cut
Definition: GlobalMuonRefitter.h:132
GlobalMuonRefitter::PXB
Definition: GlobalMuonRefitter.h:66
FastTrackerRecHitMaskProducer_cfi.recHits
recHits
Definition: FastTrackerRecHitMaskProducer_cfi.py:8
GlobalMuonRefitter::checkRecHitsOrdering
RefitDirection checkRecHitsOrdering(const ConstRecHitContainer &) const
Definition: GlobalMuonRefitter.cc:693
GlobalMuonRefitter::TOB
Definition: GlobalMuonRefitter.h:66
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
edm::ParameterSet
Definition: ParameterSet.h:47
GlobalMuonRefitter::undetermined
Definition: GlobalMuonRefitter.h:105
DetId::Tracker
Definition: DetId.h:25
HLT_FULL_cff.coneSize
coneSize
Definition: HLT_FULL_cff.py:50911
GlobalMuonRefitter::all4DSegmentsToken
edm::EDGetTokenT< DTRecSegment4DCollection > all4DSegmentsToken
Definition: GlobalMuonRefitter.h:188
GlobalMuonRefitter::theGEMRecHitLabel
edm::InputTag theGEMRecHitLabel
Definition: GlobalMuonRefitter.h:141
TrackingRecHit::ConstRecHitContainer
std::vector< ConstRecHitPointer > ConstRecHitContainer
Definition: TrackingRecHit.h:32
GlobalMuonRefitter::theTrackerRecHitBuilder
const TransientTrackingRecHitBuilder * theTrackerRecHitBuilder
Definition: GlobalMuonRefitter.h:178
GlobalMuonRefitter::theSkipStation
int theSkipStation
Definition: GlobalMuonRefitter.h:152
GEMDetId
Definition: GEMDetId.h:18
edm::RangeMap::const_iterator
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:43
GlobalMuonRefitter::theGEMChi2Cut
float theGEMChi2Cut
Definition: GlobalMuonRefitter.h:135
GlobalMuonRefitter::outsideIn
Definition: GlobalMuonRefitter.h:105
CSCDetId
Definition: CSCDetId.h:26
GlobalMuonRefitter::theDYTthrsParameters
edm::ParameterSet theDYTthrsParameters
Definition: GlobalMuonRefitter.h:171
edmPickEvents.event
event
Definition: edmPickEvents.py:273
GlobalMuonRefitter::theService
const MuonServiceProxy * theService
Definition: GlobalMuonRefitter.h:184
GlobalMuonRefitter::theCosmicFlag
bool theCosmicFlag
Definition: GlobalMuonRefitter.h:137
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
GlobalMuonRefitter::TEC
Definition: GlobalMuonRefitter.h:66
GlobalMuonRefitter::theRefitDirection
RefitDirection theRefitDirection
Definition: GlobalMuonRefitter.h:164
RefitDirection
Definition: RefitDirection.h:13
ME0DetId::station
int station() const
Definition: ME0DetId.h:58
TrackerTopology::pxfDisk
unsigned int pxfDisk(const DetId &id) const
Definition: TrackerTopology.h:446
reco::Track::innerDetId
unsigned int innerDetId() const
DetId of the detector on which surface the innermost state is located.
Definition: Track.h:82
GlobalMuonRefitter::thePropagatorName
std::string thePropagatorName
Definition: GlobalMuonRefitter.h:158
GlobalMuonRefitter::hitCloner
TkClonerImpl hitCloner
Definition: GlobalMuonRefitter.h:179
GlobalMuonRefitter::theTrackerSkipSystem
int theTrackerSkipSystem
Definition: GlobalMuonRefitter.h:153
ME0DetId
Definition: ME0DetId.h:16
MuonSubdetId::ME0
static constexpr int ME0
Definition: MuonSubdetId.h:15
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
GlobalMuonRefitter::theDTRecHitLabel
edm::InputTag theDTRecHitLabel
Definition: GlobalMuonRefitter.h:139
PV3DBase::basicVector
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:53
Trajectory::measurements
DataContainer const & measurements() const
Definition: Trajectory.h:178
GlobalMuonRefitter::CSCSegmentsToken
edm::EDGetTokenT< CSCSegmentCollection > CSCSegmentsToken
Definition: GlobalMuonRefitter.h:187
GlobalMuonRefitter::theME0RecHitLabel
edm::InputTag theME0RecHitLabel
Definition: GlobalMuonRefitter.h:142
RecHitLessByDet
Definition: RecHitLessByDet.h:16
TrajectoryStateOnSurface::globalMomentum
GlobalVector globalMomentum() const
Definition: TrajectoryStateOnSurface.h:66
mag
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
Definition: Basic3DVectorLD.h:127
TrackerTopology::tobLayer
unsigned int tobLayer(const DetId &id) const
Definition: TrackerTopology.h:147
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
reco::TransientTrack
Definition: TransientTrack.h:19
ConstRecHitContainer
TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer
Definition: MillePedeAlignmentAlgorithm.cc:74
GlobalMuonRefitter::theRPCInTheFit
bool theRPCInTheFit
Definition: GlobalMuonRefitter.h:160
MuonSubdetId::RPC
static constexpr int RPC
Definition: MuonSubdetId.h:13
Exception
Definition: hltDiff.cc:246
PropagationDirection
PropagationDirection
Definition: PropagationDirection.h:4
GlobalMuonRefitter::printHits
void printHits(const ConstRecHitContainer &) const
print all RecHits of a trajectory
Definition: GlobalMuonRefitter.cc:672
GlobalMuonRefitter::theHitThreshold
int theHitThreshold
Definition: GlobalMuonRefitter.h:131
TrajectorySeed
Definition: TrajectorySeed.h:18
GlobalMuonRefitter::theCacheId_TRH
unsigned long long theCacheId_TRH
Definition: GlobalMuonRefitter.h:156
GlobalMuonRefitter::dytInfo
reco::DYTInfo * dytInfo
Definition: GlobalMuonRefitter.h:172
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
GlobalMuonRefitter::theME0RecHits
edm::Handle< ME0SegmentCollection > theME0RecHits
Definition: GlobalMuonRefitter.h:146
GlobalMuonRefitter::TID
Definition: GlobalMuonRefitter.h:66
GlobalMuonRefitter::theMuonHitsOption
int theMuonHitsOption
Definition: GlobalMuonRefitter.h:129
GlobalMuonRefitter::theCSCChi2Cut
float theCSCChi2Cut
Definition: GlobalMuonRefitter.h:133
GEMDetId::station
constexpr int station() const
Definition: GEMDetId.h:176
GlobalMuonRefitter::theEvent
const edm::Event * theEvent
Definition: GlobalMuonRefitter.h:185
DetId::Muon
Definition: DetId.h:26
DTChamberId
Definition: DTChamberId.h:14
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:224
GlobalMuonRefitter::TIB
Definition: GlobalMuonRefitter.h:66
PTrajectoryStateOnDet
Definition: PTrajectoryStateOnDet.h:10
CSCDetId::station
int station() const
Definition: CSCDetId.h:79
remoteMonitoring_LED_IterMethod_cfg.threshold
threshold
Definition: remoteMonitoring_LED_IterMethod_cfg.py:426
GlobalMuonRefitter::refit
std::vector< Trajectory > refit(const reco::Track &globalTrack, const int theMuonHitsOption, const TrackerTopology *tTopo) const
build combined trajectory from sta Track and tracker RecHits
Definition: GlobalMuonRefitter.cc:180
TrackerTopology::tecWheel
unsigned int tecWheel(const DetId &id) const
Definition: TrackerTopology.h:198
DynamicTruncation
Definition: DynamicTruncation.h:47
ME0SegmentCollection
keep
const int keep
Definition: GenParticlePruner.cc:48
GlobalMuonRefitter::all4DSegments
edm::Handle< DTRecSegment4DCollection > all4DSegments
Definition: GlobalMuonRefitter.h:190
edm::InputTag
Definition: InputTag.h:15
alongMomentum
Definition: PropagationDirection.h:4
GlobalMuonRefitter::selectMuonHits
ConstRecHitContainer selectMuonHits(const Trajectory &, const std::map< DetId, int > &) const
select muon hits compatible with trajectory; check hits in chambers with showers
Definition: GlobalMuonRefitter.cc:587
GlobalMuonRefitter::theCSCRecHits
edm::Handle< CSCRecHit2DCollection > theCSCRecHits
Definition: GlobalMuonRefitter.h:144
DTChamberId::station
int station() const
Return the station number.
Definition: DTChamberId.h:42
hit
Definition: SiStripHitEffFromCalibTree.cc:88
edm::OwnVector< TrackingRecHit >
GlobalMuonRefitter::theDTRecHitToken
edm::EDGetTokenT< DTRecHitCollection > theDTRecHitToken
Definition: GlobalMuonRefitter.h:147
TrackerTopology::tibLayer
unsigned int tibLayer(const DetId &id) const
Definition: TrackerTopology.h:150
GlobalMuonRefitter::insideOut
Definition: GlobalMuonRefitter.h:105
GlobalMuonRefitter::theDYTuseAPE
bool theDYTuseAPE
Definition: GlobalMuonRefitter.h:169