CMS 3D CMS Logo

BasicMultiVertexState.cc
Go to the documentation of this file.
3 
4 using namespace std;
5 
6 BasicMultiVertexState::BasicMultiVertexState(const vector<VertexState>& vsComp)
7  : valid(true), theComponents(vsComp), theCombinedStateUp2Date(false) {}
8 
11  return theCombinedState.position();
12 }
13 
16  return theCombinedState.time();
17 }
18 
21  return theCombinedState.error();
22 }
23 
26  return theCombinedState.timeError();
27 }
28 
31  return theCombinedState.error4D();
32 }
33 
36  return theCombinedState.weight();
37 }
38 
41  return theCombinedState.weight4D();
42 }
43 
47 }
48 
52 }
53 
54 // RefCountedVertexSeed BasicMultiVertexState::seedWithoutTracks() const
55 // {
56 // checkCombinedState();
57 // return theCombinedState.seedWithoutTracks();
58 // }
59 
61  if (!valid)
62  throw VertexException("BasicSingleVertexState::invalid");
63  if (theComponents.empty()) {
64  cout << "Asking for weight of empty MultiVertexState, returning zero!" << endl;
65  throw VertexException("Asking for weight of empty MultiVertexState, returning zero!");
66  return 0.;
67  }
68 
69  double weight = 0.;
70  for (vector<VertexState>::const_iterator it = theComponents.begin(); it != theComponents.end(); it++) {
71  weight += it->weightInMixture();
72  }
73  return weight;
74 }
75 
77  if (!valid)
78  throw VertexException("BasicSingleVertexState::invalid");
80  return;
81 
84 }
VertexState combine(const VSC &theMixture) const
GlobalWeight weight4D() const override
GlobalError error4D() const override
Common base class.
AlgebraicVector4 weightTimesPosition4D() const override
GlobalPoint position() const override
Definition: weight.py:1
GlobalWeight weight() const override
GlobalPoint position() const
Definition: VertexState.h:62
GlobalWeight weight4D() const
Definition: VertexState.h:71
MultiVertexStateCombiner theCombiner
AlgebraicVector3 weightTimesPosition() const
Definition: VertexState.h:77
double time() const
Definition: VertexState.h:73
double timeError() const
Definition: VertexState.h:75
ROOT::Math::SVector< double, 4 > AlgebraicVector4
GlobalWeight weight() const
Definition: VertexState.h:69
double time() const override
GlobalError error() const override
GlobalError error4D() const
Definition: VertexState.h:67
double timeError() const override
std::vector< VertexState > theComponents
AlgebraicVector4 weightTimesPosition4D() const
Definition: VertexState.h:79
ROOT::Math::SVector< double, 3 > AlgebraicVector3
GlobalError error() const
Definition: VertexState.h:64
double weightInMixture() const override
AlgebraicVector3 weightTimesPosition() const override