24 #include "TDocOutput.h" 32 #include "TRotation.h" 33 #include "TPolyLine.h" 35 #include "Math/Rotation3D.h" 36 #include "Math/Vector3Dfwd.h" 45 #define REPLACE(STRING,DIR,EXT) TString(STRING).ReplaceAll("/","").ReplaceAll(DIR,"").ReplaceAll("."+TString(EXT),"") 61 int bLag = LAG<0 ? 0 : LAG;
62 int eLag = LAG<0 ?
NET->
nLag : LAG+1;
64 factor = factor<=0 ? 1 :
fabs(factor);
72 watplot PTS(const_cast<char*>(
"ptswrc"),200,20,800,500);
81 std::vector<float>* vP;
105 for(
int lag=bLag; lag<eLag; lag++){
108 if(!p->
size())
continue;
110 if(
NET->
MRA) clusterID_net = p->
get((
char*)
"ID",0,
'S',0);
111 else clusterID_net = p->
get((
char*)
"ID",0,
'S',1);
112 K = clusterID_net.
size();
120 ID = size_t(clusterID_net.
data[k]+0.1);
121 if((iID)&&(ID!=iID))
continue;
128 {cout<<
"netevent::output(): incorrect search option"<<endl;
exit(1);}
157 int idSize = pd->
RWFID.size();
159 for (
int mm=0; mm<idSize; mm++)
if (pd->
RWFID[mm]==(
int)ID) wfIndex=mm;
161 for(j=0; j<
int(nIFO); j++) {
171 pwfINJ[
j] = INJ.
pwf[
j];
172 if (pwfINJ[j]==NULL) {
173 cout <<
"Error : Injected waveform not saved !!! : detector " 178 cout <<
"Error : Reconstructed waveform not saved !!! : ID -> " 179 << ID <<
" : detector " <<
NET->
ifoName[
j] << endl;
182 if (wfIndex>=0) pwfREC[
j] = pd->
RWFP[wfIndex];
191 double rescale = 1./pow(sqrt(2.),TMath::Log2(inRate/wfINJ->
rate()));
192 *wfINJ*=rescale; *wfREC*=rescale;
194 double bINJ = wfINJ->
start();
195 double eINJ = wfINJ->
start()+wfINJ->
size()/R;
196 double bREC = wfREC->
start();
197 double eREC = wfREC->
start()+wfREC->
size()/R;
202 int oINJ = bINJ>bREC ? 0 :
int((bREC-bINJ)*R+0.5);
203 int oREC = bINJ<bREC ? 0 :
int((bINJ-bREC)*R+0.5);
206 double startXCOR = bINJ>bREC ? bINJ : bREC;
207 double endXCOR = eINJ<eREC ? eINJ : eREC;
208 int sizeXCOR =
int((endXCOR-startXCOR)*R+0.5);
211 if (sizeXCOR<=0)
continue;
216 for (
int i=0;i<(
int)wfINJ->
size();i++) enINJ+=wfINJ->
data[i]*wfINJ->
data[i];
221 for (
int i=0;i<sizeXCOR;i++) enREC+=wfREC->
data[i+oREC]*wfREC->
data[i+oREC];
223 double xcorINJ_REC=0;
224 for (
int i=0;i<sizeXCOR;i++) xcorINJ_REC+=wfINJ->
data[i+oINJ]*wfREC->
data[i+oREC];
227 wfREC_SUB_INJ.
resize(sizeXCOR);
228 for (
int i=0;i<sizeXCOR;i++) wfREC_SUB_INJ.data[i]=wfREC->
data[i+oREC]-wfINJ->
data[i+oINJ];
229 wfREC_SUB_INJ.start(startXCOR);
230 wfREC_SUB_INJ.rate(wfREC->
rate());
241 bool batch = gROOT->IsBatch();
242 gROOT->SetBatch(
true);
245 double optRate = (p->
cRate[ID-1])[0];
246 double optLayer = p->
rate/optRate;
247 double optLevel =
int(log10(optLayer)/log10(2));
257 if(sbasedirCED!=NULL) wfINJ->wavearray<double>::Dump(const_cast<char*>(fname),2);
262 if(sbasedirCED!=NULL) wfREC->wavearray<double>::Dump(const_cast<char*>(fname),2);
272 PTS.
plot(wfINJ, const_cast<char*>(
"ALP"), 1, bT, eT);
274 PTS.
graph[0]->SetLineWidth(1);
275 PTS.
graph[0]->GetXaxis()->SetTitle(xtitle);
276 if(bT<(startXCOR-
EVT->
gps[0])) bT=startXCOR-
EVT->
gps[0];
278 PTS.
plot(wfREC, const_cast<char*>(
"SAME"), 2, bT, eT);
280 PTS.
graph[1]->SetLineWidth(2);
281 gmin = TMath::Min(PTS.
graph[0]->GetHistogram()->GetMinimum(),PTS.
graph[1]->GetHistogram()->GetMinimum());
282 gmax = TMath::Max(PTS.
graph[0]->GetHistogram()->GetMaximum(),PTS.
graph[1]->GetHistogram()->GetMaximum());
283 PTS.
graph[0]->GetYaxis()->SetRangeUser(0.9*gmin,1.1*gmax);
286 if(sbasedirCED!=NULL) PTS.
canvas->Print(fname);
else PTS.
canvas->Write(
REPLACE(fname,dirCED,gtype));
292 PTS.
canvas->SetLogy(
true);
297 PTS.
plot(wfINJ, const_cast<char*>(
"ALP"), 1,
300 PTS.
graph[0]->SetLineWidth(1);
301 PTS.
plot(wfREC, const_cast<char*>(
"SAME"), 2,
304 PTS.
graph[1]->SetLineWidth(2);
305 gmin = TMath::Min(PTS.
graph[0]->GetHistogram()->GetMinimum(),PTS.
graph[1]->GetHistogram()->GetMinimum());
306 gmax = TMath::Max(PTS.
graph[0]->GetHistogram()->GetMaximum(),PTS.
graph[1]->GetHistogram()->GetMaximum());
307 PTS.
graph[0]->GetYaxis()->SetRangeUser(0.9*gmin,1.1*gmax);
310 if(sbasedirCED!=NULL) PTS.
canvas->Print(fname);
else PTS.
canvas->Write(
REPLACE(fname,dirCED,gtype));
312 PTS.
canvas->SetLogx(
false);
313 PTS.
canvas->SetLogy(
false);
316 wfREC_SUB_INJ.start(wfREC_SUB_INJ.start()-
EVT->
gps[0]);
318 PTS.
plot(wfREC, const_cast<char*>(
"ALP"), 2,
320 PTS.
graph[0]->SetLineWidth(1);
321 PTS.
graph[0]->GetXaxis()->SetTitle(xtitle);
322 PTS.
plot(wfREC_SUB_INJ, const_cast<char*>(
"SAME"), 1,
324 PTS.
graph[1]->SetLineWidth(2);
325 gmin = TMath::Min(PTS.
graph[0]->GetHistogram()->GetMinimum(),PTS.
graph[1]->GetHistogram()->GetMinimum());
326 gmax = TMath::Max(PTS.
graph[0]->GetHistogram()->GetMaximum(),PTS.
graph[1]->GetHistogram()->GetMaximum());
327 PTS.
graph[0]->GetYaxis()->SetRangeUser(0.9*gmin,1.1*gmax);
328 wfREC_SUB_INJ.start(wfREC_SUB_INJ.start()+
EVT->
gps[0]);
330 if(sbasedirCED!=NULL) PTS.
canvas->Print(fname);
else PTS.
canvas->Write(
REPLACE(fname,dirCED,gtype));
336 PTS.
canvas->SetLogy(
true);
339 wfREC_SUB_INJ.start(wfREC_SUB_INJ.start()-
EVT->
gps[0]);
341 PTS.
plot(wfREC, const_cast<char*>(
"ALP"), 2,
344 PTS.
graph[0]->SetLineWidth(1);
345 PTS.
plot(wfREC_SUB_INJ, const_cast<char*>(
"SAME"), 1,
348 PTS.
graph[1]->SetLineWidth(2);
349 gmin = TMath::Min(PTS.
graph[0]->GetHistogram()->GetMinimum(),PTS.
graph[1]->GetHistogram()->GetMinimum());
350 gmax = TMath::Max(PTS.
graph[0]->GetHistogram()->GetMaximum(),PTS.
graph[1]->GetHistogram()->GetMaximum());
351 PTS.
graph[0]->GetYaxis()->SetRangeUser(0.9*gmin,1.1*gmax);
352 wfREC_SUB_INJ.start(wfREC_SUB_INJ.start()+
EVT->
gps[0]);
354 if(sbasedirCED!=NULL) PTS.
canvas->Print(fname);
else PTS.
canvas->Write(
REPLACE(fname,dirCED,gtype));
356 PTS.
canvas->SetLogx(
false);
357 PTS.
canvas->SetLogy(
false);
362 int xcor_length = sizeXCOR/wfINJ->
rate();
363 int wts_size = xcor_length<8 ? 16 : 16*
int(1+xcor_length/8.);
364 wts_size*=wfINJ->
rate();
378 for (
int m=0;m<sizeXCOR;m++)
379 if(m<(
int)xINJ.
size()/2) xINJ.
data[m+wts_size/2]=wfINJ->
data[m+oINJ];
383 double wts_start,wts_stop;
385 double rescale = 2.*pow(sqrt(2.),TMath::Log2(inRate/
wINJ.
rate()));
386 double wts_offset = wfINJ->
start()-double(oINJ+wts_size/2)/wfINJ->
rate();
387 TString xtitle = TString::Format(
"Time (sec) : GPS OFFSET = %.3f",wts_offset);
394 else wINJ.Forward(optLevel);
396 wts_stop = sizeXCOR<wts_size/2 ? wts_start+sizeXCOR/
wINJ.
rate() : wts_start+(wts_size/2)/
wINJ.
rate();
397 WTS.
plot(&
wINJ, 1, wts_start, wts_stop,const_cast<char*>(
"COLZ"));
399 WTS.
hist2D->Scale(2*rescale);
401 WTS.
hist2D->GetXaxis()->SetTitle(xtitle);
402 WTS.
hist2D->GetXaxis()->CenterTitle(
false);
403 if(sbasedirCED!=NULL) WTS.
canvas->Print(fname);
else WTS.
canvas->Write(
REPLACE(fname,dirCED,gtype));
410 for (
int m=0;m<sizeXCOR;m++)
411 if(m<(
int)xREC.
size()/2) xREC.
data[m+wts_size/2]=wfREC->
data[m+oREC];
420 else wREC.Forward(optLevel);
421 wts_start =
wREC.start()+(double)(wts_size/2)/
wREC.rate();
422 wts_stop = sizeXCOR<wts_size/2 ? wts_start+sizeXCOR/
wREC.rate() : wts_start+(wts_size/2)/
wREC.rate();
423 WTS.
plot(&
wREC, 1, wts_start, wts_stop,const_cast<char*>(
"COLZ"));
425 WTS.
hist2D->Scale(2*rescale);
427 WTS.
hist2D->GetXaxis()->SetTitle(xtitle);
428 WTS.
hist2D->GetXaxis()->CenterTitle(
false);
429 if(sbasedirCED!=NULL) WTS.
canvas->Print(fname);
else WTS.
canvas->Write(
REPLACE(fname,dirCED,gtype));
436 for (
int m=0;m<sizeXCOR;m++)
437 if(m<(
int)xDIF.
size()/2) xDIF.
data[m+wts_size/2]=wfREC->
data[m+oREC]-wfINJ->
data[m+oINJ];
446 else wDIF.Forward(optLevel);
447 wts_start = wDIF.start()+(double)(wts_size/2)/wDIF.rate();
448 wts_stop = sizeXCOR<wts_size/2 ? wts_start+sizeXCOR/wDIF.rate() : wts_start+(wts_size/2)/wDIF.rate();
449 WTS.
plot(&wDIF, 2, wts_start, wts_stop,const_cast<char*>(
"COLZ"));
451 if(sbasedirCED!=NULL) WTS.
canvas->Print(fname);
else WTS.
canvas->Write(
REPLACE(fname,dirCED,gtype));
454 double t1 = wDIF.start();
455 double t2 = wDIF.start()+wDIF.size()/wDIF.rate();
457 int ni = 1<<wDIF.pWavelet->m_Level;
458 int nb =
int((t1-wDIF.start())*wDIF.rate()/ni);
459 int nj =
int((t2-t1)*wDIF.rate())/ni;
469 for(
int m=0;m<ni;m++) {
470 wINJ.getLayer(wlINJ,m);
471 wREC.getLayer(wlREC,m);
472 wDIF.getLayer(wlDIF,m);
473 for(
int k=nb;k<ne;k++) {
489 WTS.
canvas->SetLogy(
false);
490 gROOT->SetBatch(batch);
493 *wfINJ*=1./rescale; *wfREC*=1./rescale;
520 bool batch = gROOT->IsBatch();
521 gROOT->SetBatch(
true);
533 for(j=0; j<
int(vP->size()); j++) {
539 skyprob.
set(k,(*vP)[j]);
541 ra = skyprob.
getRA(i);
543 skyprobcc.
set(k,(*vP)[j]);
548 if(skyprobcc.
getType()&&(sbasedirCED!=NULL)) {
549 sprintf(fname,
"%s/skyprobcc.%s", dirCED,
"fits");
553 if(
NET->
like()==
'2') analysis=
"2G";
554 if(
NET->
MRA) analysis+=
":MRA";
559 char configur[64]=
"";
561 if (search==
'r')
sprintf(configur,
"%s un-modeled",analysis.Data());
563 if((search==
'i')||(search==
'I'))
sprintf(configur,
"%s elliptical",analysis.Data());
564 if((search==
's')||(search==
'S'))
sprintf(configur,
"%s linear",analysis.Data());
565 if((search==
'g')||(search==
'G'))
sprintf(configur,
"%s circular",analysis.Data());
567 if (search==
'i')
sprintf(configur,
"%s iota-wave",analysis.Data());
568 if (search==
'p')
sprintf(configur,
"%s psi-wave",analysis.Data());
569 if((search==
'l')||(search==
's'))
sprintf(configur,
"%s linear",analysis.Data());
570 if((search==
'c')||(search==
'g'))
sprintf(configur,
"%s circular",analysis.Data());
571 if((search==
'e')||(search==
'b'))
sprintf(configur,
"%s elliptical",analysis.Data());
573 skyprobcc.Dump2fits(fname,
EVT->
time[0],configur,const_cast<char*>(
"PROB"),const_cast<char*>(
"pix-1"),
'C');
583 double S = 4*pi*pow(180/pi,2);
586 for(
int l=0;
l<
L;
l++) {
587 double prob = gSM.
get(
l);
589 if(prob==0) gSM.
set(
l,1
e-40);
595 hsm->GetZaxis()->SetTitleOffset(0.85);
596 hsm->GetZaxis()->SetTitleSize(0.03);
597 sprintf(fname,
"%s/skyprobcc.%s", dirCED,
"png");
598 if(sbasedirCED!=NULL) gSM.
Print(fname);
else gSM.Write(
REPLACE(fname,dirCED,gtype));
600 gROOT->SetBatch(batch);
614 cout <<
"CWB::ced::Write : No injected events found -> force simulation=0" << endl;
618 char home_ced_path[1024]=
"~waveburst/WWW/LSC/waveburst/ced";
619 char home_ced_www[1024]=
"";
623 if(
NET->
like()==
'2') analysis=
"2G";
625 else analysis+=
":MRA";
634 bool batch = gROOT->IsBatch();
635 gROOT->SetBatch(
true);
639 watplot PTS(const_cast<char*>(
"pts"),200,20,800,500);
643 int optRate,optLayer,optLevel;
645 TMarker inj; inj.SetMarkerStyle(29);
646 TMarker INJ; INJ.SetMarkerStyle(30);
647 TMarker rec; rec.SetMarkerStyle(29);
648 TMarker REC; REC.SetMarkerStyle(30);
649 TMarker det; det.SetMarkerStyle(20);
650 TMarker DET; DET.SetMarkerStyle(24);
655 char dirCED[1024]=
"";
662 double eventTime[
NIFO];
663 double lagTime[
NIFO];
664 double startSegTime,stopSegTime;
682 for(n=0; n<
nIFO; n++) {
687 TMath::Sort(nIFO,ifoid,sortid,
false);
690 if(sbasedirCED!=NULL) {
691 sprintf(command,
"mkdir -p %s",sbasedirCED);
692 if(gSystem->Exec(command))
return 0;
699 id =
NET->
getwc(k)->
get(const_cast<char*>(
"ID"), 0,
'L', rate);
700 tm =
NET->
getwc(k)->
get(const_cast<char*>(
"TIME"), 0,
'L', 0);
703 for(j=0; j<(
int)
id.
size(); j++) {
705 ID = size_t(
id.data[j]+0.5);
712 if(
EVT->
rho[analysis==
"1G"?1:0] <
rho)
continue;
715 int lagMin=2147483647;
721 if(sbasedirCED!=NULL) {
724 sprintf(dirCED,
"%s/%s", sbasedirCED, ifostr);
726 sprintf(command,
"mkdir -p %s",dirCED);
727 if(gSystem->Exec(command))
return 0;
729 if (getenv(
"HOME_CED_WWW")!=NULL) {
730 sprintf(home_ced_www,
"%s",getenv(
"HOME_CED_WWW"));
732 if (getenv(
"HOME_CED_PATH")!=NULL) {
733 sprintf(home_ced_path,
"%s",getenv(
"HOME_CED_PATH"));
737 if(
TString(home_ced_www).BeginsWith(
"/")) {
738 if(!
simulation)
sprintf(command,
"cp %s/index/cedindex_%s.html %s/index.html",home_ced_path,ifostr,dirCED);
739 else sprintf(command,
"cp %s/index/cedindex_sim_%s.html %s/index.html",home_ced_path,ifostr,dirCED);
741 if(!
simulation)
sprintf(command,
"ln -s %s/index/cedindex_%s.html %s/index.html",home_ced_path,ifostr,dirCED);
742 else sprintf(command,
"ln -s %s/index/cedindex_sim_%s.html %s/index.html",home_ced_path,ifostr,dirCED);
744 if(gSystem->Exec(command))
return 0;
750 rbasedirCED->cd(); rbasedirCED->mkdir(dirCED)->cd();
757 if(
EVT->
rho[analysis==
"1G"?1:0] <
rho)
continue;
766 if(sbasedirCED!=NULL) {
767 sprintf(fname,
"%s/eventDump.txt", dirCED);
770 int rnID =
int(gRandom->Rndm(13)*1.e9);
771 UserGroup_t*
uinfo = gSystem->GetUserInfo();
773 gSystem->Exec(
TString(
"mkdir -p /dev/shm/")+uname);
774 sprintf(fname,
"/dev/shm/%s/eventDump-%d.txt",uname.Data(),rnID);
776 EVT->
dopen(fname,const_cast<char*>(
"w"));
781 Write(factor,ID,k,dirCED);
783 if(sbasedirCED==NULL) {
785 macro.Write(
"eventDump.txt");
786 gSystem->Exec(
TString(
"rm ")+fname);
791 for(n=0; n<
nIFO; n++) minTime = ((eventTime[n]-
EVT->
gps[n])<minTime) ? eventTime[
n]-
EVT->
gps[
n] : minTime;
792 for(n=0; n<
nIFO; n++) minTimeDet = ((eventTime[n]-
EVT->
gps[n])<=minTime) ?
n : minTimeDet;
793 for(n=0; n<
nIFO; n++) lagTime[n]=eventTime[n]-
EVT->
gps[minTimeDet]-minTime;
794 startSegTime=
EVT->
gps[minTimeDet];
798 for(n=0; n<nIFO; n++) xtitle[
n] = TString::Format(
"Time (sec) : GPS OFFSET = %.3f",
EVT->
gps[n]);
801 if(sbasedirCED!=NULL)
sprintf(fname,
"%s/jobSummary.html", dirCED);
802 else sprintf(fname,
"/dev/null");
803 if((hP = fopen(fname,
"w")) != NULL) {
804 fprintf(hP,
"<table border=1 cellspacing=0 width=100%% height=100%%>\n");
805 fprintf(hP,
"<tr align=\"center\">\n");
807 fprintf(hP,
"<th>DETECTOR</th>\n");
809 fprintf(hP,
"<th>NETWORK</th>\n");
811 fprintf(hP,
"<td>%s</td>\n",ifostr);
813 fprintf(hP,
"<tr align=\"center\">\n");
815 fprintf(hP,
"<th>CHANNEL</th>\n");
818 fprintf(hP,
"<tr align=\"center\">\n");
819 fprintf(hP,
"<th>SEARCH</th>\n");
820 fprintf(hP,
"<td>%s</td>\n",analysis.Data());
822 fprintf(hP,
"<th>SEARCH</th>\n");
824 if(search==
'E' || search==
'E')
fprintf(hP,
"<td>%s un-modeled (%c)</td>\n",analysis.Data(),
search);
825 if(search==
'b' || search==
'B')
fprintf(hP,
"<td>%s un-modeled (%c)</td>\n",analysis.Data(),
search);
826 if(search==
'r' || search==
'R')
fprintf(hP,
"<td>%s un-modeled (%c)</td>\n",analysis.Data(),
search);
827 if(search==
'i' || search==
'I')
fprintf(hP,
"<td>%s elliptical (%c)</td>\n",analysis.Data(),
search);
828 if(search==
'g' || search==
'G')
fprintf(hP,
"<td>%s circular (%c)</td>\n",analysis.Data(),
search);
829 if(search==
's' || search==
'S')
fprintf(hP,
"<td>%s linear (%c)</td>\n",analysis.Data(),
search);
831 char _search = std::tolower(search);
832 if(_search==
'r')
fprintf(hP,
"<td>%s un-modeled(%c)</td>\n",analysis.Data(),
search);
833 if(_search==
'i')
fprintf(hP,
"<td>%s iota-wave(%c)</td>\n",analysis.Data(),
search);
834 if(_search==
'p')
fprintf(hP,
"<td>%s psi-wave(%c)</td>\n",analysis.Data(),
search);
835 if(_search==
'e'||_search==
'b')
fprintf(hP,
"<td>%s elliptical(%c)</td>\n",analysis.Data(),
search);
836 if(_search==
'c'||_search==
'g')
fprintf(hP,
"<td>%s circular(%c)</td>\n",analysis.Data(),
search);
837 if(_search==
'l'||_search==
's')
fprintf(hP,
"<td>%s linear(%c)</td>\n",analysis.Data(),
search);
841 fprintf(hP,
"<tr align=\"center\">\n");
842 fprintf(hP,
"<th>START SEGMENT</th>");
843 fprintf(hP,
"<td>%9.3f</td>\n",startSegTime);
845 fprintf(hP,
"<tr align=\"center\">\n");
846 fprintf(hP,
"<th>STOP SEGMENT</th>");
847 fprintf(hP,
"<td>%9.3f</td>\n",stopSegTime);
850 fprintf(hP,
"<tr align=\"center\">\n");
856 fprintf(hP,
"<tr align=\"center\">\n");
859 for(n=0; n<nIFO-1; n++)
fprintf(hP,
"%3.3f / ",lagTime[n]);
860 fprintf(hP,
"%3.3f",lagTime[nIFO-1]);
867 cout <<
"netevent::ced() error: cannot open file " << fname <<
". \n";
871 if(sbasedirCED!=NULL) {
873 html.SetEtcDir(gSystem->ExpandPathName(
"$HOME_WAT/html/etc/html"));
874 html.SetProductName(
"CED");
876 html.SetInputDir(html_input_dir.Data());
879 sprintf(cmd,
"cp %s/html/etc/html/ROOT.css %s/",gSystem->ExpandPathName(
"$HOME_WAT"),dirCED);
881 sprintf(cmd,
"cp %s/html/etc/html/ROOT.js %s/",gSystem->ExpandPathName(
"$HOME_WAT"),dirCED);
885 if(gSystem->Getenv(
"CWB_PARAMETERS_FILE")==NULL) {
886 cout <<
"Error : environment CWB_PARAMETERS_FILE is not defined!!!" << endl;
exit(1);
888 cwb_parameters_file=
TString(gSystem->Getenv(
"CWB_PARAMETERS_FILE"));
891 if(gSystem->Getenv(
"CWB_UPARAMETERS_FILE")==NULL) {
892 cout <<
"Error : environment CWB_UPARAMETERS_FILE is not defined!!!" << endl;
exit(1);
894 cwb_uparameters_file=
TString(gSystem->Getenv(
"CWB_UPARAMETERS_FILE"));
898 fpos_t poserr; fflush(stderr); fgetpos(stderr, &poserr);
899 int fderr = dup(fileno(stderr)); freopen(
"/dev/null",
"w", stderr);
901 fpos_t posout; fflush(stdout); fgetpos(stdout, &posout);
902 int fdout = dup(fileno(stdout)); freopen(
"/dev/null",
"w", stdout);
905 sprintf(title,
"<h2 class=\"convert\" align=\"center\"> %s </h2>",cwb_parameters_file.Data());
906 html.Convert(cwb_parameters_file.Data(),cwb_parameters_file.Data(),dirCED,
"",0,
title);
907 if(analysis==
"1G")
sprintf(cmd,
"mv %s/cwb1G_parameters.C.html %s/cwb_parameters.C.html",dirCED,dirCED);
908 else sprintf(cmd,
"mv %s/cwb2G_parameters.C.html %s/cwb_parameters.C.html",dirCED,dirCED);
911 char work_dir[1024];
sprintf(work_dir,
"%s",gSystem->WorkingDirectory());
913 if(cwb_uparameters_file!=
"") {
914 sprintf(title,
"<h2 class=\"convert\" align=\"center\"> %s </h2>",cwb_uparameters_path.Data());
915 html.Convert(cwb_uparameters_path.Data(),cwb_uparameters_file.Data(),dirCED,
"",0,
title);
917 TString cwb_iparameters_path =
TString(dirCED)+
"/"+gSystem->BaseName(cwb_uparameters_path.Data())+
".html";
918 TString cwb_oparameters_path =
TString(dirCED)+
"/user_parameters.C.html";
919 gSystem->Rename(cwb_iparameters_path.Data(),cwb_oparameters_path.Data());
923 fflush(stderr); dup2(fderr, fileno(stderr));
close(fderr);
924 clearerr(stderr); fsetpos(stderr, &poserr);
926 fflush(stdout); dup2(fdout, fileno(stdout));
close(fdout);
927 clearerr(stdout); fsetpos(stdout, &posout);
931 if(sbasedirCED!=NULL)
sprintf(fname,
"%s/eventSummary.html", dirCED);
932 else sprintf(fname,
"/dev/null");
933 if((hP = fopen(fname,
"w")) != NULL) {
934 fprintf(hP,
"<table border=1 cellspacing=0 width=100%% height=100%%>\n");
935 fprintf(hP,
"<tr align=\"center\">\n");
936 fprintf(hP,
"<th>GPS TIME</th>\n");
939 fprintf(hP,
"<th>DURATION</th>\n");
940 fprintf(hP,
"<th>FREQUENCY</th>\n");
941 fprintf(hP,
"<th>BANDWIDTH</th>\n");
943 fprintf(hP,
"<th>RHO[0/1]</th>\n");
944 fprintf(hP,
"<th>CC[0/1/2/3]</th>\n");
947 fprintf(hP,
"<th>THETA</th>\n");
950 fprintf(hP,
"<tr align=\"center\">\n");
960 fprintf(hP,
"<td>%1.2f / %1.2f / %1.2f / %1.2f</td>\n",
970 cout <<
"netevent::ced() error: cannot open file " << fname <<
". \n";
975 std::vector<TGraph*> mgraph(nIFO);
976 Color_t psd_color[8] = {kBlue, kRed, kGreen, kBlack, 6, 3, 8, 43};
977 for(n=0; n<
nIFO; n++) {
979 if(pD[n]->nRMS.size()==0)
continue;
989 if(fHigh>rate/2.) fHigh=rate/2.;
993 double* map00 = wdm->
pWWS;
994 double dF = rate/M/2./2.;
1004 double etime = eventTime[
n]-
EVT->
gps[
n];
1006 double segLen = stopSegTime-startSegTime;
1007 int I = (
int)etime/(segLen/nPSD);
1009 for(
int i=0; i<nPSD; ++
i){
1010 if(i==I) psd[0] = map00[0];
1011 PSD[0]+= pow(map00[0],2);
1012 for(
int j=1; j<
M; j++){
1013 if(i==I) psd[2*j-1] = map00[
j];
1014 if(i==I) psd[2*
j] = map00[
j];
1015 PSD[2*j-1]+= pow(map00[j],2);
1016 PSD[2*
j] += pow(map00[j],2);
1018 if(i==I) psd[2*M-1] = map00[
M];
1019 PSD[2*M-1]+= pow(map00[M],2);
1023 psd*=sqrt(2.)/sqrt(inRate);
1024 for(
int j=0; j<PSD.
size(); j++) PSD[j] = sqrt(PSD[j]/nPSD)*sqrt(2.)/sqrt(inRate);
1027 gStyle->SetTitleFont(12,
"D");
1031 PTS.
graph[0]->SetTitle(TString::Format(
"Power Spectral Density after lines' removal @ Time (sec) = %.0f",
EVT->
time[minTimeDet]));
1032 PTS.
graph[0]->GetXaxis()->SetTitle(
"Frequency (Hz) ");
1033 PTS.
graph[0]->GetYaxis()->SetTitle(
"[strain / #sqrt{Hz}] ");
1034 PTS.
graph[0]->SetMarkerStyle(1);
1035 PTS.
graph[0]->SetMinimum(1.
e-24);
1036 PTS.
graph[0]->SetMaximum(1.
e-20);
1037 PTS.
graph[0]->SetLineWidth(2);
1038 PTS.
graph[0]->SetLineColor(psd_color[n%8]);
1045 PTS.
canvas->SetLogx(
true);
1046 PTS.
canvas->SetLogy(
true);
1048 TLegend leg(0.753012,0.8-0.01,0.8885542,0.8793706,NULL,
"brNDC");
1049 leg.SetTextAlign(22);
1050 leg.SetLineColor(kBlack);
1051 leg.AddEntry(PTS.
graph[0],TString::Format(
"%s",
NET->
ifoName[n]),
"lp");
1054 if(sbasedirCED!=NULL) PTS.
canvas->Print(fname);
else PTS.
canvas->Write(
REPLACE(fname,dirCED,gtype));
1055 mgraph[
n] = PTS.
graph[0];
1060 if(sbasedirCED!=NULL) psd.wavearray<double>::Dump(const_cast<char*>(fname),2);
1062 if(nIFO_RMS==nIFO) {
1064 PTS.
graph[0]->Draw(
"ALP");
for(n=1; n<
nIFO; n++) PTS.
graph[n]->Draw(
"SAME");
1066 TLegend leg(0.753012,0.8-nIFO*0.01,0.8885542,0.8793706,NULL,
"brNDC");
1067 leg.SetTextAlign(22);
1068 leg.SetLineColor(kBlack);
1069 for(
int n=0;n<
nIFO;n++) leg.AddEntry(PTS.
graph[n],TString::Format(
"%s",
NET->
ifoName[n]),
"lp");
1071 sprintf(fname,
"%s/NET_psd.%s", dirCED, gtype);
1072 if(sbasedirCED!=NULL) PTS.
canvas->Print(fname);
else PTS.
canvas->Write(
REPLACE(fname,dirCED,gtype));
1074 PTS.
canvas->SetLogx(
false);
1075 PTS.
canvas->SetLogy(
false);
1082 optLevel =
int(log10(optLayer)/log10(2));
1084 for(
int n=0; n<
nIFO; n++) {
1086 if(useSparse&&(analysis!=
"1G")) {
1088 pD[
n]->
vSS[optSparse].Expand(
true);
1094 double rescale = 1./pow(sqrt(2.),TMath::Log2(inRate/pTF[n]->
rate()));
1099 for(
int n=0; n<
nIFO; n++) {
1100 if(pTF[n]->
size()==0)
continue;
1101 if(pTF[n]->getLevel()>0) pTF[
n]->
Inverse();
1106 double fparm=nfact*6;
1113 int ysize=ystop-ystart;
1125 stft.
Draw(tstart,tstop,pTF[n]->getlow(),pTF[n]->gethigh(),0,spectrogram_zmax,1);
1129 if(sbasedirCED!=NULL) stft.
Print(fname);
else canvas->Write(
REPLACE(fname,dirCED,gtype));
1130 canvas->SetLogy(
true);
1133 if(sbasedirCED!=NULL) stft.
Print(fname);
else canvas->Write(
REPLACE(fname,dirCED,gtype));
1135 tstart+=0.9;tstop-=0.9;
1136 stft.
Draw(tstart,tstop,pTF[n]->getlow(),pTF[n]->gethigh(),0,spectrogram_zmax,1);
1140 if(sbasedirCED!=NULL) stft.
Print(fname);
else canvas->Write(
REPLACE(fname,dirCED,gtype));
1141 canvas->SetLogy(
true);
1144 if(sbasedirCED!=NULL) stft.
Print(fname);
else canvas->Write(
REPLACE(fname,dirCED,gtype));
1150 for(
int n=0; n<
nIFO; n++) {
1153 if(useSparse&&(analysis!=
"1G")) {
1158 if(pTF[n]->
size()==0)
continue;
1169 for(
int n=0; n<
nIFO; n++) {
1170 if(pTF[n]->
size()==0)
continue;
1174 WTS.
hist2D->GetYaxis()->SetRangeUser(pTF[n]->getlow(),pTF[n]->gethigh());
1175 WTS.
hist2D->GetXaxis()->SetTitle(xtitle[n]);
1176 if(sbasedirCED!=NULL) WTS.
canvas->Print(fname);
else WTS.
canvas->Write(
REPLACE(fname,dirCED,gtype));
1181 for(
int n=0; n<
nIFO; n++) {
1182 if(pTF[n]->
size()==0)
continue;
1185 WTS.
hist2D->GetYaxis()->SetRangeUser(pTF[n]->getlow(),pTF[n]->gethigh());
1186 WTS.
hist2D->GetXaxis()->SetTitle(xtitle[n]);
1188 if(sbasedirCED!=NULL) WTS.
canvas->Print(fname);
else WTS.
canvas->Write(
REPLACE(fname,dirCED,gtype));
1195 for(
int n=0; n<
nIFO; n++) {
1196 if(useSparse&&(analysis!=
"1G")) {
1198 pD[
n]->
vSS[optSparse].Shrink();
1202 double rescale = 1./pow(sqrt(2.),TMath::Log2(inRate/pTF[n]->
rate()));
1203 *pTF[
n]*=1./rescale;
1217 double rescale = 1./pow(sqrt(2.),TMath::Log2(inRate/pD[0]->waveForm.
rate()));
1218 for(
int n=0; n<
nIFO; n++) {
1230 PTS.
graph[0]->GetXaxis()->SetTitle(xtitle[minTimeDet]);
1231 if(sbasedirCED!=NULL) PTS.
canvas->Print(fname);
else PTS.
canvas->Write(
REPLACE(fname,dirCED,gtype));
1237 PTS.
canvas->SetLogy(
true);
1238 PTS.
plot((
wavearray<double>&)pD[n]->waveBand, const_cast<char*>(
"ALP"), kGray, 0., 0.,
true, flow, fhigh);
1239 PTS.
plot((
wavearray<double>&)pD[n]->waveForm, const_cast<char*>(
"SAME"), kRed, 0., 0.,
true, flow, fhigh);
1240 if(sbasedirCED!=NULL) PTS.
canvas->Print(fname);
else PTS.
canvas->Write(
REPLACE(fname,dirCED,gtype));
1241 PTS.
canvas->SetLogy(
false);
1247 for(
int n=0; n<
nIFO; n++) {
1251 double wstart = pD[
n]->
waveForm.wavearray<double>::start();
1253 if(sbasedirCED!=NULL) pD[
n]->
waveForm.wavearray<double>::Dump(const_cast<char*>(fname),2);
1260 for(
int n=0; n<
nIFO; n++) pD[n]->waveBand.sethigh(0);
1264 for(
int n=0; n<
nIFO; n++) {
1274 PTS.
graph[0]->GetXaxis()->SetTitle(xtitle[minTimeDet]);
1275 if(sbasedirCED!=NULL) PTS.
canvas->Print(fname);
else PTS.
canvas->Write(
REPLACE(fname,dirCED,gtype));
1281 for(
int n=0; n<
nIFO; n++) pD[n]->waveBand.sethigh(0);
1284 for(
int n=0; n<
nIFO; n++) {
1289 PTS.
graph[0]->GetXaxis()->SetTitle(xtitle[minTimeDet]);
1290 if(sbasedirCED!=NULL) PTS.
canvas->Print(fname);
else PTS.
canvas->Write(
REPLACE(fname,dirCED,gtype));
1296 PTS.
graph[0]->GetXaxis()->SetTitle(xtitle[minTimeDet]);
1297 if(sbasedirCED!=NULL) PTS.
canvas->Print(fname);
else PTS.
canvas->Write(
REPLACE(fname,dirCED,gtype));
1303 PTS.
plot((
wavearray<double>&)pD[n]->waveForm, const_cast<char*>(
"ALP"), kRed, 0., 0.,
true, flow, fhigh);
1304 if(sbasedirCED!=NULL) PTS.
canvas->Print(fname);
else PTS.
canvas->Write(
REPLACE(fname,dirCED,gtype));
1310 for(
int n=0; n<
nIFO; n++) {
1312 double wstart = pD[
n]->
waveForm.wavearray<double>::start();
1314 if(sbasedirCED!=NULL) pD[
n]->
waveForm.wavearray<double>::Dump(const_cast<char*>(fname),2);
1315 pD[
n]->
waveForm.wavearray<double>::start(wstart);
1319 if(nIFO==1 || !fullCED) {
1326 if(analysis.Contains(
"2G")) {
1328 gStyle->SetLineColor(kBlack);
1331 sprintf(fname,
"%s/polargram_%d.%s", dirCED, m+1, gtype);
1332 if(sbasedirCED!=NULL) CPol->Print(fname);
else CPol->Write(
REPLACE(fname,dirCED,gtype));
1334 gStyle->SetLineColor(kWhite);
1347 inj.SetMarkerSize(2.5); inj.SetMarkerColor(kWhite);
1348 INJ.SetMarkerSize(2.5); INJ.SetMarkerColor(kBlack);
1349 rec.SetMarkerSize(2.5); rec.SetMarkerColor(kBlack);
1350 REC.SetMarkerSize(2.5); REC.SetMarkerColor(kWhite);
1351 det.SetMarkerSize(1.5); det.SetMarkerColor(kBlack);
1352 DET.SetMarkerSize(1.5); DET.SetMarkerColor(kWhite);
1355 sprintf(fname,
"%s/sensitivity_plus.%s", dirCED, gtype);
1356 gSM.
Draw(); rec.Draw();REC.Draw(); det.Draw();DET.Draw();
if(
simulation) {inj.Draw();INJ.Draw();}
1357 if(sbasedirCED!=NULL) gSM.
Print(fname);
else gSM.Write(
REPLACE(fname,dirCED,gtype));
1359 sprintf(fname,
"%s/sensitivity_cross.%s", dirCED, gtype);
1360 gSM.
Draw(); rec.Draw();REC.Draw(); det.Draw();DET.Draw();
if(
simulation) {inj.Draw();INJ.Draw();}
1361 if(sbasedirCED!=NULL) gSM.
Print(fname);
else gSM.Write(
REPLACE(fname,dirCED,gtype));
1363 sprintf(fname,
"%s/skystat.%s", dirCED, gtype);
1364 gSM.
Draw(); rec.Draw();REC.Draw(); det.Draw();DET.Draw();
if(
simulation) {inj.Draw();INJ.Draw();}
1365 if(sbasedirCED!=NULL) gSM.
Print(fname);
else gSM.Write(
REPLACE(fname,dirCED,gtype));
1367 sprintf(fname,
"%s/likelihood.%s", dirCED, gtype);
1368 gSM.
Draw(); rec.Draw();REC.Draw(); det.Draw();DET.Draw();
if(
simulation) {inj.Draw();INJ.Draw();}
1369 if(sbasedirCED!=NULL) gSM.
Print(fname);
else gSM.Write(
REPLACE(fname,dirCED,gtype));
1371 sprintf(fname,
"%s/null_energy.%s", dirCED, gtype);
1372 gSM.
Draw(); rec.Draw();REC.Draw(); det.Draw();DET.Draw();
if(
simulation) {inj.Draw();INJ.Draw();}
1373 if(sbasedirCED!=NULL) gSM.
Print(fname);
else gSM.Write(
REPLACE(fname,dirCED,gtype));
1375 sprintf(fname,
"%s/corr_energy.%s", dirCED, gtype);
1376 gSM.
Draw(); rec.Draw();REC.Draw(); det.Draw();DET.Draw();
if(
simulation) {inj.Draw();INJ.Draw();}
1377 if(sbasedirCED!=NULL) gSM.
Print(fname);
else gSM.Write(
REPLACE(fname,dirCED,gtype));
1379 sprintf(fname,
"%s/penalty.%s", dirCED, gtype);
1380 gSM.
Draw(); rec.Draw();REC.Draw(); det.Draw();DET.Draw();
if(
simulation) {inj.Draw();INJ.Draw();}
1381 if(sbasedirCED!=NULL) gSM.
Print(fname);
else gSM.Write(
REPLACE(fname,dirCED,gtype));
1383 sprintf(fname,
"%s/disbalance.%s", dirCED, gtype);
1384 gSM.
Draw(); rec.Draw();REC.Draw(); det.Draw();DET.Draw();
if(
simulation) {inj.Draw();INJ.Draw();}
1385 if(sbasedirCED!=NULL) gSM.
Print(fname);
else gSM.Write(
REPLACE(fname,dirCED,gtype));
1387 sprintf(fname,
"%s/correlation.%s", dirCED, gtype);
1388 gSM.
Draw(); rec.Draw();REC.Draw(); det.Draw();DET.Draw();
if(
simulation) {inj.Draw();INJ.Draw();}
1389 if(sbasedirCED!=NULL) gSM.
Print(fname);
else gSM.Write(
REPLACE(fname,dirCED,gtype));
1392 sprintf(fname,
"%s/netindex.%s", dirCED, gtype);
1393 gSM.
Draw(); rec.Draw();REC.Draw(); det.Draw();DET.Draw();
if(
simulation) {inj.Draw();INJ.Draw();}
1394 if(sbasedirCED!=NULL) gSM.
Print(fname);
else gSM.Write(
REPLACE(fname,dirCED,gtype));
1397 sprintf(fname,
"%s/ellipticity.%s", dirCED, gtype);
1398 gSM.
Draw(); rec.Draw();REC.Draw(); det.Draw();DET.Draw();
if(
simulation) {inj.Draw();INJ.Draw();}
1399 if(sbasedirCED!=NULL) gSM.
Print(fname);
else gSM.Write(
REPLACE(fname,dirCED,gtype));
1401 sprintf(fname,
"%s/polarisation.%s", dirCED, gtype);
1402 gSM.
Draw(); rec.Draw();REC.Draw(); det.Draw();DET.Draw();
if(
simulation) {inj.Draw();INJ.Draw();}
1403 if(sbasedirCED!=NULL) gSM.
Print(fname);
else gSM.Write(
REPLACE(fname,dirCED,gtype));
1406 sprintf(fname,
"%s/probability.%s", dirCED, gtype);
1407 gSM.
Draw(); rec.Draw();REC.Draw(); det.Draw();DET.Draw();
if(
simulation) {inj.Draw();INJ.Draw();}
1408 if(sbasedirCED!=NULL) gSM.
Print(fname);
else gSM.Write(
REPLACE(fname,dirCED,gtype));
1414 sprintf(fname,
"%s/probability.%s", dirCED,
"root");
1415 if(sbasedirCED!=NULL) {
1424 if(sbasedirCED!=NULL) {
1425 sprintf(fname,
"%s/probability.%s", dirCED,
"fits");
1428 const_cast<char*>(
"PROB"),const_cast<char*>(
"pix-1"),
'C');
1433 sprintf(fname,
"%s/probability_circles.%s", dirCED, gtype);
1438 gNET.
DrawCircles(phi,theta,(Color_t)kBlack,1,1,
true);
1439 rec.Draw(); det.Draw();
1453 sprintf(fname,
"%s/mchirp.%s", dirCED, gtype);
1454 if(pcd->
chirp.GetN()>0) {
1456 if(sbasedirCED!=NULL) PCH.
canvas->Print(fname);
1465 bool isPCs = !(
NET->
optim&&std::isupper(search));
1468 sprintf(fname,
"%s/l_tfmap_scalogram.%s", dirCED, gtype);
1469 WTS.
plot(pwc, ID, nIFO, isPCs?
'L':
'l', 0, const_cast<char*>(
"COLZ"),256,
NET->
pattern>0);
1470 WTS.
hist2D->GetXaxis()->SetTitle(xtitle[minTimeDet]);
1471 if(sbasedirCED!=NULL) WTS.
canvas->Print(fname);
1474 sprintf(fname,
"%s/n_tfmap_scalogram.%s", dirCED, gtype);
1475 WTS.
plot(pwc, ID, nIFO, isPCs?
'N':
'n', 0, const_cast<char*>(
"COLZ"),256,
NET->
pattern>0);
1476 WTS.
hist2D->GetXaxis()->SetTitle(xtitle[minTimeDet]);
1477 if(sbasedirCED!=NULL) WTS.
canvas->Print(fname);
1483 sprintf(fname,
"%s/l_tfmap_scalogram.%s", dirCED, gtype);
1485 gps_stop-
EVT->
slag[masterDet], const_cast<char*>(
"COLZ"));
1487 WTS.
hist2D->SetTitle(
"Scalogram");
1488 WTS.
hist2D->GetXaxis()->SetTitle(xtitle[minTimeDet]);
1489 if(sbasedirCED!=NULL) WTS.
canvas->Print(fname);
else WTS.
canvas->Write(
REPLACE(fname,dirCED,gtype));
1493 sprintf(fname,
"%s/n_tfmap_scalogram.%s", dirCED, gtype);
1495 gps_stop-
EVT->
slag[masterDet], const_cast<char*>(
"COLZ"));
1497 WTS.
hist2D->SetTitle(
"Scalogram");
1498 WTS.
hist2D->GetXaxis()->SetTitle(xtitle[minTimeDet]);
1499 if(sbasedirCED!=NULL) WTS.
canvas->Print(fname);
else WTS.
canvas->Write(
REPLACE(fname,dirCED,gtype));
1513 gROOT->SetBatch(batch);
1528 for(
int i=0;
i<
N;
i++) {avr+=
i*x[
i]*x[
i]; E+=x[
i]*x[
i];}
1535 double sum = ((M>=0)&&(M<N)) ? x[M]*x[M] : 0.;
1536 for(
int j=1;
j<
N;
j++) {
1537 a = ((M-
j>=0)&&(M-j<N)) ? x[M-j] : 0.;
1538 b = ((M+j>=0)&&(M+j<N)) ? x[M+j] : 0.;
1542 if(sum/E > P)
break;
1557 for(
int j=0;
j<token->GetEntries();
j++) {
1559 TObjString* tok = (TObjString*)token->At(
j);
1560 TString stok = tok->GetString();
1563 if(stok.Contains(
"spectrogram_zmax=")) {
1564 TString _spectrogram_zmax=stok;
1565 _spectrogram_zmax.Remove(0,_spectrogram_zmax.Last(
'=')+1);
1566 if(_spectrogram_zmax.IsFloat()) spectrogram_zmax=_spectrogram_zmax.Atof();
std::vector< char * > ifoName
void SetOptions(int simulation, double rho, double inRate, bool useSparse=false, char *gtype=const_cast< char *>("png"), int paletteId=0)
TCanvas * DrawPolargram(int ptype, network *net=NULL)
detector * getifo(size_t n)
param: detector index
virtual void resize(unsigned int)
Double_t * time
beam pattern coefficients for hx
std::vector< vector_int > cRate
Float_t * rho
biased null statistics
Float_t * high
min frequency
WSeries< double > pixeLHood
std::vector< wavearray< double > > wREC[MAX_TRIALS]
std::vector< netcluster > wc_List
Double_t * start
cluster duration = stopW-startW
std::vector< double > * getmdcTime()
virtual void rate(double r)
Float_t * duration
max cluster time relative to segment start
Float_t * low
average center_of_snr frequency
void Print(TString pname)
bool getwave(size_t, size_t, char='W')
param: cluster ID param: delay index param: time series type return: true if time series are extracte...
void DrawCircles(double phi, double theta, double gps, Color_t lcolor=kBlack, Width_t lwidth=1, Style_t lstyle=1, bool labels=false)
wavearray< double > a(hp.size())
void SetGskymap(gskymap &gSM)
void set(size_t i, double a)
double GetBoundaries(wavearray< double > x, double P, double &bT, double &eT)
Float_t * right
segment start GPS time
cout<< endl;cout<< "ts size = "<< ts.size()<< " ts rate = "<< ts.rate()<< endl;tf.Forward(ts, wdm);int levels=tf.getLevel();cout<< "tf size = "<< tf.size()<< endl;double dF=tf.resolution();double dT=1./(2 *dF);cout<< "rate(hz) : "<< RATE<< "\ layers : "<< nLAYERS<< "\ dF(hz) : "<< dF<< "\ dT(ms) : "<< dT *1000.<< endl;int itime=TIME_PIXEL_INDEX;int ifreq=FREQ_PIXEL_INDEX;int index=(levels+1) *itime+ifreq;double time=itime *dT;double freq=(ifreq >0) ? ifreq *dF :dF/4;cout<< endl;cout<< "PIXEL TIME = "<< time<< " sec "<< endl;cout<< "PIXEL FREQ = "<< freq<< " Hz "<< endl;cout<< endl;wavearray< double > x
wavearray< double > get(char *name, size_t index=0, char atype='R', int type=1, bool=true)
param: string with parameter name param: index in the amplitude array, which define detector param: c...
std::vector< wavearray< double > * > RWFP
WDM< double > wdm(nLAYERS, nLAYERS, 6, 10)
wavearray< double > psd(33)
string getmdcType(size_t n)
std::vector< TGraph * > graph
Float_t * left
min cluster time relative to segment start
std::vector< SSeries< double > > vSS[NIFO_MAX]
double getTheta(size_t i)
Float_t * ioSNR
reconstructed snr waveform
void Draw(int dpaletteId=1, Option_t *option="colfz")
WSeries< double > waveBand
virtual void start(double s)
std::vector< size_t > mdc__ID
bool getMRAwave(size_t ID, size_t lag, char atype='S', int mode=0, bool tof=false)
void plot(wavearray< double > &, char *=NULL, int=1, double=0., double=0., bool=false, float=0., float=0., bool=false, float=0., bool=false)
void dopen(const char *fname, char *mode, bool header=true)
void Draw(double t1=0.0, double t2=0.0, double f1=0.0, double f2=0.0, double z1=0.0, double z2=0.0, int dpaletteId=DUMMY_PALETTE_ID, Option_t *option="colfz")
Int_t run
max size used by allocate() for the probability maps
fprintf(stdout,"start=%f duration=%f rate=%f\, x.start(), x.size()/x.rate(), x.rate())
WDM< double > * getwdm(size_t M)
param: number of wdm layers
size_t getSkyIndex(double th, double ph)
param: theta param: phi
virtual size_t size() const
Float_t * frequency
GPS stop time of the cluster.
wavecomplex antenna(double, double, double=0.)
param: source theta,phi, polarization angle psi in degrees
void output2G(TTree *, network *, size_t, int, double)
Double_t * hrss
estimated bandwidth
Double_t * gps
average center_of_gravity time
Double_t * stop
GPS start time of the cluster.
WSeries< double > pTF[nRES]
Float_t * lag
time between consecutive events
int Write(double factor, bool fullCED=true)
Float_t * netcc
effective correlated SNR
Float_t * slag
time lag [sec]
void output(TTree *=NULL, network *=NULL, double=0., size_t=0, int=-1)
long likelihood(char='E', double=sqrt(2.), int=0, size_t=0, int=-1, bool=false)
Float_t * phi
sqrt(h+*h+ + hx*hx)
WSeries< double > pixeLNull
netevent EVT(itree, nifo)
Float_t * theta
[0]-reconstructed, [1]-injected phi angle, [2]-RA
Double_t * time
beam pattern coefficients for hx
TGraphErrors chirp
chirp fit parameters (don't remove ! fix crash when exit from CINT)
WSeries< double > waveForm
WSeries< double > * getTFmap()
param: no parameters
double fabs(const Complex &x)
void Forward(int n=-1)
param: wavelet - n is number of steps (-1 means full decomposition)
void CwbToGeographic(double ilongitude, double ilatitude, double &olongitude, double &olatitude)
strcpy(RunLabel, RUN_LABEL)
void DumpObject(const char *file, const char *name="gskymap")
Meyer< double > S(1024, 2)
netcluster * getwc(size_t n)
param: delay index
Float_t * bx
beam pattern coefficients for hp
sprintf(tfres,"(1/%g)x(%g) (sec)x(Hz)", 2 *df, df)
skymap nSensitivity
list of wdm tranformations
std::vector< clusterdata > cData
void set(size_t i, double a)
param: sky index param: value to set
double get(size_t i)
param: sky index
WaveDWT< DataType_t > * pWavelet
wavearray< double > wINJ[NIFO_MAX]
#define REPLACE(STRING, DIR, EXT)
cout<< "live time after cat 2 : "<< detSegs_ctime<< endl;if(detSegs_ctime< segTHR) {cout<< "job segment live time after cat2 < "<< segTHR<< " sec, job terminated !!!"<< endl;exit(1);} double Tb=detSegs[0].start;double Te=detSegs[0].stop;double dT=Te-Tb;char file[512], tdf00[512], tdf90[512], buFFer[1024];int rnID=int(gRandom->Rndm(13) *1.e9);if(simulation) { i=NET.readMDClog(injectionList, double(long(Tb)) -mdcShift);printf("GPS: %16.6f saved, injections: %d\", double(long(Tb)), i);frTB[nIFO].shiftBurstMDCLog(NET.mdcList, ifos, mdcShift);for(int i=0;i< NET.mdcTime.size();i++) NET.mdcTime[i]+=mdcShift;vector< waveSegment > mdcSegs(NET.mdcTime.size());for(int k=0;k< NET.mdcTime.size();k++) {mdcSegs[k].start=NET.mdcTime[k]-gap;mdcSegs[k].stop=NET.mdcTime[k]+gap;} vector< waveSegment > mdcSegs_dq2=slagTB.mergeSegLists(detSegs_dq2, mdcSegs);double mdcSegs_ctime=slagTB.getTimeSegList(mdcSegs_dq2);cout<< "live time in zero lag after cat2+inj : "<< mdcSegs_ctime<< endl;if(mdcSegs_ctime==0) {cout<< "job segment with zero cat2+inj live time in zero lag, job terminated !!!"<< endl;exit(1);} } if(dump_infos_and_exit) exit(0);if(mask >0.) NET.setSkyMask(mask, skyMaskFile);for(i=0;i< nIFO;i++) { frTB[i].readFrames(FRF[i], channelNamesRaw[i], x);x.start(x.start()+dataShift[i]);x.start(x.start() -segLen *(segID[i]-segID[0]));if(singleDetector) TB.resampleToPowerOfTwo(x);sprintf(file,"%s/%s_%d_%s_%d_%d.dat", nodedir, ifo[i], int(Tb), data_label, runID, rnID);if(dump_sensitivity_and_exit) { sprintf(file,"%s/sensitivity_%s_%d_%s_job%d.txt", dump_dir, ifo[i], int(Tb), data_label, runID);cout<< endl<< "Dump Sensitivity : "<< file<< endl<< endl;TB.makeSpectrum(file, x);continue;} if(dcCal[i]>0.) x *=dcCal[i];if(fResample >0) { x.FFT(1);x.resize(fResample/x.rate() *x.size());x.FFT(-1);x.rate(fResample);} pTF[i]=pD[i]-> getTFmap()
Bool_t fill_in(network *, int, bool=true)
Float_t * neted
network correlation coefficients: 0-net,1-pc,2-cc,3-net2
std::vector< SSeries< double > > vSS
size_t getmdc__ID(size_t n)
for(int i=0;i< 101;++i) Cos2[2][i]=0
pointers to detectors
wavearray< double > ** pwf
[x1,y1,z1,x2,y2,z2] components of spin vector
virtual void resize(unsigned int)
void Print(TString pname)
void Inverse(int n=-1)
param: n - number of steps (-1 means full reconstruction)
bool setndm(size_t, size_t, bool=true, int=1)
param: cluster ID param: lag index param: statistic identificator param: resolution idenificator retu...
void SetOptions(TString projection="hammer", TString coordinate="Geographic", double resolution=1, bool goff=false)
bool SETNDM(size_t, size_t, bool=true, int=1)
Float_t * chirp
range to source: [0/1]-rec/inj
Float_t * Deff
injected snr in the detectors
void SetZaxisTitle(TString zAxisTitle)
Float_t * bp
[0]-reconstructed iota angle, [1]-injected iota angle
Float_t * iSNR
energy of reconstructed responses Sk*Sk
Float_t * bandwidth
max frequency
Float_t * oSNR
injected snr waveform