2 #pragma GCC system_header
14 #include "TMultiGraph.h"
25 #include "TRotation.h"
26 #include "Math/Vector3Dfwd.h"
27 #include "Math/Rotation3D.h"
28 #include "Math/Polar3D.h"
39 #define COORDINATES "Geographic"
48 #define IFILE_NAME "merge/wave_sinegaussian_noVirgo.M4.root"
52 #define ANGULAR_DISTANCE 90
63 if (!gROOT->GetClass(
"Polar3DVector")) gSystem->Load(
"libMathCore");
88 h2->GetXaxis()->SetTitleSize(0.05);
89 h2->GetXaxis()->SetLabelSize(0.05);
90 h2->GetYaxis()->SetTitleSize(0.05);
91 h2->GetYaxis()->SetLabelSize(0.05);
92 h2->GetYaxis()->SetLabelFont(42);
93 h2->GetYaxis()->SetLabelFont(42);
94 h2->GetXaxis()->SetTitleFont(42);
95 h2->GetYaxis()->SetTitleFont(42);
96 h2->GetZaxis()->SetRangeUser(0,1.0);
102 XYZVector
D1(pD[0]->Rv[0],pD[0]->Rv[1],pD[0]->Rv[2]);
103 XYZVector D2(pD[1]->Rv[0],pD[1]->Rv[1],pD[1]->Rv[2]);
106 XYZVector D12 = D1-D2;
107 TVector3 vD12(D12.X(),D12.Y(),D12.Z());
109 double th12 = r2d*vD12.Theta();
110 double ph12 = r2d*vD12.Phi();
111 cout <<
"coordinates D12 " << ph12 <<
" " << th12 << endl;
112 Polar3DVector v12(1, d2r*th12, d2r*ph12);
117 if(ifile==NULL) {cout<<
"Error opening file : "<<
IFILE_NAME<<endl;
exit(1);}
118 TTree*
itree = (TTree *) gROOT->FindObject(
"waveburst");
119 if(itree==NULL) {cout<<
"Error opening tree : "<<
"waveburst"<<endl;
exit(1);}
120 itree->Draw(
"theta[0]:phi[0]:theta[1]:phi[1]",
"abs(time[0]-time[2])<0.1 && netcc[0]>0.7 && rho[0]>7 ",
"goff");
121 int isize=itree->GetSelectedRows();
122 cout <<
"isize : " << isize << endl;
124 double* th0 = itree->GetV1();
125 double* ph0 = itree->GetV2();
126 double* th1 = itree->GetV3();
127 double* ph1 = itree->GetV4();
129 #ifdef DRAW_ANGULAR_DISTANCE
130 TH1F* h1 =
new TH1F(
"hist",
"hist",100,0,180);
135 for (
int i=0;i<
isize;i++) {
138 Polar3DVector v0(1, d2r*th0[i], d2r*ph0[i]);
139 Polar3DVector v1(1, d2r*th1[i], d2r*ph1[i]);
140 double dot = v0.Dot(v1);
141 double dOmega = r2d*TMath::ACos(dot);
144 double dot12 = v12.Dot(v1);
145 double dOmega12 = r2d*TMath::ACos(dot12);
150 #ifdef DRAW_ANGULAR_DISTANCE
154 if(binj) {ph=ph1[
i]; th=th1[
i];}
155 else {ph=ph0[
i]; th=th0[
i];}
172 gNET->
DrawCircles(phi,theta,(Color_t)kWhite,1,1,
true);
177 #ifdef DRAW_ANGULAR_DISTANCE
178 gStyle->SetLineColor(kBlack);
185 TObjString* sfile = (TObjString*)token->At(token->GetEntries()-1);
188 ofile.ReplaceAll(
".root",
"_EventsVsAntPat.png");
189 cout <<
"Write : " << ofile << endl;
size_t add(detector *)
param: detector structure return number of detectors in the network
void DrawAntennaPattern(int polarization=-1, int dpaletteId=0, bool btitle=true, int order=6)
void DrawCircles(double phi, double theta, double gps, Color_t lcolor=kBlack, Width_t lwidth=1, Style_t lstyle=1, bool labels=false)
void DrawMarker(double phi, double theta, int marker, Size_t msize=1, Color_t tcolor=1)
void DrawEventsToL1H1AntPat(bool binj=true, int polarization=3)
double fabs(const Complex &x)
void CwbToGeographic(double ilongitude, double ilatitude, double &olongitude, double &olatitude)
void Print(TString pname)
void SetOptions(TString projection="hammer", TString coordinate="Geographic", double resolution=1, bool goff=false)
double SpeedOfLightInVacuo()