test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
GlobalTrajectoryBuilderBase::ComparatorInOut Struct Reference

#include <GlobalTrajectoryBuilderBase.h>

Public Member Functions

bool operator() (const TransientTrackingRecHit::ConstRecHitPointer &a, const TransientTrackingRecHit::ConstRecHitPointer &b) const
 

Detailed Description

Definition at line 130 of file GlobalTrajectoryBuilderBase.h.

Member Function Documentation

bool GlobalTrajectoryBuilderBase::ComparatorInOut::operator() ( const TransientTrackingRecHit::ConstRecHitPointer a,
const TransientTrackingRecHit::ConstRecHitPointer b 
) const
inline

Definition at line 132 of file GlobalTrajectoryBuilderBase.h.

References GeomDetEnumerators::DT, and GeomDetEnumerators::RPCBarrel.

133  {
134  bool barrel_a = ( a->det()->subDetector() == GeomDetEnumerators::DT ||
135  a->det()->subDetector() == GeomDetEnumerators::RPCBarrel );
136 
137  bool barrel_b = ( b->det()->subDetector() == GeomDetEnumerators::DT ||
138  b->det()->subDetector() == GeomDetEnumerators::RPCBarrel );
139 
140  if ( barrel_a && barrel_b ) return a->det()->surface().position().perp() < b->det()->surface().position().perp();
141 
142  else if ( !barrel_a && !barrel_b ) return fabs(a->globalPosition().z()) < fabs(b->globalPosition().z());
143  else if ( barrel_a && !barrel_b ) return true;
144  else if ( !barrel_a && barrel_b ) return false;
145  //shouldn't really get here in any case (there's some sense to throw here )
146  return false;
147  }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121