LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
TrackShowerIdFeatureTool.h
Go to the documentation of this file.
1 
8 #ifndef LAR_TRACK_SHOWER_ID_FEATURE_TOOLS_H
9 #define LAR_TRACK_SHOWER_ID_FEATURE_TOOLS_H 1
10 
12 
13 namespace lar_content
14 {
15 
18 
22 class TwoDShowerFitFeatureTool : public ClusterCharacterisationFeatureTool
23 {
24 public:
29 
30  void Run(LArMvaHelper::MvaFeatureVector &featureVector, const pandora::Algorithm *const pAlgorithm, const pandora::Cluster *const pCluster);
31 
32 private:
33  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
34 
43  float CalculateShowerFitWidth(const pandora::Algorithm *const pAlgorithm, const pandora::Cluster *const pCluster) const;
44 
45  unsigned int m_slidingShowerFitWindow;
46  unsigned int m_slidingLinearFitWindow;
47 };
48 
49 //------------------------------------------------------------------------------------------------------------------------------------------
50 //------------------------------------------------------------------------------------------------------------------------------------------
51 
55 class TwoDLinearFitFeatureTool : public ClusterCharacterisationFeatureTool
56 {
57 public:
62 
63  void Run(LArMvaHelper::MvaFeatureVector &featureVector, const pandora::Algorithm *const pAlgorithm, const pandora::Cluster *const pCluster);
64 
65 private:
66  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
67 
79  void CalculateVariablesSlidingLinearFit(const pandora::Cluster *const pCluster, float &straightLineLengthLarge, float &diffWithStraigthLineMean,
80  float &diffWithStraightLineSigma, float &dTdLWidth, float &maxFitGapLength, float &rmsSlidingLinearFit) const;
81 
82  unsigned int m_slidingLinearFitWindow;
84 };
85 
86 //------------------------------------------------------------------------------------------------------------------------------------------
87 //------------------------------------------------------------------------------------------------------------------------------------------
88 
92 class TwoDVertexDistanceFeatureTool : public ClusterCharacterisationFeatureTool
93 {
94 public:
99 
100  void Run(LArMvaHelper::MvaFeatureVector &featureVector, const pandora::Algorithm *const pAlgorithm, const pandora::Cluster *const pCluster);
101 
102 private:
103  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
104 
112  float CalculateVertexDistance(const pandora::Algorithm *const pAlgorithm, const pandora::Cluster *const pCluster) const;
113 
115 };
116 
117 //------------------------------------------------------------------------------------------------------------------------------------------
118 //------------------------------------------------------------------------------------------------------------------------------------------
119 
123 class ThreeDLinearFitFeatureTool : public PfoCharacterisationFeatureTool
124 {
125 public:
130 
131  void Run(LArMvaHelper::MvaFeatureVector &featureVector, const pandora::Algorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pInputPfo);
132 
133 private:
134  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
135 
147  void CalculateVariablesSlidingLinearFit(const pandora::Cluster *const pCluster, float &straightLineLengthLarge, float &diffWithStraigthLineMean,
148  float &maxFitGapLength, float &rmsSlidingLinearFit) const;
149 
152 };
153 
154 //------------------------------------------------------------------------------------------------------------------------------------------
155 //------------------------------------------------------------------------------------------------------------------------------------------
156 
160 class ThreeDVertexDistanceFeatureTool : public PfoCharacterisationFeatureTool
161 {
162 public:
167 
168  void Run(LArMvaHelper::MvaFeatureVector &featureVector, const pandora::Algorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pInputPfo);
169 
170 private:
171  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
172 
173 };
174 
175 //------------------------------------------------------------------------------------------------------------------------------------------
176 //------------------------------------------------------------------------------------------------------------------------------------------
177 
181 class ThreeDOpeningAngleFeatureTool : public PfoCharacterisationFeatureTool
182 {
183 public:
188 
189  void Run(LArMvaHelper::MvaFeatureVector &featureVector, const pandora::Algorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pInputPfo);
190 
191 private:
192  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
193  void Divide3DCaloHitList(const pandora::Algorithm *const pAlgorithm, pandora::CaloHitList &threeDCaloHitList,
194  pandora::CartesianPointVector &pointVectorStart, pandora::CartesianPointVector &pointVectorEnd);
195 
196  float OpeningAngle(const pandora::CartesianVector &principal, const pandora::CartesianVector &secondary, const pandora::CartesianVector &eigenValues) const;
197 };
198 
199 //------------------------------------------------------------------------------------------------------------------------------------------
200 //------------------------------------------------------------------------------------------------------------------------------------------
201 
205 class ThreeDPCAFeatureTool : public PfoCharacterisationFeatureTool
206 {
207 public:
212 
213  void Run(LArMvaHelper::MvaFeatureVector &featureVector, const pandora::Algorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pInputPfo);
214 
215 private:
216  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
217 };
218 
219 //------------------------------------------------------------------------------------------------------------------------------------------
220 //------------------------------------------------------------------------------------------------------------------------------------------
221 
225 class ThreeDChargeFeatureTool : public PfoCharacterisationFeatureTool
226 {
227 public:
232 
237  {
238  public:
242  VertexComparator(const pandora::CartesianVector vertexPosition2D);
243 
251  bool operator()(const pandora::CaloHit *const left, const pandora::CaloHit *const right) const;
252 
253  pandora::CartesianVector m_neutrinoVertex; //The neutrino vertex used to sort
254 
255  };
256 
257  void Run(LArMvaHelper::MvaFeatureVector &featureVector, const pandora::Algorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pInputPfo);
258 
259 private:
271  void CalculateChargeVariables(const pandora::Algorithm *const pAlgorithm, const pandora::Cluster *const pCluster, float &totalCharge, float &chargeSigma,
272  float &chargeMean, float &endCharge);
273 
282  void OrderCaloHitsByDistanceToVertex(const pandora::Algorithm *const pAlgorithm, const pandora::Cluster *const pCluster, pandora::CaloHitList &caloHitList);
283 
284  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
285 
287 };
288 
289 } // namespace lar_content
290 
291 #endif // #ifndef LAR_TRACK_SHOWER_ID_FEATURE_TOOLS_H
LinearFitFeatureTool class for the calculation of variables related to sliding linear fit...
constexpr auto const & right(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:112
MvaTypes::MvaFeatureVector MvaFeatureVector
Definition: LArMvaHelper.h:58
MvaFeatureTool< const pandora::Algorithm *const, const pandora::ParticleFlowObject *const > PfoCharacterisationFeatureTool
VertexDistanceFeatureTool class for the calculation of distance to neutrino vertex.
unsigned int m_slidingShowerFitWindow
The sliding shower fit window.
void Run(LArMvaHelper::MvaFeatureVector &featureVector, const pandora::Algorithm *const pAlgorithm, const pandora::Cluster *const pCluster)
unsigned int m_slidingLinearFitWindow
The sliding linear fit window.
MvaFeatureTool< const pandora::Algorithm *const, const pandora::Cluster *const > ClusterCharacterisationFeatureTool
unsigned int m_slidingLinearFitWindow
The sliding linear fit window.
VertexDistanceFeatureTool class for the calculation of distance to neutrino vertex.
float CalculateShowerFitWidth(const pandora::Algorithm *const pAlgorithm, const pandora::Cluster *const pCluster) const
Calculation of the shower fit width variable.
unsigned int m_slidingLinearFitWindowLarge
The sliding linear fit window - should be large, providing a simple linear fit.
Header file for the lar support vector machine class.
unsigned int m_slidingLinearFitWindow
The sliding linear fit window.
ChargeFeatureTool class for the calculation of concentration.
VertexComparator class for comparison of two points wrt neutrino vertex position. ...
constexpr auto const & left(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:104
unsigned int m_slidingLinearFitWindowLarge
The sliding linear fit window - should be large, providing a simple linear fit.
PCA class for the calculation of PCA-related variables.
ShowerFitFeatureTool to calculate variables related to sliding shower fit.
float m_endChargeFraction
Fraction of hits that will be considered to calculate end charge (default 10%)
LinearFitFeatureTool class for the calculation of variables related to sliding linear fit...
MvaFeatureTool class template.
Definition: LArMvaHelper.h:27
unsigned int m_slidingLinearFitWindow
The sliding linear fit window.
VertexDistanceFeatureTool class for the calculation of distance to neutrino vertex.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)