Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:52:50

0001 #ifndef DataFormats_Alignment_TkFittedLasBeam_h
0002 #define DataFormats_Alignment_TkFittedLasBeam_h
0003 
0004 /// \class TkFittedLasBeam ($Revision: 1.3 $)
0005 ///
0006 /// \author Gero Flucke
0007 /// \date May 2009
0008 /// last update on $Date: 2009/07/27 12:44:16 $ by $Author: flucke $
0009 ///
0010 /// An extension of the 'TkLasBeam' containing information about
0011 /// a track model fit to the laser hits.
0012 /// Documentation in TkLasTrackBasedInterface TWiki
0013 
0014 #include "DataFormats/Alignment/interface/TkLasBeam.h"
0015 #include "DataFormats/CLHEP/interface/AlgebraicObjects.h"
0016 #include <vector>
0017 
0018 class TkFittedLasBeam : public TkLasBeam {
0019 public:
0020   typedef float Scalar;  // scalar type used in this class
0021 
0022   TkFittedLasBeam();
0023   TkFittedLasBeam(const TkLasBeam &lasBeam);
0024   ~TkFittedLasBeam() override {}  // anyway virtual since inherited...
0025 
0026   /// the parametrisation type used (0 means undefined...)
0027   unsigned int parametrisation() const { return parametrisation_; }
0028   /// parallel to derivatives()
0029   const std::vector<Scalar> &parameters() const { return parameters_; }
0030   /// covariance of first n=firstFixedParameter() parameters()
0031   const AlgebraicSymMatrix &parametersCov() const { return paramCovariance_; }
0032   /// matrix of local derivatives: columns are parameters, rows are hits
0033   const AlgebraicMatrix &derivatives() const { return derivatives_; }
0034   /// index of first parameter and its derivative that was not fixed
0035   /// in the fit, but might be free in a global fit, e.g. within millepede
0036   unsigned int firstFixedParameter() const { return firstFixedParameter_; }
0037 
0038   /// set parameterisation (0=undefined), derivatives, chi^2 etc:
0039   /// - 'params' and 'derivatives' must be parallel,
0040   /// - 'covariance' contains the free part, i.e. has size 'firstFixedParam'
0041   /// - obeye firstFixedParam <= params.size()
0042   /// throws if inconsistent
0043   void setParameters(unsigned int parametrisation,
0044                      const std::vector<Scalar> &params,
0045                      const AlgebraicSymMatrix &paramCovariance,
0046                      const AlgebraicMatrix &derivatives,
0047                      unsigned int firstFixedParam,
0048                      float chi2);
0049 
0050 private:
0051   unsigned int parametrisation_;        /// type of parameterisation (0 means undefined)
0052   std::vector<Scalar> parameters_;      /// beam parameters (depend on parameterisation_)
0053   AlgebraicSymMatrix paramCovariance_;  /// cov. matrix of 'free' params. (dim=firstFixedParameter_)
0054   AlgebraicMatrix derivatives_;         /// derivatives with respect to parameters_
0055   unsigned int firstFixedParameter_;    /// first non-free parameter in (local) fit
0056   float chi2_;                          /// chi^2 value of fit
0057 };
0058 
0059 // To get the typedef for the collection:
0060 #include "DataFormats/Alignment/interface/TkFittedLasBeamCollectionFwd.h"
0061 
0062 #endif