CMS 3D CMS Logo

List of all members | Public Member Functions
HigherInnerHit Struct Reference

Public Member Functions

bool operator() (const OrderedHitTriplet &trip1, const OrderedHitTriplet &trip2) const
 

Detailed Description

Definition at line 137 of file SimpleCosmicBONSeeder.cc.

Member Function Documentation

◆ operator()()

bool HigherInnerHit::operator() ( const OrderedHitTriplet trip1,
const OrderedHitTriplet trip2 
) const
inline

Definition at line 138 of file SimpleCosmicBONSeeder.cc.

138  {
139  //FIXME: inner gives a SEGV
140 #if 0
141  //const SeedingHitSet::ConstRecHitPointer &ihit1 = trip1.inner();
142  //const SeedingHitSet::ConstRecHitPointer &ihit2 = trip2.inner();
143  const SeedingHitSet::ConstRecHitPointer &ihit1 = trip1.middle();
144  const SeedingHitSet::ConstRecHitPointer &ihit2 = trip2.middle();
145  const SeedingHitSet::ConstRecHitPointer &ohit1 = trip1.outer();
146  const SeedingHitSet::ConstRecHitPointer &ohit2 = trip2.outer();
147 #endif
152  float iy1 = ihit1->globalPosition().y();
153  float oy1 = ohit1->globalPosition().y();
154  float iy2 = ihit2->globalPosition().y();
155  float oy2 = ohit2->globalPosition().y();
156  if (oy1 - iy1 > 0) { // 1 Downgoing
157  if (oy2 - iy2 > 0) { // 2 Downgoing
158  // sort by inner, or by outer if inners are the same
159  return (iy1 != iy2 ? (iy1 > iy2) : (oy1 > oy2));
160  } else
161  return true; // else prefer downgoing
162  } else if (oy2 - iy2 > 0) {
163  return false; // prefer downgoing
164  } else { // both upgoing
165  // sort by inner, or by outer
166  return (iy1 != iy2 ? (iy1 < iy2) : (oy1 < oy2));
167  }
168  }

References OrderedHitTriplet::inner(), OrderedHitTriplet::middle(), and OrderedHitTriplet::outer().

SeedingHitSet::ConstRecHitPointer
BaseTrackerRecHit const * ConstRecHitPointer
Definition: SeedingHitSet.h:10
OrderedHitTriplet::middle
MiddleRecHit middle() const
Definition: OrderedHitTriplet.h:20
OrderedHitTriplet::outer
OuterRecHit outer() const
Definition: OrderedHitTriplet.h:21
OrderedHitTriplet::inner
InnerRecHit inner() const
Definition: OrderedHitTriplet.h:19