LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
EndPoint2D.cxx
Go to the documentation of this file.
1 //
3 // \brief Definition of vertex object for LArSoft
4 //
5 // \author spitz
6 //
8 
10 
11 #include <iomanip>
12 
13 namespace recob {
14 
15  //----------------------------------------------------------------------
17  : fDriftTime(-1.), fWireID(), fID(-1), fStrength(-1.), fView(geo::kUnknown), fTotalCharge(-999.)
18  {}
19 
20  //----------------------------------------------------------------------
21  EndPoint2D::EndPoint2D(double driftTime,
22  geo::WireID wireID,
23  double strength,
24  int id,
25  geo::View_t view,
26  double totalQ)
27  : fDriftTime(driftTime)
28  , fWireID(wireID)
29  , fID(id)
30  , fStrength(strength)
31  , fView(view)
32  , fTotalCharge(totalQ)
33  {}
34 
35  //----------------------------------------------------------------------
36  // ostream operator.
37  //
38 
39  std::ostream& operator<<(std::ostream& o, const EndPoint2D& ep)
40  {
41  o << std::setiosflags(std::ios::fixed) << std::setprecision(2);
42  o << "EndPoint2D ID " << std::setw(5) << std::right << ep.ID() << " WireID : \n"
43  << "\tCryostat = " << std::setw(7) << std::right << ep.WireID().Cryostat
44  << "\tTPC = " << std::setw(7) << std::right << ep.WireID().TPC << "\tPlane = " << std::setw(7)
45  << std::right << ep.WireID().Plane << "\tWire Number = " << std::setw(7) << std::right
46  << ep.WireID().Wire << " View = " << std::setw(9) << std::right << ep.View()
47  << " Time = " << std::setw(9) << std::right << ep.DriftTime();
48 
49  return o;
50  }
51 
52 }
constexpr auto const & right(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:102
Reconstruction base classes.
int ID() const
Definition: EndPoint2D.h:66
geo::View_t fView
view for this end point
Definition: EndPoint2D.h:28
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
Unknown view.
Definition: geo_types.h:142
double fStrength
vertex&#39;s strength
Definition: EndPoint2D.h:27
CryostatID_t Cryostat
Index of cryostat.
Definition: geo_types.h:211
WireID_t Wire
Index of the wire within its plane.
Definition: geo_types.h:563
double fTotalCharge
total charge of hits associated with end point
Definition: EndPoint2D.h:29
double DriftTime() const
Definition: EndPoint2D.h:58
geo::WireID fWireID
vertex&#39;s wireID
Definition: EndPoint2D.h:25
PlaneID_t Plane
Index of the plane within its TPC.
Definition: geo_types.h:481
geo::View_t View() const
Definition: EndPoint2D.h:54
geo::WireID WireID() const
Definition: EndPoint2D.h:62
double fDriftTime
Default constructor.
Definition: EndPoint2D.h:24
friend std::ostream & operator<<(std::ostream &o, const EndPoint2D &c)
Definition: EndPoint2D.cxx:39
int fID
vertex&#39;s ID
Definition: EndPoint2D.h:26
TPCID_t TPC
Index of the TPC within its cryostat.
Definition: geo_types.h:399
Namespace collecting geometry-related classes utilities.