ClusterCreator.cxx
Go to the documentation of this file.
1 /** ****************************************************************************
2  * @file ClusterCreator.cxx
3  * @brief Helper functions to create a cluster - implementation file
4  * @date January 21, 2015
5  * @author petrillo@fnal.gov
6  * @see Cluster.h ClusterCreator.h
7  *
8  * ****************************************************************************/
9 
10 // declaration header
13 
14 // LArSoft libraries
16 
17 namespace cluster {
18 
20  util::GeometryUtilities const& gser,
22  float start_wire,
23  float sigma_start_wire,
24  float start_tick,
25  float sigma_start_tick,
26  float end_wire,
27  float sigma_end_wire,
28  float end_tick,
29  float sigma_end_tick,
31  geo::View_t view,
32  geo::PlaneID const& plane,
33  recob::Cluster::SentryArgument_t sentry /* = recob::Cluster::Sentry */
34  )
35  : cluster(CreateCluster(gser,
36  algo,
37  start_wire,
38  sigma_start_wire,
39  start_tick,
40  sigma_start_tick,
41  end_wire,
42  sigma_end_wire,
43  end_tick,
44  sigma_end_tick,
45  ID,
46  view,
47  plane,
48  sentry))
49  {} // ClusterCreator::ClusterCreator()
50 
51  //----------------------------------------------------------------------
54  util::GeometryUtilities const& gser,
56  float start_wire,
57  float sigma_start_wire,
58  float start_tick,
59  float sigma_start_tick,
60  float end_wire,
61  float sigma_end_wire,
62  float end_tick,
63  float sigma_end_tick,
65  geo::View_t view,
66  geo::PlaneID const& plane,
67  recob::Cluster::SentryArgument_t sentry /* = recob::Cluster::Sentry */
68  )
69  {
70  return recob::Cluster(start_wire,
71  sigma_start_wire,
72  start_tick,
73  sigma_start_tick,
74  algo.StartCharge(gser).value(),
75  algo.StartAngle().value(),
76  algo.StartOpeningAngle().value(),
77  end_wire,
78  sigma_end_wire,
79  end_tick,
80  sigma_end_tick,
81  algo.EndCharge(gser).value(),
82  algo.EndAngle().value(),
83  algo.EndOpeningAngle().value(),
84  algo.Integral().value(),
85  algo.IntegralStdDev().value(),
86  algo.SummedADC().value(),
87  algo.SummedADCStdDev().value(),
88  algo.NHits(),
89  algo.MultipleHitDensity(),
90  algo.Width(gser),
91  ID,
92  view,
93  plane,
94  sentry);
95  } // ClusterCreator::CreateCluster()
96 
97 } // namespace cluster
virtual Measure_t EndCharge(util::GeometryUtilities const &gser)
virtual Measure_t IntegralStdDev()
Computes the standard deviation on the charge of the cluster hits.
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
unsigned int ID
The data type to uniquely identify a Plane.
Definition: geo_types.h:472
Set of hits with a 2D structure.
Definition: Cluster.h:71
Cluster finding and building.
Type of sentry argument.
Definition: Cluster.h:176
Algorithm collection class computing cluster parameters.
recob::Cluster CreateCluster(util::GeometryUtilities const &gser, ClusterParamsAlgBase &algo, float start_wire, float sigma_start_wire, float start_tick, float sigma_start_tick, float end_wire, float sigma_end_wire, float end_tick, float sigma_end_tick, recob::Cluster::ID_t ID, geo::View_t view, geo::PlaneID const &plane, recob::Cluster::SentryArgument_t sentry=recob::Cluster::Sentry)
Creates a cluster from direct information and a hit list.
virtual Measure_t SummedADCStdDev()
Computes the standard deviation on the charge of the cluster hits.
virtual Measure_t StartOpeningAngle()
Computes the opening angle at the start or end of the cluster.
Helper functions to create a cluster.
virtual Measure_t StartAngle()
Computes the angle at the start or end of the cluster.
virtual Measure_t StartCharge(util::GeometryUtilities const &gser)
Computes the charge on the first and last wire of the track.
virtual float MultipleHitDensity()
Fraction of wires in the cluster with more than one hit.
virtual Measure_t Integral()
Computes the total charge of the cluster from Hit::Integral()
Interface for a algorithm class computing cluster parameters.
virtual float Width(util::GeometryUtilities const &)
Computes the width of the cluster.
virtual Measure_t SummedADC()
Computes the total charge of the cluster from Hit::SummedADC()
virtual size_t NHits()
Returns the number of hits in the cluster.
int ID_t
Type of cluster ID.
Definition: Cluster.h:74
ClusterCreator(util::GeometryUtilities const &gser, ClusterParamsAlgBase &algo, float start_wire, float sigma_start_wire, float start_tick, float sigma_start_tick, float end_wire, float sigma_end_wire, float end_tick, float sigma_end_tick, recob::Cluster::ID_t ID, geo::View_t view, geo::PlaneID const &plane, recob::Cluster::SentryArgument_t sentry=recob::Cluster::Sentry)
Constructor: computes some information from hit list.