High level interface to join up the various bits of the analysis. More...
#include <AnalysisFlow.h>
Public Types | |
enum | selection { kAll, kWaisPulser, kDecimated } |
A human readable method of selecting the set of events to process, this can be expanded as required,. More... | |
Public Member Functions | |
AnalysisFlow (CmdLineArgs *args, FilterStrategy *filterStrat=NULL) | |
Preferred constructor. More... | |
~AnalysisFlow () | |
Destructor. | |
void | doAnalysis (Long64_t startAtThisEntry=-1) |
AnitaEventSummary * | doEntry (Long64_t entry) |
AnitaEventSummary * | doEvent (UInt_t eventNumber) |
AnalysisReco * | getReco () |
FilteredAnitaEvent * | getEvent () |
const AnitaDataset * | getData () |
Long64_t | firstEntry () |
Long64_t | lastEntry () |
Int_t | GetDebug () const |
Get the value of fDebug. | |
void | SetDebug (Int_t val) |
Set the value of fDebug. | |
Int_t | GetDoAll () const |
Get the value of fDoAll. | |
void | SetDoAll (Int_t val) |
Set the value of fDoAll. | |
Int_t | GetBlindStrat () const |
Get the value of fBlindStrat as an integer. More... | |
AnitaDataset::BlindingStrategy | GetEnumBlindStrat () const |
Get the value of fBlindStrat as AnalysisFlow::selection enum. More... | |
void | SetBlindStrat (Int_t val) |
Set the value of fBlindStrat from an integer value. More... | |
void | SetBlindStrat (AnitaDataset::BlindingStrategy val) |
Set the value of fBlindStrat from an enum value. More... | |
Double_t | GetNoiseTimeScaleSeconds () const |
Get the value of fNoiseTimeScaleSeconds. More... | |
void | SetNoiseTimeScaleSeconds (Double_t val) |
Set the value of fNoiseTimeScaleSeconds. More... | |
Int_t | GetNoiseEvenWaveforms () const |
Get the value of fNoiseEvenWaveforms. More... | |
void | SetNoiseEvenWaveforms (Int_t val) |
Set the value of fNoiseEvenWaveforms. More... | |
Int_t | GetOutFileCompressionLevel () const |
Get the value of fOutFileCompressionLevel. More... | |
void | SetOutFileCompressionLevel (Int_t val) |
Set the value of fOutFileCompressionLevel. More... | |
Int_t | GetOutFileCompressionAlgo () const |
Get the value of fOutFileCompressionAlgo. More... | |
void | SetOutFileCompressionAlgo (Int_t val) |
Set the value of fOutFileCompressionAlgo. More... | |
ClassDef (AnalysisFlow, 0) | |
Required for ROOT awareness of getter/setter functions. More... | |
Static Public Member Functions | |
static const char * | selectionAsString (selection sel) |
Protected Member Functions | |
void | prepareDataSet () |
Create the data set if not already done. More... | |
void | prepareOutputFiles () |
Coax the OutputConvention class into creating appropriately named output files. More... | |
Bool_t | shouldIDoThisEvent (RawAnitaHeader *header, UsefulAdu5Pat *usefulPat) |
Applies high level event selection. More... | |
Bool_t | isPulserWAIS (RawAnitaHeader *header, UsefulAdu5Pat *usefulPat) |
Bool_t | isPulserLDB (RawAnitaHeader *header, UsefulAdu5Pat *usefulPat) |
void | setPulserFlags (RawAnitaHeader *header, UsefulAdu5Pat *usefulPat, AnitaEventSummary *sum) |
void | prepareEverything (const char *preferredSettingsFileName=NULL) |
Initialize all input and output objects. | |
Bool_t | checkForSgeTaskId () |
Look for an environmental variable called SGE_TASK_ID for running on the hoffman2 cluster. More... | |
Protected Attributes | |
selection | fSelection |
Which event selection is applied? More... | |
int | fRun |
Which run in the data set should be is being processed? | |
int | fNumDivisions |
For parallel processing the run is divided into this many portions. | |
int | fDivision |
Which portion of the run to process (runs from 0 to fNumDivisions) | |
AnitaDataset * | fData |
Rootified data handler. | |
Long64_t | fFirstEntry |
The first entry to process (derived from fDivision and fNumDivisions) | |
Long64_t | fLastEntry |
The final entry to process (derived from fDivision and fNumDivisions) | |
AnalysisReco * | fReco |
The reconstruction class, fills an AnitaEventSummary. | |
FilterStrategy * | fFilterStrat |
Which filter strategy is applied to the events. | |
AnalysisSettings * | fSettings |
Contains configurable numbers parsed from an Acclaim analysis settings file. | |
AnitaEventSummary * | fEventSummary |
The most recently filled AnitaEventSummary, updated after each event processed. | |
FilteredAnitaEvent * | fEv |
The most recently produced FilteredAnitaEvent, updated after each event processed. | |
NoiseMonitor * | fNoiseMonitor |
Measures the noise. | |
UInt_t | fLastEventConsidered |
Tracks the event numbers processed by the class. | |
TString | fOutFileBaseName |
The meat of the output file name. | |
TFile * | fOutFile |
the output file, will contain TTree of AnitaEventSummary | |
TTree * | fSumTree |
The produced TTree of AnitaEventSummary. | |
Int_t | fDebug |
Controls the printing of debug info, feel free to wrap noisy stderr messages with if(fDebug),. More... | |
Int_t | fDoAll |
Process all events (that won't crash the analysis software) regardless of quality. More... | |
AnitaDataset::BlindingStrategy | fBlindStrat |
The blinding strategy with which to initialize fData. More... | |
Double_t | fNoiseTimeScaleSeconds |
The N value for SNR measurements, comes from waveform RMS in nearby min-bias triggers, this variable controls how long to average over in seconds. More... | |
Int_t | fNoiseEvenWaveforms |
Derived the noise value for RMS from the even or the uneven waveforms? Which choice is sensible will depend on the filter strategy, fFilterStrat. More... | |
Int_t | fOutFileCompressionLevel |
What compression level for the ROOT output files? There's no reason not to set this to the maximum possible value. More... | |
Int_t | fOutFileCompressionAlgo |
Which compression algorithm for the ROOT output files? More... | |
High level interface to join up the various bits of the analysis.
AnalysisFlow takes care of event selection, loading input data, saving output data, and contains a template function to loop over said data while performing the analysis reconstruction
Definition at line 34 of file AnalysisFlow.h.
A human readable method of selecting the set of events to process, this can be expanded as required,.
Definition at line 42 of file AnalysisFlow.h.
Acclaim::AnalysisFlow::AnalysisFlow | ( | Acclaim::CmdLineArgs * | args, |
FilterStrategy * | filterStrat = NULL |
||
) |
Preferred constructor.
Also searches for the environment variable SGE_TASK_ID, which indicates this code is running on the hoffman2 cluster. If this is the case, then some of the passed variables (fRun, fDivision, fNumDivisions) are overwritten with information endoded in SGE_TASK_ID. This allows for easy cluster scripting.
args | contains the command line arguments |
filterStrat | is the filter stragtegy to use |
Definition at line 15 of file AnalysisFlow.cxx.
|
protected |
Look for an environmental variable called SGE_TASK_ID for running on the hoffman2 cluster.
If it is found this function overrides the fRun, fDivision, fNumDivision members. A task array on the hoffman2 cluster gives each process a different SGE_TASK_ID so this is useful to make the analysis run in parallel.
Definition at line 53 of file AnalysisFlow.cxx.
Acclaim::AnalysisFlow::ClassDef | ( | AnalysisFlow | , |
0 | |||
) |
Required for ROOT awareness of getter/setter functions.
void Acclaim::AnalysisFlow::doAnalysis | ( | Long64_t | startAtThisEntry = -1 | ) |
Does the main analysis loop for all specified events
startAtThisEntry | optional, (default = -1), if you wish force the analysis loop to start at a specific tree entry |
Definition at line 443 of file AnalysisFlow.cxx.
AnitaEventSummary * Acclaim::AnalysisFlow::doEntry | ( | Long64_t | entry | ) |
Does my analysis on a single event in AnitaDataset member fData trees, referenced by entry
entry | is the entry to process |
Definition at line 388 of file AnalysisFlow.cxx.
AnitaEventSummary * Acclaim::AnalysisFlow::doEvent | ( | UInt_t | eventNumber | ) |
Does my analysis on a single event in AnitaDataset member fData trees, referenced by RawAnitaHeader::eventNumber
eventNumber | is the event to process, must be in the run and event selection! |
Definition at line 381 of file AnalysisFlow.cxx.
|
inline |
Get the first entry to be fetched in the fData
Definition at line 132 of file AnalysisFlow.h.
|
inline |
Get the value of fBlindStrat as an integer.
Definition at line 302 of file AnalysisFlow.h.
|
inline |
Get a pointer to the contained AnitaDataset fData member
Definition at line 126 of file AnalysisFlow.h.
|
inline |
Get the value of fBlindStrat as AnalysisFlow::selection enum.
Definition at line 302 of file AnalysisFlow.h.
|
inline |
Get a pointer to the FilteredAnitaEvent, fEv (this is mostly for MagicDisplay)
Definition at line 120 of file AnalysisFlow.h.
|
inline |
Get the value of fNoiseEvenWaveforms.
Definition at line 338 of file AnalysisFlow.h.
|
inline |
Get the value of fNoiseTimeScaleSeconds.
Definition at line 320 of file AnalysisFlow.h.
|
inline |
Get the value of fOutFileCompressionAlgo.
Definition at line 373 of file AnalysisFlow.h.
|
inline |
Get the value of fOutFileCompressionLevel.
Definition at line 356 of file AnalysisFlow.h.
|
inline |
Get a pointer to the AnalysisReco member, fReco, which does the hard work of event reconstruction
Definition at line 114 of file AnalysisFlow.h.
|
protected |
Applies Linda's LDB pulser selection from the thesis(!) version of my analysis. Should still work, but I've not tested this in a while.
header | is the event header |
usefulPat | is a usefulAdu5Pat object |
Definition at line 282 of file AnalysisFlow.cxx.
|
protected |
Applies my WAIS pulser selection, which works for ANITA-3.
header | is the event header |
usefulPat | is a usefulAdu5Pat object |
Definition at line 259 of file AnalysisFlow.cxx.
|
inline |
Get the final entry to be processed in the fData
This is not the last proccessed entry, but the final entry to be processed in fData.
Definition at line 140 of file AnalysisFlow.h.
|
protected |
Create the data set if not already done.
Creates an instance of the AnitaDataset class and finds the first/last entries to process using the division/numDivision member variables.
Definition at line 142 of file AnalysisFlow.cxx.
|
protected |
Coax the OutputConvention class into creating appropriately named output files.
The OutputConvention class was written some time ago to convert the cpp default main arguments (argc/argv) into an output file with a helpful name. This function dances around the original implementation intention to generate some fake argc/argv variables and pass them to an OutputConvention object.
Definition at line 166 of file AnalysisFlow.cxx.
|
inlinestatic |
Translate the AnalysisFlow::selection enum to a descriptive string
sel | is the AnalysisFlow event selection |
Definition at line 56 of file AnalysisFlow.h.
|
inline |
Set the value of fBlindStrat from an enum value.
Definition at line 302 of file AnalysisFlow.h.
|
inline |
Set the value of fBlindStrat from an integer value.
Definition at line 302 of file AnalysisFlow.h.
|
inline |
Set the value of fNoiseEvenWaveforms.
Definition at line 338 of file AnalysisFlow.h.
|
inline |
Set the value of fNoiseTimeScaleSeconds.
Definition at line 320 of file AnalysisFlow.h.
|
inline |
Set the value of fOutFileCompressionAlgo.
Definition at line 373 of file AnalysisFlow.h.
|
inline |
Set the value of fOutFileCompressionLevel.
Definition at line 356 of file AnalysisFlow.h.
|
protected |
Set the pulser flags in the passed AnitaEventSummary
header | is the event header |
usefulPat | is the ANITA gps data |
sum | is the AnitaEventSummary in which to set the flag |
Definition at line 319 of file AnalysisFlow.cxx.
|
protected |
Applies high level event selection.
Look at the (useful) GPS and header information and implement the event selection logic for the AnalysisFlow::selection enum.
header | is the RawAnitaHeader for this event |
usefulPat | is the UsefulAdu5Pat for the event |
Definition at line 226 of file AnalysisFlow.cxx.
|
protected |
The blinding strategy with which to initialize fData.
Definition at line 302 of file AnalysisFlow.h.
|
protected |
Controls the printing of debug info, feel free to wrap noisy stderr messages with if(fDebug),.
Definition at line 258 of file AnalysisFlow.h.
|
protected |
Process all events (that won't crash the analysis software) regardless of quality.
Definition at line 274 of file AnalysisFlow.h.
|
protected |
Derived the noise value for RMS from the even or the uneven waveforms? Which choice is sensible will depend on the filter strategy, fFilterStrat.
Definition at line 338 of file AnalysisFlow.h.
|
protected |
The N value for SNR measurements, comes from waveform RMS in nearby min-bias triggers, this variable controls how long to average over in seconds.
Definition at line 320 of file AnalysisFlow.h.
|
protected |
Which compression algorithm for the ROOT output files?
Definition at line 373 of file AnalysisFlow.h.
|
protected |
What compression level for the ROOT output files? There's no reason not to set this to the maximum possible value.
Definition at line 356 of file AnalysisFlow.h.
|
protected |
Which event selection is applied?
Definition at line 144 of file AnalysisFlow.h.