Slice.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////
2 //
3 // \brief Definition of slice object for LArSoft
4 //
5 // \author tjyang@fnal.gov
6 //
7 ////////////////////////////////////////////////////////////////////////////
8 
9 #ifndef RB_SLICE_H
10 #define RB_SLICE_H
11 
13 
14 namespace recob {
15 
16  class Slice {
17 
18  public:
19 
22 
23  Slice(); // Needed for ROOT persistency.
24 
25  Slice(int id, Point_t center, Vector_t direction, Point_t end0Pos, Point_t end1Pos, float aspectratio, float charge)
26  : fID(id), fCenter(center), fDirection(direction), fEnd0Pos(end0Pos), fEnd1Pos(end1Pos), fAspectRatio(aspectratio), fCharge(charge)
27  {}
28 
29  int ID() const { return fID; }
30  Point_t Center() const { return fCenter; }
31  Vector_t Direction() const { return fDirection; }
32  Point_t End0Pos() const { return fEnd0Pos; }
33  Point_t End1Pos() const { return fEnd1Pos; }
34  float AspectRatio() const { return fAspectRatio; }
35  float Charge() const { return fCharge; }
36 
37  void SetID(const int id) { fID = id;}
40  void SetEnd0Pos(const Point_t endpos) {fEnd0Pos = endpos;}
41  void SetEnd1Pos(const Point_t endpos) {fEnd1Pos = endpos;}
42  void SetAspectRatio(const float aspectratio) {fAspectRatio = aspectratio;}
43  void SetCharge(const float charge) {fCharge = charge;}
44 
45  private:
46 
47  int fID; ///< id for this slice
48  Point_t fCenter; ///< Center of the slice for flash matching
49  Vector_t fDirection; ///< direction from a linear fit
50  Point_t fEnd0Pos; ///< Position of a SpacePoint at one end of the slice
51  Point_t fEnd1Pos; ///< Position of the other end
52  float fAspectRatio; ///< absolute value of the linear correlation coefficient (0 = round blob, 1 = line)
53  float fCharge;
54 
55  };
56 }
57 #endif // RB_SLICE_H
void SetAspectRatio(const float aspectratio)
Definition: Slice.h:42
Vector_t fDirection
direction from a linear fit
Definition: Slice.h:49
Reconstruction base classes.
Point_t fCenter
Center of the slice for flash matching.
Definition: Slice.h:48
float Charge() const
Definition: Slice.h:35
float fAspectRatio
absolute value of the linear correlation coefficient (0 = round blob, 1 = line)
Definition: Slice.h:52
Vector_t Direction() const
Definition: Slice.h:31
Point_t fEnd1Pos
Position of the other end.
Definition: Slice.h:51
void SetEnd0Pos(const Point_t endpos)
Definition: Slice.h:40
tracking::Vector_t Vector_t
Definition: Slice.h:21
void SetDirection(const Vector_t direction)
Definition: Slice.h:39
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< Coord_t >, ROOT::Math::GlobalCoordinateSystemTag > Vector_t
Type for representation of momenta in 3D space. See recob::tracking::Coord_t for more details on the ...
Definition: TrackingTypes.h:29
void SetCharge(const float charge)
Definition: Slice.h:43
void SetEnd1Pos(const Point_t endpos)
Definition: Slice.h:41
Slice(int id, Point_t center, Vector_t direction, Point_t end0Pos, Point_t end1Pos, float aspectratio, float charge)
Definition: Slice.h:25
void SetID(const int id)
Definition: Slice.h:37
int fID
id for this slice
Definition: Slice.h:47
float fCharge
Definition: Slice.h:53
int ID() const
Definition: Slice.h:29
Point_t Center() const
Definition: Slice.h:30
Point_t End1Pos() const
Definition: Slice.h:33
Point_t fEnd0Pos
Position of a SpacePoint at one end of the slice.
Definition: Slice.h:50
def center(depos, point)
Definition: depos.py:117
Point_t End0Pos() const
Definition: Slice.h:32
tracking::Point_t Point_t
Definition: Slice.h:20
float AspectRatio() const
Definition: Slice.h:34
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< Coord_t >, ROOT::Math::GlobalCoordinateSystemTag > Point_t
Type for representation of position in physical 3D space. See recob::tracking::Coord_t for more detai...
Definition: TrackingTypes.h:26
void SetCenter(const Point_t center)
Definition: Slice.h:38