ATLAS Offline Software
Loading...
Searching...
No Matches
Intersection.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
6// Intersection.h, (c) ATLAS Detector software
8
9#ifndef TRKDETDESCRUTILS_INTERSECTION_H
10#define TRKDETDESCRUTILS_INTERSECTION_H
11
14
15namespace Trk {
16
22
24{
26 double pathLength;
27 double distance;
28 bool valid;
29
30 Intersection(const Amg::Vector3D& sinter, double slenght, bool svalid, double dist = 0.)
31 : position(sinter)
32 , pathLength(slenght)
33 , distance(dist)
34 , valid(svalid)
35 {}
36
37 // smaller operator for sorting
38 bool operator<(const Intersection& si) const { return (valid && pathLength < si.pathLength); }
39};
40
42template<class T>
44{
45public:
47 const T* object;
49
51 ObjectIntersection(const Intersection& sInter, const T* sObject, PropDirection dir = alongMomentum)
52 : intersection(sInter)
53 , object(sObject)
54 , pDirection(dir)
55 {}
56
58 bool operator<(const ObjectIntersection<T>& oi) const { return (intersection < oi.intersection); }
59};
60
62template<class T, class R, class S>
64{
65public:
67 const T* object;
69 const S* result;
71
74 const T* sObject,
75 const R* sRepresentation,
76 const S* sResult,
78 : intersection(sInter)
79 , object(sObject)
80 , representation(sRepresentation)
81 , result(sResult)
82 , pDirection(dir)
83 {}
84
86 bool operator<(const FullIntersection<T, R, S>& oi) const { return (intersection < oi.intersection); }
87};
88
89}
90
91#endif
FullIntersection(const Intersection &sInter, const T *sObject, const R *sRepresentation, const S *sResult, PropDirection dir=alongMomentum)
Full intersection.
bool operator<(const FullIntersection< T, R, S > &oi) const
smaller operator for ordering & sorting
ObjectIntersection(const Intersection &sInter, const T *sObject, PropDirection dir=alongMomentum)
Object intersection.
bool operator<(const ObjectIntersection< T > &oi) const
smaller operator for ordering & sorting
Eigen::Matrix< double, 3, 1 > Vector3D
Ensure that the ATLAS eigen extensions are properly loaded.
PropDirection
PropDirection, enum for direction of the propagation.
@ alongMomentum
Intersection(const Amg::Vector3D &sinter, double slenght, bool svalid, double dist=0.)
bool operator<(const Intersection &si) const
Amg::Vector3D position