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 "AraAntennaInfo.h" 00018 #include "AraStationInfo.h" 00019 00020 00022 00026 class AraGeomTool 00027 { 00028 public: 00029 AraGeomTool(); 00030 ~AraGeomTool(); 00031 00032 // AraAntennaInfo *getAntByRfChan(int chan); 00033 // AraAntennaInfo *getAntByPolAndAnt(AraAntPol::AraAntPol_t antPol, int antNum); 00034 int getChanIndex(AraLabChip::AraLabChip_t chip, int chan) {return chip*CHANNELS_PER_LAB3 +chan;} 00035 00036 //something wrong with this guy 00037 AraLabChip::AraLabChip_t getLabChipForChan(int chan, int stationId) {return fStationInfo[stationId].fAntInfo[chan].labChip;} 00038 00039 int getNumLabChansForChan(int chan, int stationId) { return fStationInfo[stationId].fAntInfo[chan].numLabChans;} 00040 int getFirstLabChanForChan(int chan, int stationId) { return fStationInfo[stationId].fAntInfo[chan].labChans[0];} 00041 int getSecondLabChanForChan(int chan, int stationId) { return fStationInfo[stationId].fAntInfo[chan].labChans[1];} 00042 00043 00044 // int getFirstLabChanIndexForChan(int chan) { return getChanIndex(getLabChipForChan(chan),getFirstLabChanForChan(chan));} 00045 00046 00047 int getFirstLabChanIndexForChan(int chan, int stationId) { return getChanIndex(getLabChipForChan(chan, stationId),getFirstLabChanForChan(chan, stationId));} 00048 00049 00050 int getSecondLabChanIndexForChan(int chan, int stationId) { return getChanIndex(getLabChipForChan(chan, stationId),getSecondLabChanForChan(chan, stationId));} 00051 00052 //jpd helperfunction for diplexed channels 00053 int isDiplexed(int chan, int stationId) {return fStationInfo[stationId].fAntInfo[chan].isDiplexed;} 00054 00055 Double_t getLowPassFilter(int chan, int stationId) { return fStationInfo[stationId].fAntInfo[chan].lowPassFilterMhz; } 00056 00057 Double_t getHighPassFilter(int chan, int stationId) { return fStationInfo[stationId].fAntInfo[chan].highPassFilterMhz; } 00058 00059 00060 00061 int getRFChanByPolAndAnt(AraAntPol::AraAntPol_t antPol, int antNum, int stationId); 00062 00063 00064 //jpd this is a hack to try and get AraCanvasMaker.cxx to work 00065 int getRFChanByPolAndAnt(AraAntPol::AraAntPol_t antPol, int antNum); 00066 00067 00068 00069 Double_t calcDeltaTInfinity(Double_t ant1[3], Double_t ant2[3],Double_t phiWave, Double_t thetaWave); 00070 Double_t calcDeltaTR(Double_t ant1[3], Double_t ant2[3], Double_t phiWave, Double_t thetaWave,Double_t R); 00071 00072 Double_t calcDeltaTInfinity(Int_t chan1, Int_t chan2,Double_t phiWave, Double_t thetaWave, int stationId); 00073 Double_t calcDeltaTR(Int_t chan1, Int_t chan2, Double_t phiWave, Double_t thetaWave,Double_t R, int stationId); 00074 00075 //Instance generator 00076 static AraGeomTool* Instance(); 00077 00078 AraStationInfo fStationInfo[ICRR_NO_STATIONS]; //station info contains the antenna info and station information 00079 int fAntLookupTable[ICRR_NO_STATIONS][3][8]; //At some point should lose the magic numbers 00080 00081 //Some variables to do with ice properties 00082 static Double_t nTopOfIce; 00083 00084 00085 protected: 00086 static AraGeomTool *fgInstance; 00087 // protect against multiple instances 00088 00089 private: 00090 //jpd this will be the implementation that will load from the sql DB 00091 void readChannelMapDb(Int_t stationId); 00092 00093 }; 00094 00095 00096 #endif //ARAGEOMTOOL_H
Generated on Wed Aug 8 16:20:07 2012 for ARA ROOT Test Bed Software by
