CMS 3D CMS Logo

SeedFromConsecutiveHitsTripletOnlyCreator.cc
Go to the documentation of this file.
2 
12 
14  const SeedingHitSet& hits) const {
17 
18  if (hits.size() == 3 &&
19  !(trackerHitRTTI::isSingleType(*hits[2]) && (hits[2]->geographicalId().subdetId() == SiStripDetId::TID ||
20  hits[2]->geographicalId().subdetId() == SiStripDetId::TEC))) {
21  //if 3rd hit is mono and endcap pT is not well defined so take initial state from pair
23  FastHelix helix(tth3->globalPosition(),
24  tth2->globalPosition(),
25  tth1->globalPosition(),
26  nomField,
28  tth1->globalPosition());
29  kine = helix.stateAtVertex();
30  if UNLIKELY (isBOFF && (theBOFFMomentum > 0)) {
32  kine.position(), kine.momentum().unit() * theBOFFMomentum, kine.charge(), magneticField_);
33  }
34  return (filter ? filter->compatible(hits, kine, helix) : true);
35  }
36 
37  const GlobalPoint& vertexPos = region->origin();
38 
39  FastHelix helix(tth2->globalPosition(), tth1->globalPosition(), vertexPos, nomField, magneticField_);
40  if (helix.isValid()) {
41  kine = helix.stateAtVertex();
42  } else {
43  GlobalVector initMomentum(tth2->globalPosition() - vertexPos);
44  initMomentum *= (100. / initMomentum.perp());
45  kine = GlobalTrajectoryParameters(vertexPos, initMomentum, 1, magneticField_);
46  }
47 
48  if UNLIKELY (isBOFF && (theBOFFMomentum > 0)) {
50  kine.position(), kine.momentum().unit() * theBOFFMomentum, kine.charge(), magneticField_);
51  }
52  return (filter ? filter->compatible(hits, kine, helix) : true);
53 }
bool isSingleType(TrackingRecHit const &hit)
GlobalPoint const & origin() const
static constexpr auto TID
Definition: SiStripDetId.h:38
virtual bool compatible(const SeedingHitSet &hits) const =0
BaseTrackerRecHit const * ConstRecHitPointer
Definition: SeedingHitSet.h:14
Vector3DBase unit() const
Definition: Vector3DBase.h:54
#define UNLIKELY(x)
Definition: Likely.h:21
bool initialKinematic(GlobalTrajectoryParameters &kine, const SeedingHitSet &hits) const override
static constexpr auto TEC
Definition: SiStripDetId.h:40