GWOLLUM  4.2.0
Tools for gravitational-wave analyses
Streams.h
Go to the documentation of this file.
1 
6 #ifndef __Streams__
7 #define __Streams__
8 
9 #include "TimeDelay.h"
10 #include "Sample.h"
11 #include "DetConst.h"
12 
13 using namespace std;
14 
22 class Streams: public Sample{
23 
24  public:
25 
37  Streams(const string aName, const unsigned int aVerbose=0);
38 
42  virtual ~Streams(void);
53  void SetName(const string aName);
54 
58  inline string GetName(void){ return Name; };
59 
63  inline string GetNamePrefix(void){ return NamePrefix; };
64 
68  inline string GetNameSuffix(void){ return NameSuffix; };
69 
74  inline string GetNameSuffixUnderScore(void){ return NameSuffixUnderScore; };
75 
79  inline string GetNameConv(void){ return NamePrefix+"-"+NameSuffixUnderScore; };
80 
88  inline string GetDirectory(const string aOutDir="."){
89  return aOutDir+"/"+Name;
90  };
91 
100  inline string GetTriggerFileName(const unsigned int aGpsStart, const unsigned int aDuration, const string aFileFormat="root", const string aProcessName="PROC", const string aOutDir="."){
101  gwl_ss<<aOutDir<<"/"<<GetNameConv()<<"_"<<aProcessName<<"-"<<aGpsStart<<"-"<<aDuration<<"."<<aFileFormat;
102  string ss_ret = gwl_ss.str();
103  gwl_ss.clear(); gwl_ss.str("");
104  return ss_ret;
105  };
106 
110  inline unsigned int GetDetectorIndex(void){ return DetIndex; };
111 
115  inline string GetDetectorPrefix(void){ return DET_PREFIX[DetIndex]; };
116 
128  void GetDetectorAMResponse(double &aFplus, double &aFcross,
129  const double aRa, const double aDec,
130  const double aPsi, const double aGmst);
131 
139  inline double GetLocalTime(const double aRa, const double aDec, const double aGeocentricTime){
140  return aGeocentricTime+TimeDelayFromEarthCenter(DetLoc, aRa, aDec, aGeocentricTime);
141  };
142 
143 protected:
144 
145  string Name;
146 
147 private:
148 
149  unsigned int verbose;
150  string NamePrefix;
151  string NameSuffix;
153  unsigned int DetIndex;
154  double Response[3][3];
155  double DetLoc[3];
156 
160  void MakeDetector(void);
161 
165  void ComputeDetectorResponse(void);
166 
167  ClassDef(Streams,0)
168 };
169 
170 #endif
171 
172 
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:22
double GetLocalTime(const double aRa, const double aDec, const double aGeocentricTime)
Converts the geocentric time to the detector local time [s].
Definition: Streams.h:139
string GetNamePrefix(void)
Returns the stream name prefix.
Definition: Streams.h:63
unsigned int DetIndex
Detector index.
Definition: Streams.h:153
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:100
string GetDetectorPrefix(void)
Returns the detector prefix for this stream.
Definition: Streams.h:115
string GetNameSuffix(void)
Returns the stream name suffix.
Definition: Streams.h:68
unsigned int GetDetectorIndex(void)
Returns the detector index for this stream.
Definition: Streams.h:110
string NameSuffixUnderScore
Stream suffix with only underscores.
Definition: Streams.h:152
string Name
Stream name.
Definition: Streams.h:141
unsigned int verbose
Verbosity level.
Definition: Streams.h:149
string NamePrefix
Stream prefix.
Definition: Streams.h:150
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:74
string GetDirectory(const string aOutDir=".")
Returns the stream directory.
Definition: Streams.h:88
string GetNameConv(void)
Returns the stream name using the LIGO-Virgo file name convention.
Definition: Streams.h:79
string GetName(void)
Returns the stream full name.
Definition: Streams.h:58
string NameSuffix
Stream suffix.
Definition: Streams.h:151