CMS 3D CMS Logo

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

#include <BasicMultiVertexState.h>

Inheritance diagram for BasicMultiVertexState:
BasicVertexState ReferenceCounted

Public Member Functions

 BasicMultiVertexState ()
 
 BasicMultiVertexState (const std::vector< VertexState > &vsComp)
 
virtual BasicMultiVertexStateclone () const
 
virtual std::vector< VertexStatecomponents () const
 
GlobalError error () const
 
GlobalError error4D () const
 
bool is4D () const
 
bool isValid () const
 
GlobalPoint position () const
 
double time () const
 
double timeError () const
 
GlobalWeight weight () const
 
GlobalWeight weight4D () const
 
double weightInMixture () const
 
AlgebraicVector3 weightTimesPosition () const
 
AlgebraicVector4 weightTimesPosition4D () const
 
- 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
typedef ProxyBase< BasicVertexState, CopyUsingClone< BasicVertexState > > Proxy
 
typedef ReferenceCountingPointer< BasicVertexStateRCPtr
 

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

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

Definition at line 7 of file BasicMultiVertexState.cc.

7  :
8  valid(true), theComponents(vsComp), theCombinedStateUp2Date( false) {}
std::vector< VertexState > theComponents

Member Function Documentation

void BasicMultiVertexState::checkCombinedState ( ) const
private

Definition at line 89 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().

90 {
91  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
92  if (theCombinedStateUp2Date) return;
93 
96 }
VertexState combine(const VSC &theMixture) const
Common base class.
MultiVertexStateCombiner theCombiner
std::vector< VertexState > theComponents
virtual BasicMultiVertexState* BasicMultiVertexState::clone ( void  ) const
inlinevirtual
virtual std::vector<VertexState> BasicMultiVertexState::components ( ) const
inlinevirtual

Vector of individual components in the mixture.

Reimplemented from BasicVertexState.

Definition at line 88 of file BasicMultiVertexState.h.

References theComponents.

88  {
89  return theComponents;
90  }
std::vector< VertexState > theComponents
GlobalError BasicMultiVertexState::error ( ) const
virtual

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

Implements BasicVertexState.

Definition at line 24 of file BasicMultiVertexState.cc.

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

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

25 {
27  return theCombinedState.error();
28 }
GlobalError error() const
Definition: VertexState.h:74
GlobalError BasicMultiVertexState::error4D ( ) const
virtual

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

Implements BasicVertexState.

Definition at line 36 of file BasicMultiVertexState.cc.

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

Referenced by clone().

37 {
39  return theCombinedState.error4D();
40 }
GlobalError error4D() const
Definition: VertexState.h:80
bool BasicMultiVertexState::is4D ( ) const
inlinevirtual

Implements BasicVertexState.

Definition at line 97 of file BasicMultiVertexState.h.

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

bool is4D() const
Definition: VertexState.h:133
bool BasicMultiVertexState::isValid ( void  ) const
inlinevirtual

The validity of the vertex

Implements BasicVertexState.

Definition at line 95 of file BasicMultiVertexState.h.

References valid.

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

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.

Referenced by clone().

12 {
14  return theCombinedState.position();
15 }
GlobalPoint position() const
Definition: VertexState.h:69
double BasicMultiVertexState::time ( ) const
virtual

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

Implements BasicVertexState.

Definition at line 17 of file BasicMultiVertexState.cc.

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

Referenced by clone().

18 {
20  return theCombinedState.time();
21 }
double time() const
Definition: VertexState.h:95
double BasicMultiVertexState::timeError ( ) const
virtual

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

Implements BasicVertexState.

Definition at line 30 of file BasicMultiVertexState.cc.

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

Referenced by clone().

31 {
33  return theCombinedState.timeError();
34 }
double timeError() const
Definition: VertexState.h:99
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 42 of file BasicMultiVertexState.cc.

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

Referenced by clone(), and weightInMixture().

43 {
45  return theCombinedState.weight();
46 }
GlobalWeight weight() const
Definition: VertexState.h:85
GlobalWeight BasicMultiVertexState::weight4D ( ) const
virtual

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

Implements BasicVertexState.

Definition at line 48 of file BasicMultiVertexState.cc.

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

Referenced by clone().

49 {
51  return theCombinedState.weight4D();
52 }
GlobalWeight weight4D() const
Definition: VertexState.h:90
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 73 of file BasicMultiVertexState.cc.

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

Referenced by clone().

73  {
74  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
75  if (theComponents.empty()) {
76  cout << "Asking for weight of empty MultiVertexState, returning zero!" << endl;
77  throw VertexException("Asking for weight of empty MultiVertexState, returning zero!");
78  return 0.;
79  }
80 
81  double weight = 0.;
82  for (vector<VertexState>::const_iterator it = theComponents.begin();
83  it != theComponents.end(); it++) {
84  weight += it->weightInMixture();
85  }
86  return weight;
87 }
Common base class.
Definition: weight.py:1
std::vector< VertexState > theComponents
GlobalWeight weight() const
AlgebraicVector3 BasicMultiVertexState::weightTimesPosition ( ) const
virtual

Mean (weight*position) matrix of the mixture

Implements BasicVertexState.

Definition at line 54 of file BasicMultiVertexState.cc.

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

Referenced by clone().

55 {
58 }
AlgebraicVector3 weightTimesPosition() const
Definition: VertexState.h:103
AlgebraicVector4 BasicMultiVertexState::weightTimesPosition4D ( ) const
virtual

Mean (weight*position) matrix of the mixture

Implements BasicVertexState.

Definition at line 60 of file BasicMultiVertexState.cc.

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

Referenced by clone().

61 {
64 }
AlgebraicVector4 weightTimesPosition4D() const
Definition: VertexState.h:108

Member Data Documentation

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

Definition at line 106 of file BasicMultiVertexState.h.

Referenced by checkCombinedState().

MultiVertexStateCombiner BasicMultiVertexState::theCombiner
private

Definition at line 108 of file BasicMultiVertexState.h.

Referenced by checkCombinedState().

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

Definition at line 104 of file BasicMultiVertexState.h.

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

bool BasicMultiVertexState::valid
private

Definition at line 103 of file BasicMultiVertexState.h.

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