Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:57:29

0001 #ifndef Alignment_TwoBodyDecay_TwoBodyDecayEstimator_h
0002 #define Alignment_TwoBodyDecay_TwoBodyDecayEstimator_h
0003 
0004 #include "Alignment/TwoBodyDecay/interface/TwoBodyDecay.h"
0005 #include "Alignment/TwoBodyDecay/interface/TwoBodyDecayVirtualMeasurement.h"
0006 
0007 #include "DataFormats/CLHEP/interface/AlgebraicObjects.h"
0008 #include "RecoVertex/VertexTools/interface/PerigeeLinearizedTrackState.h"
0009 
0010 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0011 
0012 /** Class  TwoBodyDecayEstimator estimates the decay parameters and the
0013  * corresponding error matrix (see TwoBodyDecayParameter) from two linearized
0014  * tracks, and an hypothesis for the primary particle's mass and width as well
0015  * as the mass of the secondary particles. It utilizes a robust M-estimator.
0016  *
0017  *  /author Edmund Widl
0018  */
0019 
0020 class TwoBodyDecayEstimator {
0021 public:
0022   typedef PerigeeLinearizedTrackState::RefCountedLinearizedTrackState RefCountedLinearizedTrackState;
0023 
0024   TwoBodyDecayEstimator(const edm::ParameterSet &config);
0025   virtual ~TwoBodyDecayEstimator(void) {}
0026 
0027   virtual TwoBodyDecay estimate(const std::vector<RefCountedLinearizedTrackState> &linTracks,
0028                                 const TwoBodyDecayParameters &linearizationPoint,
0029                                 const TwoBodyDecayVirtualMeasurement &vm) const;
0030 
0031   inline int ndf(void) const { return theNdf; }
0032   inline const AlgebraicVector &pulls(void) const { return thePulls; }
0033 
0034   virtual TwoBodyDecayEstimator *clone(void) const { return new TwoBodyDecayEstimator(*this); }
0035 
0036 protected:
0037   virtual bool constructMatrices(const std::vector<RefCountedLinearizedTrackState> &linTracks,
0038                                  const TwoBodyDecayParameters &linearizationPoint,
0039                                  const TwoBodyDecayVirtualMeasurement &vm,
0040                                  AlgebraicVector &vecM,
0041                                  AlgebraicSymMatrix &matG,
0042                                  AlgebraicMatrix &matA) const;
0043 
0044 private:
0045   bool checkValues(const AlgebraicVector &vec) const;
0046 
0047   double theRobustificationConstant;
0048   double theMaxIterDiff;
0049   int theMaxIterations;
0050   bool theUseInvariantMass;
0051 
0052   mutable int theNdf;
0053   mutable AlgebraicVector thePulls;
0054 };
0055 
0056 #endif