Omicron  4.2.0
An algorithm to detect and characterize transient events in gravitational-wave detectors
Loading...
Searching...
No Matches
OxOmicron Class Reference

Omicron for Ox analyses. More...

#include <OxOmicron.h>

Inheritance diagram for OxOmicron:
Collaboration diagram for OxOmicron:

Public Member Functions

bool CreateOutputFile (string &aOutFileName, const unsigned int aTime)
 Creates an ouput file.
 
unsigned int GetAnalysisDuration (void)
 Returns the Ox analysis duration [s].
 
Long64_t GetEntries (const unsigned int aDetectorIndex)
 Returns the number of Omicron results.
 
int GetEntry (const unsigned int aDetectorIndex, Long64_t aEntry)
 Loads an entry in the Omicron results.
 
double GetLightTravelTime (void)
 Returns the light travel time between the two detectors.
 
string GetOmicronChannelName (const unsigned int aDetectorIndex)
 Returns the Omicron channel name.
 
unsigned int GetOmicronChunkDuration (void)
 Returns the Omicron chunk duration [s].
 
unsigned int GetOmicronEndTime (const unsigned int aDetectorIndex)
 Returns the end time of the current Omicron entry.
 
unsigned int GetOmicronOverlapDuration (void)
 Returns the Omicron overlap duration [s].
 
unsigned int GetOmicronQ (const unsigned int aQindex)
 Returns Q value of a given Q plane.
 
unsigned int GetOmicronQN (void)
 Returns the number of Omicron Q planes.
 
double GetOmicronSnrSqMax (const unsigned int aDetectorIndex)
 Returns the maximum SNR squared of the current Omicron entry.
 
unsigned int GetOmicronStartTime (const unsigned int aDetectorIndex)
 Returns the start time of the current Omicron entry.
 
bool Process (const unsigned int aDetectorIndex, const unsigned int aTimeStart, const bool aResetPsd)
 Runs the Omicron analysis.
 
Constructors and destructors
 OxOmicron (const string aOptionFile, const unsigned int aGpsRef)
 Constructor of the OxOmicron class.
 
virtual ~OxOmicron (void)
 Destructor of the OxOmicron class.
 
- Public Member Functions inherited from OxInit
void AttachTree (TTree *aTree)
 Attach a TTree to the output file.
 
void CloseOutputFile (void)
 Closes the current ouput file (if any).
 
bool CreateOutputFile (string &aOutFileName, const unsigned int aTime)
 Creates an ouput file.
 
string GetName (void)
 Returns the object name.
 
string GetOutputDirectory (void)
 Returns the path to the output directory.
 
unsigned int GetOxFileN (void)
 Returns the number of Ox files.
 
bool GetStatus (void)
 Returns the class status.
 
 OxInit (const string aOptionFile)
 Constructor of the OxInit class.
 
virtual ~OxInit (void)
 Destructor of the OxInit class.
 

Protected Member Functions

int FillTree (const unsigned int aDetectorIndex)
 Fills the output tree with the current Omicron event.
 
- Protected Member Functions inherited from OxInit
void AddOptions (void)
 Adds options from the text file.
 
void DefineOption (const string aTag, const string aKey, const double aDefaultValue, const unsigned int aSize)
 Defines an option (double).
 
void DefineOption (const string aTag, const string aKey, const int aDefaultValue, const unsigned int aSize)
 Defines an option (integer).
 
void DefineOption (const string aTag, const string aKey, const string aDefaultValue, const unsigned int aSize)
 Defines an option (string).
 
void DefineOption (const string aTag, const string aKey, const unsigned int aDefaultValue, const unsigned int aSize)
 Defines an option (unsigned integer).
 
string GetOxFileName (const unsigned int aFileIndex)
 Returns the path to the Ox file.
 
void OverloadOption (const string aTag, const string aKey)
 Overloads an option using the text file as a reference.
 

Protected Attributes

Streams * detector [2]
 Detector streams.
 
Omicronomicron [2]
 Omicron objects (detector 0 and 1).
 
TTree * oxo_tree [2]
 TTree: Omicron results. Do not delete as it is owned by the output file.
 
TChain * oxo_tree_read [2]
 TChain: Omicron results (read-only).
 
- Protected Attributes inherited from OxInit
GwollumOptions * ox_opt
 List of options.
 
bool status
 Class status.
 

Private Member Functions

