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,
27  &*bfield,
28  tth1->globalPosition());
29  kine = helix.stateAtVertex();
30  if
31  UNLIKELY(isBOFF && (theBOFFMomentum > 0)) {
33  kine.position(), kine.momentum().unit() * theBOFFMomentum, kine.charge(), &*bfield);
34  }
35  return (filter ? filter->compatible(hits, kine, helix) : true);
36  }
37 
38  const GlobalPoint& vertexPos = region->origin();
39 
40  FastHelix helix(tth2->globalPosition(), tth1->globalPosition(), vertexPos, nomField, &*bfield);
41  if (helix.isValid()) {
42  kine = helix.stateAtVertex();
43  } else {
44  GlobalVector initMomentum(tth2->globalPosition() - vertexPos);
45  initMomentum *= (100. / initMomentum.perp());
46  kine = GlobalTrajectoryParameters(vertexPos, initMomentum, 1, &*bfield);
47  }
48 
49  if
50  UNLIKELY(isBOFF && (theBOFFMomentum > 0)) {
52  kine.position(), kine.momentum().unit() * theBOFFMomentum, kine.charge(), &*bfield);
53  }
54  return (filter ? filter->compatible(hits, kine, helix) : true);
55 }
Vector3DBase
Definition: Vector3DBase.h:8
TrackingRegion::origin
GlobalPoint const & origin() const
Definition: TrackingRegion.h:73
Likely.h
MessageLogger.h
FastHelix.h
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
ESHandle.h
SeedingHitSet
Definition: SeedingHitSet.h:6
GlobalTrajectoryParameters::position
GlobalPoint position() const
Definition: GlobalTrajectoryParameters.h:60
FastHelix
Definition: FastHelix.h:26
SeedingHitSet::ConstRecHitPointer
BaseTrackerRecHit const * ConstRecHitPointer
Definition: SeedingHitSet.h:10
GlobalTrajectoryParameters::charge
TrackCharge charge() const
Definition: GlobalTrajectoryParameters.h:72
SeedFromConsecutiveHitsCreator::theBOFFMomentum
float theBOFFMomentum
Definition: SeedFromConsecutiveHitsCreator.h:64
SeedFromConsecutiveHitsCreator::isBOFF
bool isBOFF
Definition: SeedFromConsecutiveHitsCreator.h:74
SiStripDetId.h
SeedFromConsecutiveHitsCreator::filter
const SeedComparitor * filter
Definition: SeedFromConsecutiveHitsCreator.h:69
SeedComparitor::compatible
virtual bool compatible(const SeedingHitSet &hits) const =0
UNLIKELY
#define UNLIKELY(x)
Definition: Likely.h:21
Vector3DBase::unit
Vector3DBase unit() const
Definition: Vector3DBase.h:54
IdealMagneticFieldRecord.h
SeedFromConsecutiveHitsCreator::bfield
edm::ESHandle< MagneticField > bfield
Definition: SeedFromConsecutiveHitsCreator.h:72
GlobalTrajectoryParameters
Definition: GlobalTrajectoryParameters.h:15
Point3DBase< float, GlobalTag >
SiStripDetId::TEC
static constexpr auto TEC
Definition: SiStripDetId.h:40
GlobalTrajectoryParameters::momentum
GlobalVector momentum() const
Definition: GlobalTrajectoryParameters.h:65
SeedFromConsecutiveHitsCreator::region
const TrackingRegion * region
Definition: SeedFromConsecutiveHitsCreator.h:68
MagneticField.h
SeedFromConsecutiveHitsTripletOnlyCreator::initialKinematic
bool initialKinematic(GlobalTrajectoryParameters &kine, const SeedingHitSet &hits) const override
Definition: SeedFromConsecutiveHitsTripletOnlyCreator.cc:13
SiStripDetId::TID
static constexpr auto TID
Definition: SiStripDetId.h:38
SeedFromConsecutiveHitsTripletOnlyCreator.h
SeedFromConsecutiveHitsCreator::nomField
float nomField
Definition: SeedFromConsecutiveHitsCreator.h:73
EventSetup.h
TrackingRegion.h
trackerHitRTTI::isSingleType
bool isSingleType(TrackingRecHit const &hit)
Definition: trackerHitRTTI.h:34