Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
larpandoracontent
larpandoracontent
LArCheating
CheatingSliceSelectionTool.h
Go to the documentation of this file.
1
/**
2
* @file larpandoracontent/LArCheating/CheatingSliceSelectionTool.h
3
*
4
* @brief Header file for the cheating slice selection tool class.
5
*
6
* $Log: $
7
*/
8
#ifndef LAR_CHEATING_SLICE_SELECTION_TOOL_H
9
#define LAR_CHEATING_SLICE_SELECTION_TOOL_H 1
10
11
#include "
larpandoracontent/LArControlFlow/MasterAlgorithm.h
"
12
13
namespace
lar_content
14
{
15
16
/**
17
* @brief CheatingSliceSelectionTool class
18
*/
19
class
CheatingSliceSelectionTool
:
public
SliceSelectionBaseTool
20
{
21
public
:
22
/**
23
* @brief Default constructor
24
*/
25
CheatingSliceSelectionTool
();
26
27
/**
28
* @brief Select which slice(s) to use
29
*
30
* @param pAlgorithm the address of the master instance, used to access MCParticles when in training mode
31
* @param inputSliceVector the initial slice vector
32
* @param outputSliceVector the output slice vector
33
*/
34
void
SelectSlices
(
const
pandora::Algorithm *
const
pAlgorithm,
const
SliceVector
&inputSliceVector,
SliceVector
&outputSliceVector);
35
36
typedef
std::map<float, int, std::greater<float>>
MetricSliceIndexMap
;
37
38
protected
:
39
/**
40
* @brief Template method to determine if an MC particle matches the target criteria for slice selection. Return true if match.
41
*
42
* @param mcParticle the MC particle to check
43
*/
44
virtual
bool
IsTarget
(
const
pandora::MCParticle *
const
mcParticle)
const
= 0;
45
46
pandora::StatusCode
ReadSettings
(
const
pandora::TiXmlHandle xmlHandle);
47
48
protected
:
49
int
m_maxSlices
;
///< The maximum number of slices to retain (0 to retain all) - default 0
50
float
m_threshold
;
///< The minimum cut threshold to retain a slice (< 0 for no threshold) - default -1
51
std::string
m_cutVariable
;
///< The variable to cut on ("purity" or "completeness") - default "completeness"
52
};
53
54
}
// namespace lar_content
55
56
#endif // #ifndef LAR_CHEATING_SLICE_SELECTION_TOOL_H
lar_content::CheatingSliceSelectionTool::SelectSlices
void SelectSlices(const pandora::Algorithm *const pAlgorithm, const SliceVector &inputSliceVector, SliceVector &outputSliceVector)
Select which slice(s) to use.
Definition:
CheatingSliceSelectionTool.cc:26
lar_content::CheatingSliceSelectionTool::m_cutVariable
std::string m_cutVariable
The variable to cut on ("purity" or "completeness") - default "completeness".
Definition:
CheatingSliceSelectionTool.h:51
lar_content::SliceVector
std::vector< pandora::CaloHitList > SliceVector
Definition:
MasterAlgorithm.h:26
lar_content
Definition:
CheatingBeamParticleIdTool.cc:18
lar_content::CheatingSliceSelectionTool::m_maxSlices
int m_maxSlices
The maximum number of slices to retain (0 to retain all) - default 0.
Definition:
CheatingSliceSelectionTool.h:49
string
std::string string
Definition:
nybbler.cc:12
lar_content::CheatingSliceSelectionTool
CheatingSliceSelectionTool class.
Definition:
CheatingSliceSelectionTool.h:19
lar_content::CheatingSliceSelectionTool::MetricSliceIndexMap
std::map< float, int, std::greater< float > > MetricSliceIndexMap
Definition:
CheatingSliceSelectionTool.h:36
lar_content::CheatingSliceSelectionTool::ReadSettings
pandora::StatusCode ReadSettings(const pandora::TiXmlHandle xmlHandle)
Definition:
CheatingSliceSelectionTool.cc:122
MasterAlgorithm.h
Header file for the master algorithm class.
lar_content::CheatingSliceSelectionTool::m_threshold
float m_threshold
The minimum cut threshold to retain a slice (< 0 for no threshold) - default -1.
Definition:
CheatingSliceSelectionTool.h:50
lar_content::CheatingSliceSelectionTool::CheatingSliceSelectionTool
CheatingSliceSelectionTool()
Default constructor.
Definition:
CheatingSliceSelectionTool.cc:20
lar_content::SliceSelectionBaseTool
SliceSelectionBaseTool class.
Definition:
MasterAlgorithm.h:426
lar_content::CheatingSliceSelectionTool::IsTarget
virtual bool IsTarget(const pandora::MCParticle *const mcParticle) const =0
Template method to determine if an MC particle matches the target criteria for slice selection...
Generated by
1.8.11