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.

Member Function Documentation

◆ checkCombinedState()

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 }
Common base class.
MultiVertexStateCombiner theCombiner
std::vector< VertexState > theComponents
VertexState combine(const VSC &theMixture) const

◆ 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.

References theComponents.

83 { return theComponents; }
std::vector< VertexState > 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.

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

Referenced by Page1Parser.Page1Parser::check_for_whole_start_tag().

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

◆ 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.

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

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

◆ is4D()

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

◆ isValid()

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; }

◆ 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.

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

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

◆ 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.

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

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

◆ 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.

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

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

◆ 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.

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

Referenced by weightInMixture().

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

◆ 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.

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

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

◆ 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.

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

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

◆ weightTimesPosition()

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().

44  {
47 }
AlgebraicVector3 weightTimesPosition() const
Definition: VertexState.h:77

◆ weightTimesPosition4D()

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().

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

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().