CMS 3D CMS Logo

BasicMultiVertexState.cc
Go to the documentation of this file.
3 
4 using namespace std;
5 
7 BasicMultiVertexState(const vector<VertexState>& vsComp) :
8  valid(true), theComponents(vsComp), theCombinedStateUp2Date( false) {}
9 
10 
12 {
14  return theCombinedState.position();
15 }
16 
18 {
20  return theCombinedState.time();
21 }
22 
23 
25 {
27  return theCombinedState.error();
28 }
29 
31 {
33  return theCombinedState.timeError();
34 }
35 
37 {
39  return theCombinedState.error4D();
40 }
41 
43 {
45  return theCombinedState.weight();
46 }
47 
49 {
51  return theCombinedState.weight4D();
52 }
53 
55 {
58 }
59 
61 {
64 }
65 
66 
67 // RefCountedVertexSeed BasicMultiVertexState::seedWithoutTracks() const
68 // {
69 // checkCombinedState();
70 // return theCombinedState.seedWithoutTracks();
71 // }
72 
74  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
75  if (theComponents.empty()) {
76  cout << "Asking for weight of empty MultiVertexState, returning zero!" << endl;
77  throw VertexException("Asking for weight of empty MultiVertexState, returning zero!");
78  return 0.;
79  }
80 
81  double weight = 0.;
82  for (vector<VertexState>::const_iterator it = theComponents.begin();
83  it != theComponents.end(); it++) {
84  weight += it->weightInMixture();
85  }
86  return weight;
87 }
88 
90 {
91  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
92  if (theCombinedStateUp2Date) return;
93 
96 }
97 
VertexState combine(const VSC &theMixture) const
Common base class.
Definition: weight.py:1
GlobalError error() const
GlobalError error4D() const
GlobalPoint position() const
Definition: VertexState.h:69
AlgebraicVector3 weightTimesPosition() const
GlobalWeight weight4D() const
Definition: VertexState.h:90
MultiVertexStateCombiner theCombiner
AlgebraicVector3 weightTimesPosition() const
Definition: VertexState.h:103
ROOT::Math::SVector< double, 3 > AlgebraicVector3
double time() const
Definition: VertexState.h:95
double timeError() const
Definition: VertexState.h:99
GlobalWeight weight() const
Definition: VertexState.h:85
GlobalError error4D() const
Definition: VertexState.h:80
std::vector< VertexState > theComponents
AlgebraicVector4 weightTimesPosition4D() const
Definition: VertexState.h:108
AlgebraicVector4 weightTimesPosition4D() const
GlobalWeight weight() const
GlobalError error() const
Definition: VertexState.h:74
ROOT::Math::SVector< double, 4 > AlgebraicVector4
GlobalPoint position() const
GlobalWeight weight4D() const