All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 }
int ID() const
Definition: EndPoint2D.h:58
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
walls no right
Definition: selectors.fcl:105
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 DriftTime() const
Definition: EndPoint2D.h:56
PlaneID_t Plane
Index of the plane within its TPC.
Definition: geo_types.h:493
geo::View_t View() const
Definition: EndPoint2D.h:55
geo::WireID WireID() const
Definition: EndPoint2D.h:57
TPCID_t TPC
Index of the TPC within its cryostat.
Definition: geo_types.h:406
std::ostream & operator<<(std::ostream &o, Cluster const &c)
Definition: Cluster.cxx:173