CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
BasicMultiVertexState Class Referencefinal

#include <BasicMultiVertexState.h>

Inheritance diagram for BasicMultiVertexState:
BasicVertexState

Public Member Functions

 BasicMultiVertexState ()
 
 BasicMultiVertexState (const std::vector< VertexState > &vsComp)
 
pointer clone () const override
 
std::vector< VertexStatecomponents () const override
 
GlobalError error () const override
 
GlobalError error4D () const override
 
bool is4D () const override
 
bool isValid () const override
 
GlobalPoint position () const override
 
double time () const override
 
double timeError () const override
 
GlobalWeight weight () const override
 
GlobalWeight weight4D () const override
 
double weightInMixture () const override
 
AlgebraicVector3 weightTimesPosition () const override
 
AlgebraicVector4 weightTimesPosition4D () const override
 
- Public Member Functions inherited from BasicVertexState
virtual ~BasicVertexState ()
 

Private Member Functions

void checkCombinedState () const
 

Private Attributes

VertexState theCombinedState
 
bool theCombinedStateUp2Date
 
MultiVertexStateCombiner theCombiner
 
std::vector< VertexStatetheComponents
 
bool valid
 

Additional Inherited Members

- Public Types inherited from BasicVertexState
using pointer = Proxy::pointer
 
using Proxy = ProxyBase11< BasicVertexState >
 
- Static Public Member Functions inherited from BasicVertexState
template<typename T , typename... Args>
static std::shared_ptr< BasicVertexStatebuild (Args &&...args)
 

Detailed Description

Multi state measurement of a vertex. Some data is calculated on demand to improve performance.

Definition at line 12 of file BasicMultiVertexState.h.

Constructor & Destructor Documentation

BasicMultiVertexState::BasicMultiVertexState ( )
inline

Constructors

Definition at line 16 of file BasicMultiVertexState.h.

16 : valid(false) {}
BasicMultiVertexState::BasicMultiVertexState ( const std::vector< VertexState > &  vsComp)

Definition at line 6 of file BasicMultiVertexState.cc.

Member Function Documentation

void BasicMultiVertexState::checkCombinedState ( ) const
private

Definition at line 76 of file BasicMultiVertexState.cc.

References MultiVertexStateCombiner::combine(), theCombinedState, theCombinedStateUp2Date, theCombiner, theComponents, and valid.

Referenced by error(), error4D(), is4D(), position(), time(), timeError(), weight(), weight4D(), weightTimesPosition(), and weightTimesPosition4D().

76  {
77  if (!valid)
78  throw VertexException("BasicSingleVertexState::invalid");
80  return;
81 
84 }
VertexState combine(const VSC &theMixture) const
Common base class.
MultiVertexStateCombiner theCombiner
std::vector< VertexState > theComponents
pointer BasicMultiVertexState::clone ( void  ) const
inlineoverridevirtual

Access methods

Implements BasicVertexState.

Definition at line 22 of file BasicMultiVertexState.h.

References error(), error4D(), position(), time(), timeError(), weight(), weight4D(), weightInMixture(), weightTimesPosition(), and weightTimesPosition4D().

22 { return build<BasicMultiVertexState>(*this); }
std::vector<VertexState> BasicMultiVertexState::components ( ) const
inlineoverridevirtual

Vector of individual components in the mixture.

Reimplemented from BasicVertexState.

Definition at line 83 of file BasicMultiVertexState.h.

References theComponents.

83 { return theComponents; }
std::vector< VertexState > theComponents
GlobalError BasicMultiVertexState::error ( ) const
overridevirtual

Mean covariance matrix of the mixture (covariance matrix of the collapsed state)

Implements BasicVertexState.

Definition at line 19 of file BasicMultiVertexState.cc.

References checkCombinedState(), VertexState::error(), and theCombinedState.

Referenced by Page1Parser.Page1Parser::check_for_whole_start_tag(), and clone().

19  {
21  return theCombinedState.error();
22 }
GlobalError error() const
Definition: VertexState.h:64
GlobalError BasicMultiVertexState::error4D ( ) const
overridevirtual

Mean covariance matrix of the mixture (covariance matrix of the collapsed state)

Implements BasicVertexState.

Definition at line 29 of file BasicMultiVertexState.cc.

References checkCombinedState(), VertexState::error4D(), and theCombinedState.

Referenced by clone().

29  {
31  return theCombinedState.error4D();
32 }
GlobalError error4D() const
Definition: VertexState.h:67
bool BasicMultiVertexState::is4D ( ) const
inlineoverridevirtual

Implements BasicVertexState.

Definition at line 90 of file BasicMultiVertexState.h.

References checkCombinedState(), VertexState::is4D(), and theCombinedState.

90  {
92  return theCombinedState.is4D();
93  }
bool is4D() const
Definition: VertexState.h:95
bool BasicMultiVertexState::isValid ( void  ) const
inlineoverridevirtual

