CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SeedFromConsecutiveHitsTripletOnlyCreator.cc
Go to the documentation of this file.
2 
10 
11 
13  const SeedingHitSet& hits,
14  const TrackingRegion & region,
15  const edm::EventSetup& es) const
16 {
18 
19  const TransientTrackingRecHit::ConstRecHitPointer& tth1 = hits[0];
20  const TransientTrackingRecHit::ConstRecHitPointer& tth2 = hits[1];
21  const TransientTrackingRecHit::ConstRecHitPointer& tth3 = hits[2];
22 
23  FastHelix helix(tth3->globalPosition(), tth2->globalPosition(), tth1->globalPosition(), es, tth1->globalPosition());
24  kine = helix.stateAtVertex().parameters();
25 
27  es.get<IdealMagneticFieldRecord>().get(bfield);
28  bool isBOFF = ( std::abs(bfield->inTesla(GlobalPoint(0,0,0)).z()) < 1e-3 );
29  if (isBOFF && (theBOFFMomentum > 0)) {
30  kine = GlobalTrajectoryParameters(kine.position(),
31  kine.momentum().unit() * theBOFFMomentum,
32  kine.charge(),
33  &*bfield);
34  }
35  return kine;
36 }
#define abs(x)
Definition: mlp_lapack.h:159
virtual GlobalTrajectoryParameters initialKinematic(const SeedingHitSet &hits, const TrackingRegion &region, const edm::EventSetup &es) const
const T & get() const
Definition: EventSetup.h:55