9 #ifndef CROSSCORRELATOR_H 10 #define CROSSCORRELATOR_H 14 #include "FilteredAnitaEvent.h" 15 #include "AnalysisWaveform.h" 16 #include "AnitaEventCalibrator.h" 17 #include "AnitaGeomTool.h" 18 #include "UsefulAdu5Pat.h" 21 #include "AnitaEventSummary.h" 24 #include "RootTools.h" 25 #include "FancyFFTs.h" 40 #define SPEED_OF_LIGHT 2.99792458e8 41 #define SPEED_OF_LIGHT_NS 0.299792458 45 #define DELTA_PHI_SECT 2 48 #define NUM_COMBOS 336 51 #define UPSAMPLE_FACTOR 6 52 #define NOMINAL_SAMPLING_DELTAT (1./2.6f) 54 #define GET_NUM_FREQS(n)((n)/2+1) 81 TGraph* getUpsampledCrossCorrelationGraph(
AnitaPol::AnitaPol_t pol, Int_t ant1, Int_t ant2)
const;
82 TGraph* getCrossCorrelationGraphWorker(Int_t numSamps,
AnitaPol::AnitaPol_t pol, Int_t ant1, Int_t ant2)
const;
85 virtual Double_t getCrossCorrelation(
AnitaPol::AnitaPol_t pol, Int_t combo, Double_t deltaT)
const;
86 Double_t getTimeOfMaximumUpsampledCrossCorrelation(
AnitaPol::AnitaPol_t pol, Int_t ant1, Int_t ant2)
const;
88 void initializeVariables();
95 Bool_t useCombo(Int_t ant1, Int_t ant2, Int_t phiSector, Int_t deltaPhiSect);
96 void fillCombosToUse();
97 void do5PhiSectorCombinatorics();
99 Double_t getInterpolatedUpsampledCorrelationValue(
AnitaPol::AnitaPol_t pol, Int_t combo, Double_t deltaT)
const;
165 Double_t getPeakCorrelation(
AnitaPol::AnitaPol_t pol, Double_t minOffset=-100, Double_t maxOffset=100, Double_t stepSize=NOMINAL_SAMPLING_DELTAT)
const;
167 virtual Double_t getCrossCorrelation(
AnitaPol::AnitaPol_t pol, Int_t ant, Double_t deltaT)
const;
Int_t comboIndices[NUM_SEAVEYS][NUM_SEAVEYS]
Array mapping ant1+ant2 to combo index.
virtual void correlateEvent(const FilteredAnitaEvent *fEv)
std::vector< Int_t > comboToAnt1s
Vector mapping combo index to ant1.
Double_t correlationDeltaT
nominalSamplingDeltaT/UPSAMPLE_FACTOR, deltaT of for interpolation.
Int_t multiplyTopRingByMinusOne
For showing how I'm an idiot with respect to compiling the ANITA-3 prioritizer.
std::vector< Int_t > comboToAnt2s
Vector mapping combo index to ant2.
Int_t kDeltaPhiSect
Specifies how many phi-sectors around peak use in reconstruction.
std::complex< Double_t > ffts[AnitaPol::kNotAPol][NUM_SEAVEYS][((NUM_SAMP *2)/2+1)]
FFTs of evenly resampled waveforms.
TemplateCorrelator(Int_t run, UInt_t eventNumber)
Double_t interpRMS2[AnitaPol::kNotAPol][NUM_SEAVEYS]
RMS of interpolated TGraphs with extra zero padding.
Int_t numCombos
Number of possible antenna pairs, counted during initialization. Should equal NUM_COMBOS.
Double_t interpRMS[AnitaPol::kNotAPol][NUM_SEAVEYS]
RMS of interpolated TGraphs.
Namespace which wraps everything in the library.
TGraph * getCrossCorrelationGraph(AnitaPol::AnitaPol_t pol, Int_t ant) const
UInt_t eventNumber[AnitaPol::kNotAPol]
For tracking event number.
virtual ~TemplateCorrelator()
void initTemplate(const FilteredAnitaEvent *fEv)
Double_t nominalSamplingDeltaT
ANITA-3 => 1./2.6 ns, deltaT for evenly resampling.
std::vector< Int_t > combosToUseGlobal[NUM_PHI]
Depends on L3 trigger for global image.
Int_t numSamples
Number of samples in waveform after padding.
Cross-correlate all channels of an event with a template.
A class to take in FiteredAnitaEvents and cross-correlate nearby channels.
Int_t numSamplesUpsampled
Number of samples in waveform after padding and up sampling.
Double_t crossCorrelationsUpsampled[AnitaPol::kNotAPol][336][NUM_SAMP *2 *6 *2]
Upsampled cross correlations.
Double_t crossCorrelations[AnitaPol::kNotAPol][336][NUM_SAMP *2]
Cross correlations.
This class is intended to store all the necessary data about an ANITA event for filtering and analysi...
enum AnitaPol::EAnitaPol AnitaPol_t
Polarisation enumeration.
Int_t kOnlyThisCombo
For debugging, only fill histograms with one particular antenna pair.
Double_t fVolts[AnitaPol::kNotAPol][NUM_SEAVEYS][NUM_SAMP *2]
Hold the filtered waveforms for padding...