bool CheckOmicron (void)
 Checks the consistency between the 2 Omicron objects.
 
OmicronCreateOmicron (const unsigned int aDetectorIndex, const unsigned int aGpsRef)
 Creates the Omicron object for a given detector.
 

Private Attributes

double light_travel_time
 Light travel time between detectors.
 
double oxo_snrsq [2]
 TTree: Maximum squared SNR.
 
unsigned int oxo_start_time [2]
 TTree: Omicron start time (removing padding).
 

Detailed Description

Omicron for Ox analyses.

This class is designed to manage the Omicron analysis for Ox. Two Omicron objects are created by the constructor, one for each detector. Call Process() to run the Omicron analysis and generate spectrograms.

The Omicron options can either be provided by two option files or by a list of Ox files. The results of the Omicron analysis is saved in TTree in Ox files: see CreateOutputFile().

Constructor & Destructor Documentation

◆ OxOmicron()

OxOmicron::OxOmicron ( const string  aOptionFile,
const unsigned int  aGpsRef 
)

Constructor of the OxOmicron class.

The list of options is given in a text file. They are identified with a set of tag and key words:

  • OXO OPTIONS: path to the omicron option files for the first and second detectors.
  • OXO FFL0: path to the FFL file for the first detector. This option is used to overwrite what is read from Ox files (if any).
  • OXO FFL1: path to the FFL file for the second detector. This option is used to overwrite what is read from Ox files (if any).
  • OXO INJGEN: path to the InjGen file with injections. This option is used to overwrite what is read from Ox files (if any).
See also
OxInit::OxInit() for additional options.

Two Omicron objects are created with CreateOmicron().

Warning
The two Omicron objects must have the same parameter set: see CheckOmicron().

If Ox files are provided (see OxInit::OxInit()), the Omicron results can also be read with this class.

Parameters
[in]aOptionFilePath to the option file.
[in]aGpsRefReference GPS time to intiate Omicron objects.

◆ ~OxOmicron()

OxOmicron::~OxOmicron ( void  )
virtual

Destructor of the OxOmicron class.

Member Function Documentation

◆ CheckOmicron()

bool OxOmicron::CheckOmicron ( void  )
private

Checks the consistency between the 2 Omicron objects.

Conditions to meet:

  • The Omicron objects must be valid
  • There must be exactly 1 channel per Omicron object.
  • The analysis timing must be the same.
  • The tiling structure must be the same.
  • The sampling frequency must be the same.
Returns
true if the omicron objects are consistent.

◆ CreateOmicron()

Omicron * OxOmicron::CreateOmicron ( const unsigned int  aDetectorIndex,
const unsigned int  aGpsRef 
)
private

Creates the Omicron object for a given detector.

If no Ox files are provided, the omicron object is created using the option text file provided with OXO/OPTIONS. With Ox files, the Omicron object is created using the Omicron options saved in the Ox files.

Note
The list of Omicron options are dumped in a text file (ox.omicron.[0/1].[GPS].opt) in the output directory.
Parameters
[in]aDetectorIndexDetector index: 0 = first detector, 1 = second detector.
[in]aGpsRefReference GPS time to initiate the Omicron object

◆ CreateOutputFile()

bool OxOmicron::CreateOutputFile ( string &  aOutFileName,
const unsigned int  aTime 
)

Creates an ouput file.

A new ROOT file is opened in the output directory to save the Ox analysis results (OxInit::CreateOutputFile()). The Omicron option TTrees are written in the file with the names "omicron0_options" and "omicron1_options" for the first and second detector respectively. The Omicron TTree "oxo" is initialized in the ouput file.

See also
OxInit::CreateOutputFile() for the file management.
Parameters
[out]aOutFileNameOutput ROOT file name.
[in]aTimeTime used to name the ouput file.

◆ FillTree()

int OxOmicron::FillTree ( const unsigned int  aDetectorIndex)
inlineprotected

Fills the output tree with the current Omicron event.

Returns
The function returns the number of bytes committed to the individual branches.
Parameters
[in]aDetectorIndexDetector index: 0 = first detector, 1 = second detector.

◆ GetAnalysisDuration()

unsigned int OxOmicron::GetAnalysisDuration ( void  )
inline

Returns the Ox analysis duration [s].

The Ox analysis duration is the duration of Omicron spectrograms excluding the overlap between analysis windows.

◆ GetEntries()

