14 cout <<
"Starting reading output directory ..." << endl;
16 int nfile = fileList.size();
17 for(
int n=0;
n<nfile;
n++) {
31 TFile*
ifile =
new TFile(fName);
32 if(ifile==NULL) {cout <<
"Error opening root file : " << fName.Data() << endl;
exit(1);}
42 cout <<
"cwb::InitNetwork - Error : net is not contained in root file " << fName.Data() << endl;
47 if(ifile->Get(
"config")!=NULL) {
59 char cdrms_name[32];
sprintf(cdrms_name,
"rms-f%d",0);
68 {cout <<
"Error : strain rms not present, job terminated!!!" << endl;
exit(1);}
77 DumpToFile(pD[
n]->nRMS, -1., &CFG, &NET, pD[
n]->Name, fName);
99 double fNinquist = rate/2.;
111 const double scale = 1./nRMS.
wrate();
115 igps = (nRMS.
stop()-nRMS.
start())/scale/2;
116 gps = nRMS.
start()+igps*scale;
118 igps = (gps-nRMS.
start())/scale + 1;
121 int N = nRMS.
size()/(M+1);
130 fName.ReplaceAll(
"cstrain_",
"nrms_");
131 fName.ReplaceAll(
".root",
".txt");
132 cout << endl <<
"Dump nRMS " <<
" : " << fName << endl;
136 if(!out.good()) {cout <<
"Error Opening File : " << fName << endl;
exit(1);}
139 double rescale = oneside ? sqrt(2.)/sqrt(inRate) : 1./sqrt(inRate);
141 double df=fNinquist/
M;
142 for(
int j=1;
j<
M; ++
j) {
143 double f =
j*df+df/2.;
144 if(f<flow || f>fhigh)
continue;
147 for(
int i=0;
i<
N;
i++) rms += nRMS.
data[
i*(M+1)+
j]*rescale;
150 rms = nRMS.
data[igps*(M+1)+
j]*rescale;
152 out <<
j*df+df/2. <<
" " << rms << endl;
160 sprintf(cmd,
"export CWB_SENSITIVITY_FILE_NAME=\"%s\";",fName.Data());
161 sprintf(cmd,
"%s export CWB_SENSITIVITY_SAVE_PLOT=%d;",cmd,1);
162 sprintf(cmd,
"%s export CWB_SENSITIVITY_RANGE_FIX=%d;",cmd,1);
163 sprintf(cmd,
"%s root -n -l -b ${CWB_MACROS}/cwb_draw_sensitivity.C",cmd);
164 cout << cmd << endl; gSystem->Exec(cmd);
detector * getifo(size_t n)
param: detector index
virtual void rate(double r)
WDM< double > wdm(nLAYERS, nLAYERS, 6, 10)
virtual void start(double s)
cout<< "SNR "<< xsnr<< endl;wavearray< double > f
network ** net
NOISE_MDC_SIMULATION.
virtual size_t size() const
void ReadFile(TString fName)
cout<< "Starting reading output directory ..."<< endl;vector< TString > fileList
virtual void stop(double s)
sprintf(tfres,"(1/%g)x(%g) (sec)x(Hz)", 2 *df, df)
WaveDWT< DataType_t > * pWavelet
void DumpToFile(WSeries< double > &nRMS, double gps, CWB::config *cfg, network *net, TString ifo, TString fName)