travex
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Predicates.h
Go to the documentation of this file.
1 #ifndef tvx_Predicates_h
2 #define tvx_Predicates_h
3 
4 #include <functional>
5 
6 namespace tvx {
7 
8 //class GenericTrackNode;
9 //class GenericHit;
10 
11 
12 template<class _GenericTrackNode, class _GenericHit>
13 struct IsHitWithinError : public std::function<bool(_GenericTrackNode, _GenericHit)>
14 {
15  bool operator() (_GenericTrackNode trackNode, _GenericHit hit)
16  {
17  return (trackNode.CalcDistanceToHit(hit) <= 5*trackNode.GetError().Mag());
18  }
19 
20 };
21 
22 
23 }
24 
25 #endif
Definition: Event.h:12
bool operator()(_GenericTrackNode trackNode, _GenericHit hit)
Definition: Predicates.h:15