8 #define GWGCCatalog "$CWB_GWAT/data/GWGCCatalog_Rev1d8.txt" 9 #define DISTANCE_THR 50 // Mpc 12 #define SGRA_NAME "SgrA*" 13 #define SGRA_DEC -29.11667 14 #define SGRA_RA 266.41667 16 #define NGC0224_NAME "M31" 17 #define NGC0224_DEC 41.2687 18 #define NGC0224_RA 10.6846 20 #define NGC0292_NAME "SMC" 21 #define NGC0292_DEC -72.8002 22 #define NGC0292_RA 13.1583 24 #define ESO056_115_NAME "LMC" 25 #define ESO056_115_DEC -69.7561 26 #define ESO056_115_RA 80.8941 29 #define COORDINATES "" 30 #define PROJECTION "hammer" 40 #define SKYMASK_FILE_NAME "SkyMaskCC_BRST50MPC_S6_Rev1d7_R0d4_NSOURCES.txt" 41 #define SKYMASK_RESOLUTION 0.4 52 #define REJECTED_SKY_PIXEL_PERCENTAGE 1.0 54 #define OUTPUT_PROBABILITY_SKYMAP 68 #ifdef SKYMASK_FILE_NAME 75 #ifdef ADD_PHI_PADDING 77 for (
int l=0;
l<
L;
l++) {
97 #ifdef OUTPUT_PROBABILITY_SKYMAP 99 for (
int l=0;
l<
L;
l++) norm+=sm.
get(
l);
101 for (
int l=0;
l<
L;
l++) out <<
l <<
" " << sm.
get(
l) << endl;
105 for (
int l=0;
l<
L;
l++) {
107 out <<
l <<
" " << mask << endl;
112 cout <<
"SkyMaskCC perc : " << perc*100 << endl;
119 sprintf(title,
"Statistics of sources in the BRST50MPC_S6 MDC SET out to a %d Mpc measured distance (# %d)",
DISTANCE_THR,nGWGC);
148 ofileLabel.ReplaceAll(
".txt",
"");
149 ofileLabel.ReplaceAll(
".",
"");
150 ofileLabel.ReplaceAll(
"/",
"");
153 cout <<
"ofileName : " << ofileName << endl;
155 cout <<
"Write : " << ofileName << endl;
156 skyplot->Print(ofileName);
165 if (!in.good()) {cout <<
"Error Opening File : " << gSystem->ExpandPathName(
GWGCCatalog) << endl;
exit(1);}
168 in.getline(iline,1024);
172 in.getline(iline,1024);
173 if (!in.good())
break;
177 TObjString* tname = (TObjString*)tok->At(1);
178 TObjString*
tra = (TObjString*)tok->At(2);
179 TObjString*
tdec = (TObjString*)tok->At(3);
180 TObjString*
tdist = (TObjString*)tok->At(14);
183 double ra = tra->GetString().Atof();
184 double dec = tdec->GetString().Atof();
185 double dist = tdist->GetString().Atof();
188 double th = -(dec-90);
189 double ph = ra*360./24.;
191 sm.
set(ind,sm.
get(ind)+1);
206 x =
new double[
NMAX];
207 y =
new double[
NMAX];
208 z =
new double[
NMAX];
212 if (!in.good()) {cout <<
"Error Opening File : " << gSystem->ExpandPathName(
GWGCCatalog) << endl;
exit(1);}
215 in.getline(iline,1024);
219 in.getline(iline,1024);
220 if (!in.good())
break;
224 TObjString* tname = (TObjString*)tok->At(1);
225 TObjString*
tra = (TObjString*)tok->At(2);
226 TObjString*
tdec = (TObjString*)tok->At(3);
227 TObjString*
tdist = (TObjString*)tok->At(14);
230 double ra = tra->GetString().Atof();
231 double dec = tdec->GetString().Atof();
232 double dist = tdist->GetString().Atof();
236 double ph = ra*360./24.+180.;
248 if (name.CompareTo(
"NGC0224")==0) {
252 cout << name.Data() <<
" ra : " << ra <<
" dec : " << dec <<
" " << dist << endl;
253 cout <<
"PH : " << ph <<
" TH : " << th <<
" " << dist << endl;
258 cout <<
"nGWGC : " << nGWGC << endl;
263 double ph =
i/(double)RESOLUTION;
264 double th =
j/(double)RESOLUTION;
273 TMath::Sort(size,z,index,
true);
275 for (
int i=0;
i<
size;
i++) T[
i]=x[index[
i]];
277 for (
int i=0;
i<
size;
i++) T[
i]=y[index[
i]];
279 for (
int i=0;
i<
size;
i++) T[
i]=z[index[
i]];
283 cout <<
"size : " << size << endl;
294 TTree*
itree = (TTree *) gROOT->FindObject(
"MDC");
295 int isize = itree->GetEntries();
297 itree->Draw(
"15*2.5e-21/SimHrss:External_x:External_phi:EarthCtrGPS",
"",
"goff");
298 double* idistance = itree->GetV1();
299 double* itheta = itree->GetV2();
300 double* iphi = itree->GetV3();
302 double* igps = itree->GetV4();
307 double dist = idistance[
n];
312 th = acos(itheta[
n]);
316 ph = iphi[
n] > 0 ? iphi[
n] : 2*Pi+iphi[
n];
318 ph = sm.
phi2RA(ph, igps[n]);
322 sm.
set(ind,sm.
get(ind)+1);
337 x =
new double[
NMAX];
338 y =
new double[
NMAX];
339 z =
new double[
NMAX];
342 TTree*
itree = (TTree *) gROOT->FindObject(
"MDC");
343 int isize = itree->GetEntries();
345 itree->Draw(
"15*2.5e-21/SimHrss:External_x:External_phi:EarthCtrGPS",
"",
"goff");
346 double* idistance = itree->GetV1();
347 double* itheta = itree->GetV2();
348 double* iphi = itree->GetV3();
350 double* igps = itree->GetV4();
357 double dist = idistance[
n];
362 th = acos(itheta[
n]);
367 ph = iphi[
n] > 0 ? iphi[
n] : 2*Pi+iphi[
n];
370 ph = sm.
phi2RA(ph, igps[n]);
383 cout <<
"nGWGC : " << nGWGC << endl;
388 double ph =
i/(double)RESOLUTION;
389 double th =
j/(double)RESOLUTION;
398 TMath::Sort(size,z,index,
true);
400 for (
int i=0;
i<
size;
i++) T[
i]=x[index[
i]];
402 for (
int i=0;
i<
size;
i++) T[
i]=y[index[
i]];
404 for (
int i=0;
i<
size;
i++) T[
i]=z[index[
i]];
408 cout <<
"size : " << size << endl;
#define SKYMASK_RESOLUTION
int ReadGWGCCatalogToSkymap(skymap &sm)
int ReadBRST50MPC_S6(double *&x, double *&y, double *&z, int &nGWGC)
cout<< endl;cout<< "ts size = "<< ts.size()<< " ts rate = "<< ts.rate()<< endl;tf.Forward(ts, wdm);int levels=tf.getLevel();cout<< "tf size = "<< tf.size()<< endl;double dF=tf.resolution();double dT=1./(2 *dF);cout<< "rate(hz) : "<< RATE<< "\ layers : "<< nLAYERS<< "\ dF(hz) : "<< dF<< "\ dT(ms) : "<< dT *1000.<< endl;int itime=TIME_PIXEL_INDEX;int ifreq=FREQ_PIXEL_INDEX;int index=(levels+1) *itime+ifreq;double time=itime *dT;double freq=(ifreq >0) ? ifreq *dF :dF/4;cout<< endl;cout<< "PIXEL TIME = "<< time<< " sec "<< endl;cout<< "PIXEL FREQ = "<< freq<< " Hz "<< endl;cout<< endl;wavearray< double > x
void DrawMarker(double phi, double theta, int marker, Size_t msize=1, Color_t tcolor=1)
void DrawText(double phi, double theta, TString text, double tsize=0.04, Color_t tcolor=1)
double getTheta(size_t i)
void Draw(int dpaletteId=1, Option_t *option="colfz")
double getPhiStep(size_t i)
void SetGridxColor(Color_t colorGridx=kBlack)
size_t getSkyIndex(double th, double ph)
param: theta param: phi
void FillData(int size, double *phi, double *theta, double *binc)
void SetGalacticDiskColor(Color_t colorGalacticDisk=kBlack)
int ReadBRST50MPC_S6_ToSkymask(skymap &sm)
void SetGalacticDisk(double gpsGalacticDisk=0.0)
void SetGridyColor(Color_t colorGridy=kBlack)
double phi2RA(double ph, double gps)
void SetTitle(TString title)
int ReadGWGCCatalog(double *&x, double *&y, double *&z, int &nGWGC)
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
double get(size_t i)
param: sky index
void CreateProbSkyMaskGWGC()
#define SKYMASK_FILE_NAME
void SetOptions(TString projection="hammer", TString coordinate="Geographic", double resolution=1, bool goff=false)
void SetZaxisTitle(TString zAxisTitle)