DeviationsFromFileSensor2D

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
//   COCOA class header file
//Id:  DeviationsFromFileSensor2D.h
//CAT: Model
//
//   Base class to describe Optical Objects of type sensor 2D
//
//   History: v1.0
//   Pedro Arce

#ifndef _DEVIATIONSTRAVERSINGSENSOR2D_HH
#define _DEVIATIONSTRAVERSINGSENSOR2D_HH

#include "Alignment/CocoaUtilities/interface/CocoaGlobals.h"
#include "Alignment/CocoaModel/interface/DeviationSensor2D.h"

#include <vector>

class ALIFileIn;

typedef std::vector<std::vector<DeviationSensor2D*> > vvd;
typedef std::vector<DeviationSensor2D*> vd;

class DeviationsFromFileSensor2D {
public:
  //---------- Constructors / Destructor
  DeviationsFromFileSensor2D() {
    theOffsetX = 0.;
    theOffsetY = 0.;
  };
  ~DeviationsFromFileSensor2D() {}

  // read file
  void readFile(ALIFileIn& ifdevi);

  // get the deviation in the matrix corresponding to the intersection point (intersx, intersy)
  std::pair<ALIdouble, ALIdouble> getDevis(ALIdouble intersX, ALIdouble intersY);

  // set offsetX/Y
  void setOffset(ALIdouble offX, ALIdouble offY) {
    theOffsetX = offX;
    theOffsetY = offY;
  }

  // Access data
  static const ALIbool apply() { return theApply; }

  // Set data
  static void setApply(ALIbool val) { theApply = val; }

private:
  bool firstScanDir;
  int theScanSenseX, theScanSenseY;

  ALIuint theNPoints;
  vvd theDeviations;
  static ALIbool theApply;

  ALIint verbose;

  ALIdouble theOffsetX, theOffsetY;
};

#endif