ARA ROOT v3.9 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(Int_t stationId);
00056    void fillAntennaPositionsAtri();
00057    void fillAntennaPositionsIcrr();
00058    void fillDeltaTArrays(AraCorrelatorType::AraCorrelatorType_t corType);
00059    void setupDeltaTInfinity();
00060    void setupDeltaT40m();
00061    void getPairIndices(int pair, int &ant1, int &ant2);
00062    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);
00063    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);
00064 
00065    //Instance generator
00066    static AraEventCorrelator*  Instance(Int_t numAnts=5, Int_t stationId=0);
00067    
00068    static AraEventCorrelator *fgInstance;  
00069    // protect against multiple instances
00070 
00071    static TGraph* getNormalisedGraph(TGraph *grIn);
00072    static Double_t fastEvalForEvenSampling(TGraph *grIn, Double_t xvalue);
00073 
00074    //Start of by just considering the Bicone and Bowtie-slotted ants
00075    //So only four antennas
00076    //So only six pairs, eg. v1-v2,v1-v3,v1-v4,v2-v3,v2-v4,v3-v4
00077    //Sod this go to seven antennas
00078    
00079    Int_t fDebugMode;
00080    Double_t fPhiWaveDeg[NUM_PHI_BINS];
00081    Double_t fThetaWaveDeg[NUM_PHI_BINS];
00082    Double_t fPhiWave[NUM_PHI_BINS];
00083    Double_t fThetaWave[NUM_PHI_BINS];
00084    //21 is the maximum if you use 7 antennas in each pol
00085    Int_t fStationId;
00086    Int_t fNumAnts;
00087    Int_t fNumPairs;
00088    Int_t fFirstAnt[21];
00089    Int_t fSecondAnt[21];
00090    Double_t fVPolDeltaT[21][NUM_PHI_BINS][NUM_THETA_BINS];
00091    Double_t fHPolDeltaT[21][NUM_PHI_BINS][NUM_THETA_BINS];
00092    Double_t fVPolDeltaTInfinity[21][NUM_PHI_BINS][NUM_THETA_BINS];
00093    Double_t fHPolDeltaTInfinity[21][NUM_PHI_BINS][NUM_THETA_BINS];
00094    Double_t fVPolDeltaT40m[21][NUM_PHI_BINS][NUM_THETA_BINS];
00095    Double_t fHPolDeltaT40m[21][NUM_PHI_BINS][NUM_THETA_BINS];
00096    Int_t fRfChanVPol[7];
00097    Int_t fRfChanHPol[7];
00098    Double_t fVPolPos[7][3];
00099    Double_t fHPolPos[7][3];
00100    Double_t fVPolRho[7];
00101    Double_t fHPolRho[7];
00102    Double_t fVPolPhi[7];
00103    Double_t fHPolPhi[7];
00104    
00105 
00106 
00107    ClassDef(AraEventCorrelator,1);
00108 
00109 };
00110 
00111 
00112 #endif //ARAEVENTCORRELATOR_H

Generated on Mon Jun 3 16:10:04 2013 for ARA ROOT v3.9 Software by doxygen 1.4.7