21 #pragma GCC system_header 28 #include "TObjArray.h" 29 #include "TObjString.h" 47 cout <<
"-----> CWB_Plugin_SkyProb.C" << endl;
48 cout <<
"ifo " << ifo.Data() << endl;
49 cout <<
"type " << type << endl;
70 if(ifo.CompareTo(
"L1")==0) seed=1000;
71 if(ifo.CompareTo(
"H1")==0) seed=2000;
72 if(ifo.CompareTo(
"V1")==0) seed=3000;
73 if(ifo.CompareTo(
"J1")==0) seed=4000;
74 if(ifo.CompareTo(
"A2")==0) seed=5000;
75 if(ifo.CompareTo(
"Y2")==0) seed=6000;
76 if(ifo.CompareTo(
"Y3")==0) seed=7000;
79 if(ifo.CompareTo(
"L1")==0) fName=
"plugins/strains/advLIGO_NSNS_Opt_8khz_one_side.txt";
80 if(ifo.CompareTo(
"H1")==0) fName=
"plugins/strains/advLIGO_NSNS_Opt_8khz_one_side.txt";
81 if(ifo.CompareTo(
"V1")==0) fName=
"plugins/strains/advVIRGO_sensitivity_12May09_8khz_one_side.txt";
82 if(ifo.CompareTo(
"J1")==0) fName=
"plugins/strains/LCGT_sensitivity_8khz_one_side.txt";
83 if(ifo.CompareTo(
"A2")==0) fName=
"plugins/strains/advLIGO_NSNS_Opt_8khz_one_side.txt";
84 if(ifo.CompareTo(
"Y2")==0) fName=
"plugins/strains/advLIGO_NSNS_Opt_8khz_one_side.txt";
85 if(ifo.CompareTo(
"Y3")==0) fName=
"plugins/strains/advLIGO_NSNS_Opt_8khz_one_side.txt";
99 sprintf(cmd,
"network* net = (network*)%p;",NET);
100 gROOT->ProcessLine(cmd);
127 if(ifo.CompareTo(NET->
ifoName[0])==0) {
138 for(
int k=0;
k<(
int)NET->
mdcTime.size();
k++) cout <<
k <<
" mdcTime " << MDC.
mdcTime[
k] << endl;
139 for(
int k=0;
k<(
int)NET->
mdcType.size();
k++) cout <<
k <<
" mdcType " << MDC.
mdcType[
k] << endl;
146 cout <<
"CWB_Plugin_SkyProb.C -> CWB_PLUGIN_OLIKELIHOOD implemented only for 2G" << endl;
151 watplot SMS(const_cast<char*>(
"sms"),200,20,800,400);
156 cout <<
"-----> CWB_Plugin_SkyProb.C -> " <<
" gIFACTOR : " << gIFACTOR << endl;
159 float* gSLAGSHIFT=NULL;
IMPORT(
float*,gSLAGSHIFT)
170 TList *files = (TList*)gROOT->GetListOfFiles();
177 while ((file=(TSystemFile*)
next())) {
178 fname = file->GetName();
180 if(fname.Contains(
"wave_")) {
181 froot=(TFile*)file;froot->cd();
183 outDump.ReplaceAll(
".root.tmp",
".txt");
184 cout <<
"output file name : " << fname << endl;
188 cout <<
"CWB_Plugin_SkyProb.C : Error - output root file not found" << endl;
192 cout <<
"CWB_Plugin_SkyProb.C : Error - output root file not found" << endl;
196 TTree*
net_tree = (TTree *) froot->Get(
"waveburst");
206 net_tree->SetBranchAddress(
"Psm",&Psm);
208 for(
int k=0;
k<
K;
k++) {
210 id = NET->
getwc(
k)->
get(const_cast<char*>(
"ID"), 0,
'L', rate);
214 int ID = size_t(
id.data[
j]+0.5);
224 if(cfg->
dump) EVT->
dopen(outDump.Data(),
const_cast<char*
>(
"a"),
false);
225 EVT->
output2G(net_tree,NET,ID,
k,ofactor);
229 #ifdef WATPLOT // monster event display 232 sprintf(fname2,
"skyprob_%d.png",ID);
233 cout <<
"write " << fname2 << endl;
235 SMS.
canvas->Print(fname2);
std::vector< char * > ifoName
virtual void resize(unsigned int)
void setSLags(float *slag)
TString Get(wavearray< double > &x, TString ifo)
std::vector< std::string > mdcList
std::vector< std::string > mdcType
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< std::string > mdcType
virtual void start(double s)
std::vector< double > mdcTime
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)
virtual size_t size() const
void output2G(TTree *, network *, size_t, int, double)
void CWB_Plugin(TFile *jfile, CWB::config *cfg, network *NET, WSeries< double > *x, TString ifo, int type)
COHERENCE.
#define IMPORT(TYPE, VAR)
std::vector< std::string > mdcList
TIter next(twave->GetListOfBranches())
netevent EVT(itree, nifo)
netcluster * getwc(size_t n)
param: delay index
sprintf(tfres,"(1/%g)x(%g) (sec)x(Hz)", 2 *df, df)
double factors[FACTORS_MAX]
std::vector< double > mdcTime