00001 #ifndef HecGeometry_h 00002 #define HecGeometry_h 00003 00004 #include <string> 00005 #include <vector> 00006 #include <iostream> 00007 00008 #define MAX_CELLS 600 //what to do here? 00009 /*! -Class: HecGeometry 00010 - Author: Ian Gable (igable@uvic.ca) 00011 - Date: 05/09/2002 00012 - Description: HecGeometry can be used to determine the z, eta, and phi coords given 00013 a particular adcNumber. It reads a specific geometry file of a specific format 00014 which is passed to the class in the constructor. 00015 - Notes: This class will not operate properly if the file format is changed. 00016 */ 00017 00018 using std::vector; 00019 using std::string; 00020 using std::cout; 00021 using std::endl; 00022 00023 class HecGeometry { 00024 00025 public: 00026 00027 /** Contructor 00028 * @param geoFileName The name of the Geometry File. Can be relative or absolute path 00029 */ 00030 HecGeometry(string geoFileName); 00031 00032 //! get the integer eta Coord 00033 int iEta(int adcNumber); 00034 00035 //! get the integer phi coordinate 00036 int iPhi(int adcNumber); 00037 00038 //! get the integer Z coordinate 00039 int iZ(int adcNumber); 00040 00041 /** Return a vector containing a list of the acdNumber for the given cordinate range. 00042 * Rememeber that you can use all the propertes of STL vectors. 00043 */ 00044 vector<int> adcNumbers(int etaStart, int etaFinish, int phiStart, int phiFinish, int zStart, int zFinish); 00045 00046 private: 00047 00048 void loadGeometryFile(string geoFileName); //this will load the geometry file 00049 00050 int m_eta[MAX_CELLS]; //eta (pseudorapidity) aranged according to acd number 00051 int m_phi[MAX_CELLS]; //phi according to acd number 00052 int m_z[MAX_CELLS]; //z according to acd number 00053 int m_numCells; // the number of cells according to the file 00054 00055 00056 }; 00057 00058 #endif
1.2.14 written by Dimitri van Heesch,
© 1997-2002