CMS 3D CMS Logo

Public Member Functions | Protected Member Functions

SeedFromConsecutiveHitsTripletOnlyCreator Class Reference

#include <SeedFromConsecutiveHitsTripletOnlyCreator.h>

Inheritance diagram for SeedFromConsecutiveHitsTripletOnlyCreator:
SeedFromConsecutiveHitsCreator SeedCreator

List of all members.

Public Member Functions

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

Protected Member Functions

virtual GlobalTrajectoryParameters initialKinematic (const SeedingHitSet &hits, const TrackingRegion &region, const edm::EventSetup &es, const SeedComparitor *filter, bool &passesFilter) const

Detailed Description

Definition at line 8 of file SeedFromConsecutiveHitsTripletOnlyCreator.h.


Constructor & Destructor Documentation

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

Definition at line 14 of file SeedFromConsecutiveHitsTripletOnlyCreator.h.

{}

Member Function Documentation

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;
}