Logo Coherent WaveBurst  
Reference Guide
Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
gnetwork.hh
Go to the documentation of this file.
1 /**********************************************************
2  * Package: graphic wat Class Library
3  * File name: gnetwork.hh
4  * Author: Gabriele Vedovato (vedovato@lnl.infn.it)
5  **********************************************************/
6 
7 
8 #ifndef GNETWORK_HH
9 #define GNETWORK_HH
10 
11 #include "gskymap.hh"
12 #include "network.hh"
13 #include "TGraphPolar.h"
14 
15 class gnetwork : public network
16 {
17 
18 public:
19 
20  // Constructors
21  gnetwork() : network() {Init();}
24  virtual ~gnetwork();
25 
26  gskymap* GetGskymap() {return &gSM;}
27  void SetGskymap(gskymap& gSM) {this->gSM = gSM;}
28 
29  void setSkyMaps(double sms,double t1,double t2,double p1,double p2) {
30  network::setSkyMaps(sms,t1,t2,p1,p2);gSM=gskymap(sms,t1,t2,p1,p2);}
31  void setSkyMaps(int healpix_order) {
32  network::setSkyMaps(int(healpix_order));gSM=gskymap(int(healpix_order));}
33 
34  void DrawAntennaPattern(int polarization=-1, int dpaletteId=0, bool btitle=true, int order=6);
35  void DrawSites(Color_t mcolor=kBlack, Size_t msize=2.0, Style_t mstyle=20);
36  void DrawSitesArms(double mlength=600000., Color_t lcolor=kBlack, Size_t lwidth=1.0, Style_t lstyle=1);
37  void DrawSitesShortLabel(Color_t tcolor=kBlack, Size_t tsize=0.052, Font_t tfont=32);
38  void DrawSitesLabel(Color_t tcolor=kBlack, Size_t tsize=0.045, Font_t tfont=32);
39  void DrawDelay(TString ifo1, TString ifo2,
40  double phi=1000., double theta=1000., double frequency=0.);
41  double GetDelay(TString ifo1, TString ifo2, double phi, double theta);
42  double GetDelay(TString ifo1, TString ifo2, TString mode="");
43  double GetAntennaPattern(double phi, double theta, double psi=0., int polarization=1);
44  double GetAntennaPattern(TString ifo, double phi, double theta, double psi=0., bool plus=true);
45 
46  int Delay2Coordinates(double t1, double t2, double t3, double& ph1, double& th1, double& ph2,double& th2);
47 
48  double GetSite(TString ifo, TString type="");
49 
50  void MakeNetworkDetectorIndex(double gamma, int loop, double snr=-1.0);
51  void DrawNetworkDetectorIndex(double gamma, int loop, double snr=-1.0,
52  int dpaletteId=DUMMY_PALETTE_ID, bool btitle=true);
53 
54  void DrawCircles(double phi, double theta, double gps,
55  Color_t lcolor=kBlack, Width_t lwidth=1, Style_t lstyle=1, bool labels=false);
56  void DrawCircles(double phi, double theta,
57  Color_t lcolor=kBlack, Width_t lwidth=1, Style_t lstyle=1, bool labels=false);
58 
59  void Draw(char* smName, network* net=NULL) {Draw(TString(smName),net);}
60  void Draw(TString smName, network* net=NULL);
61 
62  void ClearSites();
63  void ClearSitesArms();
64  void ClearSitesLabel();
65  void ClearCircles();
66 
67  //: dump gnetwork into root file
68  void DumpObject(char* file);
69  //: load gnetwork object from root file
70  void LoadObject(char* file);
71 
72  static inline double ndi(double*, double, int);
73 
74  TCanvas* DrawPolargram(int ptype, network* net=NULL);
75 
76 private:
77 
78  void Init();
79  void Draw(skymap sm, TString title="") {gSM=sm;gSM.SetTitle(TString("network ")+title);gSM.Draw();}
81  skymap sm=nSensitivity;for(int l=0;l<(int)sm.size();l++) sm.set(l,double(w[l]));
82  Draw(sm,title);return;}
84  skymap sm=nSensitivity;for(int l=0;l<(int)sm.size();l++) sm.set(l,double(w[l]));
85  Draw(sm,title);return;}
87  skymap sm=nSensitivity;for(int l=0;l<(int)sm.size();l++) sm.set(l,double(w[l]));
88  Draw(sm,title);return;}
89 
91 
92  unsigned int siteLabelType;
93 
94  std::vector<TMarker*> siteM; //!
95  std::vector<TPolyLine*> siteA; //!
96  std::vector<TText*> siteT; //!
97  std::vector<TLatex*> siteL; //!
98  std::vector<TLatex*> siteP; //!
99  std::vector<TPolyLine*> circleL; //!
100  std::vector<TMarker*> daxisM; //!
101 
103 
104  TCanvas* canvasP; //! canvas used for the polargrams
105  TGraphPolar* grP[2]; //! polargraphs used for the polargrams
106 
107  ClassDef(gnetwork,2)
108 };
109 
110 inline double gnetwork::ndi(double* u, double um, int nIFO) {
111  double d = 0.;
112  for(int i=0;i<nIFO;i++) d+= (u[i]*u[i]*u[i]*u[i]);
113  d = um > 0. ? 1./(d/(um*um)) : 0.;
114  return d;
115 }
116 
117 #endif
TCanvas * DrawPolargram(int ptype, network *net=NULL)
Definition: gnetwork.cc:1516
std::vector< TPolyLine * > circleL
Definition: gnetwork.hh:99
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
void DrawDelay(TString ifo1, TString ifo2, double phi=1000., double theta=1000., double frequency=0.)
Definition: gnetwork.cc:939
TCanvas * canvasP
Definition: gnetwork.hh:104
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
TString ptype[nPLOT]
Definition: cwb_mkfad.C:94
void SetGskymap(gskymap &gSM)
Definition: gnetwork.hh:27
double GetSite(TString ifo, TString type="")
Definition: gnetwork.cc:167
detector * pD[NIFO_MAX]
Definition: gnetwork.hh:102
TString("c")
virtual ~gnetwork()
Definition: gnetwork.cc:76
int Delay2Coordinates(double t1, double t2, double t3, double &ph1, double &th1, double &ph2, double &th2)
Definition: gnetwork.cc:1009
void Draw(wavearray< int > w, TString title="")
Definition: gnetwork.hh:80
double frequency
float theta
void DrawSitesLabel(Color_t tcolor=kBlack, Size_t tsize=0.045, Font_t tfont=32)
Definition: gnetwork.cc:423
void DumpObject(char *file)
Definition: gnetwork.cc:1473
int polarization
std::vector< TLatex * > siteP
Definition: gnetwork.hh:98
watplot p1(const_cast< char * >("TFMap1"))
i drho i
void Draw(int dpaletteId=0, Option_t *option="colfz")
Definition: gskymap.cc:442
std::vector< TMarker * > siteM
Definition: gnetwork.hh:94
char ifo[NIFO_MAX][8]
network ** net
NOISE_MDC_SIMULATION.
#define DUMMY_PALETTE_ID
Definition: gskymap.hh:47
size_t mode
wavearray< double > w
Definition: Test1.C:27
#define nIFO
void DrawNetworkDetectorIndex(double gamma, int loop, double snr=-1.0, int dpaletteId=DUMMY_PALETTE_ID, bool btitle=true)
Definition: gnetwork.cc:1233
void Draw(wavearray< double > w, TString title="")
Definition: gnetwork.hh:86
void DrawSitesShortLabel(Color_t tcolor=kBlack, Size_t tsize=0.052, Font_t tfont=32)
Definition: gnetwork.cc:407
float phi
float psi
void setSkyMaps(double sms, double t1, double t2, double p1, double p2)
Definition: gnetwork.hh:29
i() int(T_cor *100))
void setSkyMaps(int healpix_order)
Definition: gnetwork.hh:31
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
gnetwork()
Definition: gnetwork.hh:21
unsigned int siteLabelType
Definition: gnetwork.hh:92
static double ndi(double *, double, int)
Definition: gnetwork.hh:110
void LoadObject(char *file)
Definition: gnetwork.cc:1487
Definition: skymap.hh:45
void SetTitle(TString title)
Definition: gskymap.hh:134
gskymap gSM
Definition: gnetwork.hh:90
double GetDelay(TString ifo1, TString ifo2, double phi, double theta)
Definition: gnetwork.cc:907
gskymap * GetGskymap()
Definition: gnetwork.hh:26
int nifo
std::vector< TText * > siteT
Definition: gnetwork.hh:96
char title[256]
Definition: SSeriesExample.C:1
void Draw(skymap sm, TString title="")
Definition: gnetwork.hh:79
double gps
void MakeNetworkDetectorIndex(double gamma, int loop, double snr=-1.0)
Definition: gnetwork.cc:1128
watplot p2(const_cast< char * >("TFMap2"))
string file
Definition: cwb_online.py:385
double gamma
Definition: network.hh:574
int l
Definition: cbc_plots.C:434
skymap nSensitivity
list of wdm tranformations
Definition: network.hh:601
void ClearSites()
Definition: gnetwork.cc:505
std::vector< TPolyLine * > siteA
Definition: gnetwork.hh:95
void ClearSitesLabel()
Definition: gnetwork.cc:529
double GetAntennaPattern(double phi, double theta, double psi=0., int polarization=1)
Definition: gnetwork.cc:545
void set(size_t i, double a)
param: sky index param: value to set
Definition: skymap.hh:104
bool btitle
Definition: DrawGnetwork2.C:16
void Draw(char *smName, network *net=NULL)
Definition: gnetwork.hh:59
void ClearSitesArms()
Definition: gnetwork.cc:517
TH1 * t1
void ClearCircles()
Definition: gnetwork.cc:491
TGraphPolar * grP[2]
canvas used for the polargrams
Definition: gnetwork.hh:105
snr * snr
Definition: ComputeSNR.C:71
void Draw(wavearray< short > w, TString title="")
Definition: gnetwork.hh:83
detectorParams detParms[4]
size_t size()
Definition: skymap.hh:118
std::vector< TLatex * > siteL
Definition: gnetwork.hh:97
void Init()
Definition: gnetwork.cc:93
std::vector< TMarker * > daxisM
Definition: gnetwork.hh:100
void setSkyMaps(double, double=0., double=180., double=0., double=360.)
param: sky map granularity step, degrees param: theta begin, degrees param: theta end...
Definition: network.cc:2656