00001
00002
00004 #ifndef __Inject__
00005 #define __Inject__
00006
00007 #include "Chain.h"
00008 #include "TFile.h"
00009 #include "TTree.h"
00010 #include "TGraph.h"
00011 #include "TimeDelay.h"
00012 #include "Segments.h"
00013 #include "Network.h"
00014 #include "InjRea.h"
00015
00016
00017
00018
00019 #define INJDURATIONMAX 10 // [s]
00020
00021 using namespace std;
00022
00023 class Inject {
00024
00025 public:
00026
00027 Inject(Network *aNet, const int aSampling, const int aVerbose=0);
00028 virtual ~Inject();
00029
00030
00031 bool SetInjectionSet(const string aInjRootFilePattern);
00032 inline string GetInjectionSet(void){ return InjRootFilePattern; };
00033 bool InjectSet(const int aDetIndex, const int aDataSize, double *aData, const double aTimeStart);
00034
00035
00036 bool InjectSignal(const int aDetIndex, const int aDataSize, double *aData, const double aTimeStart);
00037 bool SaveInjectionSignal(const string aRootFileName, const string aOption="recreate");
00038 bool SaveDetectorSignal(const string aRootFileName, const string aOption="recreate");
00039
00040
00041 bool SetSource(const double aTime, const double aRa, const double aDec, const double aPsi=0, const double aEcc=0);
00042 bool GenerateGauss(const double aAmplitude, const double aSigma);
00043 bool GenerateSineGauss(const double aAmplitude, const double aSigma, const double aFrequency);
00044
00045 protected:
00046
00047 bool status;
00048 int Verbose;
00049
00050
00051 Network *Net;
00052 int fSampling;
00053 int DataSize;
00054
00055
00056 InjRea *InjSet;
00057 string InjRootFilePattern;
00058
00059
00060 int InjSize;
00061 double *hplus;
00062 double *hcross;
00063 double *hdet;
00064 double *hset;
00065 double inj_time;
00066 double inj_ra;
00067 double inj_dec;
00068 double inj_psi;
00069 double inj_ecc;
00070
00071 bool ProjectSignal(const int aDetIndex, const double aTimeStart);
00072
00073
00074 double *window;
00075 bool CreateTukeyWindow(const int size);
00076
00077
00078 ClassDef(Inject,0)
00079 };
00080
00081 #endif
00082
00083