CMS 3D CMS Logo

SeedFromConsecutiveHitsStraightLineCreator.cc
Go to the documentation of this file.
3 
4 
5 
7  const SeedingHitSet & hits) const {
8 
9  const SeedingHitSet::ConstRecHitPointer& tth1 = hits[0];
10  const SeedingHitSet::ConstRecHitPointer& tth2 = hits[1];
11 
12  const GlobalPoint& vertexPos = region->origin();
13 
14  // Assume initial state is straight line passing through beam spot
15  // with direction given by innermost two seed hits (with big uncertainty)
16  GlobalVector initMomentum(tth2->globalPosition() - tth1->globalPosition());
17  double rescale = 1000./initMomentum.perp();
18  initMomentum *= rescale; // set to approximately infinite momentum
19  TrackCharge q = 1; // irrelevant, since infinite momentum
20  kine = GlobalTrajectoryParameters(vertexPos, initMomentum, q, &*bfield);
21 
22  return true;
23 
24 }
25 
GlobalPoint const & origin() const
int TrackCharge
Definition: TrackCharge.h:4
BaseTrackerRecHit const * ConstRecHitPointer
Definition: SeedingHitSet.h:11
bool initialKinematic(GlobalTrajectoryParameters &kine, const SeedingHitSet &hits) const override
edm::ESHandle< MagneticField > bfield