All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
lardataobj/lardataobj/RecoBase/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;}
38  void SetCenter(const Point_t center) { fCenter = center;}
39  void SetDirection(const Vector_t direction) { fDirection = direction;}
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)
Vector_t fDirection
direction from a linear fit
Point_t fCenter
Center of the slice for flash matching.
float fAspectRatio
absolute value of the linear correlation coefficient (0 = round blob, 1 = line)
Point_t fEnd1Pos
Position of the other end.
void SetEnd0Pos(const Point_t endpos)
void SetDirection(const Vector_t direction)
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)
void SetEnd1Pos(const Point_t endpos)
Slice(int id, Point_t center, Vector_t direction, Point_t end0Pos, Point_t end1Pos, float aspectratio, float charge)
Point_t fEnd0Pos
Position of a SpacePoint at one end of the slice.
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)