GWOLLUM 4.2.0
Tools for gravitational-wave analyses
Loading...
Searching...
No Matches
Streams.h
Go to the documentation of this file.
1
6#ifndef __Streams__
7#define __Streams__
8
9#include <TH2.h>
10#include "TimeDelay.h"
11#include "Sample.h"
12#include "DetConst.h"
13
14using namespace std;
15
23class Streams: public Sample{
24
25 public:
26
38 Streams(const string aName, const unsigned int aVerbose=0);
39
43 virtual ~Streams(void);
54 void SetName(const string aName);
55
59 inline string GetName(void){ return Name; };
60
64 inline string GetNamePrefix(void){ return NamePrefix; };
65
69 inline string GetNameSuffix(void){ return NameSuffix; };
70
75 inline string GetNameSuffixUnderScore(void){ return NameSuffixUnderScore; };
76
80 inline string GetNameConv(void){ return NamePrefix+"-"+NameSuffixUnderScore; };
81
89 inline string GetDirectory(const string aOutDir="."){
90 return aOutDir+"/"+Name;
91 };
92
101 inline string GetTriggerFileName(const unsigned int aGpsStart, const unsigned int aDuration, const string aFileFormat="root", const string aProcessName="PROC", const string aOutDir="."){
102 gwl_ss<<aOutDir<<"/"<<GetNameConv()<<"_"<<aProcessName<<"-"<<aGpsStart<<"-"<<aDuration<<"."<<aFileFormat;
103 string ss_ret = gwl_ss.str();
104 gwl_ss.clear(); gwl_ss.str("");
105 return ss_ret;
106 };
107
111 inline unsigned int GetDetectorIndex(void){ return DetIndex; };
112
116 inline string GetDetectorPrefix(void){ return DET_PREFIX[DetIndex]; };
117
129 void GetDetectorAMResponse(double &aFplus, double &aFcross,
130 const double aRa, const double aDec,
131 const double aPsi, const double aGmst);
132
140 inline double GetLocalTime(const double aRa, const double aDec, const double aGeocentricTime){
141 return aGeocentricTime+TimeDelayFromEarthCenter(DetLoc, aRa, aDec, aGeocentricTime);
142 };
143
192 bool GetSkyRingPoint(double &aThetaS, double &aPhiS, const double aGmst, const double aDeltaT, const double aOmegaS, Streams *aDprime);
193
204 inline bool GetSkyRingPointRaDec(double &aDecS, double &aRaS, const double aGmst, const double aDeltaT, const double aOmegaS, Streams *aDprime){
205 if(GetSkyRingPoint(aDecS, aRaS, aGmst, aDeltaT, aOmegaS, aDprime)==false) return false;
206 aDecS = TMath::Pi()/2.0 - aDecS;
207 return true;
208 };
209
216 TH2D* GetSkyAntennaFactor(const unsigned int aGpsTime);
217
218protected:
219
220 string Name;
221
222private:
223
224 unsigned int verbose;
225 string NamePrefix;
226 string NameSuffix;
228 unsigned int DetIndex;
229 double Response[3][3];
230 double DetLoc[3];
231
235 void MakeDetector(void);
236
240 void ComputeDetectorResponse(void);
241
242 ClassDef(Streams,0)
243};
244
245#endif
246
247
Detector constants.
Time series transformation.
double TimeDelayFromEarthCenter(const double detector_earthfixed_xyz_metres[3], double source_right_ascension_radians, double source_declination_radians, const double gpstime)
Computes difference in arrival time of the same signal at detector and at center of Earth-fixed frame...
Definition TimeDelay.cc:55
See Measure of time delay.
Transform discrete time series.
Definition Sample.h:162
Manage streams.
Definition Streams.h:23
bool GetSkyRingPointRaDec(double &aDecS, double &aRaS, const double aGmst, const double aDeltaT, const double aOmegaS, Streams *aDprime)
Returns the sky position of a GW signal when detected by two detectors (radec).
Definition Streams.h:204
void MakeDetector(void)
Associates detector's properties to the stream (based on prefix).
Definition Streams.cc:228
double GetLocalTime(const double aRa, const double aDec, const double aGeocentricTime)
Converts the geocentric time to the detector local time [s].
Definition Streams.h:140
string GetNamePrefix(void)
Returns the stream name prefix.
Definition Streams.h:64
unsigned int DetIndex
Detector index.
Definition Streams.h:228
string GetTriggerFileName(const unsigned int aGpsStart, const unsigned int aDuration, const string aFileFormat="root", const string aProcessName="PROC", const string aOutDir=".")
Returns the stream trigger file name.
Definition Streams.h:101
void SetName(const string aName)
Sets a new name to the stream.
Definition Streams.cc:28
string GetDetectorPrefix(void)
Returns the detector prefix for this stream.
Definition Streams.h:116
string GetNameSuffix(void)
Returns the stream name suffix.
Definition Streams.h:69
unsigned int GetDetectorIndex(void)
Returns the detector index for this stream.
Definition Streams.h:111
bool GetSkyRingPoint(double &aThetaS, double &aPhiS, const double aGmst, const double aDeltaT, const double aOmegaS, Streams *aDprime)
Returns the sky position of a GW signal when detected by two detectors.
Definition Streams.cc:113
double DetLoc[3]
Detector location (vertex) on Earth.
Definition Streams.h:230
string NameSuffixUnderScore
Stream suffix with only underscores.
Definition Streams.h:227
void GetDetectorAMResponse(double &aFplus, double &aFcross, const double aRa, const double aDec, const double aPsi, const double aGmst)
Computes antenna factors and .
Definition Streams.cc:64
void ComputeDetectorResponse(void)
Computes the detector spatial response matrix.
Definition Streams.cc:246
TH2D * GetSkyAntennaFactor(const unsigned int aGpsTime)
Returns the sky map of the detector antenna factor for a given time.
Definition Streams.cc:194
string Name
Stream name.
Definition Streams.h:220
unsigned int verbose
Verbosity level.
Definition Streams.h:224
string NamePrefix
Stream prefix.
Definition Streams.h:225
virtual ~Streams(void)
Destructor of the Streams class.
Definition Streams.cc:21
Streams(const string aName, const unsigned int aVerbose=0)
Constructor of the Streams class.
string GetNameSuffixUnderScore(void)
Returns the stream name suffix with only underscores.
Definition Streams.h:75
string GetDirectory(const string aOutDir=".")
Returns the stream directory.
Definition Streams.h:89
double Response[3][3]
Detector response.
Definition Streams.h:229
string GetNameConv(void)
Returns the stream name using the LIGO-Virgo file name convention.
Definition Streams.h:80
string GetName(void)
Returns the stream full name.
Definition Streams.h:59
string NameSuffix
Stream suffix.
Definition Streams.h:226