LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
LArTrackOverlapResult.h
Go to the documentation of this file.
1 
8 #ifndef LAR_TRACK_OVERLAP_RESULT_H
9 #define LAR_TRACK_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 
40  TrackOverlapResult(const unsigned int nMatchedSamplingPoints, const unsigned int nSamplingPoints, const float chi2);
41 
48 
52  virtual ~TrackOverlapResult();
53 
59  bool IsInitialized() const;
60 
66  unsigned int GetNMatchedSamplingPoints() const;
67 
73  unsigned int GetNSamplingPoints() const;
74 
80  float GetMatchedFraction() const;
81 
87  float GetChi2() const;
88 
94  float GetReducedChi2() const;
95 
101  bool operator<(const TrackOverlapResult &rhs) const;
102 
108  bool operator>(const TrackOverlapResult &rhs) const;
109 
116 
117 protected:
120  unsigned int m_nSamplingPoints;
122  float m_chi2;
124 };
125 
126 //------------------------------------------------------------------------------------------------------------------------------------------
127 
132 {
133 public:
138 
147  TransverseOverlapResult(const unsigned int nMatchedSamplingPoints, const unsigned int nSamplingPoints, const float chi2, const XOverlap &xOverlap);
148 
155 
160 
166  const XOverlap &GetXOverlap() const;
167 
174 
175 private:
177 };
178 
179 typedef std::vector<TransverseOverlapResult> TransverseOverlapResultVector;
180 
188 
189 //------------------------------------------------------------------------------------------------------------------------------------------
190 
195 {
196 public:
201 
209  LongitudinalOverlapResult(const TrackOverlapResult trackOverlapResult, const float innerChi2, const float outerChi2);
210 
220  LongitudinalOverlapResult(const unsigned int nMatchedSamplingPoints, const unsigned int nSamplingPoints, const float chi2,
221  const float innerChi2, const float outerChi2);
222 
229 
234 
240  float GetInnerChi2() const;
241 
247  float GetOuterChi2() const;
248 
255 
256 private:
257  float m_innerChi2;
258  float m_outerChi2;
259 };
260 
261 typedef std::vector<LongitudinalOverlapResult> LongitudinalOverlapResultVector;
262 
263 //------------------------------------------------------------------------------------------------------------------------------------------
264 
269 {
270 public:
275 
283  FragmentOverlapResult(const TrackOverlapResult trackOverlapResult, const pandora::CaloHitList &caloHitList, const pandora::ClusterList &clusterList);
284 
294  FragmentOverlapResult(const unsigned int nMatchedSamplingPoints, const unsigned int nSamplingPoints, const float chi2,
295  const pandora::CaloHitList &caloHitList, const pandora::ClusterList &clusterList);
296 
303 
308 
314  const pandora::CaloHitList &GetFragmentCaloHitList() const;
315 
321  const pandora::ClusterList &GetFragmentClusterList() const;
322 
328  pandora::HitType GetFragmentHitType() const;
329 
336 
337 private:
338  pandora::CaloHitList m_caloHitList;
339  pandora::ClusterList m_clusterList;
340 };
341 
342 typedef std::vector<FragmentOverlapResult> FragmentOverlapResultVector;
343 
344 //------------------------------------------------------------------------------------------------------------------------------------------
345 
350 {
351 public:
356 
366  DeltaRayOverlapResult(const unsigned int nMatchedSamplingPoints, const unsigned int nSamplingPoints, const float chi2,
367  const XOverlap &xOverlap, const pandora::PfoList &commonMuonPfoList);
368 
375 
379  virtual ~DeltaRayOverlapResult();
380 
386  const pandora::PfoList &GetCommonMuonPfoList() const;
387 
394 
395 private:
396  pandora::PfoList m_commonMuonPfoList;
397 };
398 
399 typedef std::vector<DeltaRayOverlapResult> DeltaRayOverlapResultVector;
400 
401 //------------------------------------------------------------------------------------------------------------------------------------------
402 //------------------------------------------------------------------------------------------------------------------------------------------
403 
405 {
406  return m_isInitialized;
407 }
408 
409 //------------------------------------------------------------------------------------------------------------------------------------------
410 
412 {
413  if (m_isInitialized)
415 
416  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
417 }
418 
419 //------------------------------------------------------------------------------------------------------------------------------------------
420 
421 inline unsigned int TrackOverlapResult::GetNSamplingPoints() const
422 {
423  if (m_isInitialized)
424  return m_nSamplingPoints;
425 
426  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
427 }
428 
429 //------------------------------------------------------------------------------------------------------------------------------------------
430 
432 {
433  if (m_isInitialized)
434  return m_matchedFraction;
435 
436  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
437 }
438 
439 //------------------------------------------------------------------------------------------------------------------------------------------
440 
441 inline float TrackOverlapResult::GetChi2() const
442 {
443  if (m_isInitialized)
444  return m_chi2;
445 
446  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
447 }
448 
449 //------------------------------------------------------------------------------------------------------------------------------------------
450 
452 {
453  if (m_isInitialized)
454  return m_reducedChi2;
455 
456  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
457 }
458 
459 //------------------------------------------------------------------------------------------------------------------------------------------
460 //------------------------------------------------------------------------------------------------------------------------------------------
461 
463 {
464  if (m_isInitialized)
465  return m_xOverlap;
466 
467  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
468 }
469 
470 //------------------------------------------------------------------------------------------------------------------------------------------
471 //------------------------------------------------------------------------------------------------------------------------------------------
472 
474 {
475  return m_innerChi2;
476 }
477 
478 //------------------------------------------------------------------------------------------------------------------------------------------
479 
481 {
482  return m_outerChi2;
483 }
484 
485 //------------------------------------------------------------------------------------------------------------------------------------------
486 //------------------------------------------------------------------------------------------------------------------------------------------
487 
488 inline const pandora::CaloHitList &FragmentOverlapResult::GetFragmentCaloHitList() const
489 {
490  return m_caloHitList;
491 }
492 
493 //------------------------------------------------------------------------------------------------------------------------------------------
494 
495 inline const pandora::ClusterList &FragmentOverlapResult::GetFragmentClusterList() const
496 {
497  return m_clusterList;
498 }
499 
500 //------------------------------------------------------------------------------------------------------------------------------------------
501 //------------------------------------------------------------------------------------------------------------------------------------------
502 
503 inline const pandora::PfoList &DeltaRayOverlapResult::GetCommonMuonPfoList() const
504 {
505  return m_commonMuonPfoList;
506 }
507 
508 } // namespace lar_content
509 
510 #endif // #ifndef LAR_TRACK_OVERLAP_RESULT_H
LongitudinalOverlapResult class.
pandora::ClusterList m_clusterList
The list of fragment-associated clusters.
float m_chi2
The absolute chi2 value.
FragmentOverlapResult class.
unsigned int GetNMatchedSamplingPoints() const
Get the number of matched sampling points.
bool IsInitialized() const
Whether the track overlap result has been initialized.
std::vector< FragmentOverlapResult > FragmentOverlapResultVector
virtual ~TrackOverlapResult()
Destructor.
TrackOverlapResult()
Default constructor.
unsigned int m_nMatchedSamplingPoints
The number of matched sampling points.
bool m_isInitialized
Whether the track overlap result has been initialized.
float m_outerChi2
The outer chi squared.
std::vector< TransverseOverlapResult > TransverseOverlapResultVector
float m_innerChi2
The inner chi squared.
bool operator<(const TrackOverlapResult &rhs) const
Track overlap result less than operator.
const XOverlap & GetXOverlap() const
Get the x overlap object.
TransverseOverlapResult operator+(const TransverseOverlapResult &lhs, const TransverseOverlapResult &rhs)
Transverse overlap result + operator.
const pandora::CaloHitList & GetFragmentCaloHitList() const
Get the list of fragment-associated hits.
unsigned int GetNSamplingPoints() const
Get the number of sampling points.
float GetMatchedFraction() const
Get the fraction of sampling points resulting in a match.
const pandora::PfoList & GetCommonMuonPfoList() const
Get the common muon pfo list.
DeltaRayOverlapResult class.
TransverseOverlapResult class.
float GetReducedChi2() const
Get the chi2 per samping point value.
TrackOverlapResult class.
TrackOverlapResult & operator=(const TrackOverlapResult &rhs)
Track overlap result assigment operator.
std::vector< DeltaRayOverlapResult > DeltaRayOverlapResultVector
HitType
Definition: HitType.h:12
std::vector< LongitudinalOverlapResult > LongitudinalOverlapResultVector
Header file for the lar x overlap class.
bool operator>(const TrackOverlapResult &rhs) const
Track overlap result greater than operator.
float m_reducedChi2
The chi2 per samping point value.
pandora::PfoList m_commonMuonPfoList
The list of cosmic ray pfos that, in each view, lie close to the clusters of the tensor element...
unsigned int m_nSamplingPoints
The number of sampling points.
float m_matchedFraction
The fraction of sampling points resulting in a match.
XOverlap class.
Definition: LArXOverlap.h:17
const pandora::ClusterList & GetFragmentClusterList() const
Get the list of fragment-associated clusters.
float GetChi2() const
Get the absolute chi2 value.
pandora::CaloHitList m_caloHitList
The list of fragment-associated hits.
XOverlap m_xOverlap
The x overlap object.