1 #ifndef _ANITA_EVENT_SUMMARY_H_ 2 #define _ANITA_EVENT_SUMMARY_H_ 5 #include "AnitaConventions.h" 12 class TruthAnitaEvent;
41 static const Int_t maxDirectionsPerPol = 5;
44 static const Int_t numBlastPowerBands = 3;
90 Double_t
dPhi(Double_t phi)
const;
91 Double_t dTheta(Double_t
theta,
bool different_sign_conventions =
false)
const;
94 Double_t bearing()
const;
95 Double_t dPhiNorth()
const;
98 Double_t dPhiWais()
const;
99 Double_t dThetaWais(
bool different_sign_conventions =
true)
const;
100 Double_t dPhiSun()
const;
101 Double_t dThetaSun(
bool different_sign_conventions =
true)
const;
102 Double_t dPhiLDB()
const;
103 Double_t dThetaLDB(
bool different_sign_conventions =
true)
const;
104 Double_t dPhiMC()
const;
105 Double_t dThetaMC(
bool different_sign_conventions =
true)
const;
106 Double_t dPhiTagged()
const;
107 Double_t
dThetaTagged(
bool different_sign_conventions =
true)
const;
110 Bool_t
closeToMC(Double_t deltaPhiDeg, Double_t deltaThetaDeg)
const;
111 Bool_t closeToWais(Double_t deltaPhiDeg, Double_t deltaThetaDeg)
const;
112 Bool_t closeToLDB(Double_t deltaPhiDeg, Double_t deltaThetaDeg)
const;
113 Bool_t closeToSun(Double_t deltaPhiDeg, Double_t deltaThetaDeg)
const;
114 Bool_t closeToTagged(Double_t deltaPhiDeg, Double_t deltaThetaDeg)
const;
117 Double_t minAbsHwAngle()
const;
118 Bool_t absHwAngleLessThanAbsHwAngleXPol()
const;
129 Double_t dThetaSource(
const SourceHypothesis& source,
bool different_sign_conventions =
true)
const;
130 void printEvent()
const;
146 WaveformInfo() : fContainer(NULL), fLastEventNumberCache(0), nwMeanCache(-1),
147 nwGradCache(-1), nwInterceptCache(-1), nwChisquareCache(-1) {; }
149 Double_t peakHilbert;
151 Double_t xPolPeakVal;
152 Double_t xPolPeakHilbert;
155 Double_t
max_dI,max_dQ,max_dU,max_dV,polErr;
165 Double_t spectrumSlope;
166 Double_t spectrumIntercept;
170 Double_t riseTime_10_90;
171 Double_t riseTime_10_50;
172 Double_t fallTime_90_10;
173 Double_t fallTime_50_10;
174 Double_t width_50_50;
175 Double_t width_10_10;
176 Double_t power_10_10;
179 Double_t peakMoments[5];
182 Double_t bandwidthMeasure;
186 Int_t numAntennasInCoherent;
189 Double_t localMaxToMinTime;
190 Double_t globalMaxToMin;
191 Double_t globalMaxToMinTime;
195 Double_t linearPolFrac()
const;
196 Double_t linearPolAngle()
const;
197 Double_t circPolFrac()
const;
198 Double_t totalPolFrac()
const;
201 Double_t instantaneousLinearPolFrac()
const;
202 Double_t instantaneousLinearPolAngle()
const;
203 Double_t instantaneousCircPolFrac()
const;
204 Double_t instantaneousTotalPolFrac()
const;
206 Double_t standardizedPeakMoment(Int_t i)
const;
207 inline Double_t skewness(){
return standardizedPeakMoment(3);}
208 inline Double_t kurtosis(){
return standardizedPeakMoment(4);}
210 Double_t fracPowerWindowMean()
const;
211 Double_t fracPowerWindowGradient()
const;
212 Double_t fracPowerWindowIntercept()
const;
213 Double_t fracPowerWindowChisquare()
const;
215 ClassDefNV(WaveformInfo, 18);
219 void cacheQuantitiesDerivedFromNarrowestWidths()
const;
221 mutable UInt_t fLastEventNumberCache;
222 mutable Double_t nwMeanCache;
223 mutable Double_t nwGradCache;
224 mutable Double_t nwInterceptCache;
225 mutable Double_t nwChisquareCache;
242 Double_t peakHilbert;
244 Double_t getPhi()
const;
245 inline Int_t getAnt()
const {
return ant;}
246 inline AnitaPol::AnitaPol_t getPol()
const {
return pol;}
254 AnitaPol::AnitaPol_t pol;
285 Int_t isSoftwareTrigger;
286 Int_t isMinBiasTrigger;
287 Int_t isPayloadBlast;
292 Int_t isStepFunction;
304 Double_t medianPower[1+AnitaRing::kNotARing];
305 Double_t meanPowerFiltered[1+AnitaRing::kNotARing];
306 Double_t medianPowerFiltered[1+AnitaRing::kNotARing];
308 Double_t maxBottomToTopRatio[AnitaPol::kNotAPol];
309 Int_t maxBottomToTopRatioSector[AnitaPol::kNotAPol];
310 Double_t minBottomToTopRatio[AnitaPol::kNotAPol];
311 Int_t minBottomToTopRatioSector[AnitaPol::kNotAPol];
313 Int_t nSectorsWhereBottomExceedsTop;
318 Double_t middleOrBottomPower[numBlastPowerBands];
319 Double_t topPower[numBlastPowerBands];
320 Int_t middleOrBottomAnt[numBlastPowerBands];
321 Int_t middleOrBottomPol[numBlastPowerBands];
342 Double_t mapValue[NUM_POLS];
365 Double_t triggerSNR[2];
366 TVector3 nuDirection;
367 double nuTheta, nuPhi;
368 double interactionTheta, interactionPhi;
369 double interactionLon, interactionLat, interactionAlt;
370 double rfExitTheta, rfExitPhi;
371 double rfExitLon, rfExitLat, rfExitAlt;
372 double balloonLon, balloonLat, balloonAlt;
399 void reset() {
latitude = -999; longitude = -999; altitude = -999; heading = -999; prevHeading = -999;};
400 void update(
const Adu5Pat*
pat);
408 pat.longitude = longitude;
410 pat.altitude = altitude;
411 pat.heading = heading;
452 AnitaEventSummary(
const RawAnitaHeader* header, UsefulAdu5Pat* pat,
const TruthAnitaEvent * truth = 0);
453 void setTriggerInfomation(
const RawAnitaHeader* header);
454 void setSourceInformation(UsefulAdu5Pat* pat,
const TruthAnitaEvent * truth = 0);
455 void zeroInternals();
456 Bool_t update()
const {resetNonPersistent();
return true;}
459 AnitaPol::AnitaPol_t highestPol()
const;
460 Int_t highestPolAsInt()
const;
461 Int_t highestPeakInd()
const;
462 const PointingHypothesis& highestPeak()
const;
463 const WaveformInfo& highestCoherent()
const;
464 const WaveformInfo& highestDeconvolved()
const;
465 const WaveformInfo& highestCoherentFiltered()
const;
466 const WaveformInfo& highestDeconvolvedFiltered()
const;
468 static void setThresholdForMostImpulsive(
double threshold);
470 Int_t mostImpulsivePolAsInt(
int whichMetric=0)
const;
471 Int_t mostImpulsiveInd(
int whichMetric=0)
const;
472 const PointingHypothesis& mostImpulsivePeak(
int whichMetric=0)
const;
473 const WaveformInfo& mostImpulsiveCoherent(
int whichMetric=0)
const;
474 const WaveformInfo& mostImpulsiveDeconvolved(
int whichMetric=0)
const;
475 const WaveformInfo& mostImpulsiveCoherentFiltered(
int whichMetric=0)
const;
476 const WaveformInfo& mostImpulsiveDeconvolvedFiltered(
int whichMetric=0)
const;
478 inline Double_t weight(){
return mc.weight > 0 ?
mc.weight : 1;}
480 Int_t trainingPolAsInt()
const;
481 Int_t trainingPeakInd()
const;
482 const PointingHypothesis& trainingPeak()
const;
483 const WaveformInfo& trainingCoherent()
const;
484 const WaveformInfo& trainingDeconvolved()
const;
485 const WaveformInfo& trainingCoherentFiltered()
const;
486 const WaveformInfo& trainingDeconvolvedFiltered()
const;
487 Int_t countChannelAboveThreshold(
int threshold=100)
const;
499 mutable Int_t fHighestPeakIndex;
500 mutable AnitaPol::AnitaPol_t fHighestPol;
501 mutable Int_t fTrainingPeakIndex;
502 mutable AnitaPol::AnitaPol_t fTrainingPol;
503 mutable Int_t fMostImpulsiveIndex;
504 mutable AnitaPol::AnitaPol_t fMostImpulsivePol;
505 mutable UInt_t fLastEventNumber;
508 void findHighestPeak()
const;
509 void findTrainingPeak()
const;
510 void findMostImpulsive(
int whichMetric)
const;
511 void resetNonPersistent()
const;
512 const SourceHypothesis* sourceFromTag()
const;
Double_t sigma_phi
error on theta
WaveformInfo deconvolved[AnitaPol::kNotAPol][maxDirectionsPerPol]
Summaries of the (unfiltered) coherently summed waveforms, array index correponds to entry in peak[][...
Bool_t masked_xpol
was this in a masked phi sector?
Double_t hwAngleXPol
angle with respect to triggering phi sector
PointingHypothesis peak[AnitaPol::kNotAPol][maxDirectionsPerPol]
Number of peaks stored in this AnitaEventSummary (might be less than maxDirectionsPerPol) ...
Double_t mapHistoryVal[NUM_POLS]
what the instantaneous map value is at this source hypothesis
Double_t dphi_rough
angular separation from higher value peak in same event. 1000 if highest value event (i...
Double_t dThetaTagged(bool different_sign_conventions=true) const
See AnitaEventSummary::sourceFromTag()
Double_t phi_separation
If an event barely missed the ground, it is useful to see the coordinates at which it would hit if th...
Adu5Pat pat() const
Copy the data from the pat into the object.
Bool_t closeToMC(Double_t deltaPhiDeg, Double_t deltaThetaDeg) const
See AnitaEventSummary::sourceFromTag()
Double_t hwAngle
value of average of the peak location over the past 60 min-bias events
MCTruth mc
Contains location of LDB cal pulser in map coordinates at time of event.
virtual ~SourceHypothesis()
sets all the values to nonsense. Sorry, mapHistoryVal means this is in source now ...
Double_t sigma_theta
on continent, or -9999 if doesn't intersect
Double_t meanPower[1+AnitaRing::kNotARing]
SourceHypothesis wais
Contains location of sun in map coordinates at time of event.
AnitaPol::AnitaPol_t mostImpulsivePol(int whichMetric=0) const
value between 0 and 1, will find the brightest peak that is within threshold as impulsive as the most...
static const Int_t numFracPowerWindows
The maximum number of frequency peaks per waveform spectrum.
static const Int_t peaksPerSpectrum
The maximum number of hypotheses storable per polarization */.
WaveformInfo coherent_filtered[AnitaPol::kNotAPol][maxDirectionsPerPol]
Summaries of the (unfiltered) de-dispersed coherently summed waveforms, array index correponds to ent...
Float_t latitude
Slightly more useful constructor.
Bool_t triggered
theta - theta rough
ChannelInfo()
Correct indices are set in the AnitaEventSummary constructor.
EventFlags flags
Summaries of each channel's waveform.
Bool_t masked
was this in a triggered xpol phi sector?
Double_t mapHistoryVal
rms of interferometric map
Double_t antennaPeakAverage
was this in a masked phi xpol sector?
Double_t mapRMS
snr of peak
Double_t dPhi(Double_t phi) const
the average of channel peaks in this direction
AnitaEventSummary()
Reduced GPS data.
Double_t theta_adjustment_needed
chisq/ndof of peak finding process, if available (otherwise zero)
Double_t chisq
correlation coefficient between theta and phi
AnitaPol::AnitaPol_t trainingPol() const
Return the weight of the event, always returns 1 for data, the weight from MCTruth otherwise...
SourceHypothesis ldb
Contains location of WAIS divide cal pulser in map coordinates at time of event.
PayloadLocation anitaLocation
Contains summary information about MC truth, if real data then this filled with constant, unphysical values.
Double_t longitude
on continent, or -9999 if doesn't intersect
UInt_t realTime
Event number.
Double_t theta
peak phi, degrees
ChannelInfo channels[AnitaPol::kNotAPol][NUM_SEAVEYS]
Summaries of the filtered, de-dispersed, coherently summed waveforms, array index correponds to entry...
Double_t dtheta_rough
phi - phi rough
Double_t value
peak theta, degrees
Common analysis format between UCorrelator and Acclaim.
SourceHypothesis sun
Flags corresponding the event quality, trigger type, calibration pulser timing, etc.
Int_t nPeaks[AnitaPol::kNotAPol]
Time of the event.
WaveformInfo coherent[AnitaPol::kNotAPol][maxDirectionsPerPol]
Summaries of the event peak directions (indices of all WaveformInfo member arrays match peak index) ...
Bool_t triggered_xpol
was this in a triggered phi sector?
Double_t latitude
angle with respect to triggering phi sector in opposite polarisation
Double_t distanceToSource
on continent, or -9999 if doesn't intersect
WaveformInfo deconvolved_filtered[AnitaPol::kNotAPol][maxDirectionsPerPol]
Summaries of the filtered, coherently summed waveforms, array index correponds to entry in peak[][]...
void reset()
a history of the interferometric map value for the source location
Double_t altitude
on continent, or -9999 if doesn't intersect