EndPoint2D.cxx
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////
2 //
3 // \brief Definition of vertex object for LArSoft
4 //
5 // \author spitz
6 //
7 ////////////////////////////////////////////////////////////////////////////
8 
10 
11 #include <iomanip>
12 
13 namespace recob{
14 
15  //----------------------------------------------------------------------
17  : fDriftTime(-1.)
18  , fWireID()
19  , fID(-1)
20  , fStrength(-1.)
21  , fView(geo::kUnknown)
22  , fTotalCharge(-999.)
23  {
24  }
25 
26  //----------------------------------------------------------------------
27  EndPoint2D::EndPoint2D(double driftTime,
28  geo::WireID wireID,
29  double strength,
30  int id,
31  geo::View_t view,
32  double totalQ)
33  : fDriftTime(driftTime)
34  , fWireID(wireID)
35  , fID(id)
36  , fStrength(strength)
37  , fView(view)
38  , fTotalCharge(totalQ)
39  {
40  }
41 
42  //----------------------------------------------------------------------
43  // ostream operator.
44  //
45 
46  std::ostream& operator<< (std::ostream& o, const EndPoint2D& ep)
47  {
48  o << std::setiosflags(std::ios::fixed) << std::setprecision(2);
49  o << "EndPoint2D ID " << std::setw(5) << std::right << ep.ID()
50  << " WireID : \n"
51  << "\tCryostat = " << std::setw(7) << std::right << ep.WireID().Cryostat
52  << "\tTPC = " << std::setw(7) << std::right << ep.WireID().TPC
53  << "\tPlane = " << std::setw(7) << std::right << ep.WireID().Plane
54  << "\tWire Number = " << std::setw(7) << std::right << ep.WireID().Wire
55  << " View = " << std::setw(9) << std::right << ep.View()
56  << " Time = " << std::setw(9) << std::right << ep.DriftTime();
57 
58  return o;
59  }
60 
61 
62 }
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.
double fStrength
vertex&#39;s strength
Definition: EndPoint2D.h:28
CryostatID_t Cryostat
Index of cryostat.
Definition: geo_types.h:212
WireID_t Wire
Index of the wire within its plane.
Definition: geo_types.h:580
double fTotalCharge
total charge of hits associated with end point
Definition: EndPoint2D.h:30
Q_EXPORT QTSManip setprecision(int p)
Definition: qtextstream.h:343
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:493
Q_EXPORT QTSManip setw(int w)
Definition: qtextstream.h:331
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:46
int fID
vertex&#39;s ID
Definition: EndPoint2D.h:27
TPCID_t TPC
Index of the TPC within its cryostat.
Definition: geo_types.h:406
LArSoft geometry interface.
Definition: ChannelGeo.h:16