Logo Coherent WaveBurst  
Reference Guide
Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CBCTool.hh
Go to the documentation of this file.
1 /**********************************************************
2  * Package: CBCTool Class Library
3  * File name: CBCTool.hh
4  * Author: Francesco Salemi (salemi@aei.mpg.de)
5  **********************************************************/
6 
7 
8 #ifndef CBCTOOL_HH
9 #define CBCTOOL_HH
10 
11 #include "TROOT.h"
12 #include "TMath.h"
13 #include "TSystem.h"
14 #include "TString.h"
15 #include "TTree.h"
16 #include "TFile.h"
17 #include "TRandom.h"
18 #include "TRandom3.h"
19 #include "TObjArray.h"
20 #include "TObjString.h"
21 #include "TSystemDirectory.h"
22 #include "TChain.h"
23 #include "TApplication.h"
24 #include "TH1I.h"
25 #include "TF1.h"
26 #include "TH1D.h"
27 #include "TH2F.h"
28 #include "TStyle.h"
29 #include "TLegend.h"
30 #include "TCanvas.h"
31 #include "TGraphSmooth.h"
32 #include "TF1.h"
33 #include "Math/WrappedTF1.h"
34 #include "Math/BrentRootFinder.h"
35 
36 #include "TGraph2DErrors.h"
37 #include "TText.h"
38 #include "TPaveText.h"
39 
40 #include <string>
41 #include <iostream>
42 #include <fstream>
43 #include <stdlib.h>
44 #include <math.h>
45 #include <ctype.h>
46 #include <vector>
47 #include <string.h>
48 
49 #include "wavecomplex.hh"
50 #include "wavearray.hh"
51 #include "network.hh"
52 #include "Meyer.hh"
53 #include "netevent.hh"
54 
55 #include "FrameL.h"
56 
57 #include "History.hh"
58 #include "Toolfun.hh"
59 #include "Toolbox.hh"
60 
61 #define LST_TREE_NAME "frl"
62 
63 using namespace std;
64 
65 namespace CWB {
66 
67 class CBCTool {
68 
69 public:
70 
71 
72  /* ******************************** */
73  /* * post processing methods * */
74  /* ******************************** */
75 
76  static Long64_t GetTreeIndex(TTree *tree, const char* selection);
77 
78  static void doROCPlot(int bkg_entries, double* rho_bkg, int* index, float RHO_BIN, double liveTot, TF1* AverageRad, TCanvas* c1, TString odir, bool write_ascii);
79  static void doROCPlot(int bkg_entries, double* rho_bkg, int* index, float RHO_BIN, float RHO_NBINS, float RHO_MIN, double liveTot, double* Rrho, double* eRrho, double* Trho, TCanvas* c1, TString odir, bool write_ascii);
80  static TF1* doRangePlot(int RHO_NBINS, double* Trho, double* Rrho, double* eRrho, float RHO_MIN, float T_out, TCanvas* c1, TString networkname, TString odir, bool write_ascii);
81 
82  static double getLiveTime(int nIFO, TChain& liv,int lag_number, int slag_number, int dummy);
83 
84  static double getLiveTime2(TChain& liv);
85 
86  static double getZeroLiveTime(int nIFO, TChain& liv);
87 
88  static double getZeroLiveTime2(int nIFO, TChain& liv);
89 
90  static double getFAR(float rho, TH1* hc, double liveTot);
91 
92  static TH2F* FillSLagHist(int NIFO_MAX, TChain& live, int NSlag, double SlagMin, double SlagMax);
93 
94  static void doChirpFARPlot(int sel_events, double* recMchirp, double* injMchirp, double* far, TCanvas* c1, TString odir);
95 
96  static double calc_isco_radius(double a);
97 
98  static double calc_isco_freq(double a);
99 
100  static double _final_spin_diff(double a_f, double eta, double delta_m, double S, double Delta);
101 
102  static double _final_spin_diff(Double_t *x, Double_t *par);
103 
104  static double bbh_final_mass_and_spin_non_precessing(double m1, double m2, double chi1, double chi2);
105 
106 private:
107 
108  ClassDef(CBCTool,1)
109 };
110 
111 } // end namespace
112 
113 #endif
TTree * tree
Definition: TimeSortTree.C:20
double rho
TString live
Definition: ced.hh:24
char networkname[256]
Definition: cbc_plots.C:95
wavearray< double > a(hp.size())
TString("c")
#define RHO_NBINS
Definition: cbc_plots.C:4
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<< "\t layers : "<< nLAYERS<< "\t dF(hz) : "<< dF<< "\t 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
char odir[1024]
STL namespace.
#define nIFO
TCanvas * c1
const int NIFO_MAX
Definition: wat.hh:4
double liveTot
m1
Definition: cbc_plots.C:606
float chi2
Definition: cbc_plots.C:603
vector< mdcpar > par
wavearray< int > index
Meyer< double > S(1024, 2)
double T_out
bool write_ascii
Definition: cbc_plots.C:447
#define RHO_BIN
Definition: cbc_plots.C:3
#define RHO_MIN
Definition: cbc_plots.C:2
static double Delta
Definition: geodesics.cc:8
m2
Definition: cbc_plots.C:607