CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/Alignment/CocoaModel/interface/DeviationsFromFileSensor2D.h

Go to the documentation of this file.
00001 //   COCOA class header file
00002 //Id:  DeviationsFromFileSensor2D.h
00003 //CAT: Model
00004 //
00005 //   Base class to describe Optical Objects of type sensor 2D
00006 // 
00007 //   History: v1.0 
00008 //   Pedro Arce
00009 
00010 #ifndef _DEVIATIONSTRAVERSINGSENSOR2D_HH
00011 #define _DEVIATIONSTRAVERSINGSENSOR2D_HH
00012 
00013 #include "Alignment/CocoaUtilities/interface/CocoaGlobals.h"
00014 #include "Alignment/CocoaModel/interface/DeviationSensor2D.h"
00015 
00016 #include <vector>
00017 
00018 class ALIFileIn;
00019 
00020 typedef std::vector< std::vector< DeviationSensor2D* > > vvd;
00021 typedef std::vector< DeviationSensor2D* > vd;
00022 
00023 
00024 class DeviationsFromFileSensor2D
00025 {
00026 
00027 public:
00028   //---------- Constructors / Destructor
00029   DeviationsFromFileSensor2D(){ 
00030     theOffsetX = 0.;
00031     theOffsetY = 0.;
00032   };
00033   ~DeviationsFromFileSensor2D(){ };
00034  
00035   // read file
00036   void readFile( ALIFileIn& ifdevi );
00037 
00038   // get the deviation in the matrix corresponding to the intersection point (intersx, intersy)
00039   std::pair< ALIdouble, ALIdouble> getDevis( ALIdouble intersX, ALIdouble intersY );
00040 
00041   // set offsetX/Y
00042   void setOffset( ALIdouble offX, ALIdouble offY ){
00043     theOffsetX = offX; 
00044     theOffsetY = offY; 
00045   }
00046 
00047   // Access data
00048   static const ALIbool apply(){
00049     return theApply;
00050   }
00051 
00052   // Set data
00053   static void setApply( ALIbool val) {
00054     theApply = val;
00055   }
00056  
00057   
00058  private:
00059   bool firstScanDir;
00060   int  theScanSenseX, theScanSenseY;
00061 
00062   ALIuint theNPoints;
00063   vvd theDeviations;
00064   static ALIbool theApply;
00065 
00066   ALIint verbose;
00067 
00068   ALIdouble theOffsetX, theOffsetY;
00069 
00070 };
00071 
00072 #endif
00073