CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/Alignment/CommonAlignment/interface/SurveyResidual.h

Go to the documentation of this file.
00001 #ifndef Alignment_CommonAlignment_SurveyResidual_h
00002 #define Alignment_CommonAlignment_SurveyResidual_h
00003 
00016 #include "Alignment/CommonAlignment/interface/StructureType.h"
00017 #include "Alignment/CommonAlignment/interface/Utilities.h"
00018 
00019 class Alignable;
00020 class AlignableSurface;
00021 
00022 class SurveyResidual
00023 {
00024   public:
00025 
00030   SurveyResidual(
00031                  const Alignable&,
00032                  align::StructureType, // level at which residuals are found 
00033                  bool bias = false     // true for biased residuals
00034                  );
00035 
00039   inline bool valid() const;
00040 
00043   AlgebraicVector sensorResidual() const;
00044 
00047   align::LocalVectors pointsResidual() const;
00048 
00050   AlgebraicSymMatrix inverseCovariance() const;
00051 
00052   private:
00053 
00056   void findSisters(
00057                    const Alignable*,
00058                    bool bias
00059                    );
00060 
00062   void calculate(
00063                  const Alignable&
00064                  );
00065                  
00066   // Cache some values for calculation
00067 
00068   const Alignable* theMother; // mother that matches the structure type
00069                               // given in constructor
00070 
00071   const AlignableSurface& theSurface; // current surface
00072 
00073   const std::vector<bool>& theSelector; // flags for selected parameters
00074 
00075   std::vector<const Alignable*> theSisters; // list of final daughters for
00076                                             // finding mother's position
00077 
00078   align::GlobalVectors theNominalVs; // nominal points from mother's pos
00079   align::GlobalVectors theCurrentVs; // current points rotated to nominal surf
00080 
00081   align::ErrorMatrix theCovariance;
00082 };
00083 
00084 bool SurveyResidual::valid() const
00085 {
00086   return theMother != 0;
00087 }
00088 
00089 #endif