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 136 of file SimpleCosmicBONSeeder.cc.

Member Function Documentation

◆ operator()()

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

Definition at line 137 of file SimpleCosmicBONSeeder.cc.

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

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