Logo Coherent WaveBurst  
Reference Guide
Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Delays2Directions.C
Go to the documentation of this file.
1 //
2 // Convert Delay to Sky Coordinates
3 // Author : Gabriele Vedovato
4 
5 #define ODIR_NAME "plots"
6 
8 
9  int nIFO=0;
10  TString ifo[10];
11  if(network.Contains("V1")) ifo[nIFO++]="V1"; // VIRGO
12  if(network.Contains("H1")) ifo[nIFO++]="H1"; // LHO1
13  if(network.Contains("L1")) ifo[nIFO++]="L1"; // LLO
14  if(network.Contains("G1")) ifo[nIFO++]="G1"; // GEO
15  if(network.Contains("T1")) ifo[nIFO++]="T1"; // TAMA
16  if(network.Contains("H2")) ifo[nIFO++]="H2"; // LHO2
17  if(network.Contains("A1")) ifo[nIFO++]="A1"; // AIGO
18  if(network.Contains("O1")) ifo[nIFO++]="O1"; // AURIGA
19  if(network.Contains("N1")) ifo[nIFO++]="N1"; // NAUTILUS
20  if(network.Contains("E1")) ifo[nIFO++]="E1"; // EXPLORER
21  if(network.Contains("A2")) ifo[nIFO++]="A2"; // AUSTRALIAN 90°
22  if(network.Contains("J1")) ifo[nIFO++]="J1"; // JAPANESE
23 
24  if(nIFO==0) {cout << "No detectors defined !!! " << endl;exit(1);}
25 
26  char ifostr[32]="";
27  for(int n=0; n<nIFO; n++) {
28  sprintf(ifostr,"%s %s",ifostr,ifo[n].Data());
29  }
30  cout << "Network : " << ifostr << endl;
31 
32  gnetwork gNET(nIFO,ifo);
33 
34  TString ifoName[3];
35  for(int n=0; n<nIFO; n++) ifoName[n]=TString(gNET.getifo(n)->Name);
36  for(int n=0; n<nIFO; n++) cout << n << " " << ifoName[n].Data() << endl;
37 
38 /*
39 H-V : 874649008.2204 - 874649008.2001 = 0.0203
40 L-V : 874649008.2172 - 874649008.2008 = 0.0165
41 L-H : 874649008.2257 - 874649008.2286 = -0.0029
42 */
43 
44  double ph1,ph2,th1,th2;
45 
46  gNET.Delay2Coordinates(0,0.0203,0.0165,ph1,th1,ph2,th2);
47  cout << "ph1 : " << ph1 << " th1 : " << th1 << " ph2 : " << ph2 << " th2 : " << th2 << endl;
48  CwbToGeographic(ph1,th1,ph1,th1);
49  CwbToGeographic(ph2,th2,ph2,th2);
50  cout << "ph1 : " << ph1 << " th1 : " << th1 << " ph2 : " << ph2 << " th2 : " << th2 << endl;
51 
52  exit(0);
53 }
54 
detector * getifo(size_t n)
param: detector index
Definition: network.hh:418
gnetwork * gNET
int n
Definition: cwb_net.C:10
TString("c")
int Delay2Coordinates(double t1, double t2, double t3, double &ph1, double &th1, double &ph2, double &th2)
Definition: gnetwork.cc:1009
char ifostr[64]
char ifo[NIFO_MAX][8]
#define nIFO
void Delays2Directions(TString network="L1H1V1")
char Name[16]
Definition: detector.hh:309
void CwbToGeographic(double ilongitude, double ilatitude, double &olongitude, double &olatitude)
Definition: skycoord.hh:396
sprintf(tfres,"(1/%g)x(%g) (sec)x(Hz)", 2 *df, df)
exit(0)