CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
fireworks::StateOrdering Class Reference

#include <TrackUtils.h>

Public Member Functions

bool operator() (const State &state1, const State &state2) const
 
 StateOrdering (const TEveVector &momentum)
 

Private Attributes

TEveVector m_direction
 

Detailed Description

Definition at line 47 of file TrackUtils.h.

Constructor & Destructor Documentation

fireworks::StateOrdering::StateOrdering ( const TEveVector &  momentum)
inline

Definition at line 50 of file TrackUtils.h.

References m_direction.

50  {
51  m_direction = momentum;
52  m_direction.Normalize();
53  }

Member Function Documentation

bool fireworks::StateOrdering::operator() ( const State state1,
const State state2 
) const
inline

Definition at line 54 of file TrackUtils.h.

References m_direction, and fireworks::State::position.

55  {
56  double product1 = state1.position.Perp()*(state1.position.fX*m_direction.fX + state1.position.fY*m_direction.fY>0 ? 1 : -1);
57  double product2 = state2.position.Perp()*(state2.position.fX*m_direction.fX + state2.position.fY*m_direction.fY>0 ? 1 : -1);
58  return product1 < product2;
59  }

Member Data Documentation

TEveVector fireworks::StateOrdering::m_direction
private

Definition at line 48 of file TrackUtils.h.

Referenced by operator()(), and StateOrdering().