Logo Coherent WaveBurst  
Reference Guide
Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DrawSGR1806.C
Go to the documentation of this file.
1 //
2 // Draw SGR1806 sky position & bar detectors antenna pattern
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 O1_ENABLED
14 #define N1_ENABLED
15 #define E1_ENABLED
16 
17 #define RESOLUTION 2
18 //#define RESOLUTION 4
19 
20 //#define COORDINATES "cWB"
21 #define COORDINATES "Geographic"
22 
23 #define PROJECTION ""
24 //#define PROJECTION "hammer"
25 //#define PROJECTION "sinusoidal"
26 
27 #define DISPLAY_WORLD_MAP
28 
29 //#define WRITE_PLOT
30 
31 // ARG 1806-20 SOURCE DEFINITION (RA 18h 05.7m Dec -20d 25m) Distance : 14.5 ± 1.4 kpc
32 // http://www.journals.uchicago.edu/ApJ/journal/issues/ApJ/v478n2/33968/
33 
34 #define DRAW_SGR1806
35 #define SGR1806_NAME "SGR_1806_20"
36 #define SGR1806_DATE "2004-12-27 21:30:26.68 UTC Mon"
37 #define SGR1806_GPS_TIME 788218239.68
38 //#define SGR1806_RA 270.095
39 //#define SGR1806_DEC (90-(-20.41666))
40 #define SGR1806_RA (270.095-360.0)
41 #define SGR1806_DEC -20.41666
42 
43 #define DRAW_SGRA
44 #define SGRA_NAME "SgrA*"
45 #define SGRA_DATE "2004-12-27 21:30:26 UTC Mon"
46 #define SGRA_GPS_TIME 788218239.68
47 // cWB
48 //#define SGRA_RA 266.41667
49 //#define SGRA_DEC (90-(-29.11667))
50 // Geographic
51 #define SGRA_RA (266.41667-360.0)
52 #define SGRA_DEC -29.11667
53 
54 //#define DRAW_DELAY
55 
56 void DrawSGR1806(bool draw_sensitivity = true) {
57 
58  int nIFO=0;
59  TString ifo[10];
60 #ifdef H1_ENABLED
61  ifo[nIFO++]="H1"; // LHO1
62 #endif
63 #ifdef L1_ENABLED
64  ifo[nIFO++]="L1"; // LLO
65 #endif
66 #ifdef G1_ENABLED
67  ifo[nIFO++]="G1"; // GEO
68 #endif
69 #ifdef V1_ENABLED
70  ifo[nIFO++]="V1"; // VIRGO
71 #endif
72 #ifdef T1_ENABLED
73  ifo[nIFO++]="T1"; // TAMA
74 #endif
75 #ifdef H2_ENABLED
76  ifo[nIFO++]="H2"; // LHO2
77 #endif
78 #ifdef A1_ENABLED
79  ifo[nIFO++]="A1"; // AIGO
80 #endif
81 #ifdef O1_ENABLED
82  ifo[nIFO++]="O1"; // AURIGA
83 #endif
84 #ifdef N1_ENABLED
85  ifo[nIFO++]="N1"; // NAUTILUS
86 #endif
87 #ifdef E1_ENABLED
88  ifo[nIFO++]="E1"; // EXPLORER
89 #endif
90 
91  cout << ifo[0] << " " << ifo[1] << endl;
92 
93  char ifostr[32]="";
94  for(int n=0; n<nIFO; n++) {
95  sprintf(ifostr,"%s %s",ifostr,ifo[n].Data());
96  }
97 
98  char title[256];
100 
101  if(draw_sensitivity) sprintf(title,"%s %s DPF F+ - Network : %s",SGR1806_NAME,SGR1806_DATE,ifostr);
102  else sprintf(title,"%s %s DPF Fx - Network : %s",SGR1806_NAME,SGR1806_DATE,ifostr);
103 
104  gnetwork* gNET = new gnetwork(nIFO,ifo);
105  gskymap* gSM = gNET->GetGskymap();
106 
107  gNET->setSkyMaps(0.4,0,180,0,360);
108  gNET->setAntenna();
109  gNET->setDelay(const_cast<char*>(ifo[0].Data()));
110 
112 // gSM->SetOptions("LVC experiment", 300,40, 1200, 670);
113 
114 #ifdef DISPLAY_WORLD_MAP
115  gSM->SetWorldMap();
116 #endif
117 
118  TH2D* h2 = (TH2D*)gSM->GetHistogram();
119  //h2->GetZaxis()->SetRangeUser(0,1.4);
120  gSM->SetTitle(title);
121 
122  double phi,theta;
123 #ifdef DRAW_SGR1806
124  phi=SGR1806_RA;
125  theta=SGR1806_DEC;
126 #endif
127 
128 #ifdef DRAW_DELAY
129  //gNET->DrawDelay(ifo[0],ifo[1]);
130  //gNET->DrawDelay(ifo[0],ifo[1],phi,theta);
131  gNET->DrawDelay(ifo[0],ifo[1],phi,theta,930.);
132 #else
133  gNET->DrawAntennaPattern(draw_sensitivity);
134 #endif
135  gNET->DrawSites(kWhite,0.6);
136  gNET->DrawSitesLabel(kWhite,0.025);
137 
138  gNET->GetSite(ifo[0]);
139 
140 #ifdef DRAW_SGR1806
141  gSM->DrawMarker(phi,theta, SGR1806_GPS_TIME, 29, 2.0, kYellow);
142  gSM->DrawText(phi-14, theta+8, SGR1806_GPS_TIME, SGR1806_NAME, 0.04, kWhite);
143  cout << "Time Delay -> " << gNET->GetDelay(ifo[0],ifo[1],phi,theta) << endl;
144  gNET->DrawCircles(phi,theta,SGR1806_GPS_TIME,kWhite);
145 #endif
146 
147 #ifdef DRAW_SGRA
148  phi=SGRA_RA;
149  theta=SGRA_DEC;
150  //gSM->DrawMarker(phi,theta, 29, 2.0, kBlack);
151  //gSM->DrawText(phi-14, theta-14, SGRA_NAME, 0.04, kBlack);
152  gSM->DrawMarker(phi,theta, SGR1806_GPS_TIME, 29, 2.0, kBlack);
153  gSM->DrawText(phi-14, theta-14, SGR1806_GPS_TIME, SGRA_NAME, 0.04, kBlack);
154 #endif
155 
156  double mTau=gNET->GetDelay(ifo[0],ifo[1],"MAX"); // maximum time delay
157  double dTau=gNET->GetDelay(ifo[0],ifo[1]); // time delay difference
158  cout<<"maximum time delay between detectors: "<<mTau<<endl;
159  cout<<" maximum time delay difference: "<<dTau<<endl;
160 
161 #ifdef WRITE_PLOT
162  cout << "Write : " << ofileName << endl;
163  gSM->Print(ofileName);
164 #endif
165 }
166 
TH2D * GetHistogram()
Definition: gskymap.hh:120
gskymap * gSM
#define PROJECTION
Definition: DrawSGR1806.C:23
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
void DrawDelay(TString ifo1, TString ifo2, double phi=1000., double theta=1000., double frequency=0.)
Definition: gnetwork.cc:939
void DrawCircles(double phi, double theta, double gps, Color_t lcolor=kBlack, Width_t lwidth=1, Style_t lstyle=1, bool labels=false)
Definition: gnetwork.cc:1289
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 SGR1806_DATE
Definition: DrawSGR1806.C:36
#define SGR1806_GPS_TIME
Definition: DrawSGR1806.C:37
float theta
void DrawMarker(double phi, double theta, int marker, Size_t msize=1, Color_t tcolor=1)
Definition: gskymap.cc:724
void DrawText(double phi, double theta, TString text, double tsize=0.04, Color_t tcolor=1)
Definition: gskymap.cc:781
void DrawSitesLabel(Color_t tcolor=kBlack, Size_t tsize=0.045, Font_t tfont=32)
Definition: gnetwork.cc:423
char ifostr[64]
void DrawSGR1806(bool draw_sensitivity=true)
Definition: DrawSGR1806.C:56
char ifo[NIFO_MAX][8]
#define nIFO
float phi
#define SGRA_RA
Definition: DrawSGR1806.C:51
void setSkyMaps(double sms, double t1, double t2, double p1, double p2)
Definition: gnetwork.hh:29
void DrawSites(Color_t mcolor=kBlack, Size_t msize=2.0, Style_t mstyle=20)
Definition: gnetwork.cc:238
#define SGR1806_RA
Definition: DrawSGR1806.C:40
void setDelay(const char *="L1")
Definition: network.cc:2736
TString ofileName
Definition: MergeTrees.C:37
void SetTitle(TString title)
Definition: gskymap.hh:134
double GetDelay(TString ifo1, TString ifo2, double phi, double theta)
Definition: gnetwork.cc:907
gskymap * GetGskymap()
Definition: gnetwork.hh:26
#define SGR1806_NAME
Definition: DrawSGR1806.C:35
#define SGRA_DEC
Definition: DrawSGR1806.C:52
char title[256]
Definition: SSeriesExample.C:1
void SetWorldMap(bool drawWorldMap=true)
Definition: gskymap.hh:136
#define COORDINATES
Definition: DrawSGR1806.C:21
double mTau
sprintf(tfres,"(1/%g)x(%g) (sec)x(Hz)", 2 *df, df)
#define SGR1806_DEC
Definition: DrawSGR1806.C:41
void Print(TString pname)
Definition: gskymap.cc:1104
#define RESOLUTION
Definition: DrawSGR1806.C:17
void SetOptions(TString projection="hammer", TString coordinate="Geographic", double resolution=1, bool goff=false)
Definition: gskymap.cc:66
#define SGRA_NAME
Definition: DrawSGR1806.C:44