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

Functions

wave Add (net_file_name)
 
live Add (liv_file_name)
 
legr AddEntry (g1, lab, "l")
 
legr AddEntry ("", lab, "a")
 
legl AddEntry (g2, lab, "l")
 
TB checkFile (gSystem->Getenv("CWB_ROOTLOGON_FILE"))
 
TB checkFile (gSystem->Getenv("CWB_PARAMETERS_FILE"))
 
TB checkFile (gSystem->Getenv("CWB_UPARAMETERS_FILE"))
 
TB checkFile (gSystem->Getenv("CWB_PPARAMETERS_FILE"))
 
TB checkFile (gSystem->Getenv("CWB_UPPARAMETERS_FILE"))
 
TB checkFile (gSystem->Getenv("CWB_EPPARAMETERS_FILE"))
 
c2 Clear ()
 
Slag Divide (lSlag)
 
lSlag2 Draw ("P")
 
FarPlot Draw ("AP")
 
legr Draw ()
 
g1 Draw ("same")
 
 exit (0)
 
 fclose (frate)
 
FarPlot Fit (g1,"R")
 
FarPlot Fit (g2,"R+","SAME")
 
 for (long int l=0;l< num;l++)
 pointers to detectors More...
 
gROOT ForceStyle ()
 
 fprintf (frate,"#FAR[years^-1] eFAR Tshift[days]\)
 
FarPlot GetHistogram () -> GetXaxis() ->SetRangeUser(TMath::FloorNint(SlagMin/86400.), TMath::CeilNint(SlagMax/86400.))
 
cout<< "Number of slags : "<< mycount<< endl;double liveTot=lSlag-> GetSumOfWeights ()
 
lSlag2 GetXaxis () -> SetTitle("slag shift [day]")
 
Slag GetYaxis () -> SetTitle("slag[2] shift [day]")
 
 if (nIFO >3)
 
 if (!slagFound)
 
 if (!test_veto.IsNull()) sprintf(cut
 
 if (nIFO==2)
 
TChain live ("liveTime")
 
TIter mynext (wave.GetListOfBranches())
 
c1 Range (-0.75,-1.23433, 6.75, 8.17182)
 
mynext Reset ()
 
c1 SaveAs (fname)
 
lSlag2 Scale (1./86400)
 
TString sel ("slag[1]:slag[2]")
 
c1 SetBorderSize (1)
 
live SetBranchAddress ("slag", xslag)
 
live SetBranchAddress ("lag", xlag)
 
live SetBranchAddress ("live",&xlive)
 
live SetBranchStatus ("gps", false)
 
gStyle SetCanvasColor (kWhite)
 
wave SetEstimate (num)
 
c1 SetFillColor (0)
 
gStyle SetFrameBorderMode (0)
 
c1 SetFrameFillColor (0)
 
c1 SetGridx ()
 
c1 SetGridy ()
 
gStyle SetLineColor (kWhite)
 
FarPlot SetLineColor (kBlue)
 
g1 SetLineColor (2)
 
g2 SetLineColor (3)
 
legr SetLineColor (1)
 
FarPlot SetLineStyle (3)
 
g1 SetLineWidth (5)
 
c2 SetLogy (kFALSE)
 
FarPlot SetMarkerColor (kBlue)
 
FarPlot SetMarkerSize (1)
 
lSlag2 SetMarkerStyle (20)
 
gStyle SetNumberContours (256)
 
gStyle SetOptStat (kFALSE)
 
gStyle SetPalette (1, 0)
 
gStyle SetStatBorderSize (1)
 
Slag SetStats (kFALSE)
 
lSlag2 SetTitle (mytitle)
 
FarPlot SetTitle ("")
 
gStyle SetTitleFillColor (kWhite)
 
 sprintf (cut,"rho[1]>%f", T_cut)
 
 sprintf (cut2,"!(lag[%d]==0&&slag[%d]==0)", nIFO, nIFO)
 
 sprintf (mytitle,"Live time (%zu lags) over slag shift", lagSize)
 
 sprintf (fname,"%s/Live_vs_slagtime.png", netdir)
 
 sprintf (fname,"%s/FAR_vs_slag.txt", netdir)
 
 sprintf (lab,"#chi^{2}/ndf(right) : %3.3g / %d", g1->GetChisquare(), g1->GetNDF())
 
 sprintf (lab,"P0(right) : %.2f +/- %.2f", g1->GetParameters()[0], g1->GetParErrors()[0])
 
 sprintf (lab,"P1(right) : %.2g +/- %.2g", g1->GetParameters()[1], g1->GetParErrors()[1])
 
 sprintf (lab,"#chi^{2}/ndf(left) : %3.3g / %d", g2->GetChisquare(), g2->GetNDF())
 
 sprintf (lab,"P0(left) : %.2f +/- %.2f", g2->GetParameters()[0], g2->GetParErrors()[0])
 
 sprintf (lab,"P1(left) : %.2g +/- %.2g", g2->GetParameters()[1], g2->GetParErrors()[1])
 
 sprintf (fname,"%s/FAR_vs_slag.png", netdir)
 
c1 Update ()
 
TChain wave ("waveburst")
 
 while ((branch=(TBranch *) mynext()))
 

Variables

TBranch * branch
 
TCanvas * c1 = new TCanvas("Slag", "Slag",32,55,750,502)
 
char cut [512]
 
char cut2 [256]
 
double D [50000]
 
double Dx [50000]
 
double Dy [50000]
 
double eFAR [50000]
 
double FAR [50000]
 
TGraphErrors * FarPlot = new TGraphErrors(mycount, Dy, FAR, eN, eFAR)
 
char fname [1024]
 
FILE * frate = fopen(fname,"w")
 
TF1 * g1 = new TF1("g1","pol1",0,SlagMax/86400.)
 
TF1 * g2 = new TF1("g2","pol1",-SlagMax/86400.,0)
 
cout<<"Number of Entries: "<< num<< endl;double *slag1=new double[slag_entries];slag1=wave.GetV1();double *slag2=new double[slag_entries];slag2=wave.GetV2();char mytitle[256];double SlagMax=wave.GetMaximum("slag")+segLen/2.;double SlagMin=wave.GetMinimum("slag") -segLen/2.;int NSlag=TMath::FloorNint((SlagMax-SlagMin)/segLen);cout<< "SLAG MAX : "<< wave.GetMaximum("slag")<< " s SLAG MIN : "<< wave.GetMinimum("slag")<< " s #SLAGS : "<< NSlag-1<< endl;if(NSlag==1){cout<<"Just one slag....Skipping further execution!"<< endl;exit(0);} sprintf(mytitle,"FAR distribution over slags (post cat3 & rho>%f)", T_cut);TH2F *Slag=new TH2F("SLAG", mytitle, NSlag, SlagMin/86400., SlagMax/86400., NSlag, SlagMin/86400., SlagMax/86400.);Slag-> GetXaxis () -> SetTitle("slag[1] shift [day]")
 
char lab [256]
 
 legl = new TLegend(0.15,0.8,0.4,0.98,"","brNDC")
 
 legr = new TLegend(0.6,0.8,0.885,0.98,"","brNDC")
 
double liveMax = lSlag->GetMaximum()
 
TH2F * lSlag = new TH2F("LSLAG","Live time distribution over slags",NSlag,SlagMin/86400.,SlagMax/86400.,NSlag,SlagMin/86400.,SlagMax/86400.)
 
double LSlag [50000]
 
TH1D * lSlag2 = lSlag->ProjectionY()
 
int mycount = 0
 
int ntrg = live.GetEntries()
 
long int num = wave.GetEntries()
 
s && s
 
const int slag_entries = num
 
bool slagFound =false
 
CWB::Toolbox TB
 
TString test_veto = veto_not_vetoed
 
s veto_not_vetoed
 
TAxis * xaxis = Slag->GetXaxis()
 
float xlag [NIFO_MAX+1]
 
double xlive
 
float xslag [NIFO_MAX+1]
 
TAxis * yaxis = Slag->GetYaxis()
 

Function Documentation

◆ Add() [1/2]

wave Add ( net_file_name  )

◆ Add() [2/2]

live Add ( liv_file_name  )

◆ AddEntry() [1/3]

legr AddEntry ( g1  ,
lab  ,
"l"   
)

◆ AddEntry() [2/3]

legr AddEntry ( ""  ,
lab  ,
"a"   
)

◆ AddEntry() [3/3]

legl AddEntry ( g2  ,
lab  ,
"l"   
)

◆ checkFile() [1/6]

TB checkFile ( gSystem->  Getenv"CWB_ROOTLOGON_FILE")

◆ checkFile() [2/6]

TB checkFile ( gSystem->  Getenv"CWB_PARAMETERS_FILE")

◆ checkFile() [3/6]

TB checkFile ( gSystem->  Getenv"CWB_UPARAMETERS_FILE")

◆ checkFile() [4/6]

TB checkFile ( gSystem->  Getenv"CWB_PPARAMETERS_FILE")

◆ checkFile() [5/6]

TB checkFile ( gSystem->  Getenv"CWB_UPPARAMETERS_FILE")

◆ checkFile() [6/6]

TB checkFile ( gSystem->  Getenv"CWB_EPPARAMETERS_FILE")

◆ Clear()

c2 Clear ( )

Definition at line 1279 of file CWB_Plugin_xWRC.C.

◆ Divide()

Slag Divide ( lSlag  )

◆ Draw() [1/4]

lSlag2 Draw ( "P"  )

◆ Draw() [2/4]

FarPlot Draw ( "AP"  )

◆ Draw() [3/4]

legr Draw ( )

◆ Draw() [4/4]

g2 Draw ( "same"  )

◆ exit()

exit ( )

◆ fclose()

fclose ( frate  )

◆ Fit() [1/2]

FarPlot Fit ( g1  ,
"R"   
)

◆ Fit() [2/2]

FarPlot Fit ( g2  ,
"R+"  ,
"SAME"   
)

◆ for()

for ( )

pointers to detectors

Definition at line 116 of file cwb_report_slags.C.

◆ ForceStyle()

gROOT ForceStyle ( )

◆ fprintf()

fprintf ( frate  ,
"#FAR eFAR Tshift\  [years^-1][days] 
)

◆ GetHistogram()

FarPlot GetHistogram ( ) -> GetXaxis() ->SetRangeUser(TMath::FloorNint(SlagMin/86400.), TMath::CeilNint(SlagMax/86400.))

◆ GetSumOfWeights()

cout<< "Number of slags : " << mycount << endl; double liveTot = lSlag-> GetSumOfWeights ( )

◆ GetXaxis()

lSlag2 GetXaxis ( ) -> SetTitle("slag shift [day]")

Definition at line 569 of file cwb_report_cbc.C.

◆ GetYaxis()

Slag GetYaxis ( ) -> SetTitle("slag[2] shift [day]")

Definition at line 570 of file cwb_report_cbc.C.

◆ if() [1/4]

if ( nIFO  ,
 
)

Definition at line 23 of file cwb_report_slags.C.

◆ if() [2/4]

if ( slagFound)

Definition at line 76 of file cwb_report_slags.C.

◆ if() [3/4]

if ( !test_veto.  IsNull())

◆ if() [4/4]

if ( nIFO  = =2)

Definition at line 94 of file cwb_report_slags.C.

◆ live()

TChain live ( "liveTime"  )

◆ mynext()

TIter mynext ( wave.  GetListOfBranches())

◆ Range()

c1 Range ( -0.  75,
-1.  23433,
6.  75,
8.  17182 
)

◆ Reset()

mynext Reset ( )

◆ SaveAs()

c1 SaveAs ( fname  )

◆ Scale()

lSlag2 Scale ( 1./  86400)

◆ sel()

TString sel ( "slag:slag"  [1][2])

◆ SetBorderSize()

c1 SetBorderSize ( )

◆ SetBranchAddress() [1/3]

live SetBranchAddress ( "slag"  ,
xslag   
)

◆ SetBranchAddress() [2/3]

live SetBranchAddress ( "lag"  ,
xlag   
)

◆ SetBranchAddress() [3/3]

live SetBranchAddress ( "live"  ,
xlive 
)

◆ SetBranchStatus()

live SetBranchStatus ( "gps"  ,
false   
)

◆ SetCanvasColor()

gStyle SetCanvasColor ( kWhite  )

◆ SetEstimate()

wave SetEstimate ( num  )

◆ SetFillColor()

c1 SetFillColor ( )

◆ SetFrameBorderMode()

gStyle SetFrameBorderMode ( )

◆ SetFrameFillColor()

c2 SetFrameFillColor ( )

◆ SetGridx()

c1 SetGridx ( )

◆ SetGridy()

c1 SetGridy ( )

◆ SetLineColor() [1/5]

gStyle SetLineColor ( kWhite  )

◆ SetLineColor() [2/5]

FarPlot SetLineColor ( kBlue  )

◆ SetLineColor() [3/5]

g1 SetLineColor ( )

◆ SetLineColor() [4/5]

g2 SetLineColor ( )

◆ SetLineColor() [5/5]

legr SetLineColor ( )

◆ SetLineStyle()

FarPlot SetLineStyle ( )

◆ SetLineWidth()

g2 SetLineWidth ( )

◆ SetLogy()

c2 SetLogy ( kFALSE  )

◆ SetMarkerColor()

FarPlot SetMarkerColor ( kBlue  )

◆ SetMarkerSize()

FarPlot SetMarkerSize ( )

◆ SetMarkerStyle()

lSlag2 SetMarkerStyle ( 20  )

◆ SetNumberContours()

gStyle SetNumberContours ( 256  )

◆ SetOptStat()

gStyle SetOptStat ( kFALSE  )

◆ SetPalette()

gStyle SetPalette ( ,
 
)

◆ SetStatBorderSize()

gStyle SetStatBorderSize ( )

◆ SetStats()

Slag SetStats ( kFALSE  )

◆ SetTitle() [1/2]

lSlag2 SetTitle ( mytitle  )

◆ SetTitle() [2/2]

FarPlot SetTitle ( ""  )

◆ SetTitleFillColor()

gStyle SetTitleFillColor ( kWhite  )

◆ sprintf() [1/12]

sprintf ( cut  ,
rho[1],
%f ,
T_cut   
)

◆ sprintf() [2/12]

sprintf ( cut2  ,
"!(lag[%d]==0&&slag[%d]==0)"  ,
nIFO  ,
nIFO   
)

◆ sprintf() [3/12]

sprintf ( mytitle  ,
"Live time (%zu lags) over slag shift ,
lagSize   
)

◆ sprintf() [4/12]

sprintf ( fname  ,
"%s/Live_vs_slagtime.png ,
netdir   
)

◆ sprintf() [5/12]

sprintf ( fname  ,
"%s/FAR_vs_slag.txt"  ,
netdir   
)

◆ sprintf() [6/12]

sprintf ( lab  ,
"#chi^{2}/ndf(right) : %3.3g / %d"  ,
g1->  GetChisquare(),
g1->  GetNDF() 
)

◆ sprintf() [7/12]

sprintf ( lab  ,
"P0(right) : %.2f +/- %.2f"  ,
g1->  GetParameters()[0],
g1->  GetParErrors()[0] 
)

◆ sprintf() [8/12]

sprintf ( lab  ,
"P1(right) : %.2g +/- %.2g"  ,
g1->  GetParameters()[1],
g1->  GetParErrors()[1] 
)

◆ sprintf() [9/12]

sprintf ( lab  ,
"#chi^{2}/ndf(left) : %3.3g / %d"  ,
g2->  GetChisquare(),
g2->  GetNDF() 
)

◆ sprintf() [10/12]

sprintf ( lab  ,
"P0(left) : %.2f +/- %.2f"  ,
g2->  GetParameters()[0],
g2->  GetParErrors()[0] 
)

◆ sprintf() [11/12]

sprintf ( lab  ,
"P1(left) : %.2g +/- %.2g"  ,
g2->  GetParameters()[1],
g2->  GetParErrors()[1] 
)

◆ sprintf() [12/12]

sprintf ( fname  ,
"%s/FAR_vs_slag.png ,
netdir   
)

◆ Update()

c1 Update ( )

◆ wave()

TChain wave ( "waveburst"  )

◆ while()

while ( (branch=(TBranch *) mynext())  )

Definition at line 72 of file cwb_report_slags.C.

Variable Documentation

◆ branch

TBranch* branch

Definition at line 69 of file cwb_report_slags.C.

◆ c1

TCanvas* c1 = new TCanvas("Slag", "Slag",32,55,750,502)

Definition at line 53 of file cwb_report_slags.C.

◆ cut

s cut

Definition at line 83 of file cwb_report_slags.C.

◆ cut2

char cut2[256]

Definition at line 84 of file cwb_report_slags.C.

◆ D

double D[50000]

Definition at line 154 of file cwb_report_slags.C.

◆ Dx

double Dx[50000]

Definition at line 155 of file cwb_report_slags.C.

◆ Dy

double Dy[50000]

Definition at line 156 of file cwb_report_slags.C.

◆ eFAR

double eFAR[50000]

Definition at line 153 of file cwb_report_slags.C.

◆ FAR

double FAR[50000]

Definition at line 151 of file cwb_report_slags.C.

◆ FarPlot

TGraphErrors* FarPlot = new TGraphErrors(mycount, Dy, FAR, eN, eFAR)

Definition at line 195 of file cwb_report_slags.C.

◆ fname

char fname[1024]

Definition at line 82 of file cwb_report_slags.C.

◆ frate

FILE* frate = fopen(fname,"w")

Definition at line 190 of file cwb_report_slags.C.

◆ g1

TF1* g1 = new TF1("g1","pol1",0,SlagMax/86400.)

Definition at line 213 of file cwb_report_slags.C.

◆ g2

TF1* g2 = new TF1("g2","pol1",-SlagMax/86400.,0)

Definition at line 216 of file cwb_report_slags.C.

◆ GetXaxis

h2gd GetXaxis ( ) -> SetTitle("slag[1] shift [day]")

Definition at line 111 of file cwb_report_slags.C.

◆ lab

char lab[256]

Definition at line 223 of file cwb_report_slags.C.

◆ legl

legl = new TLegend(0.15,0.8,0.4,0.98,"","brNDC")

Definition at line 222 of file cwb_report_slags.C.

◆ legr

legr = new TLegend(0.6,0.8,0.885,0.98,"","brNDC")

Definition at line 221 of file cwb_report_slags.C.

◆ liveMax

double liveMax = lSlag->GetMaximum()

Definition at line 177 of file cwb_report_slags.C.

◆ lSlag

TH2F* lSlag = new TH2F("LSLAG","Live time distribution over slags",NSlag,SlagMin/86400.,SlagMax/86400.,NSlag,SlagMin/86400.,SlagMax/86400.)

Definition at line 115 of file cwb_report_slags.C.

◆ LSlag

double LSlag[50000]

Definition at line 152 of file cwb_report_slags.C.

◆ lSlag2

TH1D* lSlag2 = lSlag->ProjectionY()

Definition at line 136 of file cwb_report_slags.C.

◆ mycount

int mycount = 0

Definition at line 150 of file cwb_report_slags.C.

◆ ntrg

int ntrg = live.GetEntries()

Definition at line 128 of file cwb_report_slags.C.

◆ num

num = wave.GetEntries()

Definition at line 91 of file cwb_report_slags.C.

◆ s

s&& s

Definition at line 89 of file cwb_report_slags.C.

◆ slag_entries

const int slag_entries = num

Definition at line 96 of file cwb_report_slags.C.

◆ slagFound

bool slagFound =false

Definition at line 70 of file cwb_report_slags.C.

◆ TB

Definition at line 29 of file cwb_report_slags.C.

◆ test_veto

TString test_veto = veto_not_vetoed

Definition at line 88 of file cwb_report_slags.C.

◆ veto_not_vetoed

s veto_not_vetoed

Definition at line 89 of file cwb_report_slags.C.

◆ xaxis

TAxis* xaxis = Slag->GetXaxis()

Definition at line 148 of file cwb_report_slags.C.

◆ xlag

float xlag[NIFO_MAX+1]

Definition at line 120 of file cwb_report_slags.C.

◆ xlive

double xlive

Definition at line 122 of file cwb_report_slags.C.

◆ xslag

float xslag[NIFO_MAX+1]

Definition at line 121 of file cwb_report_slags.C.

◆ yaxis

TAxis* yaxis = Slag->GetYaxis()

Definition at line 149 of file cwb_report_slags.C.