LArSoft  v07_13_02
Liquid Argon Software toolkit - http://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 #include <iostream>
13 
14 namespace recob{
15 
16  //----------------------------------------------------------------------
18  : fDriftTime(-1.)
19  , fWireID()
20  , fID(-1)
21  , fStrength(-1.)
22  , fView(geo::kUnknown)
23  , fTotalCharge(-999.)
24  {
25  }
26 
27  //----------------------------------------------------------------------
28  EndPoint2D::EndPoint2D(double driftTime,
29  geo::WireID wireID,
30  double strength,
31  int id,
32  geo::View_t view,
33  double totalQ)
34  : fDriftTime(driftTime)
35  , fWireID(wireID)
36  , fID(id)
37  , fStrength(strength)
38  , fView(view)
39  , fTotalCharge(totalQ)
40  {
41  }
42 
43  //----------------------------------------------------------------------
44  // ostream operator.
45  //
46 
47  std::ostream& operator<< (std::ostream& o, const EndPoint2D& ep)
48  {
49  o << std::setiosflags(std::ios::fixed) << std::setprecision(2);
50  o << "EndPoint2D ID " << std::setw(5) << std::right << ep.ID()
51  << " WireID : \n"
52  << "\tCryostat = " << std::setw(7) << std::right << ep.WireID().Cryostat
53  << "\tTPC = " << std::setw(7) << std::right << ep.WireID().TPC
54  << "\tPlane = " << std::setw(7) << std::right << ep.WireID().Plane
55  << "\tWire Number = " << std::setw(7) << std::right << ep.WireID().Wire
56  << " View = " << std::setw(9) << std::right << ep.View()
57  << " Time = " << std::setw(9) << std::right << ep.DriftTime();
58 
59  return o;
60  }
61 
62 
63 }
constexpr auto const & right(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:112
Reconstruction base classes.
int ID() const
Definition: EndPoint2D.h:58
geo::View_t fView
view for this end point
Definition: EndPoint2D.h:29
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
Unknown view.
Definition: geo_types.h:83
double fStrength
vertex&#39;s strength
Definition: EndPoint2D.h:28
CryostatID_t Cryostat
Index of cryostat.
Definition: geo_types.h:130
WireID_t Wire
Index of the wire within its plane.
Definition: geo_types.h:313
double fTotalCharge
total charge of hits associated with end point
Definition: EndPoint2D.h:30
double DriftTime() const
Definition: EndPoint2D.h:56
geo::WireID fWireID
vertex&#39;s wireID
Definition: EndPoint2D.h:26
PlaneID_t Plane
Index of the plane within its TPC.
Definition: geo_types.h:258
geo::View_t View() const
Definition: EndPoint2D.h:55
geo::WireID WireID() const
Definition: EndPoint2D.h:57
double fDriftTime
Default constructor.
Definition: EndPoint2D.h:25
friend std::ostream & operator<<(std::ostream &o, const EndPoint2D &c)
Definition: EndPoint2D.cxx:47
int fID
vertex&#39;s ID
Definition: EndPoint2D.h:27
TPCID_t TPC
Index of the TPC within its cryostat.
Definition: geo_types.h:203
Namespace collecting geometry-related classes utilities.