LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
LArTrackTwoViewOverlapResult.h
Go to the documentation of this file.
1 
8 #ifndef LAR_TRACK_TWO_VIEW_OVERLAP_RESULT_H
9 #define LAR_TRACK_TWO_VIEW_OVERLAP_RESULT_H 1
10 
11 #include "Pandora/StatusCodes.h"
12 
15 
16 #include <vector>
17 
18 namespace lar_content
19 {
24 {
25 public:
30 
40  TwoViewDeltaRayOverlapResult(const TwoViewXOverlap &xOverlap, const pandora::PfoList &commonMuonPfoList,
41  const pandora::Cluster *const pBestMatchedCluster, const pandora::ClusterList &matchedClusterList, const float reducedChiSquared);
42 
49 
54 
60  bool IsInitialized() const;
61 
67  const TwoViewXOverlap &GetXOverlap() const;
68 
74  const pandora::Cluster *GetBestMatchedCluster() const;
75 
81  const pandora::PfoList &GetCommonMuonPfoList() const;
82 
88  const pandora::ClusterList &GetMatchedClusterList() const;
89 
95  float GetReducedChiSquared() const;
96 
102  const pandora::Cluster *GetBestMatchedAvailableCluster() const;
103 
110 
116  bool operator<(const TwoViewDeltaRayOverlapResult &rhs) const;
117 
118 private:
121  pandora::PfoList m_commonMuonPfoList;
122  const pandora::Cluster *m_pBestMatchedCluster;
123  pandora::ClusterList m_matchedClusterList;
125 };
126 
127 //------------------------------------------------------------------------------------------------------------------------------------------
128 
133 {
134 public:
139 
145  TrackTwoViewOverlapResult(const float matchingScore);
146 
153 
157  virtual ~TrackTwoViewOverlapResult();
158 
164  bool IsInitialized() const;
165 
171  float GetMatchingScore() const;
172 
178  bool operator<(const TrackTwoViewOverlapResult &rhs) const;
179 
185  bool operator>(const TrackTwoViewOverlapResult &rhs) const;
186 
193 
194 protected:
197 };
198 
199 //------------------------------------------------------------------------------------------------------------------------------------------
200 
205 {
206 public:
211 
222  TwoViewTransverseOverlapResult(const float matchingScore, const float downsamplingFactor, const unsigned int nSamplingPoints,
223  const unsigned int nMatchedSamplingPoints, const float correlationCoefficient, const TwoViewXOverlap &twoViewXOverlap);
224 
231 
236 
242  unsigned int GetNSamplingPoints() const;
243 
249  unsigned int GetNMatchedSamplingPoints() const;
250 
256  unsigned int GetNReUpsampledSamplingPoints() const;
257 
263  unsigned int GetNMatchedReUpsampledSamplingPoints() const;
264 
270  float GetCorrelationCoefficient() const;
271 
277  float GetLocallyMatchedFraction() const;
278 
284  const TwoViewXOverlap &GetTwoViewXOverlap() const;
285 
291  bool operator<(const TwoViewTransverseOverlapResult &rhs) const;
292 
299 
300 private:
302  unsigned int m_nSamplingPoints;
306 };
307 
308 typedef std::vector<TwoViewTransverseOverlapResult> TwoViewTransverseOverlapResultVector;
309 
310 //------------------------------------------------------------------------------------------------------------------------------------------
311 //------------------------------------------------------------------------------------------------------------------------------------------
312 
314 {
315  return m_isInitialized;
316 }
317 
318 //------------------------------------------------------------------------------------------------------------------------------------------
319 
321 {
322  return m_xOverlap;
323 }
324 
325 //------------------------------------------------------------------------------------------------------------------------------------------
326 
327 inline const pandora::Cluster *TwoViewDeltaRayOverlapResult::GetBestMatchedCluster() const
328 {
329  return m_pBestMatchedCluster;
330 }
331 
332 //------------------------------------------------------------------------------------------------------------------------------------------
333 
334 inline const pandora::PfoList &TwoViewDeltaRayOverlapResult::GetCommonMuonPfoList() const
335 {
336  return m_commonMuonPfoList;
337 }
338 
339 //------------------------------------------------------------------------------------------------------------------------------------------
340 
341 inline const pandora::ClusterList &TwoViewDeltaRayOverlapResult::GetMatchedClusterList() const
342 {
343  return m_matchedClusterList;
344 }
345 
346 //------------------------------------------------------------------------------------------------------------------------------------------
347 
349 {
350  return m_reducedChiSquared;
351 }
352 
353 //------------------------------------------------------------------------------------------------------------------------------------------
354 //------------------------------------------------------------------------------------------------------------------------------------------
355 
357 {
358  return m_isInitialized;
359 }
360 
361 //------------------------------------------------------------------------------------------------------------------------------------------
362 
364 {
365  if (m_isInitialized)
366  return m_matchingScore;
367 
368  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
369 }
370 
371 //------------------------------------------------------------------------------------------------------------------------------------------
372 //------------------------------------------------------------------------------------------------------------------------------------------
373 
375 {
376  if (m_isInitialized)
377  return m_nSamplingPoints;
378 
379  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
380 }
381 
382 //------------------------------------------------------------------------------------------------------------------------------------------
383 
385 {
386  if (m_isInitialized)
387  return m_nMatchedSamplingPoints;
388 
389  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
390 }
391 
392 //------------------------------------------------------------------------------------------------------------------------------------------
393 
395 {
396  if (m_isInitialized)
397  return static_cast<unsigned int>(m_downsamplingFactor * static_cast<float>(m_nSamplingPoints));
398 
399  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
400 }
401 
402 //------------------------------------------------------------------------------------------------------------------------------------------
403 
405 {
406  if (m_isInitialized)
407  return static_cast<unsigned int>(m_downsamplingFactor * static_cast<float>(m_nMatchedSamplingPoints));
408 
409  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
410 }
411 
412 //------------------------------------------------------------------------------------------------------------------------------------------
413 
415 {
416  if (m_isInitialized)
417  return m_correlationCoefficient;
418 
419  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
420 }
421 
422 //------------------------------------------------------------------------------------------------------------------------------------------
423 
425 {
426  if (m_isInitialized)
427  return (m_nSamplingPoints > 0 ? static_cast<float>(m_nMatchedSamplingPoints) / static_cast<float>(m_nSamplingPoints) : 0.f);
428 
429  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
430 }
431 
432 //------------------------------------------------------------------------------------------------------------------------------------------
433 
435 {
436  if (m_isInitialized)
437  return m_twoViewXOverlap;
438 
439  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
440 }
441 
442 } // namespace lar_content
443 
444 #endif // #ifndef LAR_TRACK_TWO_VIEW_OVERLAP_RESULT_H
const TwoViewXOverlap & GetTwoViewXOverlap() const
Get the two view x overlap object.
bool IsInitialized() const
Whether the track overlap result has been initialized.
bool IsInitialized() const
Whether the track overlap result has been initialized.
float GetMatchingScore() const
Get the matching score of the overlap result.
unsigned int GetNMatchedSamplingPoints() const
Get the number of matched sampling points.
float GetReducedChiSquared() const
Get the reduced chi squared value.
constexpr bool operator>(Interval< Q, Cat > const a, Quantity< Args... > const b) noexcept
Definition: intervals.h:507
pandora::ClusterList m_matchedClusterList
The list of clusters that lie on the projected hits.
bool m_isInitialized
Whether the track overlap result has been initialized.
float m_reducedChiSquared
The reduced chi squared of the best matched cluster.
unsigned int GetNMatchedReUpsampledSamplingPoints() const
Get the number of matched re-upsampled sampling points.
float GetLocallyMatchedFraction() const
Get the locally matched fraction.
pandora::PfoList m_commonMuonPfoList
The list of muon pfos whose clusters lie close to delta ray clusters in all views.
TFile f
Definition: plotHisto.C:6
const pandora::Cluster * GetBestMatchedAvailableCluster() const
Get the best matched available cluster.
TwoViewXOverlap m_xOverlap
The x overlap object.
const pandora::Cluster * GetBestMatchedCluster() const
Get the best matched cluster.
Header file for the lar x two view overlap class.
float GetCorrelationCoefficient() const
Get the correlation coefficient.
unsigned int GetNReUpsampledSamplingPoints() const
Get the number of re-upsampled sampling points.
float m_correlationCoefficient
The correlation coefficient.
bool operator<(const TwoViewDeltaRayOverlapResult &rhs) const
Track two view overlap result less than operator.
float m_matchingScore
The compatability score for the two objects associated with the overlap result.
TwoViewDeltaRayOverlapResult & operator=(const TwoViewDeltaRayOverlapResult &rhs)
Track overlap result assigment operator.
unsigned int GetNSamplingPoints() const
Get the number of sampling points.
Header file for the lar track overlap result class.
const pandora::Cluster * m_pBestMatchedCluster
The largest cluster that lies on the projected hits.
TwoViewXOverlap class.
unsigned int m_nSamplingPoints
The number of sampling points.
const pandora::ClusterList & GetMatchedClusterList() const
Get the matched cluster list.
std::vector< TwoViewTransverseOverlapResult > TwoViewTransverseOverlapResultVector
TwoViewXOverlap m_twoViewXOverlap
The two view x overlap object.
const pandora::PfoList & GetCommonMuonPfoList() const
Get the common muon pfo list.
bool m_isInitialized
Whether the two view delta ray overlap result has been initialized.
unsigned int m_nMatchedSamplingPoints
The number of matched sampling points.
const TwoViewXOverlap & GetXOverlap() const
Get the x overlap object.