00001 #ifndef Alignment_TwoBodyDecay_TwoBodyDecay_h 00002 #define Alignment_TwoBodyDecay_TwoBodyDecay_h 00003 00004 #include "Alignment/TwoBodyDecay/interface/TwoBodyDecayParameters.h" 00005 #include "Alignment/TwoBodyDecay/interface/TwoBodyDecayVirtualMeasurement.h" 00006 00016 class TwoBodyDecay 00017 { 00018 00019 public: 00020 00021 typedef TwoBodyDecayParameters::ParameterName ParameterName; 00022 00023 TwoBodyDecay( void ) : 00024 theDecayParameters(), theChi2( 0. ), theValidityFlag( false ) {} 00025 00026 TwoBodyDecay( const TwoBodyDecayParameters ¶m, double chi2, bool valid, 00027 const TwoBodyDecayVirtualMeasurement &vm ) : 00028 theDecayParameters( param ), theChi2( chi2 ), theValidityFlag( valid ), 00029 thePrimaryMass( vm.primaryMass() ), thePrimaryWidth( vm.primaryWidth() ) {} 00030 00031 ~TwoBodyDecay( void ) {} 00032 00033 inline const TwoBodyDecayParameters & decayParameters( void ) const { return theDecayParameters; } 00034 00035 inline const AlgebraicVector & parameters( void ) const { return theDecayParameters.parameters(); } 00036 inline const AlgebraicSymMatrix & covariance( void ) const { return theDecayParameters.covariance(); } 00037 00039 inline const double operator[]( ParameterName name ) const { return theDecayParameters[name]; } 00040 00042 inline const double operator()( ParameterName name ) const { return theDecayParameters(name); } 00043 00044 inline const bool hasError( void ) const { return theDecayParameters.hasError(); } 00045 00046 inline const double chi2( void ) const { return theChi2; } 00047 00048 inline const bool isValid( void ) const { return theValidityFlag; } 00049 inline void setInvalid( void ) { theValidityFlag = false; } 00050 00051 inline const double primaryMass( void ) const { return thePrimaryMass; } 00052 inline const double primaryWidth( void ) const { return thePrimaryWidth; } 00053 00054 private: 00055 00056 TwoBodyDecayParameters theDecayParameters; 00057 double theChi2; 00058 bool theValidityFlag; 00059 double thePrimaryMass; 00060 double thePrimaryWidth; 00061 00062 }; 00063 00064 #endif