HitList3D.h
Go to the documentation of this file.
1 //
2 /// \file HitList3D.h
3 /// \brief Contain 3D hit information by extrapolating ortho view
4 /// coordinate from surrounding points in the ortho view
5 /// \version $Id: HitList3D.h,v 1.0 2014-07-30 9:49:00 merritth $
6 /// \author hdmerritt@indiana.edu
7 ///
8 #ifndef BPFIT_HITLIST3D_H
9 #define BPFIT_HITLIST3D_H
10 #include <vector>
12 namespace rb { class Cluster; }
13 
14 namespace bpfit
15 {
16  class Hit3D
17  {
18  public:
19  // Constructor
21  double x = 0,
22  double y = 0,
23  double z = 0,
24  double t = 0,
25  double sig_x = 0,
26  double sig_y = 0,
27  double sig_z = 0,
28  double sig_t = 0,
29  double w = 1) :
30  fView(v), fX(x), fY(y), fZ(z), fT(t),
31  fSigX(sig_x), fSigY(sig_y), fSigZ(sig_z), fSigT(sig_t), fW(w)
32  { }
33  public:
34  geo::View_t fView; ///< View hit belongs in (x or y)
35  double fX; ///< X coordinate of hit
36  double fY; ///< Y coordinate of hit
37  double fZ; ///< Z coordinate of hit
38  double fT; ///< time coordinate of hit
39  double fSigX; ///< Error on x
40  double fSigY; ///< Error on y
41  double fSigZ; ///< Error on z
42  double fSigT; ///< Error on t
43  double fW; ///< Weight of hit
44  };
45 
46  ///
47  /// Forming the 3D hit list requires completeing information for a
48  /// hit using the other view. We have one way of doing that, but
49  /// we've left a hook for others to invent their own way.
50  ///
51  /// @param h - Hit that needs information from the orthogonal view
52  /// @param hl - The complete track hit list
53  ///
54  class HitList3D;
55  typedef void (*Interp3D)(Hit3D& h, HitList3D& hl);
56 
57  /// Essential 3D information for tracking
58  class HitList3D : public std::vector<Hit3D>
59  {
60  public:
61  HitList3D();
62  HitList3D(unsigned int n);
63  HitList3D(const rb::Cluster& clust, bool wbyq=false);
64  void SetHit(unsigned int i,
65  geo::View_t,
66  double x,
67  double y,
68  double z,
69  double t,
70  double sig_x,
71  double sig_y,
72  double sig_z,
73  double sig_t,
74  double w=1.0);
75  void AddHit(geo::View_t,
76  double x,
77  double y,
78  double z,
79  double t,
80  double sig_x,
81  double sig_y,
82  double sig_z,
83  double sig_t,
84  double w=1.0);
85  ///
86  /// CompleteOrtho extrapolates the coordinate in the orthogonal
87  /// view corresponding to the same z value in the current view.
88  ///
89  /// @param interp - optional alternate interpolation function
90  ///
91  void CompleteOrtho(Interp3D interp=0);
92 
93  ///
94  /// Sort the hits from south to north
95  ///
96  void SortByZ();
97 
98  ///
99  /// Sort the hits from top to bottom
100  ///
101  void SortByY();
102  };
103 }
104 
105 #endif // BPFIT_HITLIST3D_H
106 ////////////////////////////////////////////////////////////////////////
107 
X or Y views.
Definition: PlaneGeo.h:30
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
double fSigX
Error on x.
Definition: HitList3D.h:39
A collection of associated CellHits.
Definition: Cluster.h:47
void(* Interp3D)(Hit3D &h, HitList3D &hl)
Definition: HitList3D.h:55
double fW
Weight of hit.
Definition: HitList3D.h:43
double fX
X coordinate of hit.
Definition: HitList3D.h:35
Perform a "2 point" Hough transform on a collection of hits.
geo::View_t fView
View hit belongs in (x or y)
Definition: HitList3D.h:34
z
Definition: test.py:28
double fT
time coordinate of hit
Definition: HitList3D.h:38
double fSigY
Error on y.
Definition: HitList3D.h:40
Hit3D(geo::View_t v=geo::kXorY, double x=0, double y=0, double z=0, double t=0, double sig_x=0, double sig_y=0, double sig_z=0, double sig_t=0, double w=1)
Definition: HitList3D.h:20
double fY
Y coordinate of hit.
Definition: HitList3D.h:36
Essential 3D information for tracking.
Definition: HitList3D.h:58
Float_t w
Definition: plot.C:20
typedef void(XMLCALL *XML_ElementDeclHandler)(void *userData
double fSigT
Error on t.
Definition: HitList3D.h:42
double fZ
Z coordinate of hit.
Definition: HitList3D.h:37
double fSigZ
Error on z.
Definition: HitList3D.h:41