#include <SeedFromConsecutiveHitsTripletOnlyCreator.h>
Public Member Functions | |
SeedFromConsecutiveHitsTripletOnlyCreator (const edm::ParameterSet &cfg) | |
virtual | ~SeedFromConsecutiveHitsTripletOnlyCreator () |
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 SeedFromConsecutiveHitsTripletOnlyCreator.h.
SeedFromConsecutiveHitsTripletOnlyCreator::SeedFromConsecutiveHitsTripletOnlyCreator | ( | const edm::ParameterSet & | cfg | ) | [inline] |
Definition at line 11 of file SeedFromConsecutiveHitsTripletOnlyCreator.h.
: SeedFromConsecutiveHitsCreator(cfg) { }
virtual SeedFromConsecutiveHitsTripletOnlyCreator::~SeedFromConsecutiveHitsTripletOnlyCreator | ( | ) | [inline, virtual] |
Definition at line 14 of file SeedFromConsecutiveHitsTripletOnlyCreator.h.
{}
GlobalTrajectoryParameters SeedFromConsecutiveHitsTripletOnlyCreator::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 12 of file SeedFromConsecutiveHitsTripletOnlyCreator.cc.
References abs, SeedComparitor::compatible(), alignCSCRings::e, edm::EventSetup::get(), and SeedFromConsecutiveHitsCreator::theBOFFMomentum.
{ GlobalTrajectoryParameters kine; const TransientTrackingRecHit::ConstRecHitPointer& tth1 = hits[0]; const TransientTrackingRecHit::ConstRecHitPointer& tth2 = hits[1]; const TransientTrackingRecHit::ConstRecHitPointer& tth3 = hits[2]; FastHelix helix(tth3->globalPosition(), tth2->globalPosition(), tth1->globalPosition(), es, tth1->globalPosition()); kine = helix.stateAtVertex().parameters(); edm::ESHandle<MagneticField> bfield; es.get<IdealMagneticFieldRecord>().get(bfield); bool isBOFF = ( std::abs(bfield->inTesla(GlobalPoint(0,0,0)).z()) < 1e-3 ); if (isBOFF && (theBOFFMomentum > 0)) { kine = GlobalTrajectoryParameters(kine.position(), kine.momentum().unit() * theBOFFMomentum, kine.charge(), &*bfield); } passesFilter = (filter ? filter->compatible(hits, kine, helix, region) : true); return kine; }