Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
srcs
larreco
larreco
RecoAlg
CMTool
CMTAlgPriority
CPAlgoIgnoreTracks.cxx
Go to the documentation of this file.
1
#include "
larreco/RecoAlg/CMTool/CMTAlgPriority/CPAlgoIgnoreTracks.h
"
2
3
#include "TMath.h"
4
5
namespace
cmtool {
6
7
//----------------------------------------------------------
8
CPAlgoIgnoreTracks::CPAlgoIgnoreTracks
() :
CPriorityAlgoBase
()
9
//----------------------------------------------------------
10
{
11
SetMinHits
(20);
12
SetMinModHitDens
(1.4);
13
SetMinMHitWires
(3.5);
14
//"fPrincipal" is log(1-eigenvalue_principal)
15
// >-7 means EP > 0.99908
16
SetMinPrincipal
(-6.);
17
}
18
19
//-----------------------------
20
void
CPAlgoIgnoreTracks::Reset
()
21
//-----------------------------
22
{
23
24
}
25
26
//------------------------------------------------------------------------------
27
float
CPAlgoIgnoreTracks::Priority
(const ::cluster::ClusterParamsAlg &
cluster
)
28
//------------------------------------------------------------------------------
29
{
30
//return -1 for tracks, otherwise return nhits
31
auto
nhit = cluster.GetNHits();
32
33
//NOTE! default return value for non-track clusters is nhits
34
//but if you want to sort by a different way, use a separate
35
//CPAlgo in an array with this one, and use the kLastAlgo option
36
//to sort by that algo and still remove tracks!
37
return
(
IsTrack
(cluster) ? -1 : (
float
)nhit );
38
}
39
40
//------------------------------
41
void
CPAlgoIgnoreTracks::Report
()
42
//------------------------------
43
{
44
45
}
46
47
48
bool
CPAlgoIgnoreTracks::IsTrack
(const ::cluster::ClusterParamsAlg &
cluster
)
49
{
50
double
fPrincipal = TMath::Log(1-cluster.GetParams().eigenvalue_principal);
51
52
bool
isTrack =
false
;
53
if
(
//cluster.GetNHits() > _min_hits &&
54
cluster.GetParams().modified_hit_density <
_min_mod_hit_dens
||
55
cluster.GetParams().multi_hit_wires <
_min_multihit_wires
||
56
fPrincipal <
_min_principal
)
57
isTrack =
true
;
58
59
return
isTrack;
60
}
61
}
cluster
process_name cluster
Definition:
cheaterreco.fcl:51
cmtool::CPAlgoIgnoreTracks::_min_multihit_wires
Double_t _min_multihit_wires
Definition:
CPAlgoIgnoreTracks.h:94
cmtool::CPAlgoIgnoreTracks::IsTrack
bool IsTrack(const ::cluster::ClusterParamsAlg &cluster)
Function to check if cluster is a track.
Definition:
CPAlgoIgnoreTracks.cxx:48
cmtool::CPAlgoIgnoreTracks::SetMinModHitDens
void SetMinModHitDens(Double_t AHO)
Definition:
CPAlgoIgnoreTracks.h:85
cmtool::CPAlgoIgnoreTracks::_min_principal
Double_t _min_principal
Definition:
CPAlgoIgnoreTracks.h:95
cmtool::CPriorityAlgoBase
Definition:
CPriorityAlgoBase.h:27
cmtool::CPAlgoIgnoreTracks::SetMinMHitWires
void SetMinMHitWires(Double_t BOKE)
Definition:
CPAlgoIgnoreTracks.h:86
cmtool::CPAlgoIgnoreTracks::CPAlgoIgnoreTracks
CPAlgoIgnoreTracks()
Default constructor.
Definition:
CPAlgoIgnoreTracks.cxx:8
cmtool::CPAlgoIgnoreTracks::SetMinPrincipal
void SetMinPrincipal(Double_t HEKOKI)
Definition:
CPAlgoIgnoreTracks.h:87
cmtool::CPAlgoIgnoreTracks::SetMinHits
void SetMinHits(size_t BAKA)
Setter for track-like parameters.
Definition:
CPAlgoIgnoreTracks.h:84
cmtool::CPAlgoIgnoreTracks::Priority
virtual float Priority(const ::cluster::ClusterParamsAlg &cluster)
Definition:
CPAlgoIgnoreTracks.cxx:27
CPAlgoIgnoreTracks.h
Class def header for a class CPAlgoIgnoreTracks.
cmtool::CPAlgoIgnoreTracks::Report
virtual void Report()
Definition:
CPAlgoIgnoreTracks.cxx:41
cmtool::CPAlgoIgnoreTracks::_min_mod_hit_dens
Double_t _min_mod_hit_dens
Definition:
CPAlgoIgnoreTracks.h:93
cmtool::CPAlgoIgnoreTracks::Reset
virtual void Reset()
Function to reset the algorithm instance, called together with manager's Reset()
Definition:
CPAlgoIgnoreTracks.cxx:20
Generated by
1.8.5