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)), thePosAvailable(false),
9  valid(false), theWeightInMix(0.)
10 {}
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 13 of file BasicSingleVertexState.cc.

16  : thePos(pos), thePosAvailable(true),
17  theErr(posErr), theErrAvailable(true),
20  valid(true), theWeightInMix(weightInMix)
21 {}
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 24 of file BasicSingleVertexState.cc.

27  : thePos(pos), thePosAvailable(true),
29  theWeight(posWeight), theWeightAvailable(true),
31  valid(true), theWeightInMix(weightInMix)
32 {}
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 35 of file BasicSingleVertexState.cc.

38  : thePos(GlobalPoint(0, 0, 0)), thePosAvailable(false),
40  theWeight(posWeight), theWeightAvailable(true),
42  valid(true), theWeightInMix(weightInMix)
43 {//std::cout <<"BasicSingleVertexState ctor\n";
44 }
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 100 of file BasicSingleVertexState.cc.

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

Referenced by error().

101 {
102  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
103  int ifail;
104  theErr = weight().matrix().Inverse(ifail);
105  if (ifail != 0) throw VertexException("BasicSingleVertexState::could not invert weight matrix");
106  theErrAvailable = true;
107 }
Common base class.
const AlgebraicSymMatrix33 & matrix() const
GlobalWeight weight() const
void BasicSingleVertexState::computePosition ( ) const
private

Definition at line 91 of file BasicSingleVertexState.cc.

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

Referenced by position().

92 {
93  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
95  thePos = GlobalPoint(pos[0], pos[1], pos[2]);
96  thePosAvailable = true;
97 }
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 110 of file BasicSingleVertexState.cc.

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

Referenced by weight().

111 {
112  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
113  int ifail;
114  theWeight = error().matrix().Inverse(ifail);
115  if (ifail != 0) throw VertexException("BasicSingleVertexState::could not invert error matrix");
116  theWeightAvailable = true;
117 }
Common base class.
const AlgebraicSymMatrix33 & matrix() const
GlobalError error() const
void BasicSingleVertexState::computeWeightTimesPos ( ) const
private

Definition at line 120 of file BasicSingleVertexState.cc.

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

Referenced by weightTimesPosition().

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

Implements BasicVertexState.

Definition at line 54 of file BasicSingleVertexState.cc.

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

Referenced by computePosition(), and computeWeight().

55 {
56  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
58  return theErr;
59 }
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.

GlobalPoint BasicSingleVertexState::position ( ) const
virtual

Access methods

Implements BasicVertexState.

Definition at line 46 of file BasicSingleVertexState.cc.

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

Referenced by computeWeightTimesPos().

47 {
48  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
50  return thePos;
51 }
Common base class.
GlobalWeight BasicSingleVertexState::weight ( void  ) const
virtual

Implements BasicVertexState.

Definition at line 62 of file BasicSingleVertexState.cc.

References computeWeight(), theWeight, theWeightAvailable, and valid.

Referenced by computeError(), and computeWeightTimesPos().

63 {
64  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
66  return theWeight;
67 }
Common base class.
double BasicSingleVertexState::weightInMixture ( ) const
virtual

Implements BasicVertexState.

Definition at line 78 of file BasicSingleVertexState.cc.

References theWeightInMix, and valid.

79 {
80  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
81  return theWeightInMix;
82 }
Common base class.
AlgebraicVector3 BasicSingleVertexState::weightTimesPosition ( ) const
virtual

Implements BasicVertexState.

Definition at line 70 of file BasicSingleVertexState.cc.

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

Referenced by computePosition().

71 {
72  if (!valid) throw VertexException("BasicSingleVertexState::invalid");
74  return theWeightTimesPos;
75 }
Common base class.
AlgebraicVector3 theWeightTimesPos

Member Data Documentation

GlobalError BasicSingleVertexState::theErr
mutableprivate

Definition at line 55 of file BasicSingleVertexState.h.

Referenced by computeError(), and error().

bool BasicSingleVertexState::theErrAvailable
mutableprivate

Definition at line 56 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 54 of file BasicSingleVertexState.h.

Referenced by computePosition(), and position().

GlobalWeight BasicSingleVertexState::theWeight
mutableprivate

Definition at line 57 of file BasicSingleVertexState.h.

Referenced by computeWeight(), and weight().

bool BasicSingleVertexState::theWeightAvailable
mutableprivate

Definition at line 58 of file BasicSingleVertexState.h.

Referenced by computeWeight(), and weight().

double BasicSingleVertexState::theWeightInMix
private

Definition at line 63 of file BasicSingleVertexState.h.

Referenced by weightInMixture().

AlgebraicVector3 BasicSingleVertexState::theWeightTimesPos
mutableprivate

Definition at line 59 of file BasicSingleVertexState.h.

Referenced by computeWeightTimesPos(), and weightTimesPosition().

bool BasicSingleVertexState::theWeightTimesPosAvailable
mutableprivate

Definition at line 60 of file BasicSingleVertexState.h.

Referenced by computeWeightTimesPos(), and weightTimesPosition().

bool BasicSingleVertexState::valid
private