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 "araStructures.h" 00016 #include "araDefines.h" 00017 #include "AraAntennaInfo.h" 00018 00019 00021 00025 class AraGeomTool 00026 { 00027 public: 00028 AraGeomTool(); 00029 ~AraGeomTool(); 00030 00031 // AraAntennaInfo *getAntByRfChan(int chan); 00032 // AraAntennaInfo *getAntByPolAndAnt(AraAntPol::AraAntPol_t antPol, int antNum); 00033 int getChanIndex(AraLabChip::AraLabChip_t chip, int chan) {return chip*CHANNELS_PER_CHIP +chan;} 00034 00035 AraLabChip::AraLabChip_t getLabChipForChan(int chan) {return fAntInfo[chan].labChip;} 00036 int getNumLabChansForChan(int chan) { return fAntInfo[chan].numLabChans;} 00037 int getFirstLabChanForChan(int chan) { return fAntInfo[chan].labChans[0];} 00038 int getSecondLabChanForChan(int chan) { return fAntInfo[chan].labChans[1];} 00039 int getFirstLabChanIndexForChan(int chan) { return getChanIndex(getLabChipForChan(chan),getFirstLabChanForChan(chan));} 00040 int getSecondLabChanIndexForChan(int chan) { return getChanIndex(getLabChipForChan(chan),getSecondLabChanForChan(chan));} 00041 00042 int getRFChanByPolAndAnt(AraAntPol::AraAntPol_t antPol, int antNum); 00043 00044 00045 Double_t calcDeltaTInfinity(Double_t ant1[3], Double_t ant2[3],Double_t phiWave, Double_t thetaWave); 00046 Double_t calcDeltaTR(Double_t ant1[3], Double_t ant2[3], Double_t phiWave, Double_t thetaWave,Double_t R); 00047 Double_t calcDeltaTInfinity(Int_t chan1, Int_t chan2,Double_t phiWave, Double_t thetaWave); 00048 Double_t calcDeltaTR(Int_t chan1, Int_t chan2, Double_t phiWave, Double_t thetaWave,Double_t R); 00049 00050 00051 //Instance generator 00052 static AraGeomTool* Instance(); 00053 00054 AraAntennaInfo fAntInfo[TOTAL_ANTS]; 00055 int fAntLookupTable[3][8]; 00056 //At som point should lose the magic numbers 00057 00058 //Some variables to do with ice properties 00059 static Double_t nTopOfIce; 00060 00061 00062 00063 00064 protected: 00065 static AraGeomTool *fgInstance; 00066 // protect against multiple instances 00067 00068 private: 00069 void readChannelMap(); 00070 00071 00072 }; 00073 00074 00075 #endif //ARAGEOMTOOL_H
Generated on Wed Aug 8 16:18:55 2012 for ARA ROOT Test Bed Software by
