Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
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
12#include "Pandora/StatusCodes.h"
13
15
16#include <cmath>
17#include <vector>
18
19namespace lar_content
20{
21
26{
27public:
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
117protected:
120 unsigned int m_nSamplingPoints;
122 float m_chi2;
124};
125
126//------------------------------------------------------------------------------------------------------------------------------------------
127
132{
133public:
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
175private:
177};
178
179typedef std::vector<TransverseOverlapResult> TransverseOverlapResultVector;
180
188
189//------------------------------------------------------------------------------------------------------------------------------------------
190
195{
196public:
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
256private:
259};
260
261typedef std::vector<LongitudinalOverlapResult> LongitudinalOverlapResultVector;
262
263//------------------------------------------------------------------------------------------------------------------------------------------
264
269{
270public:
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
315
322
329
336
337private:
340};
341
342typedef std::vector<FragmentOverlapResult> FragmentOverlapResultVector;
343
344//------------------------------------------------------------------------------------------------------------------------------------------
345
350{
351public:
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
387
394
395private:
397};
398
399typedef 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
421inline 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
441inline 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
492
493//------------------------------------------------------------------------------------------------------------------------------------------
494
499
500//------------------------------------------------------------------------------------------------------------------------------------------
501//------------------------------------------------------------------------------------------------------------------------------------------
502
507
508} // namespace lar_content
509
510#endif // #ifndef LAR_TRACK_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.
pandora::PfoList m_commonMuonPfoList
The list of cosmic ray pfos that, in each view, lie close to the clusters of the tensor element.
DeltaRayOverlapResult & operator=(const DeltaRayOverlapResult &rhs)
Track overlap result assigment operator.
const pandora::PfoList & GetCommonMuonPfoList() const
Get the common muon pfo list.
pandora::CaloHitList m_caloHitList
The list of fragment-associated hits.
pandora::ClusterList m_clusterList
The list of fragment-associated clusters.
const pandora::CaloHitList & GetFragmentCaloHitList() const
Get the list of fragment-associated hits.
pandora::HitType GetFragmentHitType() const
Get the fragment hit type.
FragmentOverlapResult & operator=(const FragmentOverlapResult &rhs)
Fragments overlap result assigment operator.
const pandora::ClusterList & GetFragmentClusterList() const
Get the list of fragment-associated clusters.
LongitudinalOverlapResult & operator=(const LongitudinalOverlapResult &rhs)
Track overlap result assigment operator.
float m_matchedFraction
The fraction of sampling points resulting in a match.
bool operator>(const TrackOverlapResult &rhs) const
Track overlap result greater than operator.
unsigned int GetNSamplingPoints() const
Get the number of sampling points.
float m_chi2
The absolute chi2 value.
bool IsInitialized() const
Whether the track overlap result has been initialized.
unsigned int GetNMatchedSamplingPoints() const
Get the number of matched sampling points.
float GetReducedChi2() const
Get the chi2 per samping point value.
float GetMatchedFraction() const
Get the fraction of sampling points resulting in a match.
float m_reducedChi2
The chi2 per samping point value.
TrackOverlapResult & operator=(const TrackOverlapResult &rhs)
Track overlap result assigment operator.
unsigned int m_nMatchedSamplingPoints
The number of matched sampling points.
float GetChi2() const
Get the absolute chi2 value.
bool m_isInitialized
Whether the track overlap result has been initialized.
unsigned int m_nSamplingPoints
The number of sampling points.
bool operator<(const TrackOverlapResult &rhs) const
Track overlap result less than operator.
XOverlap m_xOverlap
The x overlap object.
const XOverlap & GetXOverlap() const
Get the x overlap object.
TransverseOverlapResult & operator=(const TransverseOverlapResult &rhs)
Track overlap result assigment operator.
XOverlap class.
Definition LArXOverlap.h:18
StatusCodeException class.
std::vector< DeltaRayOverlapResult > DeltaRayOverlapResultVector
std::vector< LongitudinalOverlapResult > LongitudinalOverlapResultVector
std::vector< FragmentOverlapResult > FragmentOverlapResultVector
TransverseOverlapResult operator+(const TransverseOverlapResult &lhs, const TransverseOverlapResult &rhs)
Transverse overlap result + operator.
std::vector< TransverseOverlapResult > TransverseOverlapResultVector
HitType
Calorimeter hit type enum.
MANAGED_CONTAINER< const Cluster * > ClusterList
MANAGED_CONTAINER< const CaloHit * > CaloHitList
MANAGED_CONTAINER< const ParticleFlowObject * > PfoList