CMS 3D CMS Logo

Functions
fastTrackingUtilities Namespace Reference

Functions

template<class T >
int32_t getRecHitCombinationIndex (const T &object)
 
bool hitIsMasked (const FastTrackerRecHit *hit, const std::vector< bool > &hitMasks)
 
double hitLocalError (const TrackingRecHit *hit)
 
template<class T >
void setRecHitCombinationIndex (edm::OwnVector< T > &recHits, int32_t icomb)
 

Function Documentation

◆ getRecHitCombinationIndex()

template<class T >
int32_t fastTrackingUtilities::getRecHitCombinationIndex ( const T object)

Definition at line 22 of file FastTrackingUtilities.h.

22  {
23  // seed must have at least one hit
24  if (object.recHits().first == object.recHits().second) {
25  throw cms::Exception("fastTrackingHelpers::getRecHitCombinationIndex")
26  << " given object has 0 hits" << std::endl;
27  }
28 
29  const TrackingRecHit &recHit = *object.recHits().first;
31  throw cms::Exception("fastTrackingHelpers::setRecHitCombinationIndex")
32  << " one of hits in OwnVector is non-fastsim" << std::endl;
33  }
34  // cast and return combination index
35  return static_cast<const FastTrackerRecHit &>(recHit).recHitCombinationIndex();
36  // return combination index of first hit
37  }

References Exception, dqmdumpme::first, trackerHitRTTI::isFast(), rpcPointValidation_cfi::recHit, FastTrackerRecHitMaskProducer_cfi::recHits, and edm::second().

Referenced by TrackCandidateProducer::produce().

◆ hitIsMasked()

bool fastTrackingUtilities::hitIsMasked ( const FastTrackerRecHit hit,
const std::vector< bool > &  hitMasks 
)
inline

Definition at line 39 of file FastTrackingUtilities.h.

39  {
40  for (unsigned int i = 0; i < hit->nIds(); i++) {
41  if (!(hitMasks)[hit->id(i)]) {
42  return false;
43  }
44  }
45  return true;
46  }

References DetachedQuadStep_cff::hitMasks, mps_fire::i, and hit::id.

Referenced by TrackCandidateProducer::produce(), and TrajectorySeedProducer::produce().

◆ hitLocalError()

double fastTrackingUtilities::hitLocalError ( const TrackingRecHit hit)
inline

Definition at line 48 of file FastTrackingUtilities.h.

48  {
49  double xx = hit->localPositionError().xx();
50  double yy = hit->localPositionError().yy();
51  double xy = hit->localPositionError().xy();
52  double delta = std::sqrt((xx - yy) * (xx - yy) + 4. * xy * xy);
53  return 0.5 * (xx + yy - delta);
54  }

References dumpMFGeometry_cfg::delta, mathSSE::sqrt(), geometryCSVtoXML::xx, geometryCSVtoXML::xy, and geometryCSVtoXML::yy.

Referenced by TrackCandidateProducer::produce().

◆ setRecHitCombinationIndex()

template<class T >
void fastTrackingUtilities::setRecHitCombinationIndex ( edm::OwnVector< T > &  recHits,
int32_t  icomb 
)
inline

Definition at line 11 of file FastTrackingUtilities.h.

11  {
12  for (auto &recHit : recHits) {
14  throw cms::Exception("fastTrackingHelpers::setRecHitCombinationIndex: one of hits in OwnVector is non-fastsim");
15  }
16  static_cast<FastTrackerRecHit &>(recHit).setRecHitCombinationIndex(icomb);
17  }
18  }

References Exception, trackerHitRTTI::isFast(), rpcPointValidation_cfi::recHit, and FastTrackerRecHitMaskProducer_cfi::recHits.

Referenced by TrackCandidateProducer::produce(), TrajectorySeedProducer::produce(), and FastTSGFromPropagation::trackerSeeds().

mps_fire.i
i
Definition: mps_fire.py:355
hit::id
unsigned int id
Definition: SiStripHitEffFromCalibTree.cc:92
DetachedQuadStep_cff.hitMasks
hitMasks
Definition: DetachedQuadStep_cff.py:99
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:215
dqmdumpme.first
first
Definition: dqmdumpme.py:55
rpcPointValidation_cfi.recHit
recHit
Definition: rpcPointValidation_cfi.py:7
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
geometryCSVtoXML.xy
xy
Definition: geometryCSVtoXML.py:19
FastTrackerRecHitMaskProducer_cfi.recHits
recHits
Definition: FastTrackerRecHitMaskProducer_cfi.py:8
geometryCSVtoXML.yy
yy
Definition: geometryCSVtoXML.py:19
dumpMFGeometry_cfg.delta
delta
Definition: dumpMFGeometry_cfg.py:25
TrackingRecHit
Definition: TrackingRecHit.h:21
Exception
Definition: hltDiff.cc:246
geometryCSVtoXML.xx
xx
Definition: geometryCSVtoXML.py:19
hit
Definition: SiStripHitEffFromCalibTree.cc:88
trackerHitRTTI::isFast
bool isFast(TrackingRecHit const &hit)
Definition: trackerHitRTTI.h:36