13 #include "TPolyLine.h"
16 #include "TObjString.h"
17 #include "TObjArray.h"
22 #include "TPaveText.h"
24 #include "TRotation.h"
25 #include "TPolyLine.h"
26 #include "Math/Rotation3D.h"
27 #include "Math/Vector3Dfwd.h"
45 #define WorlMapCoastLine "WorlMapCoastLine.txt"
46 #define WM_ENTRIES 426345
47 #define DUMMY_PALETTE_ID 1000000000
49 #define GSKYMAP_INIT canvas(NULL), h2(NULL), changed(false), isGridx(true), colorGridx(kBlack), \
50 isGridy(true), colorGridy(kBlack), isLogz(false), title(""), \
51 drawWorldMap(false), goff(0), wm_size(0), paletteId(1), gpsGalacticDisk(-1.), \
52 colorGalacticDisk(kBlack), zAxisTitle("")
63 gskymap(
double sms,
double t1=0.,
double t2=180.,
double p1=0.,
double p2=360.) :
98 h2 =
new TH2D(*sm.
h2);
113 double resolution = 1,
bool goff =
false);
115 char sname[64];
sprintf(sname,
"%s-%d",name,
int(gRandom->Rndm(13)*1.e9));
116 this->name=sname;this->wtopx=wtopx;this->wtopy=wtopy;this->ww=
ww;this->wh=wh;
122 void SetGridx(
bool isGridx=
true) {this->isGridx=isGridx;}
124 void SetGridxColor(Color_t colorGridx = kBlack) {this->colorGridx=colorGridx;}
126 void SetGridy(
bool isGridy=
true) {this->isGridy=isGridy;}
128 void SetGridyColor(Color_t colorGridy = kBlack) {this->colorGridy=colorGridy;}
130 void SetLogz(
bool isLogz=
true) {this->isLogz=isLogz;}
136 void SetWorldMap(
bool drawWorldMap=
true) {this->drawWorldMap=drawWorldMap;}
141 void SetPalette(
int paletteId=1) {this->paletteId=paletteId;}
145 void SetGalacticDisk(
double gpsGalacticDisk=0.0) {this->gpsGalacticDisk=gpsGalacticDisk;}
150 void FillData(
int size,
double*
phi,
double*
theta,
double* binc);
151 void FillData(
char*
fname);
154 void Draw(
int dpaletteId = 0, Option_t* option =
"colfz");
157 void ProjectHammer(Double_t
l,Double_t b,Double_t &Al,Double_t &Ab);
158 void ProjectSinusoidal(Double_t
l, Double_t b, Double_t &Al, Double_t &Ab);
159 void ProjectParabolic(Double_t
l, Double_t b, Double_t &Al, Double_t &Ab);
161 void DrawMarker(
double phi,
double theta,
int marker, Size_t msize = 1, Color_t tcolor = 1);
162 void DrawText(
double phi,
double theta,
TString text,
double tsize = 0.04, Color_t tcolor = 1);
164 void DrawMarker(
double ra,
double dec,
double gps,
int marker, Size_t msize = 1, Color_t tcolor = 1);
165 void DrawText(
double ra,
double dec,
double gps,
TString text,
double tsize = 0.04, Color_t tcolor = 1);
169 void ClearAxisLabel();
170 void ClearGalacticDisk();
171 void ClearWorldMap();
176 void DumpSkyMap(
char*
fname);
179 void DumpObject(
const char*
file,
const char*
name=
"gskymap");
187 void SetPlotStyle(
int paletteId = 1);
188 int ReadWorlMapCoastLine(
double*& wm_lon,
double*& wm_lat);
189 void HeapSort(
double* data,
double lenght);
190 void ReverseXAxis(TH2D *h2);
219 Int_t wtopx, wtopy,
ww, wh;
223 std::vector<TPolyLine*>
gdL;
224 std::vector<TMarker*>
wmM;
TGraphErrors * Plot(int mtype, TString ptitle, TString xtitle, TString ytitle, bool save=true)
virtual void Browse(TBrowser *b)
TString GetWorldMapPath()
std::vector< TPolyLine * > gdL
std::vector< TPolyLine * > gridxL
wavearray< double > a(hp.size())
skymap & operator-=(const skymap &)
bool GetGalacticDiskColor()
void set(size_t i, double a)
void SetGridx(bool isGridx=true)
skymap & operator*=(const skymap &)
void SetOptions(const char *name, Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh)
watplot p1(const_cast< char * >("TFMap1"))
void SetGridxColor(Color_t colorGridx=kBlack)
void SetGridy(bool isGridy=true)
skymap & operator+=(const skymap &)
gSM SetOptions(cwb_antpat_projection, COORDINATES, RESOLUTION/2)
void SetGalacticDiskColor(Color_t colorGalacticDisk=kBlack)
std::vector< TText * > axisT
void SetWorldMapPath(TString worldMapPath)
void SetGalacticDisk(double gpsGalacticDisk=0.0)
void SetPalette(int paletteId=1)
void SetGridyColor(Color_t colorGridy=kBlack)
void SetTitle(TString title)
void SetWorldMap(bool drawWorldMap=true)
watplot p2(const_cast< char * >("TFMap2"))
skymap & operator=(const skymap &)
void SetLogz(bool isLogz=true)
void HeapSort(double *data, double length)
sprintf(tfres,"(1/%g)x(%g) (sec)x(Hz)", 2 *df, df)
void set(size_t i, double a)
param: sky index param: value to set
Color_t colorGalacticDisk
std::vector< TPolyLine * > gridyL
std::vector< TMarker * > wmM
skymap & operator/=(const skymap &)
iNET LoadObject(const_cast< char * >(ROOT_FILE))
void SetZaxisTitle(TString zAxisTitle)