Logo Coherent WaveBurst  
Reference Guide
Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Test_H2H3_45deg.C
Go to the documentation of this file.
1 //
2 // Test L1H2H3V1 with H2 H3 @ 45deg
3 // Author : Gabriele Vedovato
4 
5 #define WORLD_MAP_DIR "$CWB_GWAT/data/"
6 
7 #define RESOLUTION 2
8 //#define RESOLUTION 4
9 
10 //#define COORDINATES "cWB"
11 #define COORDINATES "Geographic"
12 
13 //#define PROJECTION ""
14 #define PROJECTION "hammer"
15 //#define PROJECTION "sinusoidal"
16 
17 // polarization=0 -> |Fx| DPF
18 // polarization=1 -> |F+| DPF
19 // polarization=2 -> |Fx|/|F+| DPF
20 // polarization=3 -> sqrt(|F+|^2+|Fx|^2) DPF
21 // polarization=4 -> |Fx|^2 DPF
22 // polarization=5 -> |F+|^2 DPF
23 // polarization=6 -> Fx only with 1 detector
24 // polarization=7 -> F+ only with 1 detector
25 // polarization=8 -> F1x/F2x only with 2 detectors
26 // polarization=9 -> F1+/F2+ only with 2 detectors
27 // polarization=10 -> sqrt(|F1+|^2+|F1x|^2)/sqrt(|F2+|^2+|F2x|^2) only with 2 detectors
28 // polarization=11 -> The same as (10) but averaged over psi only with 2 detectors
29 
30 #define H2_ELEVATION 1000000 // H2 elevation in meters
31 
32 #define N_IFO 4
33 
35 
36  // define network
37 
38  char ifo[NIFO_MAX][8];
39 
40  strcpy(ifo[0],"L1");
41  strcpy(ifo[1],"");
42  strcpy(ifo[2],"");
43  strcpy(ifo[3],"V1");
44 
46  {"L1", 30.5629, -90.7742, 0.0, 0, ( +90-197.716), 0, ( -197.716 )}, // L1
47  {"H2", 46.4551, -119.408, H2_ELEVATION, 0, ( +90-125.998), 0, (+45-125.998 )}, // H2
48  {"H3", 46.4551, -119.408, 0.0, 0, ( +45-125.998), 0, ( -125.998 )}, // H3
49  {"V1", 43.6314, 10.5045, 0.0, 0, ( +90-70.5675), 0, ( -70.5675)}, // V1
50  };
51 
52  detector* pD[NIFO_MAX]; //! pointers to detectors
53  for(int i=0; i<N_IFO; i++) {
54  if(strlen(ifo[i])>0) pD[i] = new detector(ifo[i]); // built in detector
55  else pD[i] = new detector(detParms[i]); // user define detector
56  }
57 
58  gnetwork* gNET = new gnetwork;
59  for(int i=0; i<N_IFO; i++) gNET->add(pD[i]);
60  for(int n=0;n<N_IFO;n++) gNET->GetSite(detParms[n].name);
61 
62  // display network antenna pattern
63 
64  gskymap* gSM = gNET->GetGskymap();
66 
67  TString world_map = gSystem->ExpandPathName(WORLD_MAP_DIR);
68  gSM->SetWorldMapPath(world_map.Data());
69  gSM->SetWorldMap();
70 
71  gNET->DrawAntennaPattern(polarization,0,true);
72  gNET->DrawSitesShortLabel(kBlack);
73  gNET->DrawSites(kBlack,2.0);
74  gNET->DrawSitesArms(1000000,kWhite,3.0);
75 
76  // print delays (theta,phi is the H2,H3 zenit direction)
77 
78  double theta=90-46.4551; // theta
79  double phi=360-119.408; // phi
80 
81  for(int i=0;i<N_IFO;i++) {
82  for(int j=i+1;j<N_IFO;j++) {
83  cout << detParms[i].name << " " << detParms[j].name << " -> "
84  << gNET->GetDelay(detParms[i].name,detParms[j].name,phi,theta) << " sec " << endl;
85  }
86  }
87 }
88 
gskymap * gSM
gnetwork * gNET
size_t add(detector *)
param: detector structure return number of detectors in the network
Definition: network.cc:2528
void DrawSitesArms(double mlength=600000., Color_t lcolor=kBlack, Size_t lwidth=1.0, Style_t lstyle=1)
Definition: gnetwork.cc:295
void DrawAntennaPattern(int polarization=-1, int dpaletteId=0, bool btitle=true, int order=6)
Definition: gnetwork.cc:655
char name[32]
Definition: detector.hh:32
par[0] name
int n
Definition: cwb_net.C:10
double GetSite(TString ifo, TString type="")
Definition: gnetwork.cc:167
TString("c")
#define PROJECTION
float theta
int polarization
int j
Definition: cwb_net.C:10
#define WORLD_MAP_DIR
i drho i
char ifo[NIFO_MAX][8]
TString world_map
Definition: DrawGNET.C:16
void DrawSitesShortLabel(Color_t tcolor=kBlack, Size_t tsize=0.052, Font_t tfont=32)
Definition: gnetwork.cc:407
float phi
#define N_IFO
const int NIFO_MAX
Definition: wat.hh:4
void DrawSites(Color_t mcolor=kBlack, Size_t msize=2.0, Style_t mstyle=20)
Definition: gnetwork.cc:238
void SetWorldMapPath(TString worldMapPath)
Definition: gskymap.hh:138
double GetDelay(TString ifo1, TString ifo2, double phi, double theta)
Definition: gnetwork.cc:907
gskymap * GetGskymap()
Definition: gnetwork.hh:26
void SetWorldMap(bool drawWorldMap=true)
Definition: gskymap.hh:136
strcpy(RunLabel, RUN_LABEL)
#define H2_ELEVATION
#define RESOLUTION
#define COORDINATES
void Test_H2H3_45deg(int polarization=3)
detectorParams detParms[4]
void SetOptions(TString projection="hammer", TString coordinate="Geographic", double resolution=1, bool goff=false)
Definition: gskymap.cc:66
detector ** pD