CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
17 
19 {
21  return theCombinedState.error();
22 }
23 
24 
26 {
28  return theCombinedState.weight();
29 }
30 
31 
33 {
36 }
37 
38 
39 // RefCountedVertexSeed BasicMultiVertexState::seedWithoutTracks() const
40 // {
41 // checkCombinedState();
42 // return theCombinedState.seedWithoutTracks();
43 // }
44 
46  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
47  if (theComponents.empty()) {
48  cout << "Asking for weight of empty MultiVertexState, returning zero!" << endl;
49  throw VertexException("Asking for weight of empty MultiVertexState, returning zero!");
50  return 0.;
51  }
52 
53  double weight = 0.;
54  for (vector<VertexState>::const_iterator it = theComponents.begin();
55  it != theComponents.end(); it++) {
56  weight += it->weightInMixture();
57  }
58  return weight;
59 }
60 
62 {
63  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
64  if (theCombinedStateUp2Date) return;
65 
68 }
69 
VertexState combine(const VSC &theMixture) const
Common base class.
GlobalError error() const
GlobalPoint position() const
Definition: VertexState.h:50
AlgebraicVector3 weightTimesPosition() const
MultiVertexStateCombiner theCombiner
AlgebraicVector3 weightTimesPosition() const
Definition: VertexState.h:65
ROOT::Math::SVector< double, 3 > AlgebraicVector3
GlobalWeight weight() const
Definition: VertexState.h:60
std::vector< VertexState > theComponents
GlobalWeight weight() const
GlobalError error() const
Definition: VertexState.h:55
tuple cout
Definition: gather_cfg.py:145
volatile std::atomic< bool > shutdown_flag false
GlobalPoint position() const