The validity of the vertex

Implements BasicVertexState.

Definition at line 88 of file BasicMultiVertexState.h.

References valid.

Referenced by ntupleDataFormat._Object::_checkIsValid(), and core.AutoHandle.AutoHandle::ReallyLoad().

88 { return valid; }
GlobalPoint BasicMultiVertexState::position ( ) const
overridevirtual

Mean position of the mixture (position of the collapsed state)

Implements BasicVertexState.

Definition at line 9 of file BasicMultiVertexState.cc.

References checkCombinedState(), VertexState::position(), and theCombinedState.

Referenced by clone().

9  {
11  return theCombinedState.position();
12 }
GlobalPoint position() const
Definition: VertexState.h:62
double BasicMultiVertexState::time ( ) const
overridevirtual

Mean time of the mixture (time of the collapsed state)

Implements BasicVertexState.

Definition at line 14 of file BasicMultiVertexState.cc.

References checkCombinedState(), theCombinedState, and VertexState::time().

Referenced by clone().

14  {
16  return theCombinedState.time();
17 }
double time() const
Definition: VertexState.h:73
double BasicMultiVertexState::timeError ( ) const
overridevirtual

Mean covariance matrix of the mixture (covariance matrix of the collapsed state)

Implements BasicVertexState.

Definition at line 24 of file BasicMultiVertexState.cc.

References checkCombinedState(), theCombinedState, and VertexState::timeError().

Referenced by clone().

24  {
26  return theCombinedState.timeError();
27 }
double timeError() const
Definition: VertexState.h:75
GlobalWeight BasicMultiVertexState::weight ( ) const
overridevirtual

Mean weight matrix (inverse of covariance) of the mixture ( weight matrix of the collapsed state)

Implements BasicVertexState.

Definition at line 34 of file BasicMultiVertexState.cc.

References checkCombinedState(), theCombinedState, and VertexState::weight().

Referenced by clone(), and weightInMixture().

34  {
36  return theCombinedState.weight();
37 }
GlobalWeight weight() const
Definition: VertexState.h:69
GlobalWeight BasicMultiVertexState::weight4D ( ) const
overridevirtual

Mean weight matrix (inverse of covariance) of the mixture ( weight matrix of the collapsed state)

Implements BasicVertexState.

Definition at line 39 of file BasicMultiVertexState.cc.

References checkCombinedState(), theCombinedState, and VertexState::weight4D().

Referenced by clone().

39  {
41  return theCombinedState.weight4D();
42 }
GlobalWeight weight4D() const
Definition: VertexState.h:71
double BasicMultiVertexState::weightInMixture ( ) const
overridevirtual

The weight of this state. It will be the sum of the weights of the individual components in the mixture.

Implements BasicVertexState.

Definition at line 60 of file BasicMultiVertexState.cc.

References gather_cfg::cout, theComponents, valid, and weight().

Referenced by clone().

60  {
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 }
Common base class.
Definition: weight.py:1
GlobalWeight weight() const override
std::vector< VertexState > theComponents
AlgebraicVector3 BasicMultiVertexState::weightTimesPosition ( ) const
overridevirtual

Mean (weight*position) matrix of the mixture

Implements BasicVertexState.

Definition at line 44 of file BasicMultiVertexState.cc.

References checkCombinedState(), theCombinedState, and VertexState::weightTimesPosition().

Referenced by clone().

44  {
47 }
AlgebraicVector3 weightTimesPosition() const
Definition: VertexState.h:77
AlgebraicVector4 BasicMultiVertexState::weightTimesPosition4D ( ) const
overridevirtual

Mean (weight*position) matrix of the mixture

Implements BasicVertexState.

Definition at line 49 of file BasicMultiVertexState.cc.

References checkCombinedState(), theCombinedState, and VertexState::weightTimesPosition4D().

Referenced by clone().

49  {
52 }
AlgebraicVector4 weightTimesPosition4D() const
Definition: VertexState.h:79

Member Data Documentation

VertexState BasicMultiVertexState::theCombinedState
mutableprivate
bool BasicMultiVertexState::theCombinedStateUp2Date
mutableprivate

Definition at line 101 of file BasicMultiVertexState.h.

Referenced by checkCombinedState().

MultiVertexStateCombiner BasicMultiVertexState::theCombiner
private

Definition at line 103 of file BasicMultiVertexState.h.

Referenced by checkCombinedState().

std::vector<VertexState> BasicMultiVertexState::theComponents
mutableprivate

Definition at line 99 of file BasicMultiVertexState.h.

Referenced by checkCombinedState(), components(), and weightInMixture().

bool BasicMultiVertexState::valid
private

Definition at line 98 of file BasicMultiVertexState.h.

Referenced by checkCombinedState(), isValid(), and weightInMixture().