Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
Slice.h
Go to the documentation of this file.
1
7#ifndef LAR_PANDORA_SLICE_H
8#define LAR_PANDORA_SLICE_H 1
9
11
12namespace lar_pandora {
13
17 class Slice {
18 public:
27 Slice(const float topologicalScore,
28 const PFParticleVector& targetHypothesis,
29 const PFParticleVector& crHypothesis,
30 const bool isTarget = false);
31
35 float GetTopologicalScore() const;
36
41
46
50 bool IsTaggedAsTarget() const;
51
55 void TagAsTarget();
56
60 void TagAsCosmic();
61
62 private:
68 };
69
70 typedef std::vector<Slice> SliceVector;
71
72 //------------------------------------------------------------------------------------------------------------------------------------------
73
74 inline Slice::Slice(const float topologicalScore,
75 const PFParticleVector& targetHypothesis,
76 const PFParticleVector& crHypothesis,
77 const bool isTarget)
78 : m_topologicalScore(topologicalScore)
79 , m_targetHypothesis(targetHypothesis)
80 , m_crHypothesis(crHypothesis)
81 , m_isTarget(isTarget)
82 {}
83
84 //------------------------------------------------------------------------------------------------------------------------------------------
85
86 inline float Slice::GetTopologicalScore() const { return m_topologicalScore; }
87
88 //------------------------------------------------------------------------------------------------------------------------------------------
89
91
92 //------------------------------------------------------------------------------------------------------------------------------------------
93
95
96 //------------------------------------------------------------------------------------------------------------------------------------------
97
98 inline bool Slice::IsTaggedAsTarget() const { return m_isTarget; }
99
100 //------------------------------------------------------------------------------------------------------------------------------------------
101
102 inline void Slice::TagAsTarget() { m_isTarget = true; }
103
104 //------------------------------------------------------------------------------------------------------------------------------------------
105
106 inline void Slice::TagAsCosmic() { m_isTarget = false; }
107
108} // namespace lar_pandora
109
110#endif // #ifndef LAR_PANDORA_SLICE_H
helper function for LArPandoraInterface producer module
Slice class.
Definition Slice.h:17
void TagAsTarget()
Tag the slice as a neutrino / test beam particle.
Definition Slice.h:102
void TagAsCosmic()
Tag the slice as a cosmic.
Definition Slice.h:106
float GetTopologicalScore() const
Get the topological score for the slice - closer to 1 means more likely to be the target slice.
Definition Slice.h:86
const PFParticleVector & GetTargetHypothesis() const
Get the slice as reconstructed under the target hypothesis.
Definition Slice.h:90
bool m_isTarget
If the slice has been identified as a neutrino / beam particle.
Definition Slice.h:67
float m_topologicalScore
The topological neutrino / beam particle score from Pandora.
Definition Slice.h:63
PFParticleVector m_targetHypothesis
The slice as reconstructed under the neutrino / beam particle hypothesis.
Definition Slice.h:65
bool IsTaggedAsTarget() const
Check if the slice has been identified as a target.
Definition Slice.h:98
Slice(const float topologicalScore, const PFParticleVector &targetHypothesis, const PFParticleVector &crHypothesis, const bool isTarget=false)
Default constructor.
Definition Slice.h:74
PFParticleVector m_crHypothesis
The slice as reconstructed under the cosmic-ray hypothesis.
Definition Slice.h:66
const PFParticleVector & GetCosmicRayHypothesis() const
Get the slice as reconstructed under the cosmic-ray hypothesis.
Definition Slice.h:94
std::vector< Slice > SliceVector
Definition Slice.h:70
std::vector< art::Ptr< recob::PFParticle > > PFParticleVector