Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:56:00

0001 //   COCOA class header file

0002 //Id:  DeviationsFromFileSensor2D.h

0003 //CAT: Model

0004 //

0005 //   Base class to describe Optical Objects of type sensor 2D

0006 //

0007 //   History: v1.0

0008 //   Pedro Arce

0009 
0010 #ifndef _DEVIATIONSTRAVERSINGSENSOR2D_HH
0011 #define _DEVIATIONSTRAVERSINGSENSOR2D_HH
0012 
0013 #include "Alignment/CocoaUtilities/interface/CocoaGlobals.h"
0014 #include "Alignment/CocoaModel/interface/DeviationSensor2D.h"
0015 
0016 #include <vector>
0017 
0018 class ALIFileIn;
0019 
0020 typedef std::vector<std::vector<DeviationSensor2D*> > vvd;
0021 typedef std::vector<DeviationSensor2D*> vd;
0022 
0023 class DeviationsFromFileSensor2D {
0024 public:
0025   //---------- Constructors / Destructor

0026   DeviationsFromFileSensor2D() {
0027     theOffsetX = 0.;
0028     theOffsetY = 0.;
0029   };
0030   ~DeviationsFromFileSensor2D(){};
0031 
0032   // read file

0033   void readFile(ALIFileIn& ifdevi);
0034 
0035   // get the deviation in the matrix corresponding to the intersection point (intersx, intersy)

0036   std::pair<ALIdouble, ALIdouble> getDevis(ALIdouble intersX, ALIdouble intersY);
0037 
0038   // set offsetX/Y

0039   void setOffset(ALIdouble offX, ALIdouble offY) {
0040     theOffsetX = offX;
0041     theOffsetY = offY;
0042   }
0043 
0044   // Access data

0045   static const ALIbool apply() { return theApply; }
0046 
0047   // Set data

0048   static void setApply(ALIbool val) { theApply = val; }
0049 
0050 private:
0051   bool firstScanDir;
0052   int theScanSenseX, theScanSenseY;
0053 
0054   ALIuint theNPoints;
0055   vvd theDeviations;
0056   static ALIbool theApply;
0057 
0058   ALIint verbose;
0059 
0060   ALIdouble theOffsetX, theOffsetY;
0061 };
0062 
0063 #endif