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 <TRotation.h> 00016 #include <TVector3.h> 00017 #include "araIcrrStructures.h" 00018 #include "araIcrrDefines.h" 00019 #include "araAtriStructures.h" 00020 #include "AraAntennaInfo.h" 00021 #include "AraStationInfo.h" 00022 00024 00028 class AraGeomTool 00029 { 00030 public: 00031 AraGeomTool(); 00032 ~AraGeomTool(); 00033 00034 //These functions are really AraStationInfo functions, might remove them at some point 00035 int getRFChanByPolAndAnt(AraAntPol::AraAntPol_t antPol, int antNum, AraStationId_t stationId); 00036 AraAntPol::AraAntPol_t getPolByRFChan(int rfChan, AraStationId_t stationId); 00037 Int_t getAntNumByRFChan(int rfChan, AraStationId_t stationId); 00038 Int_t getElecChanFromRFChan(int rfChan, AraStationId_t stationId) {return getStationInfo(stationId)->getElecChanFromRFChan(rfChan);} 00039 00040 //These functions are all to do with calculating delta-t and reconstruciton 00041 Double_t calcDeltaTInfinity(Double_t ant1[3], Double_t ant2[3],Double_t phiWave, Double_t thetaWave); 00042 Double_t calcDeltaTR(Double_t ant1[3], Double_t ant2[3], Double_t phiWave, Double_t thetaWave,Double_t R); 00043 Double_t calcDeltaTInfinity(Int_t rfChan1, Int_t rfChan2,Double_t phiWave, Double_t thetaWave, AraStationId_t stationId); 00044 Double_t calcDeltaTR(Int_t rfChan1, Int_t rfChan2, Double_t phiWave, Double_t thetaWave,Double_t R, AraStationId_t stationId); 00045 Double_t calcDeltaTSimple(Double_t ant1[3], Double_t ant2[3], Double_t source[3]); 00046 00047 AraStationInfo *getStationInfo(AraStationId_t stationId); 00048 00049 00050 //Utility functions to do with the different stations 00051 static bool isIcrrStation(AraStationId_t stationId); 00052 static bool isAtriStation(AraStationId_t stationId); 00053 static Int_t getStationCalibIndex(AraStationId_t stationId); 00054 static Int_t getStationNumber(AraStationId_t stationId); 00055 static void printStationName(AraStationId_t stationId); 00056 static const char *getStationName(AraStationId_t stationId); 00057 static AraStationId_t getAtriStationId(int stationNumber); 00058 00059 00060 //Station and array geometry functions 00061 void convertStationToArrayCoords(AraStationId_t stationId, Double_t inputCoords[3], Double_t outputCoords[3] ); 00062 void convertArrayToStationCoords(AraStationId_t stationId, Double_t inputCoords[3], Double_t outputCoords[3] ); 00063 TVector3 convertStationToArrayCoords(AraStationId_t stationId, TVector3 inputCoords); 00064 TVector3 convertArrayToStationCoords(AraStationId_t stationId, TVector3 inputCoords); 00065 TRotation *getStationToArrayRotation(AraStationId_t stationId); 00066 TRotation *getArrayToStationRotation(AraStationId_t stationId); 00067 TVector3 &getStationVector(AraStationId_t stationId); 00068 00069 00070 //Non-station locations in array centric corrdinates 00071 Double_t *getSouthPole2010_11(); 00072 Double_t *getSouthPole2011_12(); 00073 Double_t *getSouthPoleTelescope(); 00074 Double_t *getICLCorner(int corner); 00075 Double_t *getWindTurbine(int tbNumber); 00076 00077 00078 //Instance generator 00079 static AraGeomTool* Instance(); 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 00091 AraStationInfo *fStationInfoICRR[ICRR_NO_STATIONS]; 00092 AraStationInfo *fStationInfoATRI[ATRI_NO_STATIONS]; 00093 00094 //Here are the ARA station coordinates 00095 Double_t fStationCoordsICRR[ICRR_NO_STATIONS][3]; 00096 Double_t fStationCoordsAtri[ATRI_NO_STATIONS][3]; 00097 Double_t fStationLocalCoordsICRR[ICRR_NO_STATIONS][3][3]; 00098 Double_t fStationLocalCoordsATRI[ICRR_NO_STATIONS][3][3]; 00099 00100 00101 TRotation *fArrayToStationRotationICRR[ICRR_NO_STATIONS]; 00102 TRotation *fArrayToStationRotationATRI[ATRI_NO_STATIONS]; 00103 TRotation *fStationToArrayRotationICRR[ICRR_NO_STATIONS]; 00104 TRotation *fStationToArrayRotationATRI[ATRI_NO_STATIONS]; 00105 00106 TVector3 fStationVectorATRI[ATRI_NO_STATIONS]; 00107 TVector3 fStationVectorICRR[ICRR_NO_STATIONS]; 00108 00109 void readAraArrayCoords(); 00110 00111 00112 00113 00114 }; 00115 00116 00117 #endif //ARAGEOMTOOL_H
Generated on Tue Jul 16 16:58:01 2013 for ARA ROOT v3.10 Software by
