SurveyDet

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
#ifndef Alignment_CommonAlignment_SurveyDet_h
#define Alignment_CommonAlignment_SurveyDet_h

/** \class SurveyDet
 *
 *  Class to hold survey info.
 *
 *  $Date: 2007/04/07 03:29:38 $
 *  $Revision: 1.4 $
 *  \author Chung Khim Lae
 */

#include "Alignment/CommonAlignment/interface/AlignableSurface.h"

class SurveyDet {
public:
  /// Set the surface and 9 survey points to find its position and rotation.
  ///
  ///  -----------   ^   -----------
  /// | . | . | . |  |  | 4 | 3 | 2 |
  ///  -----------   |    -----------
  /// | . | . | . |  L  | 5 | 0 | 1 |
  ///  -----------   |   -----------
  /// | . | . | . |  |  | 6 | 7 | 8 |
  ///  -----------   v   -----------
  /// <---- W ---->
  ///
  /// The left sensor shows how the 9 points are chosen (W = width, L = length)
  /// The right sensor shows how the points are indexed.
  /// Also set the survey errors.
  SurveyDet(const AlignableSurface&,   // set the surface
            const align::ErrorMatrix&  // set the survey errors
  );

  inline const align::PositionType& position() const;

  inline const align::RotationType& rotation() const;

  inline const align::ErrorMatrix& errors() const;

  inline const align::LocalPoints& localPoints() const;

  inline align::GlobalPoints globalPoints() const;

  /// Find the Jacobian for a local point to be used in HIP algo.
  /// Does not check the range of index of local point.
  AlgebraicMatrix derivatives(unsigned int index  // index of point
  ) const;

private:
  AlignableSurface theSurface;  // surface of det from survey info

  align::ErrorMatrix theErrors;

  std::vector<align::LocalPoint> thePoints;  // survey points on the surface
};

const align::PositionType& SurveyDet::position() const { return theSurface.position(); }

const align::RotationType& SurveyDet::rotation() const { return theSurface.rotation(); }

const align::ErrorMatrix& SurveyDet::errors() const { return theErrors; }

const align::LocalPoints& SurveyDet::localPoints() const { return thePoints; }

align::GlobalPoints SurveyDet::globalPoints() const { return theSurface.toGlobal(thePoints); }

#endif