test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
BasicSingleVertexState Class Reference

#include <BasicSingleVertexState.h>

Inheritance diagram for BasicSingleVertexState:
BasicVertexState ReferenceCounted

Public Member Functions

 BasicSingleVertexState ()
 
 BasicSingleVertexState (const GlobalPoint &pos, const GlobalError &posErr, const double &weightInMix=1.0)
 
 BasicSingleVertexState (const GlobalPoint &pos, const GlobalWeight &posWeight, const double &weightInMix=1.0)
 
 BasicSingleVertexState (const AlgebraicVector3 &weightTimesPosition, const GlobalWeight &posWeight, const double &weightInMix=1.0)
 
virtual BasicSingleVertexStateclone () const
 
GlobalError error () const
 
bool isValid () const
 
GlobalPoint position () const
 
GlobalWeight weight () const
 
double weightInMixture () const
 
AlgebraicVector3 weightTimesPosition () const
 
- Public Member Functions inherited from BasicVertexState
virtual std::vector< VertexStatecomponents () const
 
virtual ~BasicVertexState ()
 

Private Member Functions

void computeError () const
 
void computePosition () const
 
void computeWeight () const
 
void computeWeightTimesPos () const
 

Private Attributes

GlobalError theErr
 
bool theErrAvailable
 
GlobalPoint thePos
 
bool thePosAvailable
 
GlobalWeight theWeight
 
bool theWeightAvailable
 
double theWeightInMix
 
AlgebraicVector3 theWeightTimesPos
 
bool theWeightTimesPosAvailable
 
bool valid
 

Additional Inherited Members

- Public Types inherited from BasicVertexState
typedef ProxyBase
< BasicVertexState,
CopyUsingClone
< BasicVertexState > > 
Proxy
 
typedef
ReferenceCountingPointer
< BasicVertexState
RCPtr
 

Detailed Description

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

Definition at line 13 of file BasicSingleVertexState.h.

Constructor & Destructor Documentation

BasicSingleVertexState::BasicSingleVertexState ( )

Constructors

Definition at line 4 of file BasicSingleVertexState.cc.

Referenced by clone().

5  : thePos(GlobalPoint(0, 0, 0)),
10  valid(false)
11 {}
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
AlgebraicVector3 theWeightTimesPos
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
ROOT::Math::SVector< double, 3 > AlgebraicVector3
BasicSingleVertexState::BasicSingleVertexState ( const GlobalPoint pos,
const GlobalError posErr,
const double &  weightInMix = 1.0 
)

Definition at line 14 of file BasicSingleVertexState.cc.

17  : thePos(pos),
18  theErr(posErr),
21  theWeightInMix(weightInMix),
23  valid(true)
24 {}
AlgebraicVector3 theWeightTimesPos
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
ROOT::Math::SVector< double, 3 > AlgebraicVector3
BasicSingleVertexState::BasicSingleVertexState ( const GlobalPoint pos,
const GlobalWeight posWeight,
const double &  weightInMix = 1.0 
)

Definition at line 27 of file BasicSingleVertexState.cc.

30  : thePos(pos),
32  theWeight(posWeight),
34  theWeightInMix(weightInMix),
36  valid(true)
37 {}
AlgebraicVector3 theWeightTimesPos
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
ROOT::Math::SVector< double, 3 > AlgebraicVector3
BasicSingleVertexState::BasicSingleVertexState ( const AlgebraicVector3 weightTimesPosition,
const GlobalWeight posWeight,
const double &  weightInMix = 1.0 
)

Definition at line 40 of file BasicSingleVertexState.cc.

43  : thePos(GlobalPoint(0, 0, 0)),
45  theWeight(posWeight),
47  theWeightInMix(weightInMix),
49  valid(true)
50 {}
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
AlgebraicVector3 theWeightTimesPos
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
AlgebraicVector3 weightTimesPosition() const

Member Function Documentation

virtual BasicSingleVertexState* BasicSingleVertexState::clone ( void  ) const
inlinevirtual

Access methods

Implements BasicVertexState.

Definition at line 30 of file BasicSingleVertexState.h.

References BasicSingleVertexState().

31  {
32  return new BasicSingleVertexState(*this);
33  }
void BasicSingleVertexState::computeError ( ) const
private

Definition at line 107 of file BasicSingleVertexState.cc.

References GlobalErrorBase< T, ErrorWeightType >::matrix(), theErr, theErrAvailable, valid, and weight().

Referenced by error().

108 {
109  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
110  int ifail;
111  theErr = weight().matrix().Inverse(ifail);
112  if (ifail != 0) throw VertexException("BasicSingleVertexState::could not invert weight matrix");
113  theErrAvailable = true;
114 }
Common base class.
const AlgebraicSymMatrix33 & matrix() const
GlobalWeight weight() const
void BasicSingleVertexState::computePosition ( ) const
private

Definition at line 98 of file BasicSingleVertexState.cc.

References error(), GlobalErrorBase< T, ErrorWeightType >::matrix_new(), thePos, thePosAvailable, valid, and weightTimesPosition().

Referenced by position().

