LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
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
float
CPAlgoIgnoreTracks::Priority
(const ::cluster::ClusterParamsAlg&
cluster
)
26
//------------------------------------------------------------------------------
27
{
28
//return -1 for tracks, otherwise return nhits
29
auto
nhit = cluster.GetNHits();
30
31
//NOTE! default return value for non-track clusters is nhits
32
//but if you want to sort by a different way, use a separate
33
//CPAlgo in an array with this one, and use the kLastAlgo option
34
//to sort by that algo and still remove tracks!
35
return
(
IsTrack
(cluster) ? -1 : (
float
)nhit);
36
}
37
38
//------------------------------
39
void
CPAlgoIgnoreTracks::Report
()
40
//------------------------------
41
{}
42
43
bool
CPAlgoIgnoreTracks::IsTrack
(const ::cluster::ClusterParamsAlg&
cluster
)
44
{
45
double
fPrincipal = TMath::Log(1 - cluster.GetParams().eigenvalue_principal);
46
47
bool
isTrack =
false
;
48
if
(
//cluster.GetNHits() > _min_hits &&
49
cluster.GetParams().modified_hit_density <
_min_mod_hit_dens
||
50
cluster.GetParams().multi_hit_wires <
_min_multihit_wires
|| fPrincipal <
_min_principal
)
51
isTrack =
true
;
52
53
return
isTrack;
54
}
55
}
cmtool::CPAlgoIgnoreTracks::_min_multihit_wires
Double_t _min_multihit_wires
Definition:
CPAlgoIgnoreTracks.h:91
cmtool::CPAlgoIgnoreTracks::IsTrack
bool IsTrack(const ::cluster::ClusterParamsAlg &cluster)
Function to check if cluster is a track.
Definition:
CPAlgoIgnoreTracks.cxx:43
cmtool::CPAlgoIgnoreTracks::SetMinModHitDens
void SetMinModHitDens(Double_t AHO)
Definition:
CPAlgoIgnoreTracks.h:84
cmtool::CPAlgoIgnoreTracks::_min_principal
Double_t _min_principal
Definition:
CPAlgoIgnoreTracks.h:92
cluster
Cluster finding and building.
Definition:
SmallClusterFilter_module.cc:34
cmtool::CPriorityAlgoBase
Definition:
CPriorityAlgoBase.h:27
cmtool::CPAlgoIgnoreTracks::SetMinMHitWires
void SetMinMHitWires(Double_t BOKE)
Definition:
CPAlgoIgnoreTracks.h:85
cmtool::CPAlgoIgnoreTracks::CPAlgoIgnoreTracks
CPAlgoIgnoreTracks()
Default constructor.
Definition:
CPAlgoIgnoreTracks.cxx:8
cmtool::CPAlgoIgnoreTracks::SetMinPrincipal
void SetMinPrincipal(Double_t HEKOKI)
Definition:
CPAlgoIgnoreTracks.h:86
cmtool::CPAlgoIgnoreTracks::SetMinHits
void SetMinHits(size_t BAKA)
Setter for track-like parameters.
Definition:
CPAlgoIgnoreTracks.h:83
cmtool::CPAlgoIgnoreTracks::Priority
virtual float Priority(const ::cluster::ClusterParamsAlg &cluster)
Definition:
CPAlgoIgnoreTracks.cxx:25
CPAlgoIgnoreTracks.h
Class def header for a class CPAlgoIgnoreTracks.
cmtool::CPAlgoIgnoreTracks::Report
virtual void Report()
Definition:
CPAlgoIgnoreTracks.cxx:39
cmtool
Definition:
CFAlgoQRatio.cxx:3
cmtool::CPAlgoIgnoreTracks::_min_mod_hit_dens
Double_t _min_mod_hit_dens
Definition:
CPAlgoIgnoreTracks.h:90
cmtool::CPAlgoIgnoreTracks::Reset
virtual void Reset()
Function to reset the algorithm instance, called together with manager's Reset()
Definition:
CPAlgoIgnoreTracks.cxx:20
larreco
v09_25_00
source
larreco
RecoAlg
CMTool
CMTAlgPriority
CPAlgoIgnoreTracks.cxx
Generated on Thu May 2 2024 20:59:47 for LArSoft by
1.8.11