ATLAS Offline Software
Loading...
Searching...
No Matches
SiIntersect.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
6// SiIntersect.h
8// (c) ATLAS Detector software
10
11#ifndef INDETREADOUTGEOMETRY_SIINTERSECT_H
12#define INDETREADOUTGEOMETRY_SIINTERSECT_H
13
14namespace InDetDD {
15
22
24
25 public:
26
27 enum IntersectState {OUT = 0, BOUNDARY = 1, IN = 2};
28
30
31 bool in() const; // Definitely in
32 bool out() const; // Definitely out
33 bool nearBoundary() const; // Near boundary within tolerences
34 bool mayIntersect() const; // in() || nearBoundary()
35 operator bool() const; // Equivalent to mayIntersect().
36
37 void setIn();
38 void setOut();
39 void setNearBoundary();
40
41 private:
43
44 };
45
47 : m_state(state)
48{}
49
50inline bool SiIntersect::in() const
51{
52 return (m_state == IN);
53}
54
55inline bool SiIntersect::out() const
56{
57 return (m_state == OUT);
58}
59
60inline bool SiIntersect::nearBoundary() const
61{
62 return (m_state == BOUNDARY);
63}
64
65
66inline bool SiIntersect::mayIntersect() const
67{
68 return (m_state == BOUNDARY || m_state == IN);
69}
70
71inline SiIntersect::operator bool() const
72{
73 return mayIntersect();
74}
75
76inline void SiIntersect::setIn()
77{
78 m_state = IN;
79}
80
82{
83 m_state = OUT;
84}
85
87{
89}
90
91} // namespace InDetDD
92
93#endif //INDETREADOUTGEOMETRY_SIINTERSECT_H
94
#define OUT(dst, src)
Definition MD5.cxx:316
SiIntersect(IntersectState state=OUT)
Definition SiIntersect.h:46
bool mayIntersect() const
Definition SiIntersect.h:66
IntersectState m_state
Definition SiIntersect.h:42
bool nearBoundary() const
Definition SiIntersect.h:60
Message Stream Member.