All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MvaPfoCharacterisationAlgorithm.h
Go to the documentation of this file.
1 /**
2  * @file larpandoracontent/LArTrackShowerId/MvaPfoCharacterisationAlgorithm.h
3  *
4  * @brief Header file for the mva pfo characterisation algorithm class.
5  *
6  * $Log: $
7  */
8 #ifndef LAR_MVA_PFO_CHARACTERISATION_ALGORITHM_H
9 #define LAR_MVA_PFO_CHARACTERISATION_ALGORITHM_H 1
10 
12 
15 
18 
19 #include "Pandora/PandoraInternal.h"
20 
21 namespace lar_content
22 {
23 
24 /**
25  * @brief MvaPfoCharacterisationAlgorithm class
26  */
27 template <typename T>
29 {
30 public:
31  /**
32  * @brief Default constructor
33  */
35 
36 protected:
37  virtual bool IsClearTrack(const pandora::ParticleFlowObject *const pPfo) const;
38  virtual bool IsClearTrack(const pandora::Cluster *const pCluster) const;
39  pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle);
40 
42 
44  PfoCharacterisationFeatureTool::FeatureToolMap m_featureToolMapNoChargeInfo; ///< FeatureToolMap as a map for missing W view
45 
46  pandora::StringVector m_algorithmToolNames; ///< Vector of strings saving feature tool order for use in feature calculation
47  pandora::StringVector m_algorithmToolNamesNoChargeInfo; ///< Vector of strings saving feature tool order for use in feature calculation (missing W view)
48 
49  T m_mva; ///< The mva
50  T m_mvaNoChargeInfo; ///< The mva for missing W view
51 
52  bool m_persistFeatures; ///< Whether to write the features to the properties map
53  bool m_trainingSetMode; ///< Whether to train
54  bool m_testBeamMode; ///< Whether the training set is from a test beam experiment
55  bool m_enableProbability; ///< Whether to use probabilities instead of binary classification
56  bool m_useThreeDInformation; ///< Whether to use 3D information
57  float m_minProbabilityCut; ///< The minimum probability to label a cluster as track-like
58  unsigned int m_minCaloHitsCut; ///< The minimum number of calo hits to qualify as a track
59  bool m_applyFiducialCut; ///< Whether to apply a fiducial volume cut during training
60  float m_fiducialMinX; ///< Fiducial volume minimum x
61  float m_fiducialMaxX; ///< Fiducial volume maximum x
62  float m_fiducialMinY; ///< Fiducial volume minimum y
63  float m_fiducialMaxY; ///< Fiducial volume maximum y
64  float m_fiducialMinZ; ///< Fiducial volume minimum z
65  float m_fiducialMaxZ; ///< Fiducial volume maximum z
66  bool m_applyReconstructabilityChecks; ///< Whether to apply reconstructability checks during training
67 
68  std::string m_caloHitListName; ///< Name of input calo hit list
69  std::string m_mcParticleListName; ///< Name of input MC particle list
70 
71  std::string m_trainingOutputFile; ///< The training output file
72  std::string m_filePathEnvironmentVariable; ///< The environment variable providing a list of paths to mva files
73  std::string m_mvaFileName; ///< The mva input file
74  std::string m_mvaName; ///< The name of the mva to find
75  std::string m_mvaFileNameNoChargeInfo; ///< The mva input file for PFOs missing the W view, and thus charge info
76  std::string m_mvaNameNoChargeInfo; ///< The name of the mva to find for PFOs missing the W view, and thus charge info
77 
78  LArMCParticleHelper::PrimaryParameters m_primaryParameters; ///< The mc particle primary selection parameters
79 
80 private:
81  /**
82  * @brief Checks if the interaction vertex is within the fiducial volume
83  *
84  * @param vertex The coordinates of the vertex
85  */
86  bool PassesFiducialCut(const pandora::CartesianVector &vertex) const;
87 };
88 
91 
92 } // namespace lar_content
93 
94 #endif // #ifndef LAR_MVA_PFO_CHARACTERISATION_ALGORITHM_H
bool m_enableProbability
Whether to use probabilities instead of binary classification.
process_name vertex
Definition: cheaterreco.fcl:51
std::string m_trainingOutputFile
The training output file.
pandora::StringVector m_algorithmToolNamesNoChargeInfo
Vector of strings saving feature tool order for use in feature calculation (missing W view) ...
std::string m_caloHitListName
Name of input calo hit list.
LArMCParticleHelper::PrimaryParameters m_primaryParameters
The mc particle primary selection parameters.
std::string m_mcParticleListName
Name of input MC particle list.
unsigned int m_minCaloHitsCut
The minimum number of calo hits to qualify as a track.
bool m_testBeamMode
Whether the training set is from a test beam experiment.
ClusterCharacterisationFeatureTool::FeatureToolMap m_featureToolMap
The feature tool map.
PfoCharacterisationFeatureTool::FeatureToolMap m_featureToolMapNoChargeInfo
FeatureToolMap as a map for missing W view.
bool m_applyReconstructabilityChecks
Whether to apply reconstructability checks during training.
bool m_applyFiducialCut
Whether to apply a fiducial volume cut during training.
std::map< std::string, MvaFeatureTool< Ts...> * > FeatureToolMap
Definition: LArMvaHelper.h:37
Header file for the track shower id feature tools.
Header file for the lar adaptive boosted decision tree class.
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Header file for the lar monte carlo particle helper helper class.
Header file for the lar support vector machine class.
std::string m_mvaNameNoChargeInfo
The name of the mva to find for PFOs missing the W view, and thus charge info.
bool PassesFiducialCut(const pandora::CartesianVector &vertex) const
Checks if the interaction vertex is within the fiducial volume.
std::string m_mvaName
The name of the mva to find.
Header file for the pfo characterisation base algorithm class.
float m_minProbabilityCut
The minimum probability to label a cluster as track-like.
MvaPfoCharacterisationAlgorithm< AdaBoostDecisionTree > BdtPfoCharacterisationAlgorithm
std::string m_mvaFileNameNoChargeInfo
The mva input file for PFOs missing the W view, and thus charge info.
virtual bool IsClearTrack(const pandora::ParticleFlowObject *const pPfo) const
Whether pfo is identified as a clear track.
PfoCharacterisationFeatureTool::FeatureToolMap m_featureToolMapThreeD
FeatureToolMap as a map for 3D info.
std::string m_filePathEnvironmentVariable
The environment variable providing a list of paths to mva files.
MvaPfoCharacterisationAlgorithm< SupportVectorMachine > SvmPfoCharacterisationAlgorithm
pandora::StringVector m_algorithmToolNames
Vector of strings saving feature tool order for use in feature calculation.
bool m_persistFeatures
Whether to write the features to the properties map.
bool m_useThreeDInformation
Whether to use 3D information.