Long64_t OxOmicron::GetEntries ( const unsigned int  aDetectorIndex)
inline

Returns the number of Omicron results.

Parameters
[in]aDetectorIndexDetector index: 0 = first detector, 1 = second detector.
Precondition
The detector index must be valid.

◆ GetEntry()

int OxOmicron::GetEntry ( const unsigned int  aDetectorIndex,
Long64_t  aEntry 
)
inline

Loads an entry in the Omicron results.

Returns
The function returns the number of bytes read from the input buffer. If entry does not exist the function returns 0. If an I/O error occurs, the function returns -1.
Parameters
[in]aDetectorIndexDetector index: 0 = first detector, 1 = second detector.
[in]aEntryEntry number.
Precondition
The detector index must be valid.

◆ GetLightTravelTime()

double OxOmicron::GetLightTravelTime ( void  )
inline

Returns the light travel time between the two detectors.

◆ GetOmicronChannelName()

string OxOmicron::GetOmicronChannelName ( const unsigned int  aDetectorIndex)
inline

Returns the Omicron channel name.

Parameters
[in]aDetectorIndexDetector index: 0 = first detector, 1 = second detector.
Precondition
The detector index must be valid.

◆ GetOmicronChunkDuration()

unsigned int OxOmicron::GetOmicronChunkDuration ( void  )
inline

Returns the Omicron chunk duration [s].

◆ GetOmicronEndTime()

unsigned int OxOmicron::GetOmicronEndTime ( const unsigned int  aDetectorIndex)
inline

Returns the end time of the current Omicron entry.

Parameters
[in]aDetectorIndexDetector index: 0 = first detector, 1 = second detector.
Precondition
The detector index must be valid.

◆ GetOmicronOverlapDuration()

unsigned int OxOmicron::GetOmicronOverlapDuration ( void  )
inline

Returns the Omicron overlap duration [s].

◆ GetOmicronQ()

unsigned int OxOmicron::GetOmicronQ ( const unsigned int  aQindex)
inline

Returns Q value of a given Q plane.

Parameters
[in]aQindexQ plane index.
Precondition
The Qplane index must be valid.

◆ GetOmicronQN()

unsigned int OxOmicron::GetOmicronQN ( void  )
inline

Returns the number of Omicron Q planes.

◆ GetOmicronSnrSqMax()

double OxOmicron::GetOmicronSnrSqMax ( const unsigned int  aDetectorIndex)
inline

Returns the maximum SNR squared of the current Omicron entry.

Parameters
[in]aDetectorIndexDetector index: 0 = first detector, 1 = second detector.
Precondition
The detector index must be valid.

◆ GetOmicronStartTime()

unsigned int OxOmicron::GetOmicronStartTime ( const unsigned int  aDetectorIndex)
inline

Returns the start time of the current Omicron entry.

Parameters
[in]aDetectorIndexDetector index: 0 = first detector, 1 = second detector.
Precondition
The detector index must be valid.

◆ Process()

bool OxOmicron::Process ( const unsigned int  aDetectorIndex,
const unsigned int  aTimeStart,
const bool  aResetPsd 
)

Runs the Omicron analysis.

The Omicron analysis of the chunk starting at a given GPS time is performed:

The analysis results are saved in the Omicron TTree: FillTree().

Returns
true if all the processing steps were successful.
Parameters
[in]aDetectorIndexDetector index: 0 = first detector, 1 = second detector.
[in]aTimeStartChunk GPS time start [s].
[in]aResetPsdFlag to reset the PSD estimation.

Member Data Documentation

◆ detector

Streams* OxOmicron::detector[2]
protected

Detector streams.

◆ light_travel_time

double OxOmicron::light_travel_time
private

Light travel time between detectors.

◆ omicron

Omicron* OxOmicron::omicron[2]
protected

Omicron objects (detector 0 and 1).

◆ oxo_snrsq

double OxOmicron::oxo_snrsq[2]
private

TTree: Maximum squared SNR.

◆ oxo_start_time

unsigned int OxOmicron::oxo_start_time[2]
private

TTree: Omicron start time (removing padding).

◆ oxo_tree

TTree* OxOmicron::oxo_tree[2]
protected

TTree: Omicron results. Do not delete as it is owned by the output file.

◆ oxo_tree_read

TChain* OxOmicron::oxo_tree_read[2]
protected

TChain: Omicron results (read-only).


The documentation for this class was generated from the following files: