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 }
AlgebraicVector3
ROOT::Math::SVector< double, 3 > AlgebraicVector3
Definition: AlgebraicROOTObjects.h:12
funct::false
false
Definition: Factorize.h:29
BasicMultiVertexState.h
VertexException
Common base class.
Definition: VertexException.h:12
BasicMultiVertexState::theCombinedState
VertexState theCombinedState
Definition: BasicMultiVertexState.h:100
gather_cfg.cout
cout
Definition: gather_cfg.py:144
BasicMultiVertexState::weight
GlobalWeight weight() const override
Definition: BasicMultiVertexState.cc:34
BasicMultiVertexState::weightTimesPosition
AlgebraicVector3 weightTimesPosition() const override
Definition: BasicMultiVertexState.cc:44
BasicMultiVertexState::time
double time() const override
Definition: BasicMultiVertexState.cc:14
BasicMultiVertexState::valid
bool valid
Definition: BasicMultiVertexState.h:98
BasicMultiVertexState::timeError
double timeError() const override
Definition: BasicMultiVertexState.cc:24
BasicMultiVertexState::weightInMixture
double weightInMixture() const override
Definition: BasicMultiVertexState.cc:60
VertexState::error
GlobalError error() const
Definition: VertexState.h:64
BasicMultiVertexState::theCombinedStateUp2Date
bool theCombinedStateUp2Date
Definition: BasicMultiVertexState.h:101
Point3DBase< float, GlobalTag >
BasicMultiVertexState::BasicMultiVertexState
BasicMultiVertexState()
Definition: BasicMultiVertexState.h:16
funct::true
true
Definition: Factorize.h:173
VertexState::weight
GlobalWeight weight() const
Definition: VertexState.h:69
BasicMultiVertexState::error4D
GlobalError error4D() const override
Definition: BasicMultiVertexState.cc:29
VertexState::timeError
double timeError() const
Definition: VertexState.h:75
VertexState::weight4D
GlobalWeight weight4D() const
Definition: VertexState.h:71
GlobalErrorBase< double, ErrorMatrixTag >
VertexState::weightTimesPosition4D
AlgebraicVector4 weightTimesPosition4D() const
Definition: VertexState.h:79
VertexState::weightTimesPosition
AlgebraicVector3 weightTimesPosition() const
Definition: VertexState.h:77
BasicMultiVertexState::checkCombinedState
void checkCombinedState() const
Definition: BasicMultiVertexState.cc:76
MultiVertexStateCombiner::combine
VertexState combine(const VSC &theMixture) const
Definition: MultiVertexStateCombiner.cc:4
AlgebraicVector4
ROOT::Math::SVector< double, 4 > AlgebraicVector4
Definition: AlgebraicROOTObjects.h:13
std
Definition: JetResolutionObject.h:76
BasicMultiVertexState::theComponents
std::vector< VertexState > theComponents
Definition: BasicMultiVertexState.h:99
BasicMultiVertexState::theCombiner
MultiVertexStateCombiner theCombiner
Definition: BasicMultiVertexState.h:103
VertexState::position
GlobalPoint position() const
Definition: VertexState.h:62
VertexException.h
BasicMultiVertexState::position
GlobalPoint position() const override
Definition: BasicMultiVertexState.cc:9
RunInfoPI::valid
Definition: RunInfoPayloadInspectoHelper.h:16
VertexState::time
double time() const
Definition: VertexState.h:73
BasicMultiVertexState::weight4D
GlobalWeight weight4D() const override
Definition: BasicMultiVertexState.cc:39
weight
Definition: weight.py:1
BasicMultiVertexState::weightTimesPosition4D
AlgebraicVector4 weightTimesPosition4D() const override
Definition: BasicMultiVertexState.cc:49
BasicMultiVertexState::error
GlobalError error() const override
Definition: BasicMultiVertexState.cc:19
VertexState::error4D
GlobalError error4D() const
Definition: VertexState.h:67