9 #ifndef USEFULADU5PAT_H 10 #define USEFULADU5PAT_H 17 #include "AnitaConventions.h" 18 #include "RampdemReader.h" 19 #include "AnitaGeomTool.h" 26 const Double_t heading = 0;
27 const Double_t pitch = 0;
28 const Double_t roll = 0;
61 int getSourceLonAndLatAltZero(Double_t phiWave, Double_t thetaWave, Double_t &sourceLon, Double_t &sourceLat);
75 int getSourceLonAndLatAtAlt(Double_t phiWave, Double_t thetaWave, Double_t &sourceLon, Double_t &sourceLat,Double_t &sourceAltitude);
80 int getSourceLonAndLatAtAlt2(Double_t phiWave, Double_t thetaWave, Double_t &sourceLon, Double_t &sourceLat,Double_t &sourceAltitude, Int_t maxLoopIter = -1, TVector3* sourcePosOptional = NULL)
const;
86 int getSourceLonAndLatAtAlt3(Double_t phiWave, Double_t thetaWave, Double_t &sourceLon, Double_t &sourceLat,Double_t &sourceAltitude,
87 double* deltaAltIfNoIntersectection = NULL,
bool returnBestPositionIfNoIntersection =
false)
const;
102 Double_t * lon, Double_t * lat, Double_t *alt, Double_t * theta_adjustment_required)
const;
125 Double_t * lon, Double_t * lat, Double_t *alt, Double_t * theta_adjustment_required,
126 Double_t max_theta_adjustment = TMath::Pi()/180, Int_t max_iter = 10)
const;
140 void getThetaAndPhiWave(Double_t sourceLon, Double_t sourceLat, Double_t sourceAlt, Double_t &thetaWave, Double_t &phiWave);
153 void getThetaAndPhiWave2(Double_t sourceLon, Double_t sourceLat, Double_t sourceAlt, Double_t &thetaWave, Double_t &phiWave, TVector3* sourcePos = NULL)
const;
162 Bool_t plus_infinity =
true, Double_t eps = 0.00001 * TMath::DegToRad(), Double_t step = 10e7, TVector3 * testPosition = 0)
const;
187 void getThetaWaveAtBase(Double_t baseLon, Double_t baseLat, Double_t baseAlt, Double_t &thetaWave);
204 void getThetaAndPhiWaveWillyBorehole(Double_t &thetaWave,Double_t &phiWave);
227 Double_t
getDeltaTExpected(Int_t ant1, Int_t ant2,Double_t sourceLon, Double_t sourceLat, Double_t sourceAlt);
238 Double_t
getDeltaTExpected(Int_t ant1, Int_t ant2,Double_t phiWave, Double_t thetaWave);
249 Double_t
getDeltaTExpected(Int_t ant1,Int_t ant2,Double_t cosPhi,Double_t sinPhi,Double_t cosTheta,Double_t sinTheta);
308 return fSourceLongitude;
315 return fSourceLatitude;
323 return fSourceAltitude;
326 UInt_t getTaylorDomeTriggerTimeNs()
const;
337 Double_t getAngleBetweenPayloadAndSource(Double_t sourceLon, Double_t sourceLat, Double_t sourceAlt);
343 void getThetaAndPhiWaveHiCal(Double_t& thetaWave, Double_t& phiWave);
356 static Double_t
getReflectionAngle(Double_t plAlt, Double_t imageEl, Double_t imageAlt);
384 int astronomicalCoordinates(Double_t phiWave, Double_t thetaWave, Double_t * RA = 0, Double_t * dec = 0, Double_t * l = 0, Double_t * b = 0)
const;
386 int fromRADec (Double_t RA, Double_t dec, Double_t *phi, Double_t *theta)
const;
387 int fromRADec (
int N,
const Double_t * RA,
const Double_t * dec, Double_t *phi, Double_t *theta)
const;
446 if(fInterpSurfaceAboveGeoid){
465 Int_t fIncludeGroupDelay;
467 Double_t fSourceLongitude;
468 Double_t fSourceLatitude;
469 Double_t fSourceAltitude;
472 Double_t fBalloonCoords[3];
473 TVector3 fBalloonPos;
474 Double_t fBalloonTheta;
475 Double_t fBalloonPhi;
476 Double_t fBalloonHeight;
477 Float_t fBalloonLonCache;
478 Float_t fBalloonLatCache;
479 Float_t fBalloonAltCache;
481 Bool_t fInterpSurfaceAboveGeoid;
482 Double_t fSurfaceCloseEnoughIter;
483 Int_t fMaxLoopIterations;
487 Double_t getDeltaTTaylorOpt(Int_t ant1, Int_t ant2, Double_t *deltaR, Double_t *deltaZ, Double_t *deltaPhi);
488 Double_t getDeltaTExpectedOpt(Int_t ant1, Int_t ant2,Double_t sourceLon, Double_t sourceLat, Double_t sourceAlt, Double_t *deltaR, Double_t *deltaZ, Double_t *deltaPhi);
490 Double_t getDeltaTSeaveyOpt(Int_t ant1, Int_t ant2, Double_t *deltaR, Double_t *deltaZ, Double_t *deltaPhi);
491 Double_t getDeltaTExpectedSeaveyOpt(Int_t ant1, Int_t ant2,Double_t sourceLon, Double_t sourceLat, Double_t sourceAlt, Double_t *deltaR, Double_t *deltaZ, Double_t *deltaPhi);
492 Double_t getGroupDelay(Double_t phiToAntBoresight);
501 void accountForPitchAndRollInPhiWaveThetaWave(Double_t& phiWave, Double_t& thetaWave)
const;
506 #endif //USEFULADU5PAT_H static Double_t BilinearInterpolatedSurfaceAboveGeoid(Double_t longitude, Double_t latitude, RampdemReader::dataSet=rampdem)
Double_t getDeltaTWillyBorehole(Int_t ant1, Int_t ant2)
double getSurfaceCloseEnoughInter() const
int getSourceLonAndLatAtDesiredAlt(Double_t phiWave, Double_t thetaWave, Double_t &sourceLon, Double_t &sourceLat, Double_t desiredAlt)
Destructor.
Double_t getDifferencePointingToSun(Double_t phiAngle, Bool_t inputInDegrees=true) const
Quick way of getting difference between any azimuth phi and the sun's azimuth phi.
int getSourceLonAndLatAtAlt2(Double_t phiWave, Double_t thetaWave, Double_t &sourceLon, Double_t &sourceLat, Double_t &sourceAltitude, Int_t maxLoopIter=-1, TVector3 *sourcePosOptional=NULL) const
TVector3 getUnitVectorAlongThetaWavePhiWave(double thetaWave, double phiWave) const
static Double_t SurfaceAboveGeoid(Double_t longitude, Double_t latitude, RampdemReader::dataSet=rampdem)
Static value to which the pitch/roll variables are set in UsefulAdu5Pat, currently for ANITA-3...
static Double_t getReflectionAngle(Double_t plAlt, Double_t imageEl, Double_t imageAlt)
Currently just does direct events...
Adu5Pat – The ADU5 Position and Attitude Data.
void getThetaAndPhiWaveLDB(Double_t &thetaWave, Double_t &phiWave)
UInt_t getWaisDivideTriggerTimeNs() const
Gets the time of flight to Taylor Dome.
bool getInterpSurfaceAboveGeoid() const
void getThetaAndPhiWaveWillySeavey(Double_t &thetaWave, Double_t &phiWave)
UInt_t getTriggerTimeNsFromSource(Double_t sourceLat, Double_t sourceLong, Double_t sourceAlt) const
Gets the time of flight to LDB camp.
void setSurfaceCloseEnoughInter(double closeEnough=1.0)
void getThetaWaveAtBase(Double_t baseLon, Double_t baseLat, Double_t baseAlt, Double_t &thetaWave)
void getThetaAndPhiWave(Double_t sourceLon, Double_t sourceLat, Double_t sourceAlt, Double_t &thetaWave, Double_t &phiWave)
RampdemReader * fRampdemReader
Toggles the silly group delay correction on and off.
Double_t getThetaWave() const
UInt_t getLDBTriggerTimeNs() const
Gets the time of flight to Siple.
void setMaxLoopIterations(Int_t n=50)
double surfaceAboveGeoid(Double_t lon, Double_t lat) const
Double_t getSourceLatitude() const
UInt_t getSipleTriggerTimeNs() const
Gets the time of flight to Wais Divide.
Double_t getDeltaTExpected(Int_t ant1, Int_t ant2, Double_t sourceLon, Double_t sourceLat, Double_t sourceAlt)
void getThetaAndPhiWaveWaisDivide(Double_t &thetaWave, Double_t &phiWave)
void getThetaAndPhiWaveTaylorDome(Double_t &thetaWave, Double_t &phiWave)
Double_t getAzimuthOfSunRelativeToNorth() const
Calculates the azimuth position of the sun if ANITA was facing directly north, relies on timeOfDay...
Double_t getDeltaTTaylor(Int_t ant1, Int_t ant2)
Double_t getAzimuthOfSun() const
void getSunPosition(Double_t &phiDeg, Double_t &thetaDeg) const
Uses realTime, latitude, longitude to calculate the sun's position.
void getThetaAndPhiWaveCart(TVector3 *sourcePos, Double_t &thetaWave, Double_t &phiWave) const
~UsefulAdu5Pat()
Assignment constructor.
int getMaxLoopIterations() const
Double_t getDeltaTWillySeavey(Int_t ant1, Int_t ant2)
As UsefulAnitaEvent is to RawAnitaEvent, UsefulAdu5Pat is to Adu5Pat. Well not quite as useful but yo...
int getSourceLonAndLatAtAlt(Double_t phiWave, Double_t thetaWave, Double_t &sourceLon, Double_t &sourceLat, Double_t &sourceAltitude)
Double_t getPhiWave() const
int traceBackToContinent(Double_t phiWave, Double_t thetaWave, Double_t *lon, Double_t *lat, Double_t *alt, Double_t *theta_adjustment_required, Double_t max_theta_adjustment=TMath::Pi()/180, Int_t max_iter=10) const
Double_t getDistanceFromSource(Double_t sourceLat, Double_t sourceLong, Double_t sourceAlt) const
Gets time of flight from any source.
Double_t getSourceLongitude() const
int astronomicalCoordinates(Double_t phiWave, Double_t thetaWave, Double_t *RA=0, Double_t *dec=0, Double_t *l=0, Double_t *b=0) const
void updateCartesianBalloonInfo()
void setInterpSurfaceAboveGeoid(bool i)
void setIncludeGroupDelay(Int_t flag)
Gets distance from any source in meters.
Double_t getSourceAltitude() const
int traceBackToContinent3(Double_t phiWave, Double_t thetaWave, Double_t *lon, Double_t *lat, Double_t *alt, Double_t *theta_adjustment_required) const
void getThetaAndPhiWaveOfRayAtInfinity(const TVector3 &p0, const TVector3 &v0, Double_t &thetaWave, Double_t &phiWave, Bool_t plus_infinity=true, Double_t eps=0.00001 *TMath::DegToRad(), Double_t step=10e7, TVector3 *testPosition=0) const
void getThetaAndPhiWave2(Double_t sourceLon, Double_t sourceLat, Double_t sourceAlt, Double_t &thetaWave, Double_t &phiWave, TVector3 *sourcePos=NULL) const