AraEvent/AraGeomTool.h
00001 00002 00003 00004 00005 00006 00007 00008 00009 #ifndef ARAGEOMTOOL_H 00010 #define ARAGEOMTOOL_H 00011 00012 //Includes 00013 #include <TObject.h> 00014 #include <TMath.h> 00015 #include "araIcrrStructures.h" 00016 #include "araIcrrDefines.h" 00017 #include "araAtriStructures.h" 00018 #include "AraAntennaInfo.h" 00019 #include "AraStationInfo.h" 00020 00022 00026 class AraGeomTool 00027 { 00028 public: 00029 AraGeomTool(); 00030 ~AraGeomTool(); 00031 00032 // AraAntennaInfo *getAntByRfChan(int chan);//FIXME 00033 // AraAntennaInfo *getAntByPolAndAnt(AraAntPol::AraAntPol_t antPol, int antNum);//FIXME 00034 int getChanIndex(AraLabChip::AraLabChip_t chip, int chan) {return chip*CHANNELS_PER_LAB3 +chan;} 00035 00036 AraLabChip::AraLabChip_t getLabChipForChan(int chan, AraStationId_t stationId) {return fStationInfo[stationId].fAntInfo[chan].labChip;} 00037 00038 int getNumLabChansForChan(int chan, AraStationId_t stationId) { return fStationInfo[stationId].fAntInfo[chan].numLabChans;} 00039 int getFirstLabChanForChan(int chan, AraStationId_t stationId) { return fStationInfo[stationId].fAntInfo[chan].labChans[0];} 00040 int getSecondLabChanForChan(int chan, AraStationId_t stationId) { return fStationInfo[stationId].fAntInfo[chan].labChans[1];} 00041 00042 00043 int getFirstLabChanIndexForChan(int chan, AraStationId_t stationId) { return getChanIndex(getLabChipForChan(chan, stationId),getFirstLabChanForChan(chan, stationId));} 00044 00045 00046 int getSecondLabChanIndexForChan(int chan, AraStationId_t stationId) { return getChanIndex(getLabChipForChan(chan, stationId),getSecondLabChanForChan(chan, stationId));} 00047 00048 int isDiplexed(int chan, AraStationId_t stationId) {return fStationInfo[stationId].fAntInfo[chan].isDiplexed;} 00049 00050 Double_t getLowPassFilter(int chan, AraStationId_t stationId) { return fStationInfo[stationId].fAntInfo[chan].lowPassFilterMhz; } 00051 00052 Double_t getHighPassFilter(int chan, AraStationId_t stationId) { return fStationInfo[stationId].fAntInfo[chan].highPassFilterMhz; } 00053 00054 00055 //This is the new version this function 00056 int getRFChanByPolAndAnt(AraAntPol::AraAntPol_t antPol, int antNum, AraStationId_t stationId); 00057 00058 //FIXME -- Only used by web-plotter. Should be fixed when the Web-Plotter is up and running 00059 int getRFChanByPolAndAnt(AraAntPol::AraAntPol_t antPol, int antNum);//FIXME 00060 00061 Double_t calcDeltaTInfinity(Double_t ant1[3], Double_t ant2[3],Double_t phiWave, Double_t thetaWave); 00062 Double_t calcDeltaTR(Double_t ant1[3], Double_t ant2[3], Double_t phiWave, Double_t thetaWave,Double_t R); 00063 00064 Double_t calcDeltaTInfinity(Int_t chan1, Int_t chan2,Double_t phiWave, Double_t thetaWave, AraStationId_t stationId); 00065 Double_t calcDeltaTR(Int_t chan1, Int_t chan2, Double_t phiWave, Double_t thetaWave,Double_t R, AraStationId_t stationId); 00066 00067 00068 //Utility functions 00069 static bool isIcrrStation(AraStationId_t stationId); 00070 00071 static bool isAtriStation(AraStationId_t stationId); 00072 00073 static Int_t getStationCalibIndex(AraStationId_t stationId); 00074 00075 static void printStationName(AraStationId_t stationId); 00076 00077 static char *getStationName(AraStationId_t stationId); 00078 00079 //Instance generator 00080 static AraGeomTool* Instance(); 00081 00082 AraStationInfo fStationInfo[ICRR_NO_STATIONS]; //station info contains the antenna info and station information 00083 int fAntLookupTable[ICRR_NO_STATIONS][3][8]; //At some point should lose the magic numbers 00084 00085 //Some variables to do with ice properties 00086 static Double_t nTopOfIce; 00087 00088 00089 protected: 00090 static AraGeomTool *fgInstance; 00091 // protect against multiple instances 00092 00093 private: 00094 void readChannelMapDb(AraStationId_t stationId); 00095 00096 }; 00097 00098 00099 #endif //ARAGEOMTOOL_H
Generated on Tue Sep 11 19:51:09 2012 for ARA ROOT v3.3 Software by
