00001 #ifndef Alignment_TwoBodyDecay_TwoBodyDecayEstimator_h 00002 #define Alignment_TwoBodyDecay_TwoBodyDecayEstimator_h 00003 00004 #include "Alignment/TwoBodyDecay/interface/TwoBodyDecay.h" 00005 #include "Alignment/TwoBodyDecay/interface/TwoBodyDecayVirtualMeasurement.h" 00006 00007 #include "RecoVertex/VertexTools/interface/PerigeeLinearizedTrackState.h" 00008 #include "DataFormats/CLHEP/interface/AlgebraicObjects.h" 00009 00010 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00011 00020 class TwoBodyDecayEstimator 00021 { 00022 00023 public: 00024 00025 typedef PerigeeLinearizedTrackState::RefCountedLinearizedTrackState RefCountedLinearizedTrackState; 00026 00027 TwoBodyDecayEstimator( const edm::ParameterSet & config ); 00028 virtual ~TwoBodyDecayEstimator( void ) {} 00029 00030 virtual TwoBodyDecay estimate( const std::vector< RefCountedLinearizedTrackState > & linTracks, 00031 const TwoBodyDecayParameters & linearizationPoint, 00032 const TwoBodyDecayVirtualMeasurement & vm ) const; 00033 00034 inline int ndf( void ) const { return theNdf; } 00035 inline const AlgebraicVector& pulls( void ) const { return thePulls; } 00036 00037 virtual TwoBodyDecayEstimator* clone( void ) const { return new TwoBodyDecayEstimator( *this ); } 00038 00039 protected: 00040 00041 virtual bool constructMatrices( const std::vector< RefCountedLinearizedTrackState > & linTracks, 00042 const TwoBodyDecayParameters & linearizationPoint, 00043 const TwoBodyDecayVirtualMeasurement & vm, 00044 AlgebraicVector & vecM, AlgebraicSymMatrix & matG, AlgebraicMatrix & matA ) const; 00045 00046 private: 00047 00048 bool checkValues( const AlgebraicVector & vec ) const; 00049 00050 double theRobustificationConstant; 00051 double theMaxIterDiff; 00052 int theMaxIterations; 00053 bool theUseInvariantMass; 00054 00055 mutable int theNdf; 00056 mutable AlgebraicVector thePulls; 00057 00058 }; 00059 00060 00061 #endif