ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/IPHCalignment2/Alignment/TwoBodyDecay/interface/TwoBodyDecayParameters.h
Revision: 1.1
Committed: Fri Nov 25 17:10:51 2011 UTC (13 years, 5 months ago) by econte
Content type: text/plain
Branch: MAIN
CVS Tags: TBD2011, TBD_2011, HEAD
Log Message:
TwoBodyDecay modif

File Contents

# Content
1 #ifndef Alignment_TwoBodyDecay_TwoBodyDecayParameters_h
2 #define Alignment_TwoBodyDecay_TwoBodyDecayParameters_h
3
4 /** /class TwoBodyDecayParameters
5 *
6 * This class provides the definition and a container for the parameters
7 * describing a two-body decay.
8 *
9 * /author Edmund Widl
10 */
11
12 #include "DataFormats/CLHEP/interface/AlgebraicObjects.h"
13
14
15 class TwoBodyDecayParameters
16 {
17
18 public:
19
20 /// Define order of parameters
21 enum ParameterName { x = 0, y = 1, z = 2, px = 3, py = 4, pz = 5, theta = 6, phi = 7, mass = 8 };
22
23 enum { dimension = 9 };
24
25 TwoBodyDecayParameters( void ) :
26 theParameters( AlgebraicVector() ), theCovariance( AlgebraicSymMatrix() ) {}
27
28 TwoBodyDecayParameters( const AlgebraicVector & param, const AlgebraicSymMatrix & cov ) :
29 theParameters( param ), theCovariance( cov ) {}
30
31 TwoBodyDecayParameters( AlgebraicVector param ) :
32 theParameters( param ), theCovariance( AlgebraicSymMatrix() ) {}
33
34 TwoBodyDecayParameters( const TwoBodyDecayParameters & other ) :
35 theParameters( other.parameters() ), theCovariance( other.covariance() ) {}
36
37 ~TwoBodyDecayParameters( void ) {}
38
39 /// Get decay parameters.
40 inline const AlgebraicVector & parameters( void ) const { return theParameters; }
41
42 /// Get error matrix.
43 inline const AlgebraicSymMatrix & covariance( void ) const { return theCovariance; }
44
45 /// Get specified decay parameter.
46 inline const double operator[]( ParameterName name ) const { return theParameters[name]; }
47
48 /// Get specified decay parameter.
49 inline const double operator()( ParameterName name ) const { return theParameters[name]; }
50
51 /// Get specified range of decay parameters.
52 inline const AlgebraicVector sub( ParameterName first, ParameterName last ) const { return theParameters.sub( first+1, last+1 ); }
53
54 inline const bool hasError( void ) const { return ( theCovariance.num_row() != 0 ); }
55
56 private:
57
58 AlgebraicVector theParameters;
59 AlgebraicSymMatrix theCovariance;
60
61 };
62
63 #endif