ARA ROOT v3.6 Software

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    AraAntPol::AraAntPol_t getPolByRFChan(int rfChan, AraStationId_t stationId);
00062    Int_t getAntNumByRFChan(int rfChan, AraStationId_t stationId);
00063 
00064    
00065    Double_t calcDeltaTInfinity(Double_t ant1[3], Double_t ant2[3],Double_t phiWave, Double_t thetaWave);
00066    Double_t calcDeltaTR(Double_t ant1[3], Double_t ant2[3], Double_t phiWave, Double_t thetaWave,Double_t R);
00067    
00068    Double_t calcDeltaTInfinity(Int_t chan1, Int_t chan2,Double_t phiWave, Double_t thetaWave, AraStationId_t stationId);
00069    Double_t calcDeltaTR(Int_t chan1, Int_t chan2, Double_t phiWave, Double_t thetaWave,Double_t R, AraStationId_t stationId);
00070    
00071 
00072    //Utility functions
00073    static bool isIcrrStation(AraStationId_t stationId); 
00074 
00075    static bool isAtriStation(AraStationId_t stationId); 
00076 
00077    static Int_t getStationCalibIndex(AraStationId_t stationId); 
00078 
00079    static void printStationName(AraStationId_t stationId); 
00080 
00081    static char *getStationName(AraStationId_t stationId); 
00082 
00083    //Instance generator
00084    static AraGeomTool*  Instance();
00085    
00086    AraStationInfo fStationInfo[ICRR_NO_STATIONS]; //station info contains the antenna info and station information
00087    int fAntLookupTable[ICRR_NO_STATIONS][3][8]; //At some point should lose the magic numbers
00088    
00089    //Some variables to do with ice properties
00090    static Double_t nTopOfIce;
00091 
00092   
00093  protected:
00094    static AraGeomTool *fgInstance;  
00095    // protect against multiple instances
00096 
00097  private:
00098    void readChannelMapDb(AraStationId_t stationId);
00099 
00100 };
00101 
00102 
00103 #endif //ARAGEOMTOOL_H

Generated on Mon Mar 18 16:04:45 2013 for ARA ROOT v3.6 Software by doxygen 1.4.7