LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
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 
11 #include "Pandora/PandoraInputTypes.h"
12 #include "Pandora/StatusCodes.h"
13 
15 
16 #include <cmath>
17 #include <vector>
18 
19 namespace lar_content
20 {
21 
26 {
27 public:
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 
109 protected:
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 
136 inline unsigned int ShowerOverlapResult::GetNSamplingPoints() const
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
bool IsInitialized() const
Whether the track overlap result has been initialized.
ShowerOverlapResult()
Default constructor.
const XOverlap & GetXOverlap() const
Get the x overlap object.
bool operator<(const ShowerOverlapResult &rhs) const
Track overlap result less than operator.
unsigned int m_nSamplingPoints
The number of sampling points.
bool operator>(const ShowerOverlapResult &rhs) const
Track overlap result greater than operator.
float m_matchedFraction
The fraction of sampling points resulting in a match.
unsigned int GetNMatchedSamplingPoints() const
Get the number of matched sampling points.
bool m_isInitialized
Whether the track overlap result has been initialized.
unsigned int GetNSamplingPoints() const
Get the number of sampling points.
Header file for the lar x overlap class.
ShowerOverlapResult & operator=(const ShowerOverlapResult &rhs)
Track overlap result assigment operator.
float GetMatchedFraction() const
Get the fraction of sampling points resulting in a match.
XOverlap class.
Definition: LArXOverlap.h:17
unsigned int m_nMatchedSamplingPoints
The number of matched sampling points.
XOverlap m_xOverlap
The x overlap object.