Logo coherent WaveBurst  
Library Reference Guide
Logo
Macros | Functions | Variables
CreateMNGDDistribution.C File Reference

Macros

#define A1   5.81
 
#define A2   17.43
 
#define A3   34.86
 
#define B   0.3
 
#define DENOMINATOR   "(pow(((x-[3])*(x-[3])+y*y)+pow([0]+sqrt(z*z+[1]*[1]),2),5./2.)*pow(z*z+[1]*[1],3./2.))"
 
#define DRAW_H2
 
#define Md1   6.6e10
 
#define Md2   -2.9e10
 
#define Md3   3.3e9
 
#define MNGD_FILENAME   "MNGDDistribution.txt"
 
#define NEVENTS   1000000
 
#define NUMERATOR   "([0]*((x-[3])*(x-[3])+y*y)+([0]+3*sqrt(z*z+[1]*[1]))*pow([0]+sqrt(z*z+[1]*[1]),2))"
 
#define SOLAR_SISTEM_DISTANCE_FROM_GC   7.62
 
#define XMAX   40
 
#define YMAX   4
 

Functions

canvas Clear ()
 
h2gd Draw ("colfz")
 
h2gd Fill (x, y)
 
 GalacticToEquatorial (ilongitude, ilatitude, olongitude, olatitude)
 
