Logo Coherent WaveBurst  
Reference Guide
Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TestSiteJ1.C
Go to the documentation of this file.
1 //
2 // Test Site J1
3 // Author : Gabriele Vedovato
4 
5 
6 #define L1_ENABLED
7 #define H1_ENABLED
8 #define V1_ENABLED
9 //#define H2_ENABLED
10 //#define G1_ENABLED
11 //#define T1_ENABLED
12 //#define A1_ENABLED
13 //#define A2_ENABLED
14 //#define O1_ENABLED
15 //#define N1_ENABLED
16 //#define E1_ENABLED
17 #define J1_ENABLED
18 
19 #define RESOLUTION 2
20 //#define RESOLUTION 4
21 
22 //#define COORDINATES "cWB"
23 #define COORDINATES "Geographic"
24 
25 #define PROJECTION ""
26 //#define PROJECTION "hammer"
27 //#define PROJECTION "sinusoidal"
28 
29 #define DISPLAY_WORLD_MAP
30 
31 //#define WRITE_PLOT
32 
33 #define INJ_PHI 9.064681e-01
34 #define INJ_THETA -2.885531e-01
35 #define INJ_PSI 1.427236
36 
37 //#define TITLE "LHO1 LLO VIRGO LCGT Network Sensitivity |F+|"
38 //#define TITLE "LHO1 LLO VIRGO LCGT Network Alignment |Fx|/|F+|"
39 
40 //#define TITLE "LHO1 LLO VIRGO LCGT AIGO2 Network Sensitivity |F+|"
41 //#define TITLE "LHO1 LLO VIRGO LCGT AIGO2 Network Alignment |Fx|/|F+|"
42 
43 //#define TITLE "LHO1 LLO VIRGO LCGT AIGO2 Network Sensitivity |F+|"
44 #define TITLE "LHO1 LLO VIRGO LCGT AIGO1 Network Alignment |Fx|/|F+|"
45 
46 void TestSiteJ1(bool draw_sensitivity = true) {
47 
48  int nIFO=0;
49  TString ifo[10];
50 #ifdef H1_ENABLED
51  ifo[nIFO++]="H1"; // LHO1
52 #endif
53 #ifdef L1_ENABLED
54  ifo[nIFO++]="L1"; // LLO
55 #endif
56 #ifdef G1_ENABLED
57  ifo[nIFO++]="G1"; // GEO
58 #endif
59 #ifdef V1_ENABLED
60  ifo[nIFO++]="V1"; // VIRGO
61 #endif
62 #ifdef T1_ENABLED
63  ifo[nIFO++]="T1"; // TAMA
64 #endif
65 #ifdef H2_ENABLED
66  ifo[nIFO++]="H2"; // LHO2
67 #endif
68 #ifdef A1_ENABLED
69  ifo[nIFO++]="A1"; // AIGO
70 #endif
71 #ifdef A2_ENABLED
72  ifo[nIFO++]="A2"; // AIGO 45°
73 #endif
74 #ifdef O1_ENABLED
75  ifo[nIFO++]="O1"; // AURIGA
76 #endif
77 #ifdef N1_ENABLED
78  ifo[nIFO++]="N1"; // NAUTILUS
79 #endif
80 #ifdef E1_ENABLED
81  ifo[nIFO++]="E1"; // EXPLORER
82 #endif
83 #ifdef J1_ENABLED
84  ifo[nIFO++]="J1"; // LCGT
85 #endif
86 
87  char ifostr[32]="";
88  for(int n=0; n<nIFO; n++) {
89  sprintf(ifostr,"%s %s",ifostr,ifo[n].Data());
90  }
91 
92  TString title;
94 
95  gnetwork* gNET = new gnetwork(nIFO,ifo);
96  gskymap* gSM = gNET->GetGskymap();
98 // gSM->SetOptions("LVC experiment", 300,40, 1200, 670);
99 
100  gNET->setSkyMaps(0.4,0,180,0,360);
101  gNET->setAntenna();
102  gNET->setDelay(const_cast<char*>(ifo[0].Data()));
103 
104 #ifdef DISPLAY_WORLD_MAP
105  gSM->SetWorldMap();
106 #endif
107 
108  TH2D* h2 = (TH2D*)gSM->GetHistogram();
109  gNET->SetTitle(ifostr);
110 #ifdef TITLE
111  gNET->SetTitle(TITLE);
112 #endif
113 
114  gNET->DrawAntennaPattern(draw_sensitivity,true); // true alignment
115  gNET->DrawSites(kWhite,0.6);
116  gNET->DrawSitesLabel(kWhite,0.025);
117 
118  gNET->GetSite("H1");
119  gNET->GetSite("L1");
120  gNET->GetSite("V1");
121  gNET->GetSite("J1");
122 
123  double Pi=TMath::Pi();
124 
125  double theta = 0;
126  theta = acos(INJ_THETA);
127  theta*= 180/Pi;
128 
129  double phi = 0;
130  phi = INJ_PHI > 0 ? INJ_PHI : 2*Pi+INJ_PHI;
131  phi*= 180/Pi;
132 
133  double psi = 0;
134  psi = INJ_PSI;
135  psi*= 180/Pi;
136 
137  cout << "phi : " << phi << " theta : " << theta << " psi : " << psi << endl;
138 
139  double Fp = gNET->GetAntennaPattern(phi,theta,psi,true);
140  double Fc = gNET->GetAntennaPattern(phi,theta,psi,false);
141 
142  cout << "DPF -> " << " Fp " << Fp << " Fc : " << Fc << endl;
143 
144  detector J1((char*)"J1");
145  detector L1((char*)"L1");
146  cout << endl;
147  wavecomplex fJ1,fL1;
148  fJ1 = J1.antenna(theta,phi,psi);
149  fL1 = L1.antenna(theta,phi,psi);
150  cout << endl;
151  cout << " fJ1p : " << fJ1.real() << " fJ1x : " << fJ1.imag() << endl;
152  cout << " fL1p : " << fL1.real() << " fL1x : " << fL1.imag() << endl;
153 
154 #ifdef WRITE_PLOT
155  cout << "Write : " << ofileName << endl;
156  gSM->Print(ofileName);
157 #endif
158 }
159 
TH2D * GetHistogram()
Definition: gskymap.hh:120
gskymap * gSM
double imag() const
Definition: wavecomplex.hh:52
gnetwork * gNET
void setAntenna(detector *)
param: detector (use theta, phi index array)
Definition: network.cc:2815
void DrawAntennaPattern(int polarization=-1, int dpaletteId=0, bool btitle=true, int order=6)
Definition: gnetwork.cc:655
int n
Definition: cwb_net.C:10
double GetSite(TString ifo, TString type="")
Definition: gnetwork.cc:167
cout<< "skymap size : "<< L<< endl;for(int l=0;l< L;l++) sm.set(l, l);sm > const_cast< char * >("skymap.dat")
TString("c")
#define TITLE
Definition: TestSiteJ1.C:44
#define RESOLUTION
Definition: TestSiteJ1.C:19
float theta
double real() const
Definition: wavecomplex.hh:51
void DrawSitesLabel(Color_t tcolor=kBlack, Size_t tsize=0.045, Font_t tfont=32)
Definition: gnetwork.cc:423
char ifostr[64]
char ifo[NIFO_MAX][8]
void TestSiteJ1(bool draw_sensitivity=true)
Definition: TestSiteJ1.C:46
#define nIFO
#define INJ_THETA
Definition: TestSiteJ1.C:34
float phi
wavecomplex antenna(double, double, double=0.)
param: source theta,phi, polarization angle psi in degrees
Definition: detector.cc:473
float psi
void setSkyMaps(double sms, double t1, double t2, double p1, double p2)
Definition: gnetwork.hh:29
#define COORDINATES
Definition: TestSiteJ1.C:23
double Pi
void DrawSites(Color_t mcolor=kBlack, Size_t msize=2.0, Style_t mstyle=20)
Definition: gnetwork.cc:238
gNET add & L1
Definition: DrawGNET.C:9
void setDelay(const char *="L1")
Definition: network.cc:2736
TString ofileName
Definition: MergeTrees.C:37
#define INJ_PSI
Definition: TestSiteJ1.C:35
#define INJ_PHI
Definition: TestSiteJ1.C:33
gskymap * GetGskymap()
Definition: gnetwork.hh:26
char title[256]
Definition: SSeriesExample.C:1
void SetWorldMap(bool drawWorldMap=true)
Definition: gskymap.hh:136
#define PROJECTION
Definition: TestSiteJ1.C:25
sprintf(tfres,"(1/%g)x(%g) (sec)x(Hz)", 2 *df, df)
double GetAntennaPattern(double phi, double theta, double psi=0., int polarization=1)
Definition: gnetwork.cc:545
void Print(TString pname)
Definition: gskymap.cc:1104
void SetOptions(TString projection="hammer", TString coordinate="Geographic", double resolution=1, bool goff=false)
Definition: gskymap.cc:66