|
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")) |
|
c1 | Clear () |
|
Slag | Divide (lSlag) |
|
Slag | Draw ("colz") |
|
lSlag2 | Draw ("P") |
|
FarPlot | Draw ("AP") |
|
legr | Draw () |
|
g1 | Draw ("same") |
|
| exit (0) |
|
| fclose (frate) |
|
FarPlot | Fit ("pol1") |
|
FarPlot2 | Fit (g1,"R") |
|
FarPlot2 | Fit (g2,"R+","SAME") |
|
| for (long int l=0;l< num;l++) |
|
gROOT | ForceStyle () |
|
| fprintf (frate,"#FAR[years^-1] eFAR Tshift[days]\n") |
|
FarPlot | GetHistogram () -> SetXTitle("slag distance [day]") |
|
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) |
|
cout<< "Total BKG live time : "
<< liveTot<< endl;double *FAR2=new
double[mycount];double *eFAR2=new
double[mycount];double *N=new
double[mycount];double *Ny=new
double[mycount];double *eN=new
double[mycount];for(int i=0;i
< mycount;i++){N[i]=D[i];}Int_t
*myindex=new Int_t[mycount];TMath::Sort(mycount,
Ny, myindex, false);for(int i=0;i
< mycount;i++){FAR2[i]=FAR[myindex[i]];eFAR2[i]=eFAR[myindex[i]];N[i]=D[myindex[i]];Ny[i]=Dy[myindex[i]];eN[i]=0.0;}TGraphErrors
*FarPlot=new TGraphErrors(mycount,
N, FAR2, eN, eFAR2);FarPlot-> | SetLineColor (kBlue) |
|
g1 | SetLineColor (2) |
|
g2 | SetLineColor (3) |
|
legr | SetLineColor (1) |
|
FarPlot | SetLineStyle (3) |
|
g1 | SetLineWidth (5) |
|
c1 | SetLogy (kFALSE) |
|
FarPlot | SetMarkerColor (kBlue) |
|
FarPlot | SetMarkerSize (1) |
|
lSlag2 | SetMarkerStyle (20) |
|
gStyle | SetNumberContours (256) |
|
gStyle | SetOptFit () |
|
gStyle | SetOptFit (kFALSE) |
|
gStyle | SetOptStat (kFALSE) |
|
gStyle | SetOptStat () |
|
gStyle | SetPalette (1, 0) |
|
gStyle | SetStatBorderSize (1) |
|
Slag | SetStats (kFALSE) |
|
lSlag2 | SetTitle (mytitle) |
|
FarPlot | SetTitle ("FAR vs slag distance") |
|
FarPlot2 | SetTitle ("") |
|
gStyle | SetTitleFillColor (kWhite) |
|
| sprintf (cut,"rho[1]>%f", T_cut) |
|
| sprintf (cut2,"!(lag[%d]==0&&slag[%d]==0)", nIFO, nIFO) |
|
| sprintf (fname,"%s/slag.png", netdir) |
|
| sprintf (mytitle,"Live time (%d lags) over slag shift", lagSize) |
|
| sprintf (fname,"%s/Live_vs_slagtime.png", netdir) |
|
| sprintf (fname,"%s/FAR_vs_slag.png", netdir) |
|
| sprintf (fname,"%s/FAR_vs_slag2.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_slag2.png", netdir) |
|
c1 | Update () |
|
TChain | wave ("waveburst") |
|
| while ((branch=(TBranch *) mynext())) |
|
|
TBranch * | branch |
|
TCanvas * | c1 = new TCanvas("Slag", "Slag",32,55,750,502) |
|
TCanvas * | c2 = new TCanvas("Slag2", "Slag2",32,55,1450,502) |
|
char | cut [512] |
|
char | cut2 [256] |
|
double | D [50000] |
|
double | Dx [50000] |
|
double | Dy [50000] |
|
double | eFAR [50000] |
|
double | FAR [50000] |
|
TGraphErrors * | FarPlot2 = 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 |
|
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() |
|