![]() |
Public Member Functions | |
BlindingStrategy | setStrategy (BlindingStrategy strat) |
BlindingStrategy | getStrategy () |
TString | describeCurrentStrategy () |
AnitaDataset (int run, bool decimated=false, WaveCalType::WaveCalType_t cal=WaveCalType::kDefault, DataDirectory dir=ANITA_ROOT_DATA, BlindingStrategy strat=AnitaDataset::kDefault) | |
void | setCalType (WaveCalType::WaveCalType_t cal) |
virtual | ~AnitaDataset () |
bool | loadRun (int run, bool decimated=false, DataDirectory dir=ANITA_ROOT_DATA) |
int | getEvent (int eventNumber, bool quiet=false) |
int | getEntry (int entryNumber) |
int | current () |
int | next () |
int | previous () |
int | first () |
int | last () |
int | N () const |
int | firstEvent () |
int | nextEvent () |
int | previousEvent () |
int | lastEvent () |
int | nthEvent (int i) |
int | nextMinBiasEvent () |
int | previousMinBiasEvent () |
int | setCut (const TCut &cut) |
int | NInCut () const |
int | firstInCut () |
int | lastInCut () |
int | nextInCut () |
int | previousInCut () |
int | nthInCut (int i) |
int | setPlaylist (const char *playlist) |
int | NInPlaylist () const |
int | firstInPlaylist () |
int | lastInPlaylist () |
int | nextInPlaylist () |
int | previousInPlaylist () |
int | nthInPlaylist (int i) |
virtual UsefulAnitaEvent * | useful (bool force_reload=false) |
RawAnitaEvent * | raw (bool force_reload=false) |
CalibratedAnitaEvent * | calibrated (bool force_reload=false) |
Adu5Pat * | gps (bool force_reload=false) |
PrettyAnitaHk * | hk (bool force_reload=false) |
virtual RawAnitaHeader * | header (bool force_reload=false) |
TurfRate * | turf (bool force_reload=false) |
SurfHk * | surf (bool force_reload=false) |
TruthAnitaEvent * | truth (bool force_reload=true) |
std::vector< Double_t > * | RcoInfo (bool force_reload=false) |
std::vector< Double_t > * | ClockPhiInfo (bool force_reload=false) |
std::vector< Double_t > * | TempFactorInfo (bool force_reload=false) |
Int_t | ClockProblemInfo (bool force_reload=false) |
Int_t | ClockSpikeInfo (bool force_reload=false) |
Int_t | RFSpikeInfo (bool force_reload=false) |
int | getCurrRun () |
bool | maybeInvertPolarity (UInt_t eventNumber) |
void | hiCal (Double_t &longitude, Double_t &latitude, Double_t &altitude) |
Static Public Member Functions | |
static TString | getDescription (BlindingStrategy strat) |
static int | getRunContainingEventNumber (UInt_t eventNumber) |
Get the run that contains the eventNumber. More... | |
static const char * | getDataDir (DataDirectory dir=ANITA_ROOT_DATA) |
static int | getRunAtTime (double t) |
static bool | isKnownHiCalEvent (UInt_t eventNumber, Int_t anita=AnitaVersion::get()) |
static void | hiCal (UInt_t unixTime, Double_t &longitude, Double_t &latitude, Double_t &altitude) |
Public Attributes | |
bool | fRunLoaded |
Protected Member Functions | |
void | unloadRun () |
int | loadPlaylist (const char *playlist) |
Where was HiCal? | |
int | getPlaylistRun () |
Long64_t | getPlaylistEvent () |
void | zeroBlindPointers () |
void | loadBlindTrees () |
Int_t | needToOverwriteEvent (AnitaPol::AnitaPol_t pol, UInt_t eventNumber) |
!< Have we loaded the tree of events to insert? More... | |
void | overwriteHeader (RawAnitaHeader *header, AnitaPol::AnitaPol_t pol, Int_t fakeTreeEntry) |
void | overwriteEvent (UsefulAnitaEvent *useful, AnitaPol::AnitaPol_t pol, Int_t fakeTreeEntry) |
Static Protected Member Functions | |
static void | loadRunToEv (int anita) |
static void | loadHiCalGps () |
Protected Attributes | |
TTree * | fHeadTree |
TTree * | fDecimatedHeadTree |
Long64_t * | fIndices |
Long64_t | fIndex |
RawAnitaHeader * | fHeader |
TTree * | fEventTree |
TTree * | fCalibInfoTree |
CalibratedAnitaEvent * | fCalEvent |
RawAnitaEvent * | fRawEvent |
UsefulAnitaEvent * | fUseful |
std::vector< Double_t > * | fRcoInfo |
std::vector< Double_t > * | fClockPhiInfo |
std::vector< Double_t > * | fTempFactorInfo |
Int_t | fClockProblemInfo |
Int_t | fClockSpikeInfo |
Int_t | fRFSpikeInfo |
Bool_t | fUsefulDirty |
Bool_t | fCalDirty |
Bool_t | fGpsDirty |
TTree * | fGpsTree |
Adu5Pat * | fGps |
TTree * | fHkTree |
PrettyAnitaHk * | fHk |
TTree * | fTurfTree |
TurfRate * | fTurf |
Bool_t | fTurfDirty |
TTree * | fSurfTree |
SurfHk * | fSurf |
Bool_t | fSurfDirty |
TTree * | fTruthTree |
TruthAnitaEvent * | fTruth |
int | currRun |
Long64_t | fWantedEntry |
Long64_t | fDecimatedEntry |
Bool_t | fHaveGpsEvent |
Bool_t | fHaveCalibFile |
Bool_t | fHaveCalibInfo |
WaveCalType::WaveCalType_t | fCalType |
std::vector< TFile * > | filesToClose |
bool | fDecimated |
TEventList * | fCutList |
int | fCutIndex |
int | fPlaylistIndex |
std::vector< std::vector< long > > | fPlaylist |
BlindingStrategy | theStrat |
TRandom3 | fRandy |
!< Currently selected blinding strategy | |
bool | loadedBlindTrees |
!< for deciding whether to do polarity flipping (eventNumber is used as seed) | |
TFile * | fBlindFile |
TTree * | fBlindEventTree [AnitaPol::kNotAPol] |
!< Pointer to file containing tree of UsefulAnitaEvents to insert | |
TTree * | fBlindHeadTree [AnitaPol::kNotAPol] |
!< Tree of UsefulAnitaEvents to insert | |
UsefulAnitaEvent * | fBlindEvent [AnitaPol::kNotAPol] |
!< Tree of headers to insert | |
RawAnitaHeader * | fBlindHeader [AnitaPol::kNotAPol] |
!< Pointer to fake UsefulAnitaEvent | |
std::vector< UInt_t > | eventsToOverwrite |
!< Pointer to fake header | |
std::vector< AnitaPol::AnitaPol_t > | polarityOfEventToInsert |
std::vector< Int_t > | fakeTreeEntries |
DataDirectory | datadir |
Definition at line 47 of file AnitaDataset.h.
AnitaDataset::AnitaDataset | ( | int | run, |
bool | decimated = false , |
||
WaveCalType::WaveCalType_t | cal = WaveCalType::kDefault , |
||
DataDirectory | dir = ANITA_ROOT_DATA , |
||
BlindingStrategy | strat = AnitaDataset::kDefault |
||
) |
Constructor loading a run with calibration type and anita version. If decimated is true, the decimated header file is read and you only have access to the 10% dataset.
cal changes the calibration type.
version is: negative to read ANITA_ROOT_DATA postive # to read ANITA::_ROOT_DATA 0 to read ANITA_MC_DATA
strat is the blinding strategy.
Definition at line 206 of file AnitaDataset.cxx.
|
virtual |
Destructor
Definition at line 523 of file AnitaDataset.cxx.
CalibratedAnitaEvent * AnitaDataset::calibrated | ( | bool | force_reload = false | ) |
Loads the calibrated event. This may be read directly from disk if available or otherwise created on the fly. If force_reload is true, the event will be reloaded from the tree.
Definition at line 302 of file AnitaDataset.cxx.
std::vector< Double_t > * AnitaDataset::ClockPhiInfo | ( | bool | force_reload = false | ) |
Loads the calibInfo file and produces the clockphi info part.
Definition at line 1284 of file AnitaDataset.cxx.
Int_t AnitaDataset::ClockProblemInfo | ( | bool | force_reload = false | ) |
Loads the calibInfo file and produces the clock problem info part.
Definition at line 1306 of file AnitaDataset.cxx.
Int_t AnitaDataset::ClockSpikeInfo | ( | bool | force_reload = false | ) |
Loads the calibInfo file and produces the clock spike info part.
Definition at line 1317 of file AnitaDataset.cxx.
|
inline |
Get the description string for the currently enabled strategy
Definition at line 105 of file AnitaDataset.h.
|
inline |
loads the first entry
Definition at line 188 of file AnitaDataset.h.
int AnitaDataset::firstEvent | ( | ) |
Loads the firstEvent (in case the entries are not in order). returns the entry of it
Definition at line 870 of file AnitaDataset.cxx.
int AnitaDataset::firstInCut | ( | ) |
Loads the first event passing the cut. Returns the entry number or -1 if no cut applied
Definition at line 978 of file AnitaDataset.cxx.
int AnitaDataset::firstInPlaylist | ( | ) |
Loads the first event in the playlist. Returns the entry number or -1 if no playlist
Definition at line 1053 of file AnitaDataset.cxx.
|
inline |
Want to see what run you previously loaded? Look no further
Definition at line 321 of file AnitaDataset.h.
|
static |
Get the data directory for the anita version based on environmental variables.
Definition at line 154 of file AnitaDataset.cxx.
|
static |
Get a one line description of the blinding strategy (please update this in AnitaDataset.cxx when you add a strategy.
strat | is the strategy to describe. |
Definition at line 1479 of file AnitaDataset.cxx.
int AnitaDataset::getEntry | ( | int | entryNumber | ) |
loads the desired entry within the tree. Returns the current entry afterwards.
Definition at line 458 of file AnitaDataset.cxx.
int AnitaDataset::getEvent | ( | int | eventNumber, |
bool | quiet = false |
||
) |
loads the desired eventNumber and returns the current entry If quiet is true, won't print out a warning about changing runs or missing events.
Definition at line 494 of file AnitaDataset.cxx.
|
static |
Returns the run at the requested time
Definition at line 1357 of file AnitaDataset.cxx.
|
static |
Get the run that contains the eventNumber.
Uses AnitaVersion::get(), if it's not correct you won't get the right answer!
eventNumber | is the eventNumber |
Definition at line 1099 of file AnitaDataset.cxx.
AnitaDataset::BlindingStrategy AnitaDataset::getStrategy | ( | ) |
Get the currently set strategy
Definition at line 1509 of file AnitaDataset.cxx.
Adu5Pat * AnitaDataset::gps | ( | bool | force_reload = false | ) |
Loads the GPS. This is either from the gpsEventTree or the best-timed PAT from the gpsTree. force_reload will reload it even if it has already been loaded
Definition at line 262 of file AnitaDataset.cxx.
|
virtual |
Loads the Header. This will preferentially be from the timedHeader tree but will fall back to the less glamorous one if need be. If the decimated run was loaded, the decimated header tree is used. Optionally can force a reload
Definition at line 335 of file AnitaDataset.cxx.
|
static |
Where was hical at a particular time?
longitude | hical position |
latitude | hical position |
altitude | hical position |
realTime | unixTime stamp of the gps tree |
Definition at line 1667 of file AnitaDataset.cxx.
void AnitaDataset::hiCal | ( | Double_t & | longitude, |
Double_t & | latitude, | ||
Double_t & | altitude | ||
) |
Where was hical? Uses the current header realTime to query the hical gps tree...
longitude | hical position |
latitude | hical position |
altitude | hical position |
Definition at line 1652 of file AnitaDataset.cxx.
PrettyAnitaHk * AnitaDataset::hk | ( | bool | force_reload = false | ) |
Loads the PrettyAnitaHk. Optionally can force a reload
Definition at line 325 of file AnitaDataset.cxx.
|
static |
Check against the list of known Hi-Cal events. Warning... this list is likely incomplete!
eventNumber | the eventNumber |
anita | which ANITA flight? (optional: uses AnitaVersion::get() if not supplied.) |
Definition at line 47 of file AnitaDataset.cxx.
|
inline |
loads the last entry
Definition at line 191 of file AnitaDataset.h.
int AnitaDataset::lastEvent | ( | ) |
Loads last event (in case the entries are not in order). returns the entry of it.
Definition at line 875 of file AnitaDataset.cxx.
int AnitaDataset::lastInCut | ( | ) |
Loads the last event passing the cut. Returns the entry number or -1 if no cut applied
Definition at line 983 of file AnitaDataset.cxx.
int AnitaDataset::lastInPlaylist | ( | ) |
Loads the last event in the playlist. Returns the entry number or -1 if no playlist
Definition at line 1058 of file AnitaDataset.cxx.
bool AnitaDataset::loadRun | ( | int | run, |
bool | decimated = false , |
||
DataDirectory | dir = ANITA_ROOT_DATA |
||
) |
Loads run. Can use decimated to load the 10% data file
Definition at line 601 of file AnitaDataset.cxx.
int AnitaDataset::N | ( | ) | const |
returns the number of entries
Definition at line 902 of file AnitaDataset.cxx.
|
protected |
!< Have we loaded the tree of events to insert?
Loop through list of events to overwrite for a given polarisation and return the fakeTreeEntry we need to overwrite
pol | is the polarity to consider blinding |
eventNumber | is the eventNumber, obviously |
Definition at line 1698 of file AnitaDataset.cxx.
|
inline |
gets the next entry and returns the current entry afterwards
Definition at line 182 of file AnitaDataset.h.
int AnitaDataset::nextEvent | ( | ) |
Loads next event (in case the entries are not in order). returns the entry of it
Definition at line 889 of file AnitaDataset.cxx.
int AnitaDataset::nextInCut | ( | ) |
Loads the next passing the cut. Returns the entry number or -1 if no cut applied
Definition at line 999 of file AnitaDataset.cxx.
int AnitaDataset::nextInPlaylist | ( | ) |
Loads the next playlist event. Returns the entry number or -1 if no playlist
Definition at line 1074 of file AnitaDataset.cxx.
int AnitaDataset::nextMinBiasEvent | ( | ) |
Loads next minbias event. returns the entry of it
Definition at line 930 of file AnitaDataset.cxx.
int AnitaDataset::NInCut | ( | ) | const |
The number of events in the cut (or -1 if no cut is applied)
Definition at line 967 of file AnitaDataset.cxx.
int AnitaDataset::NInPlaylist | ( | ) | const |
The number of events in the playlist (or -1 if no playlist)
Definition at line 1042 of file AnitaDataset.cxx.
int AnitaDataset::nthEvent | ( | int | i | ) |
Returns the nth event (in case the entries are not in order). returns the entry of it.
Definition at line 880 of file AnitaDataset.cxx.
int AnitaDataset::nthInCut | ( | int | i | ) |
Loads the nth event passing the cut. Returns the entry number or -1 if no cut applied
Definition at line 989 of file AnitaDataset.cxx.
int AnitaDataset::nthInPlaylist | ( | int | i | ) |
Loads the nth playlist event. Returns the entry number or -1 if no playlist
Definition at line 1064 of file AnitaDataset.cxx.
|
inline |
gets the previous entry and returns the current entry afterwards
Definition at line 185 of file AnitaDataset.h.
int AnitaDataset::previousEvent | ( | ) |
Loads previous event (in case the entries are not in order). returns the entry of it
Definition at line 856 of file AnitaDataset.cxx.
int AnitaDataset::previousInCut | ( | ) |
Loads the previous passing the cut. Returns the entry number or -1 if no cut applied
Definition at line 1015 of file AnitaDataset.cxx.
int AnitaDataset::previousInPlaylist | ( | ) |
Loads the previous playlist event. Returns the entry number or -1 if no playlist
Definition at line 1086 of file AnitaDataset.cxx.
int AnitaDataset::previousMinBiasEvent | ( | ) |
Loads previous minbias event. returns the entry of it
Definition at line 908 of file AnitaDataset.cxx.
RawAnitaEvent * AnitaDataset::raw | ( | bool | force_reload = false | ) |
Loads the raw event. If force_reload is true, the event will be reloaded from the tree.
Definition at line 370 of file AnitaDataset.cxx.
std::vector< Double_t > * AnitaDataset::RcoInfo | ( | bool | force_reload = false | ) |
Loads the calibInfo file and produces the rco info part. These are computed by makeCalibratedEventInfo in anitaTreeMaker so that you can have consistent calibratedEventFiles that can be generated on the fly
Definition at line 1273 of file AnitaDataset.cxx.
Int_t AnitaDataset::RFSpikeInfo | ( | bool | force_reload = false | ) |
Loads the calibInfo file and produces the rf spike info part.
Definition at line 1328 of file AnitaDataset.cxx.
|
inline |
Change the calibration type
Definition at line 157 of file AnitaDataset.h.
int AnitaDataset::setCut | ( | const TCut & | cut | ) |
Applies a cut to the entire dataset. Supercedes any previous cut. Once you apply a cut, you may use NInCut, firstInCut(), nextInCut(), previousInCut(), lastInCut() to iterate. The cut applies to the headTree. Returns the number of event sin the cut
Definition at line 953 of file AnitaDataset.cxx.
int AnitaDataset::setPlaylist | ( | const char * | playlist | ) |
Loads a playlist for your dataset.Playlist format is RUN EVENTNUMBER
or EVENTNUMBER
After applying playlist, use these to iterate through. Need runToEv files from MagicDisplay
Definition at line 1031 of file AnitaDataset.cxx.
AnitaDataset::BlindingStrategy AnitaDataset::setStrategy | ( | BlindingStrategy | strat | ) |
Set the current strategy (see AnitaDataset.h) for strategy options
strat | is the strategy to use. This can be a combination e.g. (kInsertedVPolEvents | kAnotherStrategy) |
Definition at line 1503 of file AnitaDataset.cxx.
SurfHk * AnitaDataset::surf | ( | bool | force_reload = false | ) |
Loads the SURF Hk. This is indexed so that the the payload times match as closely as possible
Definition at line 1245 of file AnitaDataset.cxx.
std::vector< Double_t > * AnitaDataset::TempFactorInfo | ( | bool | force_reload = false | ) |
Loads the calibInfo file and produces the tempfactor info part.
Definition at line 1295 of file AnitaDataset.cxx.
TruthAnitaEvent * AnitaDataset::truth | ( | bool | force_reload = true | ) |
Loads the MCTruth. This will be NULL if there is no truth (like if you're working with real data.
Definition at line 1261 of file AnitaDataset.cxx.
TurfRate * AnitaDataset::turf | ( | bool | force_reload = false | ) |
Loads the TURF Rate. This is indexed so that the fTurf->realTime is as close as possible to the header triggerTime
Definition at line 1230 of file AnitaDataset.cxx.
|
virtual |
Loads the useful event. If force_reload is true, the event will be reloaded from the tree (in case you made some changes and want a fresh copy). This will either be created from the CalibratedAnitaEvent or RawAnitaEvent, whichever the Dataset found
Definition at line 381 of file AnitaDataset.cxx.
bool AnitaDataset::fRunLoaded |
Lets you check to see if you have a header and event file actually loaded, or if it failed loading
Definition at line 318 of file AnitaDataset.h.