CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SeedFromConsecutiveHitsStraightLineCreator.cc
Go to the documentation of this file.
3 
5  const SeedingHitSet& hits) const {
6  const SeedingHitSet::ConstRecHitPointer& tth1 = hits[0];
7  const SeedingHitSet::ConstRecHitPointer& tth2 = hits[1];
8 
9  const GlobalPoint& vertexPos = region->origin();
10 
11  // Assume initial state is straight line passing through beam spot
12  // with direction given by innermost two seed hits (with big uncertainty)
13  GlobalVector initMomentum(tth2->globalPosition() - tth1->globalPosition());
14  double rescale = 1000. / initMomentum.perp();
15  initMomentum *= rescale; // set to approximately infinite momentum
16  TrackCharge q = 1; // irrelevant, since infinite momentum
17  kine = GlobalTrajectoryParameters(vertexPos, initMomentum, q, magneticField_);
18 
19  return true;
20 }
T perp() const
Definition: PV3DBase.h:69
GlobalPoint const & origin() const
int TrackCharge
Definition: TrackCharge.h:4
BaseTrackerRecHit const * ConstRecHitPointer
Definition: SeedingHitSet.h:14
bool initialKinematic(GlobalTrajectoryParameters &kine, const SeedingHitSet &hits) const override