Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
LArShowerOverlapResult.h
Go to the documentation of this file.
1
8#ifndef LAR_SHOWER_OVERLAP_RESULT_H
9#define LAR_SHOWER_OVERLAP_RESULT_H 1
10
12#include "Pandora/StatusCodes.h"
13
15
16#include <cmath>
17#include <vector>
18
19namespace lar_content
20{
21
26{
27public:
32
39 ShowerOverlapResult(const unsigned int nMatchedSamplingPoints, const unsigned int nSamplingPoints, const XOverlap &xOverlap);
40
47
52
58 bool IsInitialized() const;
59
65 unsigned int GetNMatchedSamplingPoints() const;
66
72 unsigned int GetNSamplingPoints() const;
73
79 float GetMatchedFraction() const;
80
86 const XOverlap &GetXOverlap() const;
87
93 bool operator<(const ShowerOverlapResult &rhs) const;
94
100 bool operator>(const ShowerOverlapResult &rhs) const;
101
108
109protected:
112 unsigned int m_nSamplingPoints;
115};
116
117//------------------------------------------------------------------------------------------------------------------------------------------
118
120{
121 return m_isInitialized;
122}
123
124//------------------------------------------------------------------------------------------------------------------------------------------
125
127{
128 if (m_isInitialized)
130
131 throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
132}
133
134//------------------------------------------------------------------------------------------------------------------------------------------
135
137{
138 if (m_isInitialized)
139 return m_nSamplingPoints;
140
141 throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
142}
143
144//------------------------------------------------------------------------------------------------------------------------------------------
145
147{
148 if (m_isInitialized)
149 return m_matchedFraction;
150
151 throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
152}
153
154//------------------------------------------------------------------------------------------------------------------------------------------
155
157{
158 if (m_isInitialized)
159 return m_xOverlap;
160
161 throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
162}
163
164} // namespace lar_content
165
166#endif // #ifndef LAR_SHOWER_OVERLAP_RESULT_H
Header file for the lar x overlap class.
Header file for pandora input types and associated external typedefs exposed via the PandoraApi.
Header file defining status codes and relevant preprocessor macros.
bool operator>(const ShowerOverlapResult &rhs) const
Track overlap result greater than operator.
float m_matchedFraction
The fraction of sampling points resulting in a match.
bool operator<(const ShowerOverlapResult &rhs) const
Track overlap result less than operator.
bool m_isInitialized
Whether the track overlap result has been initialized.
ShowerOverlapResult & operator=(const ShowerOverlapResult &rhs)
Track overlap result assigment operator.
unsigned int GetNMatchedSamplingPoints() const
Get the number of matched sampling points.
const XOverlap & GetXOverlap() const
Get the x overlap object.
unsigned int m_nSamplingPoints
The number of sampling points.
XOverlap m_xOverlap
The x overlap object.
unsigned int m_nMatchedSamplingPoints
The number of matched sampling points.
float GetMatchedFraction() const
Get the fraction of sampling points resulting in a match.
unsigned int GetNSamplingPoints() const
Get the number of sampling points.
bool IsInitialized() const
Whether the track overlap result has been initialized.
XOverlap class.
Definition LArXOverlap.h:18
StatusCodeException class.