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 "AraAntennaInfo.h" 00015 00016 00017 #define NUM_PHI_BINS 360 00018 #define NUM_THETA_BINS 180 00019 00020 00021 00022 class UsefulAraEvent; 00023 class TH2D; 00024 class TGraph; 00025 00027 00032 namespace AraCorrelatorType { 00033 typedef enum EAraCorrelatorType { 00034 kPlaneWave = 0, 00035 kSphericalDist40, 00036 kNotACorType 00037 } AraCorrelatorType_t; 00038 } 00039 00040 00042 00046 class AraEventCorrelator : public TObject 00047 { 00048 public: 00049 AraEventCorrelator(Int_t numAnts=4); 00050 ~AraEventCorrelator(); 00051 00052 TH2D *getInterferometricMap(UsefulAraEvent *evPtr, AraAntPol::AraAntPol_t polType, AraCorrelatorType::AraCorrelatorType_t corType=AraCorrelatorType::kPlaneWave); 00053 void fillAntennaPositions(); 00054 void fillDeltaTArrays(AraCorrelatorType::AraCorrelatorType_t corType); 00055 void setupDeltaTInfinity(); 00056 void setupDeltaT40m(); 00057 void getPairIndices(int pair, int &ant1, int &ant2); 00058 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); 00059 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); 00060 00061 //Instance generator 00062 static AraEventCorrelator* Instance(Int_t numAnts=5); 00063 00064 static AraEventCorrelator *fgInstance; 00065 // protect against multiple instances 00066 00067 static TGraph* getNormalisedGraph(TGraph *grIn); 00068 static Double_t fastEvalForEvenSampling(TGraph *grIn, Double_t xvalue); 00069 00070 //Start of by just considering the Bicone and Bowtie-slotted ants 00071 //So only four antennas 00072 //So only six pairs, eg. v1-v2,v1-v3,v1-v4,v2-v3,v2-v4,v3-v4 00073 //Sod this go to seven antennas 00074 00075 Int_t fDebugMode; 00076 Double_t fPhiWaveDeg[NUM_PHI_BINS]; 00077 Double_t fThetaWaveDeg[NUM_PHI_BINS]; 00078 Double_t fPhiWave[NUM_PHI_BINS]; 00079 Double_t fThetaWave[NUM_PHI_BINS]; 00080 //21 is the maximum if you use 7 antennas in each pol 00081 Int_t fNumAnts; 00082 Int_t fNumPairs; 00083 Int_t fFirstAnt[21]; 00084 Int_t fSecondAnt[21]; 00085 Double_t fVPolDeltaT[21][NUM_PHI_BINS][NUM_THETA_BINS]; 00086 Double_t fHPolDeltaT[21][NUM_PHI_BINS][NUM_THETA_BINS]; 00087 Double_t fVPolDeltaTInfinity[21][NUM_PHI_BINS][NUM_THETA_BINS]; 00088 Double_t fHPolDeltaTInfinity[21][NUM_PHI_BINS][NUM_THETA_BINS]; 00089 Double_t fVPolDeltaT40m[21][NUM_PHI_BINS][NUM_THETA_BINS]; 00090 Double_t fHPolDeltaT40m[21][NUM_PHI_BINS][NUM_THETA_BINS]; 00091 Int_t fRfChanVPol[7]; 00092 Int_t fRfChanHPol[7]; 00093 Double_t fVPolPos[7][3]; 00094 Double_t fHPolPos[7][3]; 00095 Double_t fVPolRho[7]; 00096 Double_t fHPolRho[7]; 00097 Double_t fVPolPhi[7]; 00098 Double_t fHPolPhi[7]; 00099 00100 00101 00102 ClassDef(AraEventCorrelator,1); 00103 00104 }; 00105 00106 00107 #endif //ARAEVENTCORRELATOR_H
Generated on Wed Aug 8 16:18:55 2012 for ARA ROOT Test Bed Software by
