#include <SeedFromConsecutiveHitsStraightLineCreator.h>
Public Member Functions | |
SeedFromConsecutiveHitsStraightLineCreator (const edm::ParameterSet &cfg) | |
virtual | ~SeedFromConsecutiveHitsStraightLineCreator () |
Protected Member Functions | |
virtual GlobalTrajectoryParameters | initialKinematic (const SeedingHitSet &hits, const TrackingRegion ®ion, const edm::EventSetup &es, const SeedComparitor *filter, bool &passesFilter) const |
Definition at line 8 of file SeedFromConsecutiveHitsStraightLineCreator.h.
SeedFromConsecutiveHitsStraightLineCreator::SeedFromConsecutiveHitsStraightLineCreator | ( | const edm::ParameterSet & | cfg | ) | [inline] |
Definition at line 11 of file SeedFromConsecutiveHitsStraightLineCreator.h.
: SeedFromConsecutiveHitsCreator(cfg) { }
virtual SeedFromConsecutiveHitsStraightLineCreator::~SeedFromConsecutiveHitsStraightLineCreator | ( | ) | [inline, virtual] |
Definition at line 14 of file SeedFromConsecutiveHitsStraightLineCreator.h.
{}
GlobalTrajectoryParameters SeedFromConsecutiveHitsStraightLineCreator::initialKinematic | ( | const SeedingHitSet & | hits, |
const TrackingRegion & | region, | ||
const edm::EventSetup & | es, | ||
const SeedComparitor * | filter, | ||
bool & | passesFilter | ||
) | const [protected, virtual] |
Reimplemented from SeedFromConsecutiveHitsCreator.
Definition at line 11 of file SeedFromConsecutiveHitsStraightLineCreator.cc.
References SeedComparitor::compatible(), 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); passesFilter = (filter ? filter->compatible(hits, kine, region) : true); return kine; }