Logo Coherent WaveBurst  
Reference Guide
Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DrawO1N1E1.C
Go to the documentation of this file.
1 //
2 // Draw Bar Detectors Antenna Patterns
3 // Author : Gabriele Vedovato
4 
5 //#define L1_ENABLED
6 //#define H1_ENABLED
7 //#define V1_ENABLED
8 //#define H2_ENABLED
9 //#define G1_ENABLED
10 //#define T1_ENABLED
11 //#define A1_ENABLED
12 #define O1_ENABLED
13 #define N1_ENABLED
14 //#define E1_ENABLED
15 
16 #define RESOLUTION 2
17 //#define RESOLUTION 4
18 
19 //#define COORDINATES "cWB"
20 #define COORDINATES "Geographic"
21 
22 #define PROJECTION ""
23 //#define PROJECTION "hammer"
24 //#define PROJECTION "sinusoidal"
25 //#define PROJECTION "parabolic"
26 
27 #define DISPLAY_WORLD_MAP
28 
29 //#define WRITE_PLOT
30 
31 #define DRAW_SGRA
32 #define SGRA_NAME "SgrA*"
33 #define SGRA_DEC -29.11667
34 #define SGRA_RA 266.41667
35 
36 #define DRAW_SGR1806
37 #define SGR1806_NAME "SGR_1806_20"
38 #define SGR1806_DATE "2004-12-27 21:30:26.68 UTC Mon"
39 #define SGR1806_GPS_TIME 788218239.68
40 #define SGR1806_RA 270.095
41 #define SGR1806_DEC (90-(-20.41666))
42 
43 void DrawO1N1E1(bool draw_sensitivity = true) {
44 
45  int nIFO=0;
46  TString ifo[10];
47 #ifdef H1_ENABLED
48  ifo[nIFO++]="H1"; // LHO1
49 #endif
50 #ifdef L1_ENABLED
51  ifo[nIFO++]="L1"; // LLO
52 #endif
53 #ifdef G1_ENABLED
54  ifo[nIFO++]="G1"; // GEO
55 #endif
56 #ifdef V1_ENABLED
57  ifo[nIFO++]="V1"; // VIRGO
58 #endif
59 #ifdef T1_ENABLED
60  ifo[nIFO++]="T1"; // TAMA
61 #endif
62 #ifdef H2_ENABLED
63  ifo[nIFO++]="H2"; // LHO2
64 #endif
65 #ifdef A1_ENABLED
66  ifo[nIFO++]="A1"; // AIGO
67 #endif
68 #ifdef O1_ENABLED
69  ifo[nIFO++]="O1"; // AURIGA
70 #endif
71 #ifdef N1_ENABLED
72  ifo[nIFO++]="N1"; // NAUTILUS
73 #endif
74 #ifdef E1_ENABLED
75  ifo[nIFO++]="E1"; // EXPLORER
76 #endif
77 
78  cout << ifo[0] << " " << ifo[1] << endl;
79 
80  char ifostr[32]="";
81  for(int n=0; n<nIFO; n++) {
82  sprintf(ifostr,"%s %s",ifostr,ifo[n].Data());
83  }
84 
85  char title[256];
87 
88  //sprintf(title,"AURIGA NAUTILUS EXPLORER - Network Sensitivity");
89  sprintf(title,"AURIGA NAUTILUS - Network Sensitivity (%s)",SGR1806_DATE);
90 
91  gnetwork* gNET = new gnetwork(nIFO,ifo);
92 
93  gNET->setSkyMaps(0.4,0,180,0,360);
94  gNET->setAntenna();
95  gNET->setDelay(const_cast<char*>(ifo[0].Data()));
96 
97  gskymap* gSM = gNET->GetGskymap();
99 // gSM->SetOptions("LVC experiment", 300,40, 1200, 670);
100 
101 #ifdef DISPLAY_WORLD_MAP
102  gSM->SetWorldMap();
103 #endif
104 
105  gSM->SetGalacticDiskColor(kBlack);
106  gSM->SetGalacticDisk(788218239.68);
107 
108  TH2D* h2 = (TH2D*)gSM->GetHistogram();
109  //h2->GetZaxis()->SetRangeUser(0,1.4);
110  gNET->SetTitle(title);
111 
112  gNET->DrawAntennaPattern(draw_sensitivity,57);
113  gNET->DrawSites(kBlack,1.0);
114  //gNET->DrawSitesLabel(kBlack,0.025);
115 
116  for(int n=0;n<nIFO;n++) gNET->GetSite(ifo[n]);
117  double theta[3];
118  double phi[3];
119  for(int n=0;n<nIFO;n++) theta[n]=gNET->GetSite(ifo[n],"theta");
120  for(int n=0;n<nIFO;n++) phi[n]=gNET->GetSite(ifo[n],"theta");
121 
122  double Tphi[3]={22,-4,-25};
123  double Ttheta[3]={44.25,30.25,53.58};
124 
125  gSM->DrawText(Tphi[0], Ttheta[0], "AURIGA", 0.04, kBlack);
126  gSM->DrawText(Tphi[1], Ttheta[1], "NAUTILUS", 0.04, kBlack);
127  //gSM->DrawText(Tphi[2], Ttheta[2], "EXPLORER", 0.04, kBlack);
128 
129 #ifdef DRAW_SGRA
130  if(COORDINATES=="Geographic") {
131  gSM->DrawMarker(SGRA_RA-420, SGRA_DEC, 29, 2.0, kBlack);
132  gSM->DrawText(SGRA_RA-8-420, SGRA_DEC-8, SGRA_NAME, 0.04, kBlack);
133  }
134 #endif
135 
136 #ifdef DRAW_SGR1806
137  double sphi,stheta;
138  sphi=SGR1806_RA;
139  stheta=SGR1806_DEC;
140  skymap sm;
141  sphi = sm.RA2phi(sphi,SGR1806_GPS_TIME);
142  if(COORDINATES=="Geographic") {
143  CwbToGeographic(sphi,stheta,sphi,stheta);
144  } else {
145  gSM->DrawMarker(sphi,stheta, 29, 2.0, kBlack);
146  gSM->DrawText(sphi-14, stheta+8, SGR1806_NAME, 0.04, kBlack);
147  }
148 #endif
149 
150  double mTau=gNET->GetDelay(ifo[0],ifo[1],"MAX"); // maximum time delay
151  double dTau=gNET->GetDelay(ifo[0],ifo[1]); // time delay difference
152  cout<<"maximum time delay between detectors: "<<mTau<<endl;
153  cout<<" maximum time delay difference: "<<dTau<<endl;
154 
155 #ifdef WRITE_PLOT
156  cout << "Write : " << ofileName << endl;
157  gSM->Print(ofileName);
158 #endif
159 }
160 
TH2D * GetHistogram()
Definition: gskymap.hh:120
gskymap * gSM
void DrawO1N1E1(bool draw_sensitivity=true)
Definition: DrawO1N1E1.C:43
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
#define SGRA_DEC
Definition: DrawO1N1E1.C:33
int n
Definition: cwb_net.C:10
double GetSite(TString ifo, TString type="")
Definition: gnetwork.cc:167
#define PROJECTION
Definition: DrawO1N1E1.C:22
cout<< "skymap size : "<< L<< endl;for(int l=0;l< L;l++) sm.set(l, l);sm > const_cast< char * >("skymap.dat")
TString("c")
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
char ifostr[64]
char ifo[NIFO_MAX][8]
#define COORDINATES
Definition: DrawO1N1E1.C:20
#define nIFO
float phi
void setSkyMaps(double sms, double t1, double t2, double p1, double p2)
Definition: gnetwork.hh:29
void SetGalacticDiskColor(Color_t colorGalacticDisk=kBlack)
Definition: gskymap.hh:147
#define SGRA_RA
Definition: DrawO1N1E1.C:34
void DrawSites(Color_t mcolor=kBlack, Size_t msize=2.0, Style_t mstyle=20)
Definition: gnetwork.cc:238
#define SGR1806_GPS_TIME
Definition: DrawO1N1E1.C:39
void SetGalacticDisk(double gpsGalacticDisk=0.0)
Definition: gskymap.hh:145
#define RESOLUTION
Definition: DrawO1N1E1.C:16
#define SGRA_NAME
Definition: DrawO1N1E1.C:32
double RA2phi(double ph, double gps)
Definition: skymap.hh:195
void setDelay(const char *="L1")
Definition: network.cc:2736
Definition: skymap.hh:45
TString ofileName
Definition: MergeTrees.C:37
double GetDelay(TString ifo1, TString ifo2, double phi, double theta)
Definition: gnetwork.cc:907
gskymap * GetGskymap()
Definition: gnetwork.hh:26
char title[256]
Definition: SSeriesExample.C:1
void SetWorldMap(bool drawWorldMap=true)
Definition: gskymap.hh:136
double mTau
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)
#define SGR1806_NAME
Definition: DrawO1N1E1.C:37
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
#define SGR1806_DEC
Definition: DrawO1N1E1.C:41
#define SGR1806_DATE
Definition: DrawO1N1E1.C:38
#define SGR1806_RA
Definition: DrawO1N1E1.C:40