AraCorrelator/AraEventCorrelator.h
00001 00002 00003 00004 00005 00006 00007 00008 00009 #ifndef ARAEVENTCORRELATOR_H 00010 #define ARAEVENTCORRELATOR_H 00011 00012 //Includes 00013 #include <TObject.h> 00014 #include "AraStationInfo.h" 00015 #include "AraAntennaInfo.h" 00016 00017 00018 #define NUM_PHI_BINS 360 00019 #define NUM_THETA_BINS 180 00020 00021 #define MAX_NUM_ANTS 8 00022 #define MAX_NUM_PAIRS 28 00023 //28 = 7+1 + 6+2 + 5+3 + 4 = max num pairs for 8 antennas 00024 00025 00026 class UsefulIcrrStationEvent; 00027 class TH2D; 00028 class TGraph; 00029 00031 00036 namespace AraCorrelatorType { 00037 typedef enum EAraCorrelatorType { 00038 kPlaneWave = 0, 00039 kSphericalDist40, 00040 kNotACorType 00041 } AraCorrelatorType_t; 00042 } 00043 00044 00046 00050 class AraEventCorrelator : public TObject 00051 { 00052 public: 00053 AraEventCorrelator(Int_t numAnts=4, Int_t stationId=0); 00054 ~AraEventCorrelator(); 00055 00056 TH2D *getInterferometricMap(UsefulIcrrStationEvent *evPtr, AraAntPol::AraAntPol_t polType, AraCorrelatorType::AraCorrelatorType_t corType=AraCorrelatorType::kPlaneWave); 00057 TH2D *getInterferometricMap(UsefulAtriStationEvent *evPtr, AraAntPol::AraAntPol_t polType, AraCorrelatorType::AraCorrelatorType_t corType=AraCorrelatorType::kPlaneWave); 00058 void fillAntennaPositions(Int_t stationId); 00059 void fillAntennaPositionsAtri(); 00060 void fillAntennaPositionsIcrr(); 00061 void fillDeltaTArrays(AraCorrelatorType::AraCorrelatorType_t corType); 00062 void setupDeltaTInfinity(); 00063 void setupDeltaT40m(); 00064 void getPairIndices(int pair, int &ant1, int &ant2); 00065 Double_t calcDeltaTInfinity(Double_t ant1[3],Double_t rho1, Double_t phi1, Double_t ant2[3],Double_t rho2, Double_t phi2, Double_t phiWave, Double_t thetaWave); 00066 Double_t calcDeltaTR(Double_t ant1[3],Double_t rho1, Double_t phi1, Double_t ant2[3],Double_t rho2, Double_t phi2, Double_t phiWave, Double_t thetaWave,Double_t R); 00067 00068 //Instance generator 00069 static AraEventCorrelator* Instance(Int_t numAnts=5, Int_t stationId=0); 00070 00071 static AraEventCorrelator *fgInstance; 00072 // protect against multiple instances 00073 00074 static TGraph* getNormalisedGraph(TGraph *grIn); 00075 static Double_t fastEvalForEvenSampling(TGraph *grIn, Double_t xvalue); 00076 00077 //Start of by just considering the Bicone and Bowtie-slotted ants 00078 //So only four antennas 00079 //So only six pairs, eg. v1-v2,v1-v3,v1-v4,v2-v3,v2-v4,v3-v4 00080 //Sod this go to seven antennas 00081 00082 Int_t fDebugMode; 00083 Double_t fPhiWaveDeg[NUM_PHI_BINS]; 00084 Double_t fThetaWaveDeg[NUM_PHI_BINS]; 00085 Double_t fPhiWave[NUM_PHI_BINS]; 00086 Double_t fThetaWave[NUM_PHI_BINS]; 00087 00088 Int_t fStationId; 00089 Int_t fNumAnts; 00090 Int_t fNumPairs; 00091 Int_t fFirstAnt[MAX_NUM_PAIRS]; 00092 Int_t fSecondAnt[MAX_NUM_PAIRS]; 00093 Double_t fVPolDeltaT[MAX_NUM_PAIRS][NUM_PHI_BINS][NUM_THETA_BINS]; 00094 Double_t fHPolDeltaT[MAX_NUM_PAIRS][NUM_PHI_BINS][NUM_THETA_BINS]; 00095 Double_t fVPolDeltaTInfinity[MAX_NUM_PAIRS][NUM_PHI_BINS][NUM_THETA_BINS]; 00096 Double_t fHPolDeltaTInfinity[MAX_NUM_PAIRS][NUM_PHI_BINS][NUM_THETA_BINS]; 00097 Double_t fVPolDeltaT40m[MAX_NUM_PAIRS][NUM_PHI_BINS][NUM_THETA_BINS]; 00098 Double_t fHPolDeltaT40m[MAX_NUM_PAIRS][NUM_PHI_BINS][NUM_THETA_BINS]; 00099 Int_t fRfChanVPol[MAX_NUM_ANTS]; 00100 Int_t fRfChanHPol[MAX_NUM_ANTS]; 00101 Double_t fVPolPos[MAX_NUM_ANTS][3]; 00102 Double_t fHPolPos[MAX_NUM_ANTS][3]; 00103 Double_t fVPolRho[MAX_NUM_ANTS]; 00104 Double_t fHPolRho[MAX_NUM_ANTS]; 00105 Double_t fVPolPhi[MAX_NUM_ANTS]; 00106 Double_t fHPolPhi[MAX_NUM_ANTS]; 00107 00108 00109 00110 ClassDef(AraEventCorrelator,1); 00111 00112 }; 00113 00114 00115 #endif //ARAEVENTCORRELATOR_H
Generated on Fri Jul 26 15:27:34 2013 for ARA ROOT v3.11 Software by
