CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 142 of file SimpleCosmicBONSeeder.cc.

Member Function Documentation

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

Definition at line 143 of file SimpleCosmicBONSeeder.cc.

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

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