CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 }
AlgebraicVector4 weightTimesPosition4D() const override
double timeError() const override
GlobalWeight weight() const override
VertexState combine(const VSC &theMixture) const
Common base class.
double weightInMixture() const override
GlobalPoint position() const
Definition: VertexState.h:62
AlgebraicVector3 weightTimesPosition() const override
GlobalError error() const override
GlobalWeight weight4D() const
Definition: VertexState.h:71
MultiVertexStateCombiner theCombiner
GlobalPoint position() const override
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 error4D() const
Definition: VertexState.h:67
std::vector< VertexState > theComponents
AlgebraicVector4 weightTimesPosition4D() const
Definition: VertexState.h:79
ROOT::Math::SVector< double, 3 > AlgebraicVector3
GlobalError error() const
Definition: VertexState.h:64
tuple cout
Definition: gather_cfg.py:144
GlobalWeight weight4D() const override
GlobalError error4D() const override