33 #define PLOT_POSTFIX "_WM" 46 #define COORDINATES "Geographic" 52 #define DISPLAY_WORLD_MAP 61 static inline int net9(
double*,
double,
double*,
double,
double);
74 if (ndet==0) {cout <<
"No detector !!!" << endl;
exit(0);}
80 h2->GetXaxis()->SetNdivisions(70318);
81 h2->GetXaxis()->SetLabelFont(42);
82 h2->GetXaxis()->SetLabelOffset(0.012);
83 h2->GetXaxis()->SetTitleOffset(1.1);
84 h2->GetXaxis()->SetTitleFont(72);
85 h2->GetYaxis()->SetNdivisions(409);
86 h2->GetYaxis()->SetLabelFont(42);
87 h2->GetYaxis()->SetLabelOffset(0.01);
88 h2->GetZaxis()->SetLabelFont(42);
89 h2->GetXaxis()->SetTitleFont(42);
90 h2->GetXaxis()->SetTitle(
"Phi");
91 h2->GetXaxis()->CenterTitle(
true);
92 h2->GetYaxis()->SetTitleFont(42);
93 h2->GetYaxis()->SetTitle(
"Theta");
94 h2->GetYaxis()->CenterTitle(
true);
95 h2->GetZaxis()->SetLabelOffset(0.00001);
96 h2->GetZaxis()->SetNoExponent(
false);
99 #ifdef DISPLAY_PERC_UNDER2 106 int ii=
int(x[
i]);
if(ii>359) ii=359;
107 int jj=
int(y[i]);
if(jj>179) jj=179;
111 #ifdef DISPLAY_PERC_UNDER2 112 if(z[i]<2) ncnt_under2[ii][jj]++;
113 Fx->SetBinContent(ii+1,jj+1,t[i]);
115 double binc = h2->GetBinContent(ii+1,jj+1);
116 h2->SetBinContent(ii+1,jj+1,binc+z[i]);
120 #ifdef DISPLAY_PERC_UNDER2 121 if(ncnt[
i][
j]>0) h2->SetBinContent(
i+1,
j+1,100.*(
double(ncnt_under2[
i][
j])/
double(ncnt[
i][j])));
123 double binc = h2->GetBinContent(
i+1,j+1);
124 if(ncnt[
i][j]>0) binc/=ncnt[
i][
j];
125 h2->SetBinContent(
i+1,j+1,binc);
131 double*
xx =
new double[
size];
132 double*
yy =
new double[
size];
133 double* zz =
new double[
size];
137 #ifdef DISPLAY_PERC_UNDER2 138 double perc_under2 = h2->GetBinContent(
i+1,
j+1);
139 double fx = Fx->GetBinContent(
i+1,
j+1);
141 double nri = h2->GetBinContent(
i+1,
j+1);
145 #ifdef DISPLAY_PERC_UNDER2 160 #ifdef DISPLAY_WORLD_MAP 177 cout <<
"Print File : " << ofileName.Data() << endl;
191 detector_selected[0]=
true;
193 detector_selected[0]=
false;
196 detector_selected[1]=
true;
198 detector_selected[1]=
false;
201 detector_selected[2]=
true;
203 detector_selected[2]=
false;
206 detector_selected[3]=
true;
208 detector_selected[3]=
false;
211 detector_selected[4]=
true;
213 detector_selected[4]=
false;
216 detector_selected[5]=
true;
218 detector_selected[5]=
false;
221 detector_selected[6]=
true;
223 detector_selected[6]=
false;
226 detector_selected[7]=
true;
228 detector_selected[7]=
false;
231 detector_selected[8]=
true;
233 detector_selected[8]=
false;
237 detector_name[0]=
"H1";
238 detector_name[1]=
"L1";
239 detector_name[2]=
"G1";
240 detector_name[3]=
"V1";
241 detector_name[4]=
"T1";
242 detector_name[5]=
"H2";
243 detector_name[6]=
"A1";
244 detector_name[7]=
"A2";
245 detector_name[8]=
"J1";
259 if (detector_selected[0]) sdetectors+=
"LHO1 ";
260 if (detector_selected[1]) sdetectors+=
"LLO ";
261 if (detector_selected[2]) sdetectors+=
"GEO ";
262 if (detector_selected[3]) sdetectors+=
"VIRGO ";
263 if (detector_selected[4]) sdetectors+=
"TAMA ";
264 if (detector_selected[5]) sdetectors+=
"LHO2 ";
265 if (detector_selected[6]) sdetectors+=
"AIGO ";
266 if (detector_selected[7]) sdetectors+=
"AIGO2 ";
267 if (detector_selected[8]) sdetectors+=
"LCGT ";
270 if (detector_selected[
k]) {
275 char hacc_title[256];
277 sprintf(hacc_title,
"%s Network Response Index (gamma=%2.2f)",sdetectors.Data(),
NET_GAMMA);
279 sprintf(hacc_title,
"%s Network Response Index (gamma=%2.2f)",sdetectors.Data(),
NET_GAMMA);
284 char ofile_title[256];
291 else sprintf(ofile_title,
"%s.png",ofile_title);
293 ofileName = ofile_title;
294 ofileName.ReplaceAll(
" ",
"_");
298 for(
int n=0;
n<9;
n++) D[
n] =
new detector((
char*)detector_name[
n].Data());
308 x =
new double[
size];
309 y =
new double[
size];
310 z =
new double[
size];
311 t =
new double[
size];
315 if(
i%100000==0) cout <<
i << endl;
316 int idx =
int(gRandom->Uniform(0,L));
322 double phi=gRandom->Uniform(0,360);
323 double theta=gRandom->Uniform(0,180);
324 double psi=gRandom->Uniform(0,180);
326 double Hp=gRandom->Uniform(-1,1);
327 double Hx=gRandom->Uniform(-1,1);
330 if (detector_selected[
k]) {
340 if (detector_selected[
k]) {
346 double gR = (gp-
gx)/2.;
347 double gr = (gp+
gx)/2.;
348 double gc = sqrt(gR*gR+gI*gI);
353 if (detector_selected[
k]) {
358 double uc = (Xp*gx - Xx*gI);
359 double us = (Xx*gp - Xp*gI);
360 double vc = (gp*uc + gI*us);
361 double vs = (gx*us + gI*uc);
369 if (detector_selected[
k]) {
379 double GAMMA = 1.-gamma*gamma;
380 double ndi=
net9(u,um,v,vm,GAMMA);
390 inline int net9(
double* u,
double um,
double*
v,
double vm,
double g) {
391 double q = (1.-
g)*um;
393 return int(u[0]*u[0]>q) -
int((u[0]*u[0]/um+v[0]*v[0]/vm)>g) +
394 int(u[1]*u[1]>q) -
int((u[1]*u[1]/um+v[1]*v[1]/vm)>g) +
395 int(u[2]*u[2]>q) -
int((u[2]*u[2]/um+v[2]*v[2]/vm)>g) +
396 int(u[3]*u[3]>q) -
int((u[3]*u[3]/um+v[3]*v[3]/vm)>g) +
397 int(u[4]*u[4]>q) -
int((u[4]*u[4]/um+v[4]*v[4]/vm)>g) +
398 int(u[5]*u[5]>q) -
int((u[5]*u[5]/um+v[5]*v[5]/vm)>g) +
399 int(u[6]*u[6]>q) -
int((u[6]*u[6]/um+v[6]*v[6]/vm)>g) +
400 int(u[7]*u[7]>q) -
int((u[7]*u[7]/um+v[7]*v[7]/vm)>g) +
401 int(u[8]*u[8]>q) -
int((u[8]*u[8]/um+v[8]*v[8]/vm)>g);
wavearray< double > t(hp.size())
static double g(double e)
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
void Draw(int dpaletteId=1, Option_t *option="colfz")
int GetSkyMapSensitivity(double *&x, double *&y, double *&z, double *&t, TString &title, TString &ofileName, int &ndet)
void FillData(int size, double *phi, double *theta, double *binc)
wavecomplex antenna(double, double, double=0.)
param: source theta,phi, polarization angle psi in degrees
gwavearray< double > * gx
void SetTitle(TString title)
void SetWorldMap(bool drawWorldMap=true)
void CwbToGeographic(double ilongitude, double ilatitude, double &olongitude, double &olatitude)
sprintf(tfres,"(1/%g)x(%g) (sec)x(Hz)", 2 *df, df)
void SetOptions(TString projection="hammer", TString coordinate="Geographic", double resolution=1, bool goff=false)
static int net9(double *, double, double *, double, double)