Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
lardataobj
lardataobj
RecoBase
Vertex.cxx
Go to the documentation of this file.
1
////////////////////////////////////////////////////////////////////////////
2
//
3
// \brief Definition of vertex object for LArSoft
4
//
5
// \author brebel@fnal.gov
6
//
7
////////////////////////////////////////////////////////////////////////////
8
9
#include "
lardataobj/RecoBase/Vertex.h
"
10
11
#include <iomanip>
12
13
namespace
recob
{
14
15
//----------------------------------------------------------------------
16
Vertex::Vertex
()
17
{
18
status_
=
Invalid
;
19
id_
=
util::kBogusI
;
20
chi2_
=
util::kBogusD
;
21
ndof_
=
util::kBogusI
;
22
}
23
24
//----------------------------------------------------------------------
25
Vertex::Vertex
(
double
*xyz,
26
int
id
)
27
:
id_
(id)
28
{
29
pos_
=
Point_t
(xyz[0],xyz[1],xyz[2]);
30
status_
=
Valid
;
31
chi2_
=
util::kBogusD
;
32
ndof_
=
util::kBogusI
;
33
}
34
35
//----------------------------------------------------------------------
36
void
Vertex::XYZ
(
double
*xyz)
const
37
{
38
xyz[0] =
pos_
.X();
39
xyz[1] =
pos_
.Y();
40
xyz[2] =
pos_
.Z();
41
42
return
;
43
}
44
45
//----------------------------------------------------------------------
46
// ostream operator.
47
//
48
std::ostream&
operator<<
(std::ostream& o,
const
Vertex
&
a
)
49
{
50
o <<
std::setprecision
(5);
51
o <<
"Vertex ID "
<< a.
id_
<<
std::setw
(5)
52
<<
" (x,y,z) = ("
<< a.
pos_
.X() <<
","
<< a.
pos_
.Y() <<
","
53
<< a.
pos_
.Z() <<
")"
;
54
55
return
o;
56
}
57
58
//----------------------------------------------------------------------
59
// < operator.
60
//
61
bool
operator <
(
const
Vertex
&
a
,
const
Vertex
&
b
)
62
{
63
double
xyza[3] = {0.};
64
double
xyzb[3] = {0.};
65
a.
XYZ
(xyza);
66
b.
XYZ
(xyzb);
67
68
return
xyza[2] < xyzb[2];
69
70
}
71
72
73
}
recob::Vertex::XYZ
void XYZ(double *xyz) const
Legacy method to access vertex position, preserved to avoid breaking code. Please try to use Vertex::...
Definition:
Vertex.cxx:36
recob::Vertex::Valid
Definition:
Vertex.h:47
recob
Reconstruction base classes.
Definition:
AdcChannelData.h:91
recob::Vertex::operator<<
friend std::ostream & operator<<(std::ostream &o, const Vertex &a)
Definition:
Vertex.cxx:48
recob::Vertex::Vertex
Vertex()
Default constructor, initializes status to Invalid, and data members to default or kBogus values...
Definition:
Vertex.cxx:16
util::kBogusI
constexpr int kBogusI
obviously bogus integer value
Definition:
PhysicalConstants.h:72
recob::Vertex::Invalid
Definition:
Vertex.h:47
recob::Vertex
Definition of vertex object for LArSoft.
Definition:
Vertex.h:35
setprecision
Q_EXPORT QTSManip setprecision(int p)
Definition:
qtextstream.h:343
recob::Vertex::Point_t
tracking::Point_t Point_t
Definition:
Vertex.h:39
recob::Vertex::status_
Status status_
Vertex status, as define in Vertex::Status enum.
Definition:
Vertex.h:93
a
const double a
Definition:
gUpMuFluxGen.cxx:164
recob::Vertex::id_
int id_
id number for vertex
Definition:
Vertex.h:94
setw
Q_EXPORT QTSManip setw(int w)
Definition:
qtextstream.h:331
recob::Vertex::ndof_
int ndof_
Vertex fit degrees of freedom.
Definition:
Vertex.h:92
recob::Vertex::pos_
Point_t pos_
Vertex 3D position.
Definition:
Vertex.h:89
recob::Vertex::chi2_
double chi2_
Vertex fit chi2.
Definition:
Vertex.h:91
recob::Vertex::operator<
friend bool operator<(const Vertex &a, const Vertex &b)
Definition:
Vertex.cxx:61
b
static bool * b
Definition:
config.cpp:1043
util::kBogusD
constexpr double kBogusD
obviously bogus double value
Definition:
PhysicalConstants.h:71
Vertex.h
Generated by
1.8.11