Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
ConnectionPathwayFeatureTool.h
Go to the documentation of this file.
1
8#ifndef LAR_CONNECTION_PATHWAY_FEATURE_TOOLS_H
9#define LAR_CONNECTION_PATHWAY_FEATURE_TOOLS_H 1
10
12
14
16
18
19namespace lar_content
20{
21
23
24//------------------------------------------------------------------------------------------------------------------------------------------
25
30{
31public:
36
37 void Run(LArMvaHelper::MvaFeatureVector &featureVector, const pandora::Algorithm *const pAlgorithm,
38 const pandora::ParticleFlowObject *const pShowerPfo, const pandora::CartesianVector &nuVertex3D,
39 const ProtoShowerMatch &protoShowerMatch, const pandora::CartesianPointVector &showerStarts3D);
40
41 void Run(LArMvaHelper::MvaFeatureMap &featureMap, pandora::StringVector &featureOrder, const std::string &featureToolName,
42 const pandora::Algorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pShowerPfo, const pandora::CartesianVector &nuVertex3D,
43 const ProtoShowerMatch &protoShowerMatch, const pandora::CartesianPointVector &showerStarts3D);
44
45private:
47
58 void GetViewInitialRegionVariables(const pandora::Algorithm *const pAlgorithm, const pandora::CartesianVector &nuVertex3D,
59 const ProtoShowerMatch &protoShowerMatch, const pandora::HitType hitType, float &initialGapSize, float &largestGapSize) const;
60
62 unsigned int m_nHitsToConsider;
65};
66
67//------------------------------------------------------------------------------------------------------------------------------------------
68
73{
74public:
79
80 void Run(LArMvaHelper::MvaFeatureVector &featureVector, const pandora::Algorithm *const pAlgorithm,
81 const pandora::ParticleFlowObject *const pShowerPfo, const pandora::CartesianVector &nuVertex3D,
82 const ProtoShowerMatch &protoShowerMatch, const pandora::CartesianPointVector &showerStarts3D);
83
84 void Run(LArMvaHelper::MvaFeatureMap &featureMap, pandora::StringVector &featureOrder, const std::string &featureToolName,
85 const pandora::Algorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pShowerPfo, const pandora::CartesianVector &nuVertex3D,
86 const ProtoShowerMatch &protoShowerMatch, const pandora::CartesianPointVector &showerStarts3D);
87
88private:
90
100 float Get2DKink(const pandora::Algorithm *const pAlgorithm, const ProtoShowerMatch &protoShowerMatch,
101 const pandora::CartesianVector &showerStart3D) const;
102
113 float GetLargest2DKinkFromView(const pandora::Algorithm *const pAlgorithm, const TwoDSlidingFitResult &spineFit,
114 const pandora::HitType hitType, const pandora::CartesianVector &showerStart3D) const;
115
117 unsigned int m_spineFitWindow;
121};
122
123//------------------------------------------------------------------------------------------------------------------------------------------
124
129{
130public:
135
136 void Run(LArMvaHelper::MvaFeatureVector &featureVector, const pandora::Algorithm *const pAlgorithm,
137 const pandora::ParticleFlowObject *const pShowerPfo, const pandora::CartesianVector &nuVertex3D,
138 const ProtoShowerMatch &protoShowerMatch, const pandora::CartesianPointVector &showerStarts3D);
139
140 void Run(LArMvaHelper::MvaFeatureMap &featureMap, pandora::StringVector &featureOrder, const std::string &featureToolName,
141 const pandora::Algorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pShowerPfo, const pandora::CartesianVector &nuVertex3D,
142 const ProtoShowerMatch &protoShowerMatch, const pandora::CartesianPointVector &showerStarts3D);
143
144private:
146
165 void GetViewShowerRegionVariables(const pandora::Algorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pShowerPfo,
166 const pandora::CartesianVector &nuVertex3D, const ProtoShowerMatch &protoShowerMatch, const pandora::HitType hitType,
167 const pandora::CartesianVector &showerStart3D, float &nHits, float &foundHitRatio, float &scatterAngle, float &openingAngle,
168 float &nuVertexEnergyAsymmetry, float &nuVertexEnergyWeightedMeanRadialDistance, float &showerStartEnergyAsymmetry,
169 float &showerStartMoliereRadius);
170
182 void BuildViewShower(const pandora::ParticleFlowObject *const pShowerPfo, const TwoDSlidingFitResult &spineFit,
183 const pandora::HitType hitType, const pandora::CartesianVector &showerStart2D, const pandora::CartesianVector &nuVertex2D,
184 pandora::CaloHitList &postShowerHitList, pandora::CartesianPointVector &postShowerPositions);
185
196 void GetShowerHitVariables(const pandora::CaloHitList &spineHitList, const pandora::CaloHitList &postShowerHitList,
197 const pandora::ParticleFlowObject *const pShowerPfo, const pandora::HitType hitType, float &nHits, float &foundHitRatio);
198
208 void CalculateViewScatterAngle(const pandora::CartesianVector &nuVertex2D, const TwoDSlidingFitResult &spineFitResult,
209 const pandora::CartesianVector &showerStart2D, const TwoDSlidingFitResult &showerFitResult, float &scatterAngle);
210
219 void CalculateViewOpeningAngle(const TwoDSlidingFitResult &showerFitResult, const pandora::CaloHitList &postShowerHitList,
220 const pandora::CartesianVector &showerStart2D, float &openingAngle);
221
233 const pandora::CaloHitList &postShowerHitList, const bool isDownstream, const pandora::CartesianVector &nuVertex2D,
234 float &nuVertexEnergyAsymmetry, float &nuVertexEnergyWeightedMeanRadialDistance);
235
245 void CalculateViewShowerStartConsistencyVariables(const TwoDSlidingFitResult &showerFitResult, const pandora::CaloHitList &postShowerHitList,
246 const bool isShowerDownstream, float &showerStartEnergyAsymmetry, float &showerStartMoliereRadius);
247
250 unsigned int m_spineFitWindow;
252 unsigned int m_showerFitWindow;
261};
262
263//------------------------------------------------------------------------------------------------------------------------------------------
264
269{
270public:
275
276 void Run(LArMvaHelper::MvaFeatureVector &featureVector, const pandora::Algorithm *const pAlgorithm,
277 const pandora::ParticleFlowObject *const pShowerPfo, const pandora::CartesianVector &nuVertex3D,
278 const ProtoShowerMatch &protoShowerMatch, const pandora::CartesianPointVector &showerStarts3D);
279
280 void Run(LArMvaHelper::MvaFeatureMap &featureMap, pandora::StringVector &featureOrder, const std::string &featureToolName,
281 const pandora::Algorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pShowerPfo, const pandora::CartesianVector &nuVertex3D,
282 const ProtoShowerMatch &protoShowerMatch, const pandora::CartesianPointVector &showerStarts3D);
283
284private:
286
293 void CalculateNAmbiguousViews(const ProtoShowerMatch &protoShowerMatch, float &nAmbiguousViews);
294
306 bool GetViewAmbiguousHitVariables(const pandora::Algorithm *const pAlgorithm, const ProtoShowerMatch &protoShowerMatch,
307 const pandora::HitType hitType, const pandora::CartesianVector &nuVertex3D, float &unaccountedHitEnergy);
308
319 void BuildAmbiguousSpines(const pandora::Algorithm *const pAlgorithm, const pandora::HitType hitType, const ProtoShower &protoShower,
320 const pandora::CartesianVector &nuVertex2D, std::map<int, pandora::CaloHitList> &ambiguousHitSpines,
321 pandora::CaloHitList &hitsToExcludeInEnergyCalcs);
322
333 const pandora::Algorithm *const pAlgorithm, const pandora::HitType hitType, const pandora::CaloHitList *&pCaloHitList) const;
334
345 const pandora::CaloHitList &caloHitList, const pandora::CaloHitList &ambiguousHitList, const pandora::CartesianVector &nuVertex2D);
346
348 std::string m_caloHitListNameU;
349 std::string m_caloHitListNameV;
350 std::string m_caloHitListNameW;
352 unsigned int m_maxSampleHits;
355};
356
357} // namespace lar_content
358
359#endif // #ifndef LAR_CONNECTION_PATHWAY_FEATURE_TOOLS_H
Header file for the ProtoShower class.
Header file for the lar two dimensional sliding fit result class.
Header file defining relevant internal typedefs, sort and string conversion functions.
AmbiguousRegionFeatureTool to calculate variables related to the shower region.
bool GetViewAmbiguousHitVariables(const pandora::Algorithm *const pAlgorithm, const ProtoShowerMatch &protoShowerMatch, const pandora::HitType hitType, const pandora::CartesianVector &nuVertex3D, float &unaccountedHitEnergy)
Calculate the ambiguous region variables for the input view.
std::string m_caloHitListNameU
The event U view hit list.
float m_maxTransverseDistance
The max. proximity of a hits, included in a trajectory energy calcs.
float m_maxTrackFraction
The fraction of found hits which are considered in the energy calcs.
unsigned int m_maxSampleHits
The max. number of hits considered in the spine energy calcs.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
pandora::StatusCode GetHitListOfType(const pandora::Algorithm *const pAlgorithm, const pandora::HitType hitType, const pandora::CaloHitList *&pCaloHitList) const
Obtain the event hit list of a given view.
pandora::CaloHitList FindAmbiguousContinuousSpine(const pandora::CaloHitList &caloHitList, const pandora::CaloHitList &ambiguousHitList, const pandora::CartesianVector &nuVertex2D)
Determine a continuous pathway of an ambigous particle's spine hits.
void BuildAmbiguousSpines(const pandora::Algorithm *const pAlgorithm, const pandora::HitType hitType, const ProtoShower &protoShower, const pandora::CartesianVector &nuVertex2D, std::map< int, pandora::CaloHitList > &ambiguousHitSpines, pandora::CaloHitList &hitsToExcludeInEnergyCalcs)
Determine the spine hits of the particles with which the ambiguous hits are shared.
float m_maxHitSeparation
The max. separation of connected hits.
std::string m_caloHitListNameV
The event V view hit list.
void CalculateNAmbiguousViews(const ProtoShowerMatch &protoShowerMatch, float &nAmbiguousViews)
Count the number of views with ambiguous hits.
void Run(LArMvaHelper::MvaFeatureVector &featureVector, const pandora::Algorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pShowerPfo, const pandora::CartesianVector &nuVertex3D, const ProtoShowerMatch &protoShowerMatch, const pandora::CartesianPointVector &showerStarts3D)
std::string m_caloHitListNameW
The event W view hit list.
ConnectionRegionFeatureTool to calculate variables related to the connection pathway region.
float m_pathwayLengthLimit
pathwayLengthLimit max. limit
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
float GetLargest2DKinkFromView(const pandora::Algorithm *const pAlgorithm, const TwoDSlidingFitResult &spineFit, const pandora::HitType hitType, const pandora::CartesianVector &showerStart3D) const
Obtain a cautious estimate of the largest 2D deflection of a connection pathway in a given view.
void Run(LArMvaHelper::MvaFeatureVector &featureVector, const pandora::Algorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pShowerPfo, const pandora::CartesianVector &nuVertex3D, const ProtoShowerMatch &protoShowerMatch, const pandora::CartesianPointVector &showerStarts3D)
int m_nLayersHalfWindow
The half window of each segment.
float Get2DKink(const pandora::Algorithm *const pAlgorithm, const ProtoShowerMatch &protoShowerMatch, const pandora::CartesianVector &showerStart3D) const
Obtain a cautious estimate of the largest 2D deflection of the connection pathway.
float m_pathwayScatteringAngle2DLimit
pathwayScatteringAngle2DLimit max. limit
InitialRegionFeatureTool to calculate variables related to the initial shower region.
float m_maxInitialGapSizeLimit
maxInitialGapSizeLimit max. limit
float m_minLargestGapSizeLimit
minLargestGapSizeLimit max. limit
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
void GetViewInitialRegionVariables(const pandora::Algorithm *const pAlgorithm, const pandora::CartesianVector &nuVertex3D, const ProtoShowerMatch &protoShowerMatch, const pandora::HitType hitType, float &initialGapSize, float &largestGapSize) const
Calculate the initial region variables for the input view.
void Run(LArMvaHelper::MvaFeatureVector &featureVector, const pandora::Algorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pShowerPfo, const pandora::CartesianVector &nuVertex3D, const ProtoShowerMatch &protoShowerMatch, const pandora::CartesianPointVector &showerStarts3D)
unsigned int m_nHitsToConsider
The number of hits which defines the initial region.
MvaTypes::MvaFeatureVector MvaFeatureVector
MvaTypes::MvaFeatureMap MvaFeatureMap
MvaFeatureTool class template.
ProtoShowerMatch class.
ShowerRegionFeatureTool to calculate variables related to the shower region.
unsigned int m_spineFitWindow
The spine fit window.
void GetViewShowerRegionVariables(const pandora::Algorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pShowerPfo, const pandora::CartesianVector &nuVertex3D, const ProtoShowerMatch &protoShowerMatch, const pandora::HitType hitType, const pandora::CartesianVector &showerStart3D, float &nHits, float &foundHitRatio, float &scatterAngle, float &openingAngle, float &nuVertexEnergyAsymmetry, float &nuVertexEnergyWeightedMeanRadialDistance, float &showerStartEnergyAsymmetry, float &showerStartMoliereRadius)
Calculate the shower region variables for the input view.
void CalculateViewNuVertexConsistencyVariables(const TwoDSlidingFitResult &spineFitResult, const pandora::CaloHitList &postShowerHitList, const bool isDownstream, const pandora::CartesianVector &nuVertex2D, float &nuVertexEnergyAsymmetry, float &nuVertexEnergyWeightedMeanRadialDistance)
Evaluate the neutrino vertex consistency variables.
void GetShowerHitVariables(const pandora::CaloHitList &spineHitList, const pandora::CaloHitList &postShowerHitList, const pandora::ParticleFlowObject *const pShowerPfo, const pandora::HitType hitType, float &nHits, float &foundHitRatio)
Evaluate the variables associated with the shower region hit multiplicity.
void BuildViewShower(const pandora::ParticleFlowObject *const pShowerPfo, const TwoDSlidingFitResult &spineFit, const pandora::HitType hitType, const pandora::CartesianVector &showerStart2D, const pandora::CartesianVector &nuVertex2D, pandora::CaloHitList &postShowerHitList, pandora::CartesianPointVector &postShowerPositions)
Collect the shower region hits in a given view.
float m_maxFoundHitRatioLimit
maxFoundHitRatio max. limit
void CalculateViewOpeningAngle(const TwoDSlidingFitResult &showerFitResult, const pandora::CaloHitList &postShowerHitList, const pandora::CartesianVector &showerStart2D, float &openingAngle)
Calculate the opening angle of the shower region.
float m_moliereFraction
The energy fraction which corresponds to minShowerStartMoliereRadius.
float m_maxScatterAngleLimit
maxScatterAngle max. limit
float m_showerRadius
The max. separation distance between a shower region hit and the shower core.
unsigned int m_showerFitWindow
The shower fit window.
float m_defaultRatio
Default float value for ratios.
void CalculateViewShowerStartConsistencyVariables(const TwoDSlidingFitResult &showerFitResult, const pandora::CaloHitList &postShowerHitList, const bool isShowerDownstream, float &showerStartEnergyAsymmetry, float &showerStartMoliereRadius)
Evaluate the shower start consistency variables.
void Run(LArMvaHelper::MvaFeatureVector &featureVector, const pandora::Algorithm *const pAlgorithm, const pandora::ParticleFlowObject *const pShowerPfo, const pandora::CartesianVector &nuVertex3D, const ProtoShowerMatch &protoShowerMatch, const pandora::CartesianPointVector &showerStarts3D)
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Read the algorithm settings.
float m_maxNuVertexEnergyWeightedMeanRadialDistanceLimit
maxNuVertexEnergyWeightedMeanRadialDistance max. limit
void CalculateViewScatterAngle(const pandora::CartesianVector &nuVertex2D, const TwoDSlidingFitResult &spineFitResult, const pandora::CartesianVector &showerStart2D, const TwoDSlidingFitResult &showerFitResult, float &scatterAngle)
Calculate the connection pathway-shower region scatter angle.
float m_edgeStep
The binning of the shower boundaries.
float m_minShowerStartMoliereRadiusLimit
minShowerStartMoliereRadius max. limit
float m_maxOpeningAngleLimit
maxOpeningAngle max. limit
Algorithm class. Algorithm addresses are held only by the algorithm manager. They have a fully define...
Definition Algorithm.h:21
CartesianVector class.
ParticleFlowObject class.
MvaFeatureTool< const pandora::Algorithm *const, const pandora::ParticleFlowObject *const, const pandora::CartesianVector &, const ProtoShowerMatch &, const pandora::CartesianPointVector & > ConnectionPathwayFeatureTool
HitType
Calorimeter hit type enum.
std::vector< std::string > StringVector
std::vector< CartesianVector > CartesianPointVector
MANAGED_CONTAINER< const CaloHit * > CaloHitList
StatusCode
The StatusCode enum.