9 #ifndef FOURIERBUFFER_H 10 #define FOURIERBUFFER_H 12 #include "AnalysisWaveform.h" 17 #include "AnitaConventions.h" 63 return probs[pol][ant][freqBin];
66 return spectrumAmplitudes[pol][ant][freqBin];
75 return powerRingBuffers[pol][ant].back();
79 Int_t freqBin)
const {
80 return hRays[pol][ant].at(freqBin);
84 return sumPowers[pol][ant].size();
92 void drawSummary(TPad* pad, SummaryOption_t)
const;
93 unsigned getCurrentBufferSize()
const;
95 const std::vector<double>& getChiSquares(
int ant,
97 return chiSquares[pol][ant];
99 const std::vector<double>& getChiSquaresRelativeToSpectrum(
int ant,
101 return chiSquaresRelativeToSpectrum[pol][ant];
103 const std::vector<int>& getNDFs(
int ant,
105 return ndfs[pol][ant];
107 const std::vector<double>& getRayleighAmplitudes(
int ant,
109 return fitAmplitudes[pol][ant];
111 const std::vector<double>& getBackgroundSpectrumAmplitudes(
int ant,
113 return spectrumAmplitudes[pol][ant];
116 return probs[pol][ant];
120 return chanChiSquares[pol][ant];
125 void getMeanVarChanChiSquares(
int ant,
AnitaPol::AnitaPol_t pol,
double mean,
double var)
const{
126 mean = meanChanChiSquare[pol][ant];
127 var = varChanChiSquare[pol][ant];
130 int getNumEventsInBuffer()
const {
131 return eventsInBuffer;
133 void setForceLoadHistory(
bool f)
const {
147 std::deque<UInt_t> eventNumbers;
148 std::deque<Int_t> runs;
154 std::vector<TGraphFB>* gr,
155 int n,
double df,
double defaultVal);
187 bool fCurrentlyLoadingHistory;
188 mutable bool fForceLoadHistory;
195 mutable TSpectrum* fSpectrum;
198 void getBackgroundSpectrum(
double* y,
int n)
const;
203 mutable TPad* summaryPads[NUM_SEAVEYS];
207 mutable std::vector<TGraphFB> grReducedChiSquaresRelativeToSpectrum[
AnitaPol::kNotAPol];
227 static void setDrawingDependencies(
const std::vector<Acclaim::TGraphFB*> grs);
229 enum EDoubleClickOption{
243 int n=0) :
TGraphAligned(n), fDoubleClickOption(kDrawCopy), fDerivedFrom(NULL)
256 explicit TGraphFB(
const TGraphFB* gr) :
TGraphAligned(gr->GetN(), gr->GetX(), gr->GetY()), fDoubleClickOption(gr->fDoubleClickOption), fDerivatives(gr->fDerivatives)
261 SetLineColor(gr->GetLineColor());
262 SetLineStyle(gr->GetLineStyle());
263 fDerivedFrom = gr->fDerivedFrom;
266 virtual void ExecuteEvent(Int_t event, Int_t x, Int_t y);
267 void drawCopy()
const;
268 void drawRayleighHistNearMouse(
int x,
int y)
const;
270 const FourierBuffer* fb;
273 EDoubleClickOption fDoubleClickOption;
277 std::vector<TGraphFB*> fDerivatives;
281 #endif //FOURIERBUFFER_H void initGraphAndVector(std::vector< double > vec[][NUM_SEAVEYS], std::vector< TGraphFB > *gr, int n, double df, double defaultVal)
Initialise an internal vector and TGraphFB with with an appropriate set of default values...
A a glorified ring buffer of frequency amplitudes with a TSpectrum to look for CW spikes...
Int_t fNumSkipped
Incremented when skipping a payload blast or SURF saturation event, currently only for debugging...
void automagicallyLoadHistory(const FilteredAnitaEvent *fEv)
Function which loops through old events so that the FourierBuffer is filled.
TGraphFB(const TGraphFB *gr)
Creates a copy of the passed TGraphFB.
A little class for some GUI magic (for MagicDisplay)
bool doneVectorInit
Do we need to allocate a bunch of memory? (Do this dynamically to avoid MagicDisplay being slow) ...
Namespace which wraps everything in the library.
size_t add(const FilteredAnitaEvent *fEv)
Adds an event to the FourierBuffer.
UsefulAnitaEvent – The Calibrated Useful Anita Event object.
virtual ~FourierBuffer()
Destructor.
Int_t removeOld()
Remove data from the dequeues while their size is greater than the buffer size.
void initVectors(int n, double df)
Initialise all internal vectors.
FourierBuffer(Int_t theBufferSize=1000)
Constructor for FourierBuffer.
This class is intended to store all the necessary data about an ANITA event for filtering and analysi...
TH1D * makeChanChisquareHist(AnitaPol::AnitaPol_t pol, Int_t ant, TPad *pad, const char *drawOpt) const
Histogram the event frequency bin amplitudes squared, divided by the rayleigh distribution amplitude ...
enum AnitaPol::EAnitaPol AnitaPol_t
Polarisation enumeration.
TGraphFB(const FourierBuffer *theFb=NULL, Int_t theAnt=-1, AnitaPol::AnitaPol_t thePol=AnitaPol::kNotAPol, int n=0)
Constructor.