CMS 3D CMS Logo

Public Member Functions | Protected Member Functions

SeedFromConsecutiveHitsStraightLineCreator Class Reference

#include <SeedFromConsecutiveHitsStraightLineCreator.h>

Inheritance diagram for SeedFromConsecutiveHitsStraightLineCreator:
SeedFromConsecutiveHitsCreator SeedCreator

List of all members.

Public Member Functions

 SeedFromConsecutiveHitsStraightLineCreator (const edm::ParameterSet &cfg)
virtual ~SeedFromConsecutiveHitsStraightLineCreator ()

Protected Member Functions

virtual GlobalTrajectoryParameters initialKinematic (const SeedingHitSet &hits, const TrackingRegion &region, const edm::EventSetup &es) const

Detailed Description

Definition at line 8 of file SeedFromConsecutiveHitsStraightLineCreator.h.


Constructor & Destructor Documentation

SeedFromConsecutiveHitsStraightLineCreator::SeedFromConsecutiveHitsStraightLineCreator ( const edm::ParameterSet cfg) [inline]
virtual SeedFromConsecutiveHitsStraightLineCreator::~SeedFromConsecutiveHitsStraightLineCreator ( ) [inline, virtual]

Definition at line 14 of file SeedFromConsecutiveHitsStraightLineCreator.h.

{}

Member Function Documentation

GlobalTrajectoryParameters SeedFromConsecutiveHitsStraightLineCreator::initialKinematic ( const SeedingHitSet hits,
const TrackingRegion region,
const edm::EventSetup es 
) const [protected, virtual]

Reimplemented from SeedFromConsecutiveHitsCreator.

Definition at line 11 of file SeedFromConsecutiveHitsStraightLineCreator.cc.

References edm::EventSetup::get(), TrackingRegion::origin(), PV3DBase< T, PVType, FrameType >::perp(), and lumiQueryAPI::q.

{
  GlobalTrajectoryParameters kine;

  const TransientTrackingRecHit::ConstRecHitPointer& tth1 = hits[0];
  const TransientTrackingRecHit::ConstRecHitPointer& tth2 = hits[1];

  const GlobalPoint& vertexPos = region.origin();
  edm::ESHandle<MagneticField> bfield;
  es.get<IdealMagneticFieldRecord>().get(bfield);

  // Assume initial state is straight line passing through beam spot
  // with direction given by innermost two seed hits (with big uncertainty)
  GlobalVector initMomentum(tth2->globalPosition() - tth1->globalPosition());
  double rescale = 1000./initMomentum.perp();
  initMomentum *= rescale; // set to approximately infinite momentum
  TrackCharge q = 1; // irrelevant, since infinite momentum
  kine = GlobalTrajectoryParameters(vertexPos, initMomentum, q, &*bfield);

  return kine;
}