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() [1/2]

BasicMultiVertexState::BasicMultiVertexState ( )
inline

Constructors

Definition at line 16 of file BasicMultiVertexState.h.

16 : valid(false) {}

◆ BasicMultiVertexState() [2/2]

BasicMultiVertexState::BasicMultiVertexState ( const std::vector< VertexState > &  vsComp)

Definition at line 6 of file BasicMultiVertexState.cc.

7  : valid(true), theComponents(vsComp), theCombinedStateUp2Date(false) {}

Member Function Documentation

◆ checkCombinedState()

void BasicMultiVertexState::checkCombinedState ( ) const
private

◆ clone()

pointer BasicMultiVertexState::clone ( void  ) const
inlineoverridevirtual

Access methods

Implements BasicVertexState.

Definition at line 22 of file BasicMultiVertexState.h.

22 { return build<BasicMultiVertexState>(*this); }

◆ components()

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.

83 { return theComponents; }

References theComponents.

◆ error()

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.

19  {
21  return theCombinedState.error();
22 }

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

Referenced by Page1Parser.Page1Parser::check_for_whole_start_tag().

◆ error4D()

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.

29  {
31  return theCombinedState.error4D();
32 }

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

◆ is4D()

bool BasicMultiVertexState::is4D ( ) const
inlineoverridevirtual

Implements BasicVertexState.

Definition at line 90 of file BasicMultiVertexState.h.

90  {
92  return theCombinedState.is4D();
93  }

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

◆ isValid()

bool BasicMultiVertexState::isValid ( void  ) const
inlineoverridevirtual

The validity of the vertex

Implements BasicVertexState.

Definition at line 88 of file BasicMultiVertexState.h.

88 { return valid; }

References valid.

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

◆ position()

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.

9  {
11  return theCombinedState.position();
12 }

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

◆ time()

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.

14  {
16  return theCombinedState.time();
17 }

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

◆ timeError()

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.

24  {
26  return theCombinedState.timeError();
27 }

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

◆ weight()

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.

34  {
36  return theCombinedState.weight();
37 }

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

Referenced by weightInMixture().

◆ weight4D()

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.

39  {
41  return theCombinedState.weight4D();
42 }

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

◆ weightInMixture()

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.

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 }

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

◆ weightTimesPosition()

AlgebraicVector3 BasicMultiVertexState::weightTimesPosition ( ) const
overridevirtual

Mean (weight*position) matrix of the mixture

Implements BasicVertexState.

Definition at line 44 of file BasicMultiVertexState.cc.

44  {
47 }

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

◆ weightTimesPosition4D()

AlgebraicVector4 BasicMultiVertexState::weightTimesPosition4D ( ) const
overridevirtual

Mean (weight*position) matrix of the mixture

Implements BasicVertexState.

Definition at line 49 of file BasicMultiVertexState.cc.

49  {
52 }

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

Member Data Documentation

◆ theCombinedState

VertexState BasicMultiVertexState::theCombinedState
mutableprivate

◆ theCombinedStateUp2Date

bool BasicMultiVertexState::theCombinedStateUp2Date
mutableprivate

Definition at line 101 of file BasicMultiVertexState.h.

Referenced by checkCombinedState().

◆ theCombiner

MultiVertexStateCombiner BasicMultiVertexState::theCombiner
private

Definition at line 103 of file BasicMultiVertexState.h.

Referenced by checkCombinedState().

◆ theComponents

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

Definition at line 99 of file BasicMultiVertexState.h.

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

◆ valid

bool BasicMultiVertexState::valid
private

Definition at line 98 of file BasicMultiVertexState.h.

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

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::valid
bool valid
Definition: BasicMultiVertexState.h:98
VertexState::error
GlobalError error() const
Definition: VertexState.h:64
BasicMultiVertexState::theCombinedStateUp2Date
bool theCombinedStateUp2Date
Definition: BasicMultiVertexState.h:101
VertexState::weight
GlobalWeight weight() const
Definition: VertexState.h:69
VertexState::timeError
double timeError() const
Definition: VertexState.h:75
VertexState::is4D
bool is4D() const
Definition: VertexState.h:95
VertexState::weight4D
GlobalWeight weight4D() const
Definition: VertexState.h:71
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
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
VertexState::time
double time() const
Definition: VertexState.h:73
weight
Definition: weight.py:1
VertexState::error4D
GlobalError error4D() const
Definition: VertexState.h:67