test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
BasicSingleVertexState.cc
Go to the documentation of this file.
3 
5  : thePos(GlobalPoint(0, 0, 0)),
6  theErr(AlgebraicSymMatrix33()),
7  theWeight(AlgebraicSymMatrix33()),
8  theWeightTimesPos(AlgebraicVector3()), theWeightInMix(0.) ,
9  thePosAvailable(false), theErrAvailable(false),theWeightAvailable(false), theWeightTimesPosAvailable(false),
10  valid(false)
11 {}
12 
13 
15  const GlobalError & posErr,
16  const double & weightInMix)
17  : thePos(pos),
18  theErr(posErr),
19  theWeight(AlgebraicSymMatrix33()),
20  theWeightTimesPos(AlgebraicVector3()),
21  theWeightInMix(weightInMix),
22  thePosAvailable(true), theErrAvailable(true),theWeightAvailable(false), theWeightTimesPosAvailable(false),
23  valid(true)
24 {}
25 
26 
28  const GlobalWeight & posWeight,
29  const double & weightInMix)
30  : thePos(pos),
31  theErr(AlgebraicSymMatrix33()),
32  theWeight(posWeight),
33  theWeightTimesPos(AlgebraicVector3()),
34  theWeightInMix(weightInMix),
35  thePosAvailable(true), theErrAvailable(false),theWeightAvailable(true), theWeightTimesPosAvailable(false),
36  valid(true)
37 {}
38 
39 
41  const GlobalWeight & posWeight,
42  const double & weightInMix)
43  : thePos(GlobalPoint(0, 0, 0)),
44  theErr(AlgebraicSymMatrix33()),
45  theWeight(posWeight),
46  theWeightTimesPos(weightTimesPosition),
47  theWeightInMix(weightInMix),
48  thePosAvailable(false), theErrAvailable(false),theWeightAvailable(true), theWeightTimesPosAvailable(true),
49  valid(true)
50 {}
51 
52 
54 {
55  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
57  return thePos;
58 }
59 
60 
62 {
63  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
65  return theErr;
66 }
67 
68 
70 {
71  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
73  return theWeight;
74 }
75 
76 
78 {
79  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
81  return theWeightTimesPos;
82 }
83 
84 
86 {
87  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
88  return theWeightInMix;
89 }
90 // RefCountedVertexSeed BasicSingleVertexState::seedWithoutTracks() const
91 // {
92 // RefCountedVertexSeed v = new VertexSeed(position(), error());
93 // return v;
94 // }
95 
96 
97 
99 {
100  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
102  thePos = GlobalPoint(pos[0], pos[1], pos[2]);
103  thePosAvailable = true;
104 }
105 
106 
108 {
109  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
110  int ifail;
111  theErr = weight().matrix().Inverse(ifail);
112  if (ifail != 0) throw VertexException("BasicSingleVertexState::could not invert weight matrix");
113  theErrAvailable = true;
114 }
115 
116 
118 {
119  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
120  int ifail;
121  theWeight = error().matrix().Inverse(ifail);
122  if (ifail != 0) throw VertexException("BasicSingleVertexState::could not invert error matrix");
123  theWeightAvailable = true;
124 }
125 
126 
128 {
129  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
130  AlgebraicVector3 pos; pos(0) = position().x();
131  pos(1) = position().y(); pos(2) = position().z();
134 }
135 
136 
Common base class.
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
const AlgebraicSymMatrix33 & matrix() const
T y() const
Definition: PV3DBase.h:63
const AlgebraicSymMatrix33 & matrix_new() const
AlgebraicVector3 theWeightTimesPos
GlobalWeight weight() const
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
GlobalError error() const
T z() const
Definition: PV3DBase.h:64
GlobalPoint position() const
ROOT::Math::SVector< double, 3 > AlgebraicVector3
volatile std::atomic< bool > shutdown_flag false
AlgebraicVector3 weightTimesPosition() const
T x() const
Definition: PV3DBase.h:62