ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/IPHCalignment2/Alignment/TwoBodyDecay/interface/TwoBodyDecay.h
Revision: 1.1
Committed: Fri Nov 25 17:10:50 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

# User Rev Content
1 econte 1.1 #ifndef Alignment_TwoBodyDecay_TwoBodyDecay_h
2     #define Alignment_TwoBodyDecay_TwoBodyDecay_h
3    
4     #include "Alignment/TwoBodyDecay/interface/TwoBodyDecayParameters.h"
5     #include "Alignment/TwoBodyDecay/interface/TwoBodyDecayVirtualMeasurement.h"
6    
7     /** /class TwoBodyDecay
8     *
9     * Container-class for all information associated with a two-body decay (estimated parameters,
10     * chi2 of the fit, validity-flag).
11     *
12     * /author Edmund Widl
13     */
14    
15    
16     class TwoBodyDecay
17     {
18    
19     public:
20    
21     typedef TwoBodyDecayParameters::ParameterName ParameterName;
22    
23     TwoBodyDecay( void ) :
24     theDecayParameters(), theChi2( 0. ), theValidityFlag( false ) {}
25    
26     TwoBodyDecay( const TwoBodyDecayParameters &param, double chi2, bool valid,
27     const TwoBodyDecayVirtualMeasurement &vm ) :
28     theDecayParameters( param ), theChi2( chi2 ), theValidityFlag( valid ),
29     thePrimaryMass( vm.primaryMass() ), thePrimaryWidth( vm.primaryWidth() ) {}
30    
31     ~TwoBodyDecay( void ) {}
32    
33     inline const TwoBodyDecayParameters & decayParameters( void ) const { return theDecayParameters; }
34    
35     inline const AlgebraicVector & parameters( void ) const { return theDecayParameters.parameters(); }
36     inline const AlgebraicSymMatrix & covariance( void ) const { return theDecayParameters.covariance(); }
37    
38     /// Get specified decay parameter.
39     inline const double operator[]( ParameterName name ) const { return theDecayParameters[name]; }
40    
41     /// Get specified decay parameter.
42     inline const double operator()( ParameterName name ) const { return theDecayParameters(name); }
43    
44     inline const bool hasError( void ) const { return theDecayParameters.hasError(); }
45    
46     inline const double chi2( void ) const { return theChi2; }
47    
48     inline const bool isValid( void ) const { return theValidityFlag; }
49     inline void setInvalid( void ) { theValidityFlag = false; }
50    
51     inline const double primaryMass( void ) const { return thePrimaryMass; }
52     inline const double primaryWidth( void ) const { return thePrimaryWidth; }
53    
54     private:
55    
56     TwoBodyDecayParameters theDecayParameters;
57     double theChi2;
58     bool theValidityFlag;
59     double thePrimaryMass;
60     double thePrimaryWidth;
61    
62     };
63    
64     #endif