CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

BasicMultiVertexState Class Reference

#include <BasicMultiVertexState.h>

Inheritance diagram for BasicMultiVertexState:
BasicVertexState ReferenceCounted

List of all members.

Public Member Functions

 BasicMultiVertexState ()
 BasicMultiVertexState (const std::vector< VertexState > &vsComp)
virtual BasicMultiVertexStateclone () const
virtual std::vector< VertexStatecomponents () const
GlobalError error () const
bool isValid () const
GlobalPoint position () const
GlobalWeight weight () const
double weightInMixture () const
AlgebraicVector3 weightTimesPosition () const

Private Member Functions

void checkCombinedState () const

Private Attributes

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

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 18 of file BasicMultiVertexState.h.

Referenced by clone().

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

Member Function Documentation

void BasicMultiVertexState::checkCombinedState ( ) const [private]
virtual BasicMultiVertexState* BasicMultiVertexState::clone ( void  ) const [inline, virtual]

Access methods

Implements BasicVertexState.

Definition at line 24 of file BasicMultiVertexState.h.

References BasicMultiVertexState().

  {
    return new BasicMultiVertexState(*this);
  }
virtual std::vector<VertexState> BasicMultiVertexState::components ( ) const [inline, virtual]

Vector of individual components in the mixture.

Reimplemented from BasicVertexState.

Definition at line 60 of file BasicMultiVertexState.h.

References theComponents.

                                                    {
    return theComponents;
  }
GlobalError BasicMultiVertexState::error ( ) const [virtual]

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

Implements BasicVertexState.

Definition at line 18 of file BasicMultiVertexState.cc.

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

bool BasicMultiVertexState::isValid ( void  ) const [inline, virtual]

The validity of the vertex

Implements BasicVertexState.

Definition at line 67 of file BasicMultiVertexState.h.

References valid.

{return valid;}
GlobalPoint BasicMultiVertexState::position ( ) const [virtual]

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

Implements BasicVertexState.

Definition at line 11 of file BasicMultiVertexState.cc.

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

GlobalWeight BasicMultiVertexState::weight ( void  ) const [virtual]

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

Implements BasicVertexState.

Definition at line 25 of file BasicMultiVertexState.cc.

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

Referenced by weightInMixture().

double BasicMultiVertexState::weightInMixture ( ) const [virtual]

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 45 of file BasicMultiVertexState.cc.

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

                                                    {
  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
  if (theComponents.empty()) {
    cout << "Asking for weight of empty MultiVertexState, returning zero!" << endl;
    throw VertexException("Asking for weight of empty MultiVertexState, returning zero!");
    return 0.;
  }

  double weight = 0.;
  for (vector<VertexState>::const_iterator it = theComponents.begin(); 
        it != theComponents.end(); it++) {
    weight += it->weightInMixture();
  }
  return weight;
}
AlgebraicVector3 BasicMultiVertexState::weightTimesPosition ( ) const [virtual]

Mean (weight*position) matrix of the mixture

Implements BasicVertexState.

Definition at line 32 of file BasicMultiVertexState.cc.

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


Member Data Documentation

Definition at line 76 of file BasicMultiVertexState.h.

Referenced by checkCombinedState().

Definition at line 78 of file BasicMultiVertexState.h.

Referenced by checkCombinedState().

std::vector<VertexState> BasicMultiVertexState::theComponents [mutable, private]

Definition at line 74 of file BasicMultiVertexState.h.

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

Definition at line 73 of file BasicMultiVertexState.h.

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