cout<< "gc_phi : "<< gc_phi<< " gc_theta : "<< gc_theta<< " "<< gc_rho<< endl;for(int n=0;n< NEVENTS;n++) { if(n%10000==0) cout<< n<< endl;double x, y, z;gd-> GetRandom3 (x, y, z)
 
h2gd GetXaxis () -> SetNdivisions(-804)
 
h2gd GetYaxis () -> SetNdivisions(-804)
 
h2gd GetZaxis () -> SetLabelFont(42)
 
gStyle SetCanvasColor (kWhite)
 
canvas SetFillColor (kWhite)
 
canvas SetGridx ()
 
canvas SetGridy ()
 
gStyle SetLineColor (kWhite)
 
gStyle SetMarkerSize (2)
 
gStyle SetMarkerStyle (7)
 
gd SetNpx (100)
 
gd SetNpy (100)
 
gd SetNpz (100)
 
gStyle SetNumberContours (256)
 
gd1 SetParameter (0, A1)
 
gd1 SetParameter (1, B)
 
gd1 SetParameter (2, Md1)
 
gd1 SetParameter (3, SOLAR_SISTEM_DISTANCE_FROM_GC)
 
gd2 SetParameter (0, A2)
 
gd2 SetParameter (2, Md2)
 
gd3 SetParameter (0, A3)
 
gd3 SetParameter (2, Md3)
 
gStyle SetStatBorderSize (1)
 
h2gd SetStats (kFALSE)
 
gStyle SetTextFont (12)
 
h2gd SetTitle ("h2gd")
 
gStyle SetTitleColor (kBlue,"D")
 
gStyle SetTitleFillColor (kWhite)
 
gStyle SetTitleFont (12,"D")
 
gStyle SetTitleH (0.050)
 
gStyle SetTitleW (0.95)
 
gStyle SetTitleY (0.98)
 
xyz SetXYZ (xgc, ygc, zgc)
 
xyz SetXYZ (x, y, z)
 
 sprintf (formula,"[1]*[1]*[2]*%s/%s", NUMERATOR, DENOMINATOR)
 
canvas ToggleEventStatus ()
 

Variables

TCanvas * canvas = new TCanvas("AUNA", "GD", 300,40, 800, 800)
 
char formula [256]
 
double gc_phi = olongitude
 
double gc_rho = sqrt(xyz.Mag2())
 
double gc_theta = olatitude
 
TF3 * gd = new TF3("gd","gd1+gd2+gd3",-XMAX,XMAX,-XMAX,XMAX,-YMAX,YMAX)
 
TF3 * gd1 = new TF3("gd1",formula,-XMAX,XMAX,-XMAX,XMAX,-YMAX,YMAX)
 
TF3 * gd2 = new TF3("gd2",formula,-XMAX,XMAX,-XMAX,XMAX,-YMAX,YMAX)
 
TF3 * gd3 = new TF3("gd3",formula,-XMAX,XMAX,-XMAX,XMAX,-YMAX,YMAX)
 
double gd_phi [NEVENTS] = olongitude
 
double gd_rho [NEVENTS] = sqrt(xyz.Mag2())
 
double gd_theta [NEVENTS] = olatitude
 
double grad2rad = TMath::Pi()/180.
 
TH2D * h2gd = new TH2D("h2gd","h2gd", 100, -20, 20, 100, -20, 20)
 
double ilatitude = -(xyz.Theta()-TMath::Pi()/2.)*rad2grad
 
double ilongitude = xyz.Phi()*rad2grad
 
double olatitude
 
double olongitude
 
double rad2grad = 180./TMath::Pi()
 
double xgc =SOLAR_SISTEM_DISTANCE_FROM_GC
 
TVector3 xyz
 
double ygc =0.
 
double zgc =0.
 

Macro Definition Documentation

◆ A1

#define A1   5.81

◆ A2

#define A2   17.43

◆ A3

#define A3   34.86

◆ B

#define B   0.3

◆ DENOMINATOR

#define DENOMINATOR   "(pow(((x-[3])*(x-[3])+y*y)+pow([0]+sqrt(z*z+[1]*[1]),2),5./2.)*pow(z*z+[1]*[1],3./2.))"

◆ DRAW_H2

#define DRAW_H2

◆ Md1

#define Md1   6.6e10

◆ Md2

#define Md2   -2.9e10

◆ Md3

#define Md3   3.3e9

◆ MNGD_FILENAME

#define MNGD_FILENAME   "MNGDDistribution.txt"

◆ NEVENTS

#define NEVENTS   1000000

◆ NUMERATOR

#define NUMERATOR   "([0]*((x-[3])*(x-[3])+y*y)+([0]+3*sqrt(z*z+[1]*[1]))*pow([0]+sqrt(z*z+[1]*[1]),2))"

◆ SOLAR_SISTEM_DISTANCE_FROM_GC

#define SOLAR_SISTEM_DISTANCE_FROM_GC   7.62

◆ XMAX

#define XMAX   40

◆ YMAX

#define YMAX   4

Function Documentation

◆ Clear()

canvas Clear ( )

Definition at line 1279 of file CWB_Plugin_xWRC.C.

◆ Draw()

h2gd Draw ( "colfz"  )

◆ Fill()

h2gd Fill ( x  ,
y   
)

◆ GalacticToEquatorial()

GalacticToEquatorial ( ilongitude  ,
ilatitude  ,
olongitude  ,
olatitude   
)

◆ GetRandom3()

cout<< "gc_phi : " << gc_phi << " gc_theta : " << gc_theta << " " << gc_rho << endl; for (int n=0;n<NEVENTS;n++) { if(n%10000==0) cout << n << endl; double x,y,z; gd-> GetRandom3 ( x  ,
y  ,
z   
)

◆ GetXaxis()

h2gd GetXaxis ( ) -> SetNdivisions(-804)

Definition at line 569 of file cwb_report_cbc.C.

◆ GetYaxis()

h2gd GetYaxis ( ) -> SetNdivisions(-804)

Definition at line 570 of file cwb_report_cbc.C.

◆ GetZaxis()

h2gd GetZaxis ( ) -> SetLabelFont(42)

◆ SetCanvasColor()

gStyle SetCanvasColor ( kWhite  )

◆ SetFillColor()

canvas SetFillColor ( kWhite  )

◆ SetGridx()

canvas SetGridx ( )

◆ SetGridy()

canvas SetGridy ( )

◆ SetLineColor()

gStyle SetLineColor ( kWhite  )

◆ SetMarkerSize()

gStyle SetMarkerSize ( )

◆ SetMarkerStyle()

gStyle SetMarkerStyle ( )

◆ SetNpx()

gd SetNpx ( 100  )

◆ SetNpy()

gd SetNpy ( 100  )

◆ SetNpz()

gd SetNpz ( 100  )

◆ SetNumberContours()

gStyle SetNumberContours ( 256  )

◆ SetParameter() [1/8]

gd1 SetParameter ( ,
A1   
)

◆ SetParameter() [2/8]

gd3 SetParameter ( ,
B   
)

◆ SetParameter() [3/8]

gd1 SetParameter ( ,
Md1   
)

◆ SetParameter() [4/8]

gd3 SetParameter ( ,
SOLAR_SISTEM_DISTANCE_FROM_GC   
)

◆ SetParameter() [5/8]

gd2 SetParameter ( ,
A2   
)

◆ SetParameter() [6/8]

gd2 SetParameter ( ,
Md2   
)

◆ SetParameter() [7/8]

gd3 SetParameter ( ,
A3   
)

◆ SetParameter() [8/8]

gd3 SetParameter ( ,
Md3   
)

◆ SetStatBorderSize()

gStyle SetStatBorderSize ( )

◆ SetStats()

h2gd SetStats ( kFALSE  )

◆ SetTextFont()

gStyle SetTextFont ( 12  )

◆ SetTitle()

h2gd SetTitle ( "h2gd"  )

◆ SetTitleColor()

gStyle SetTitleColor ( kBlue  ,
"D"   
)

◆ SetTitleFillColor()

gStyle SetTitleFillColor ( kWhite  )

◆ SetTitleFont()

gStyle SetTitleFont ( 12  ,
"D"   
)

◆ SetTitleH()

gStyle SetTitleH ( 0.  050)

◆ SetTitleW()

gStyle SetTitleW ( 0.  95)

◆ SetTitleY()

gStyle SetTitleY ( 0.  98)

◆ SetXYZ() [1/2]

xyz SetXYZ ( xgc  ,
ygc  ,
zgc   
)

◆ SetXYZ() [2/2]

xyz SetXYZ ( x  ,
y  ,
z   
)

◆ sprintf()

sprintf ( formula  ,
"***%s/%s [1][1][2],
NUMERATOR  ,
DENOMINATOR   
)

◆ ToggleEventStatus()

canvas ToggleEventStatus ( )

Variable Documentation

◆ canvas

TCanvas* canvas = new TCanvas("AUNA", "GD", 300,40, 800, 800)

Definition at line 61 of file CreateMNGDDistribution.C.

◆ formula

char formula[256]

Definition at line 112 of file CreateMNGDDistribution.C.

◆ gc_phi

double gc_phi = olongitude

Definition at line 169 of file CreateMNGDDistribution.C.

◆ gc_rho

double gc_rho = sqrt(xyz.Mag2())

Definition at line 171 of file CreateMNGDDistribution.C.

◆ gc_theta

double gc_theta = olatitude

Definition at line 170 of file CreateMNGDDistribution.C.

◆ gd

TF3* gd = new TF3("gd","gd1+gd2+gd3",-XMAX,XMAX,-XMAX,XMAX,-YMAX,YMAX)

Definition at line 133 of file CreateMNGDDistribution.C.

◆ gd1

TF3* gd1 = new TF3("gd1",formula,-XMAX,XMAX,-XMAX,XMAX,-YMAX,YMAX)

Definition at line 115 of file CreateMNGDDistribution.C.

◆ gd2

TF3* gd2 = new TF3("gd2",formula,-XMAX,XMAX,-XMAX,XMAX,-YMAX,YMAX)

Definition at line 121 of file CreateMNGDDistribution.C.

◆ gd3

TF3* gd3 = new TF3("gd3",formula,-XMAX,XMAX,-XMAX,XMAX,-YMAX,YMAX)

Definition at line 127 of file CreateMNGDDistribution.C.

◆ gd_phi

gd_phi[n] = olongitude

Definition at line 141 of file CreateMNGDDistribution.C.

◆ gd_rho

gd_rho[n] = sqrt(xyz.Mag2())

Definition at line 143 of file CreateMNGDDistribution.C.

◆ gd_theta

gd_theta[n] = olatitude

Definition at line 142 of file CreateMNGDDistribution.C.

◆ grad2rad

double grad2rad = TMath::Pi()/180.

Definition at line 43 of file CreateMNGDDistribution.C.

◆ h2gd

TH2D* h2gd = new TH2D("h2gd","h2gd", 100, -20, 20, 100, -20, 20)

Definition at line 87 of file CreateMNGDDistribution.C.

◆ ilatitude

ilatitude = -(xyz.Theta()-TMath::Pi()/2.)*rad2grad

Definition at line 160 of file CreateMNGDDistribution.C.

◆ ilongitude

ilongitude = xyz.Phi()*rad2grad

Definition at line 159 of file CreateMNGDDistribution.C.

◆ olatitude

double olatitude

Definition at line 162 of file CreateMNGDDistribution.C.

◆ olongitude

double olongitude

Definition at line 161 of file CreateMNGDDistribution.C.

◆ rad2grad

double rad2grad = 180./TMath::Pi()

Definition at line 44 of file CreateMNGDDistribution.C.

◆ xgc

Definition at line 156 of file CreateMNGDDistribution.C.

◆ xyz

TVector3 xyz

Definition at line 155 of file CreateMNGDDistribution.C.

◆ ygc

double ygc =0.

Definition at line 156 of file CreateMNGDDistribution.C.

◆ zgc

double zgc =0.

Definition at line 156 of file CreateMNGDDistribution.C.