44 if((ifo!=NULL)&&(ifo[
n]!=
"")) {
50 cout <<
"gnetwork::gnetwork : Error - user define detector with no detParams" << endl;
86 for(
int i=0;
i<2;
i++)
if(
grP[
i]!=NULL)
delete grP[
i];
100 for(
int i=0;
i<2;
i++)
grP[
i]=NULL;
145 if(smName==
"nPenalty") {
Draw(NET->
nPenalty,smName);
return;}
147 if(smName==
"nNetIndex") {
Draw(NET->
nNetIndex,smName);
return;}
149 if(smName==
"nSkyStat") {
Draw(NET->
nSkyStat,smName);
return;}
154 if(smName==
"index") {
Draw(NET->
index,smName);
return;}
155 if(smName==
"skyMask") {
Draw(NET->
skyMask,smName);
return;}
156 if(smName==
"skyMaskCC") {
Draw(NET->
skyMaskCC,smName);
return;}
157 if(smName==
"skyHole") {
Draw(NET->
skyHole,smName);
return;}
158 if(smName==
"veto") {
Draw(NET->
veto,smName);
return;}
159 if(smName==
"skyProb") {
Draw(NET->
skyProb,smName);
return;}
160 if(smName==
"skyENRG") {
Draw(NET->
skyENRG,smName);
return;}
162 cout <<
"gnetwork::Draw : Warning - skymap '" << smName.Data() <<
"' not valid !" << endl;
190 if(nIFO<1) {cout <<
"gnetwork::GetSite nIFO must be >= 1" << endl;
return -1111;}
198 if(ifo.CompareTo(this->getifo(
n)->Name)==0) {nifo++;ifoId=
n;}
200 if(nifo<1) {cout <<
"gnetwork::GetSite ifo not valid" << endl;
return -1111;}
208 double theta_t=
theta;
209 if(theta_t>0) LAT=
'N';
else {LAT=
'S';theta_t=-theta_t;}
210 int theta_d =
int(theta_t);
211 int theta_m =
int((theta_t-theta_d)*60);
212 float theta_s = (theta_t-theta_d-theta_m/60.)*3600.;
216 if(phi_t>0) LON=
'E';
else {LON=
'W';phi_t=-phi_t;}
217 int phi_d =
int(phi_t);
218 int phi_m =
int((phi_t-phi_d)*60);
219 float phi_s = (phi_t-phi_d-phi_m/60.)*3600.;
222 if(type.CompareTo(
"THETA")==0)
return theta;
223 if(type.CompareTo(
"THETA_D")==0)
return theta_d;
224 if(type.CompareTo(
"THETA_M")==0)
return theta_m;
225 if(type.CompareTo(
"THETA_S")==0)
return theta_s;
226 if(type.CompareTo(
"PHI")==0)
return phi;
227 if(type.CompareTo(
"PHI_D")==0)
return phi_d;
228 if(type.CompareTo(
"PHI_M")==0)
return phi_m;
229 if(type.CompareTo(
"PHI_S")==0)
return phi_s;
231 if(type.CompareTo(
"")==0) pD[ifoId]->
print();
262 XYZVector Rv(pD[
n]->Rv[0],pD[
n]->Rv[1],pD[
n]->Rv[2]);
263 TVector3 vRv(Rv.X(),Rv.Y(),Rv.Z());
265 double phi=vRv.Phi()*r2d;
266 double theta=vRv.Theta()*r2d;
278 TMarker* pM =
new TMarker(phi,theta,mstyle);
279 pM->SetMarkerSize(msize);
280 pM->SetMarkerColor(mcolor);
283 pM =
new TMarker(phi,theta,mstyle);
284 pM->SetMarkerSize(msize/2);
285 pM->SetMarkerColor(kWhite);
321 double x[
nIFO][2][2];
322 double y[
nIFO][2][2];
326 XYZVector Rv(pD[
n]->Rv[0],pD[
n]->Rv[1],pD[
n]->Rv[2]);
327 XYZVector Ex(pD[
n]->Ex[0],pD[
n]->Ex[1],pD[
n]->Ex[2]);
328 XYZVector Ey(pD[
n]->Ey[0],pD[
n]->Ey[1],pD[
n]->Ey[2]);
329 TVector3 vRv(Rv.X(),Rv.Y(),Rv.Z());
330 TVector3 vEx(Ex.X(),Ex.Y(),Ex.Z());
331 TVector3 vEy(Ey.X(),Ey.Y(),Ey.Z());
336 theta=vRv.Theta()*r2d;
350 theta=vEx.Theta()*r2d;
363 if((x[
n][0][0]>360-mlength_deg)&&(x[
n][0][0]+x[
n][0][1]-360<mlength_deg)) x[
n][0][1]=360;
366 if((x[
n][0][0]>180-mlength_deg)&&(x[
n][0][0]+x[
n][0][1]<mlength_deg)) x[
n][0][1]=180;
370 theta=vEy.Theta()*r2d;
383 if((x[
n][1][0]>360-mlength_deg)&&(x[
n][1][0]+x[
n][1][1]-360<mlength_deg)) x[
n][1][1]=360;
386 if((x[
n][1][0]>180-mlength_deg)&&(x[
n][1][0]+x[
n][1][1]<mlength_deg)) x[
n][1][1]=180;
392 for(
int m=0;
m<2;
m++) {
393 TPolyLine *pL =
new TPolyLine(2,x[
n][
m],y[
n][m]);
394 pL->SetLineColor(lcolor);
395 pL->SetLineStyle(lstyle);
396 pL->SetLineWidth(lwidth);
448 XYZVector Rv(pD[
n]->Rv[0],pD[
n]->Rv[1],pD[
n]->Rv[2]);
449 TVector3 vRv(Rv.X(),Rv.Y(),Rv.Z());
451 double phi=vRv.Phi()*r2d;
452 double theta=vRv.Theta()*r2d;
465 if(ifoName.CompareTo(
"H2")==0) {phi+=2;theta-=10;}
466 else if(ifoName.CompareTo(
"J1")==0) {phi+=6;theta-=1;}
467 else if(ifoName.CompareTo(
"H1")==0) {phi+=6;theta-=1;}
468 else if(ifoName.CompareTo(
"L1")==0) {phi+=3;theta+=5;}
469 else if(ifoName.CompareTo(
"V1")==0) {phi+=4;theta+=2;}
470 else {phi+=2;theta+=2;}
472 if(ifoName.CompareTo(
"A1")==0) ifoName=
TString(
"#tilde{A}");
473 else if(ifoName.CompareTo(
"H2")==0) ifoName=
TString(
"#tilde{H}");
474 else if(ifoName.CompareTo(
"I2")==0) ifoName=
TString(
"#tilde{I}");
475 else if(ifoName.CompareTo(
"R2")==0) ifoName=
TString(
"#tilde{R}");
476 else ifoName.Resize(1);
478 TLatex *pL =
new TLatex(phi+1.0,theta, ifoName);
479 pL->SetTextFont(tfont);
480 pL->SetTextSize(tsize);
481 pL->SetTextColor(tcolor);
568 if((polarization<0||polarization>10)&&(polarization!=12))
569 {cout <<
"polarization must be [0-10][12]" << endl;
exit(1);}
573 {cout <<
"detectors are no declared" << endl;
exit(1);}
574 if((nIFO!=1)&&(polarization==6||polarization==7))
575 {cout <<
"with polarization [6-7] works only with one detector" << endl;
exit(1);}
576 if((nIFO!=2)&&(polarization>=8&&polarization<=11))
577 {cout <<
"with polarization [8-11] works only two one detectors" << endl;
exit(1);}
583 std::vector<wavecomplex>
F;
586 for (
int n=0;
n<
nIFO;
n++) F[
n] = pD[
n]->antenna(theta,phi,psi);
587 double gp=0,
gx=0,gI=0;
589 gp+=F[
n].real()*F[
n].real();
590 gx+=F[
n].imag()*F[
n].imag();
591 gI+=F[
n].real()*F[
n].imag();
593 double gR = (gp-
gx)/2.;
594 double gr = (gp+
gx)/2.;
595 double gc = sqrt(gR*gR+gI*gI);
597 if (polarization==0) z = sqrt(
fabs(gr-gc)<1
e-8?0.:gr-gc);
598 if (polarization==1) z = sqrt(gr+gc);
599 if (polarization==2&&sqrt(gr+gc)>0) z=sqrt((gr-gc)/(gr+gc));
600 if (polarization==3) z = sqrt(2*gr/nIFO);
601 if (polarization==4) z = (
fabs(gr-gc)<1
e-8?0.:gr-gc);
602 if (polarization==5) z = (gr+gc);
603 if (polarization==6) z = F[0].imag();
604 if (polarization==7) z = F[0].real();
605 if (polarization==8) z = (F[1].imag()!=0) ? F[0].imag()/F[1].imag() : 0.;
606 if (polarization==9) z = (F[1].real()!=0) ? F[0].real()/F[1].real() : 0.;
607 if (polarization==10) {
608 double F0=sqrt(pow(F[0].real(),2)+pow(F[0].imag(),2));
609 double F1=sqrt(pow(F[1].real(),2)+pow(F[1].imag(),2));
610 z = (F1!=0) ? F0/F1 : 0.;
612 if (polarization==12) {
613 double cos2G = gc!=0 ? gR/gc : 0;
614 double sin2G = gc!=0 ? gI/gc : 0;
616 z = r2d*atan2(sin2G,cos2G)/2.;
636 if(nIFO<1) {cout <<
"gnetwork::GetAntennaPattern nIFO must be >= 1" << endl;
return -100;}
644 if(ifo.CompareTo(this->getifo(
n)->Name)==0) {nifo++;ifoId=
n;}
646 if(nifo<1) {cout <<
"gnetwork::GetAntennaPattern ifo not valid" << endl;
return -100;}
649 if(plus)
return F.
real();
else return F.
imag();
684 if(polarization<0||polarization>12) {
685 cout <<
"---------------------------------------------------------------------------------------" << endl;
686 cout <<
"polarization must be [0-12]" << endl;
687 cout <<
"---------------------------------------------------------------------------------------" << endl;
688 cout <<
"polarization=0 -> |Fx| DPF" << endl;
689 cout <<
"polarization=1 -> |F+| DPF" << endl;
690 cout <<
"polarization=2 -> |Fx|/|F+| DPF" << endl;
691 cout <<
"polarization=3 -> sqrt((|F+|^2+|Fx|^2)/nIFO) DPF" << endl;
692 cout <<
"polarization=4 -> |Fx|^2 DPF" << endl;
693 cout <<
"polarization=5 -> |F+|^2 DPF" << endl;
694 cout <<
"polarization=6 -> Fx only with 1 detector" << endl;
695 cout <<
"polarization=7 -> F+ only with 1 detector" << endl;
696 cout <<
"polarization=8 -> F1x/F2x only with 2 detectors" << endl;
697 cout <<
"polarization=9 -> F1+/F2+ only with 2 detectors" << endl;
698 cout <<
"polarization=10 -> sqrt(|F1+|^2+|F1x|^2)/sqrt(|F2+|^2+|F2x|^2) only with 2 detectors" << endl;
699 cout <<
"polarization=11 -> The same as (10) but averaged over psi only with 2 detectors" << endl;
700 cout <<
"polarization=12 -> DPF Angle" << endl;
701 cout <<
"---------------------------------------------------------------------------------------" << endl;
707 {cout <<
"detectors are no declared" << endl;
return;}
708 if((nIFO!=1)&&(polarization==6||polarization==7))
709 {cout <<
"with polarization [6-7] works only with one detector" << endl;
return;}
710 if((nIFO!=2)&&(polarization>=8&&polarization<=11))
711 {cout <<
"with polarization [8-11] works only two one detectors" << endl;
return;}
717 switch(polarization) {
725 pTitle=
TString(
"|F_{x}|/|F_{+}|");
728 pTitle=
TString(
"#sqrt{(|F_{+}|^{2}+|F_{x}|^{2})/nIFO}");
743 pTitle=
TString(
"F1_{x}/F2_{x}");
746 pTitle=
TString(
"F1_{+}/F2_{+}");
749 pTitle=
TString(
"#sqrt{|F1_{+}|^{2}+|F1_{x}|^{2})/sqrt(|F2_{+}|^{2}+|F2_{x}|^{2}}");
760 if(ifoName.CompareTo(
"A1")==0) ifoName=
TString(
"#tilde{A}");
761 else if(ifoName.CompareTo(
"H2")==0) ifoName=
TString(
"#tilde{H}");
762 else if(ifoName.CompareTo(
"I2")==0) ifoName=
TString(
"#tilde{I}");
763 else if(ifoName.CompareTo(
"R2")==0) ifoName=
TString(
"#tilde{R}");
764 else ifoName.Resize(1);
767 if(btitle)
gSM.
h2->SetTitle(
"Network = "+netName+
769 "Antenna Pattern = "+pTitle);
771 std::vector<wavecomplex>
F(nIFO);
773 double*
x =
new double[
size];
774 double*
y =
new double[
size];
775 double*
z =
new double[
size];
784 if (polarization!=11) {
822 for (
int k=0;
k<1;
k+=1) {
824 for (
int n=0;
n<
nIFO;
n++) F[
n] = pD[
n]->antenna(theta,phi,psi);
827 double F0=F[0].real()+F[0].imag();
828 double F1=F[1].real()+F[1].imag();
829 z[
cnt] += (F1!=0) ?
fabs(F0/F1) : 0.;
831 z[
cnt] /= (double)counts;
870 if(nIFO<2) {cout <<
"nIFO must be >= 2" << endl;
return -1.;}
872 if(ifo1.CompareTo(ifo2)==0)
return 0.0;
881 if(ifo1.CompareTo(this->getifo(
n)->Name)==0) {nifo++;ifoId1=
n;}
882 if(ifo2.CompareTo(this->getifo(
n)->Name)==0) {nifo++;ifoId2=
n;}
884 if(nifo<2) {cout <<
"gnetwork::GetDelay ifo not valid" << endl;
return -1.;}
896 if(tmax > maxTau) maxTau = tmax;
897 if(tmin < minTau) minTau = tmin;
899 if(strstr(mode,
"min"))
return minTau;
900 if(strstr(mode,
"max"))
return maxTau;
901 if(strstr(mode,
"MAX"))
return fabs(maxTau)>
fabs(minTau) ?
fabs(maxTau) :
fabs(minTau);
902 return (maxTau-minTau)/2.;
918 if(nIFO<2) {cout <<
"gnetwork::GetDelay nIFO must be >= 2" << endl;
return -1.;}
920 if(ifo1.CompareTo(ifo2)==0)
return 0.0;
929 if(ifo1.CompareTo(this->getifo(
n)->Name)==0) {nifo++;ifoId1=
n;}
930 if(ifo2.CompareTo(this->getifo(
n)->Name)==0) {nifo++;ifoId2=
n;}
932 if(nifo<2) {cout <<
"gnetwork::GetDelay ifo not valid" << endl;
return -1.;}
934 return pD[ifoId1]->
getTau(theta,phi)-pD[ifoId2]->
getTau(theta,phi);
944 if(nIFO<2) {cout <<
"gnetwork::DrawDelay nIFO must be >= 2" << endl;
return;}
946 if(ifo1.CompareTo(ifo2)==0) {cout <<
"gnetwork::DrawDelay ifo1 must != ifo2" << endl;
return;}
948 double ifo1d2_pos_delay=0.;
950 if(phi!=1000) ifo1d2_pos_delay=
GetDelay(ifo1, ifo2, phi, theta);
962 if(ifo1.CompareTo(this->getifo(
n)->Name)==0) {nifo++;ifoId1=
n;}
963 if(ifo2.CompareTo(this->getifo(
n)->Name)==0) {nifo++;ifoId2=
n;}
965 if(nifo<2) {cout <<
"gnetwork::DrawDelay ifo not valid" << endl;
return;}
968 double*
x =
new double[
size];
969 double*
y =
new double[
size];
970 double*
z =
new double[
size];
979 delay-=ifo1d2_pos_delay;
981 double fdelay=
fabs(fmod(delay,0.5/frequency));
982 int idelay =
int((
fabs(delay)-fdelay)/(0.5/frequency));
983 delay = idelay%2==0 ? fdelay : (0.5/
frequency)-fdelay;
1024 if(nIFO!=3) {cout <<
"gnetwork::Delay2Source nIFO must be = 3" << endl;
return 1;}
1030 if(ifoName[
n].CompareTo(ifoName[
m])==0)
1031 {cout <<
"gnetwork::Delay2Source ifos must differents" << endl;
return 2;}
1036 if(!gROOT->GetClass(
"XYZVector")) gSystem->Load(
"libMathCore");
1042 double a=sqrt((vD[1]-vD[0]).Mag2());
1043 double b=sqrt((vD[2]-vD[1]).Mag2());
1044 double c=sqrt((vD[2]-vD[0]).Mag2());
1047 double b2=(2/
a)*sqrt(s*(s-a)*(s-b)*(s-c));
1048 double b1=sqrt(c*c-b2*b2);
1050 double delta=pow(b1*(t1-t2)-a*(t1-t3),2)+pow(b2*(t1-t2),2);
1052 double stheta = sqrt(delta)/(a*b2);
1053 double sphi = -b2*(t1-t2)/sqrt(delta);
1055 if (stheta>1) stheta=1;
1056 if (stheta<-1) stheta=-1;
1058 double theta = asin(stheta);
1059 double phi = asin(sphi);
1061 double ctheta = sqrt(pow(a*b2,2)-delta)/(a*b2);
1062 double cphi = (a*(t1-t3)-b1*(t1-t2))/sqrt(delta);
1064 if (TMath::IsNaN(ctheta)) ctheta=-1;
1065 if (ctheta>1) ctheta=-1;
1066 if (ctheta<-1) ctheta=-1;
1068 double thetacn = acos(-ctheta);
1070 XYZVector
D1 = vD[1]-vD[0];
1071 XYZVector D3 = D1.Cross(vD[2]-vD[0]);
1072 XYZVector D2 = D1.Cross(D3);
1074 XYZVector eD1 = D1.Unit();
1075 XYZVector eD2 = D2.Unit();
1076 XYZVector eD3 = D3.Unit();
1078 Rotation3D R(eD1,eD2,eD3);
1089 S.SetPhi((TMath::PiOver2()+phi));
1093 if (ph1<0) ph1+=360;
1094 if (ph1>360) ph1-=360;
1096 S.SetTheta(thetacn);
1097 S.SetPhi((TMath::PiOver2()+phi));
1101 if (ph2<0) ph2+=360;
1102 if (ph2>360) ph2-=360;
1107 S.SetPhi(-(TMath::PiOver2()+phi));
1111 if (ph1<0) ph1+=360;
1112 if (ph1>360) ph1-=360;
1114 S.SetTheta(thetacn);
1115 S.SetPhi(-(TMath::PiOver2()+phi));
1119 if (ph2<0) ph2+=360;
1120 if (ph2>360) ph2-=360;
1137 if(gamma>1) {cout <<
"gamma must be <=1" << endl;
exit(1);}
1138 if(loop<1) {cout <<
"gamma must be >=1" << endl;
exit(1);}
1141 if(nIFO==0) {cout <<
"detectors are no declared" << endl;
exit(1);}
1146 std::vector<wavecomplex>
F(nIFO);
1147 double* X =
new double[
nIFO];
1148 double* u =
new double[
nIFO];
1149 double*
v =
new double[
nIFO];
1154 gRandom->SetSeed(0);
1155 for (
int l=0;
l<
L;
l++) {
1157 for (
int i=0;
i<loop;
i++) {
1161 double psi=gRandom->Uniform(0,180);
1163 double hp=gRandom->Uniform(-1,1);
1164 double hx=gRandom->Uniform(-1,1);
1169 X[
n] = hp*F[
n].real()+hx*F[
n].imag();
1170 if(snr>=0.0) E+=X[
n]*X[
n];
1174 if(snr>=0.0)
for (
int n=0;
n<
nIFO;
n++) X[
n] = X[
n]*snr/E + gRandom->Gaus(0.,1.);
1176 double gp=0,
gx=0,gI=0;
1178 gp+=F[
n].real()*F[
n].real();
1179 gx+=F[
n].imag()*F[
n].imag();
1180 gI+=F[
n].real()*F[
n].imag();
1188 Xp+=X[
k]*F[
k].real();
1189 Xx+=X[
k]*F[
k].imag();
1192 double uc = (Xp*
gx - Xx*gI);
1193 double us = (Xx*gp - Xp*gI);
1194 double vc = (gp*uc + gI*us);
1195 double vs = (
gx*us + gI*uc);
1201 u[
k]=F[
k].real()*uc+F[
k].imag()*us;
1203 v[
k]=-F[
k].imag()*vc+F[
k].real()*vs;
1209 ndi+=this->
netx(u,um,v,vm,GAMMA);
1210 }
else ndi+=this->
ndi(u,um,nIFO);
1218 double xndi=ndi/loop;
1219 if(h2max<xndi) h2max=xndi;
1224 if(gamma<0)
gSM.
h2->GetZaxis()->SetRangeUser(1,h2max);
1246 cout <<
"gnetwork::DrawNetworkDetectorIndex : Error - network skymap not initialized" << endl;
1257 if(ifoName.CompareTo(
"A1")==0) ifoName=
TString(
"#tilde{A}");
1258 else if(ifoName.CompareTo(
"H2")==0) ifoName=
TString(
"#tilde{H}");
1259 else if(ifoName.CompareTo(
"I2")==0) ifoName=
TString(
"#tilde{I}");
1260 else if(ifoName.CompareTo(
"R2")==0) ifoName=
TString(
"#tilde{R}");
1261 else ifoName.Resize(1);
1264 if(btitle)
gSM.
h2->SetTitle(
"Network = "+netName+
1266 "Network Detector Index");
1284 DrawCircles(phi, theta, 0., lcolor, lwidth, lstyle, labels);
1309 for(n=0; n<
nIFO; n++) pD[n] = this->
getifo(n);
1314 phi_off=fmod(phi_off-phi+360,360);
1316 double ph1,th1,ph2,th2;
1320 Style_t marker[3] = {20,21,22};
1322 for(n=0;n<
nIFO;n++) {
1323 for(m=n+1;m<
nIFO;m++) {
1325 XYZVector
D1(pD[n]->Rv[0],pD[n]->Rv[1],pD[n]->Rv[2]);
1326 XYZVector D2(pD[m]->Rv[0],pD[m]->Rv[1],pD[m]->Rv[2]);
1331 XYZVector D12 = D1-D2;
1332 if(D12.Mag2()==0)
continue;
1333 TVector3 vD12(D12.X(),D12.Y(),D12.Z());
1335 TVector3 vSD(1,0,0);
1339 vSD.SetTheta(th1*d2r);
1340 vSD.SetPhi(ph1*d2r);
1343 ph1=fmod(ph1-phi_off+360,360);
1344 vSD.SetTheta(th1*d2r);
1345 vSD.SetPhi(ph1*d2r);
1347 vSD.SetTheta(theta*d2r);
1348 vSD.SetPhi(phi*d2r);
1361 th[
l] = rvSD.Theta()*r2d;
1362 ph[
l] = rvSD.Phi()*r2d+phi_off;
1363 ph[
l]=fmod(ph[l]+360,360);
1374 ph2=ph[l==0?L-1:l-1];
1379 if((
fabs(ph1-ph2)<180)&&(l<L-1)) {
1380 x[
P]=ph[
l]; y[
P]=th[
l];
1384 if(X>180) {x[
P]+=360; y[
P]-=90;}
1389 if(X>180) {x[
P]-=360; y[
P]+=90;}
1392 if(X>180) {x[
P]=-x[
P]; y[
P]-=90;}
1395 if(X>180) {x[
P]-=360; y[
P]-=90;}
1406 TPolyLine *pL =
new TPolyLine(P,x.
data,y.
data);
1408 pL->SetLineColor(lcolor);
1409 pL->SetLineStyle(lstyle);
1410 pL->SetLineWidth(lwidth);
1418 if(vSD.Dot(vD12)>0) {
1420 vth=D12.Theta()*r2d;
1422 vph=(-D12).Phi()*r2d;
1423 vth=(-D12).Theta()*r2d;
1425 vph=fmod(vph+phi_off+360,360);
1429 if(X>180) {vph+=360; vth-=90;}
1430 if(X<180) {vth-=90;}
1434 if(X>180) {vph-=360; vth+=90;}
1437 if(X>180) {vph=-vph; vth-=90;}
1440 if(X>180) {vph-=360; vth-=90;}
1450 TMarker* pM =
new TMarker(vph,vth,marker[ncircle%3]);
1451 pM->SetMarkerSize(1.0);
1452 pM->SetMarkerColor(kBlack);
1453 if(labels) pM->Draw();
1457 char ifoPair[16];
sprintf(ifoPair,
"%c%c",pD[n]->Name[0],pD[m]->Name[0]);
1458 TLatex *pL =
new TLatex(vph+4.0,vth,ifoPair);
1459 pL->SetTextFont(32);
1460 pL->SetTextSize(0.045);
1461 pL->SetTextColor(kBlack);
1462 if(labels) pL->Draw();
1463 siteP.push_back(pL);
1481 TFile* rfile =
new TFile(file,
"RECREATE");
1482 this->
Write(
"gnetwork");
1495 TFile* rfile =
new TFile(file);
1498 cout <<
"gnetwork::LoadObject : Error - input file don't contains object gnetwork" << endl;
1530 if(ptype!=0 && ptype!=1) {
1531 cout <<
"gnetwork::DrawPolargram : Error - wrong input parameter, must be [0/1]" << endl;
1540 cout <<
"gnetwork::DrawPolargram : Warning - event pixels size=0" << endl;
1554 rmax=TMath::Nint(1.1*rmax+0.5);
1556 for(
int n=0;
n<2;
n++)
if(
grP[
n]!=NULL)
delete grP[
n];
1558 canvasP =
new TCanvas(
"canvasP",
"polargram",800,800);
1559 gStyle->SetLineColor(kBlack);
1562 for(
int n=0;
n<2;
n++) {
1571 grP[
n] =
new TGraphPolar(size,apol,rpol);
1573 grP[
n]->SetMarkerStyle(20);
1574 grP[
n]->SetMarkerSize(0.8);
1575 grP[
n]->SetTitle(
" ");
1578 grP[
n]->SetMarkerColor(kBlue);
1579 grP[
n]->SetLineColor(kBlue);
1584 grP[
n]->SetMarkerColor(kRed);
1585 grP[
n]->SetLineColor(kRed);
1586 grP[
n]->Draw(
"PSAME");
1590 grP[
n]->GetPolargram()->SetTextColor(8);
1592 grP[
n]->SetMinRadial(0);
1593 grP[
n]->SetMaxRadial(rmax);
1594 grP[
n]->GetPolargram()->SetNdivPolar(612);
1595 grP[
n]->GetPolargram()->SetNdivRadial(504);
1596 grP[
n]->GetPolargram()->SetToDegree();
1597 grP[
n]->GetPolargram()->SetPolarLabelSize(0.03);
1598 grP[
n]->GetPolargram()->SetRadialLabelSize(0.03);
std::vector< char * > ifoName
TCanvas * DrawPolargram(int ptype, network *net=NULL)
detector * getifo(size_t n)
param: detector index
std::vector< TPolyLine * > circleL
detectorParams getDetectorParams()
virtual size_t size() const
wavearray< double > skyHole
size_t add(detector *)
param: detector structure return number of detectors in the network
void DrawSitesArms(double mlength=600000., Color_t lcolor=kBlack, Size_t lwidth=1.0, Style_t lstyle=1)
wavearray< double > p90_POL[2]
buffer for projection on network plane 00 ampl
void DrawAntennaPattern(int polarization=-1, int dpaletteId=0, bool btitle=true, int order=6)
void DrawDelay(TString ifo1, TString ifo2, double phi=1000., double theta=1000., double frequency=0.)
void CwbToCelestial(double ilongitude, double ilatitude, double &olongitude, double &olatitude, double gps=0)
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())
double GetSite(TString ifo, TString type="")
cout<< "skymap size : "<< L<< endl;for(int l=0;l< L;l++) sm.set(l, l);sm > const_cast< char * >("skymap.dat")
void set(size_t i, double a)
int Delay2Coordinates(double t1, double t2, double t3, double &ph1, double &th1, double &ph2, double &th2)
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<< "\t layers : "<< nLAYERS<< "\t dF(hz) : "<< dF<< "\t 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
double EarthEquatorialRadius()
void DrawSitesLabel(Color_t tcolor=kBlack, Size_t tsize=0.045, Font_t tfont=32)
wavearray< double > p00_POL[2]
buffers for cluster MRA energy
double getTheta(size_t i)
void DumpObject(char *file)
std::vector< TLatex * > siteP
void Draw(int dpaletteId=0, Option_t *option="colfz")
std::vector< detector * > ifoList
std::vector< TMarker * > siteM
wavearray< double > skyENRG
network ** net
NOISE_MDC_SIMULATION.
static int netx(double *, double, double *, double, double)
size_t getSkyIndex(double th, double ph)
param: theta param: phi
void DrawNetworkDetectorIndex(double gamma, int loop, double snr=-1.0, int dpaletteId=DUMMY_PALETTE_ID, bool btitle=true)
void FillData(int size, double *phi, double *theta, double *binc)
void DrawSitesShortLabel(Color_t tcolor=kBlack, Size_t tsize=0.052, Font_t tfont=32)
wavecomplex antenna(double, double, double=0.)
param: source theta,phi, polarization angle psi in degrees
gwavearray< double > * gx
void DrawSites(Color_t mcolor=kBlack, Size_t msize=2.0, Style_t mstyle=20)
unsigned int siteLabelType
static double ndi(double *, double, int)
void LoadObject(char *file)
wavearray< double > skyProb
double phi2RA(double ph, double gps)
double GetDelay(TString ifo1, TString ifo2, double phi, double theta)
std::vector< TText * > siteT
void CelestialToCwb(double ilongitude, double ilatitude, double &olongitude, double &olatitude, double gps=0)
void MakeNetworkDetectorIndex(double gamma, int loop, double snr=-1.0)
void ProjectParabolic(Double_t l, Double_t b, Double_t &Al, Double_t &Ab)
double fabs(const Complex &x)
void ProjectHammer(Double_t l, Double_t b, Double_t &Al, Double_t &Ab)
void CwbToGeographic(double ilongitude, double ilatitude, double &olongitude, double &olatitude)
wavearray< double > skyMaskCC
Meyer< double > S(1024, 2)
sprintf(tfres,"(1/%g)x(%g) (sec)x(Hz)", 2 *df, df)
skymap nSensitivity
list of wdm tranformations
double getTau(double, double)
param: source theta,phi angles in degrees
std::vector< TPolyLine * > siteA
double GetAntennaPattern(double phi, double theta, double psi=0., int polarization=1)
void ProjectSinusoidal(Double_t l, Double_t b, Double_t &Al, Double_t &Ab)
void Draw(char *smName, network *net=NULL)
xyz SetXYZ(xgc, ygc, zgc)
TGraphPolar * grP[2]
canvas used for the polargrams
wavearray< short > skyMask
void GeographicToCwb(double ilongitude, double ilatitude, double &olongitude, double &olatitude)
void delay(double theta, double phi)
detectorParams detParms[4]
std::vector< TLatex * > siteL
std::vector< TMarker * > daxisM
wavearray< double > r90_POL[2]
buffer for standard response 00 ampl
wavearray< double > r00_POL[2]
buffer for projection on network plane 90 ampl