99 {
100  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
102  thePos = GlobalPoint(pos[0], pos[1], pos[2]);
103  thePosAvailable = true;
104 }
Common base class.
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
const AlgebraicSymMatrix33 & matrix_new() const
GlobalError error() const
ROOT::Math::SVector< double, 3 > AlgebraicVector3
AlgebraicVector3 weightTimesPosition() const
void BasicSingleVertexState::computeWeight ( ) const
private

Definition at line 117 of file BasicSingleVertexState.cc.

References error(), GlobalErrorBase< T, ErrorWeightType >::matrix(), theWeight, theWeightAvailable, and valid.

Referenced by weight().

118 {
119  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
120  int ifail;
121  theWeight = error().matrix().Inverse(ifail);
122  if (ifail != 0) throw VertexException("BasicSingleVertexState::could not invert error matrix");
123  theWeightAvailable = true;
124 }
Common base class.
const AlgebraicSymMatrix33 & matrix() const
GlobalError error() const
void BasicSingleVertexState::computeWeightTimesPos ( ) const
private

Definition at line 127 of file BasicSingleVertexState.cc.

References GlobalErrorBase< T, ErrorWeightType >::matrix_new(), position(), theWeightTimesPos, theWeightTimesPosAvailable, valid, weight(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by weightTimesPosition().

128 {
129  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
130  AlgebraicVector3 pos; pos(0) = position().x();
131  pos(1) = position().y(); pos(2) = position().z();
134 }
Common base class.
T y() const
Definition: PV3DBase.h:63
const AlgebraicSymMatrix33 & matrix_new() const
AlgebraicVector3 theWeightTimesPos
GlobalWeight weight() const
T z() const
Definition: PV3DBase.h:64
GlobalPoint position() const
ROOT::Math::SVector< double, 3 > AlgebraicVector3
T x() const
Definition: PV3DBase.h:62
GlobalError BasicSingleVertexState::error ( ) const
virtual

Implements BasicVertexState.

Definition at line 61 of file BasicSingleVertexState.cc.

References computeError(), theErr, theErrAvailable, and valid.

Referenced by computePosition(), and computeWeight().

62 {
63  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
65  return theErr;
66 }
Common base class.
bool BasicSingleVertexState::isValid ( void  ) const
inlinevirtual

The validity of the vertex

Implements BasicVertexState.

Definition at line 44 of file BasicSingleVertexState.h.

References valid.

Referenced by core.AutoHandle.AutoHandle::ReallyLoad().

GlobalPoint BasicSingleVertexState::position ( ) const
virtual

Access methods

Implements BasicVertexState.

Definition at line 53 of file BasicSingleVertexState.cc.

References computePosition(), thePos, thePosAvailable, and valid.

Referenced by computeWeightTimesPos().

54 {
55  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
57  return thePos;
58 }
Common base class.
GlobalWeight BasicSingleVertexState::weight ( void  ) const
virtual
double BasicSingleVertexState::weightInMixture ( ) const
virtual

Implements BasicVertexState.

Definition at line 85 of file BasicSingleVertexState.cc.

References theWeightInMix, and valid.

86 {
87  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
88  return theWeightInMix;
89 }
Common base class.
AlgebraicVector3 BasicSingleVertexState::weightTimesPosition ( ) const
virtual

Implements BasicVertexState.

Definition at line 77 of file BasicSingleVertexState.cc.

References computeWeightTimesPos(), theWeightTimesPos, theWeightTimesPosAvailable, and valid.

Referenced by computePosition().

78 {
79  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
81  return theWeightTimesPos;
82 }
Common base class.
AlgebraicVector3 theWeightTimesPos

Member Data Documentation

GlobalError BasicSingleVertexState::theErr
mutableprivate

Definition at line 54 of file BasicSingleVertexState.h.

Referenced by computeError(), and error().

bool BasicSingleVertexState::theErrAvailable
mutableprivate

Definition at line 60 of file BasicSingleVertexState.h.

Referenced by computeError(), and error().

GlobalPoint BasicSingleVertexState::thePos
mutableprivate

Definition at line 53 of file BasicSingleVertexState.h.

Referenced by computePosition(), and position().

bool BasicSingleVertexState::thePosAvailable
mutableprivate

Definition at line 59 of file BasicSingleVertexState.h.

Referenced by computePosition(), and position().

GlobalWeight BasicSingleVertexState::theWeight
mutableprivate

Definition at line 55 of file BasicSingleVertexState.h.

Referenced by computeWeight(), and weight().

bool BasicSingleVertexState::theWeightAvailable
mutableprivate

Definition at line 61 of file BasicSingleVertexState.h.

Referenced by computeWeight(), and weight().

double BasicSingleVertexState::theWeightInMix
private

Definition at line 57 of file BasicSingleVertexState.h.

Referenced by weightInMixture().

AlgebraicVector3 BasicSingleVertexState::theWeightTimesPos
mutableprivate

Definition at line 56 of file BasicSingleVertexState.h.

Referenced by computeWeightTimesPos(), and weightTimesPosition().

bool BasicSingleVertexState::theWeightTimesPosAvailable
mutableprivate

Definition at line 62 of file BasicSingleVertexState.h.

Referenced by computeWeightTimesPos(), and weightTimesPosition().

bool BasicSingleVertexState::valid
private