Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:58:32

0001 /****************************************************************************
0002 * Authors: 
0003 *  Jan Kašpar (jan.kaspar@gmail.com) 
0004 ****************************************************************************/
0005 
0006 #ifndef CalibPPS_AlignmentRelative_LocalTrackFitter_h
0007 #define CalibPPS_AlignmentRelative_LocalTrackFitter_h
0008 
0009 #include "CalibPPS/AlignmentRelative/interface/LocalTrackFit.h"
0010 #include "CalibPPS/AlignmentRelative/interface/AlignmentGeometry.h"
0011 #include "CalibPPS/AlignmentRelative/interface/HitCollection.h"
0012 
0013 namespace edm {
0014   class ParameterSet;
0015 }
0016 
0017 /**
0018  *\brief Performs straight-line fit and outlier rejection.
0019  **/
0020 class LocalTrackFitter {
0021 public:
0022   /// dummy constructor (not to be used)
0023   LocalTrackFitter() {}
0024 
0025   /// normal constructor
0026   LocalTrackFitter(const edm::ParameterSet &);
0027 
0028   virtual ~LocalTrackFitter() {}
0029 
0030   /// runs the fit and outlier-removal loop
0031   /// returns true in case of success
0032   bool fit(HitCollection &, const AlignmentGeometry &, LocalTrackFit &) const;
0033 
0034 protected:
0035   /// verbosity level
0036   unsigned int verbosity;
0037 
0038   /// minimum of hits to accept data from a RP
0039   unsigned int minimumHitsPerProjectionPerRP;
0040 
0041   /// hits with higher ratio residual/sigma will be dropped
0042   double maxResidualToSigma;
0043 
0044   /// fits the collection of hits and removes hits with too high residual/sigma ratio
0045   /// \param failed whether the fit has failed
0046   /// \param selectionChanged whether some hits have been removed
0047   void fitAndRemoveOutliers(
0048       HitCollection &, const AlignmentGeometry &, LocalTrackFit &, bool &failed, bool &selectionChanged) const;
0049 
0050   /// removes the hits of pots with too few planes active
0051   void removeInsufficientPots(HitCollection &, bool &selectionChanged) const;
0052 };
0053 
0054 #endif