CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SeedFromConsecutiveHitsStraightLineCreator.cc
Go to the documentation of this file.
3 
4 
5 
6 bool SeedFromConsecutiveHitsStraightLineCreator::initialKinematic(GlobalTrajectoryParameters & kine,
7  const SeedingHitSet & hits) const {
8 
10  const TransientTrackingRecHit::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 (filter ? filter->compatible(hits, kine, *region) : true);
23 
24 }
25 
T perp() const
Definition: PV3DBase.h:72
int TrackCharge
Definition: TrackCharge.h:4