CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/Alignment/TwoBodyDecay/interface/TwoBodyDecay.h

Go to the documentation of this file.
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     thePrimaryMass( 0. ), thePrimaryWidth( 0. )  {}
00026 
00027   TwoBodyDecay( const TwoBodyDecayParameters &param, double chi2, bool valid, 
00028                 const TwoBodyDecayVirtualMeasurement &vm ) :
00029     theDecayParameters( param ), theChi2( chi2 ), theValidityFlag( valid ),
00030     thePrimaryMass( vm.primaryMass() ), thePrimaryWidth( vm.primaryWidth() ) {}
00031 
00032   ~TwoBodyDecay( void ) {}
00033 
00034   inline const TwoBodyDecayParameters & decayParameters( void ) const { return theDecayParameters; }
00035 
00036   inline const AlgebraicVector & parameters( void ) const { return theDecayParameters.parameters(); }
00037   inline const AlgebraicSymMatrix & covariance( void ) const { return theDecayParameters.covariance(); }
00038 
00040   inline double operator[]( ParameterName name ) const { return theDecayParameters[name]; }
00041 
00043   inline double operator()( ParameterName name ) const { return theDecayParameters(name); }
00044 
00045   inline bool hasError( void ) const { return theDecayParameters.hasError(); }
00046 
00047   inline double chi2( void ) const { return theChi2; }
00048 
00049   inline bool isValid( void ) const { return theValidityFlag; }
00050   inline void setInvalid( void ) { theValidityFlag = false; }
00051 
00052   inline double primaryMass( void ) const { return thePrimaryMass; }
00053   inline double primaryWidth( void ) const { return thePrimaryWidth; }
00054 
00055  private:
00056 
00057   TwoBodyDecayParameters theDecayParameters;
00058   double theChi2;
00059   bool theValidityFlag;
00060   double thePrimaryMass;
00061   double thePrimaryWidth;
00062 
00063 };
00064 
00065 #endif