ARA ROOT Test BEd Software

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

Generated on Wed Aug 8 16:20:07 2012 for ARA ROOT Test Bed Software by doxygen 1.4.7