createData.C File Reference

#include "TROOT.h"
#include "TMath.h"
#include "TTree.h"
#include "TArrayD.h"
#include "TStyle.h"
#include "TFile.h"
#include "TRandom.h"
#include "Riostream.h"
#include "TCanvas.h"
#include "TMatrixD.h"
#include "TH2F.h"
#include "TLegend.h"
#include "TBranch.h"
#include <vector>

Go to the source code of this file.

Functions

void plot (TString fname="data.root", TString var0="var0", TString var1="var1")
TMatrixDproduceSqrtMat (const TMatrixD &covMat)
void getGaussRnd (TArrayD &v, const TMatrixD &sqrtMat, TRandom &R)
void create_lin_Nvar_withFriend (Int_t N=2000)
TTreemakeTree_lin_Nvar (TString treeName, TString treeTitle, Float_t *x, Float_t *dx, const Int_t nvar, Int_t N)
TTreemakeTree_circ (TString treeName, TString treeTitle, Int_t nvar=2, Int_t N=6000, Float_t radius=1.0, Bool_t distort=false)
void create_lin_Nvar_2 (Int_t N=50000)
void create_lin_Nvar (Int_t N=50000)
void create_lin_Nvar_categories (Int_t N=10000, Int_t type=2)
void create_lin_Nvar_weighted (Int_t N=10000, int WeightedSignal=0, int WeightedBkg=1)
void create_lin_Nvar_Arr (Int_t N=1000)
void create_lin_Nvar_double ()
void create_lin_Nvar_discrete ()
void create_ManyVars ()
void create_lin_NvarObsolete ()
void create_lin (Int_t N=2000)
void create_fullcirc (Int_t nmax=20000, Bool_t distort=false)
void create_circ (Int_t N=6000, Bool_t distort=false)
void create_schachbrett (Int_t nEvents=20000)
void create_schachbrett_5D (Int_t nEvents=200000)
void create_schachbrett_4D (Int_t nEvents=200000)
void create_schachbrett_3D (Int_t nEvents=20000)
void create_schachbrett_2D (Int_t nEvents=100000, Int_t nbumps=2)
void create_3Bumps (Int_t nEvents=5000)
void createOnionData (Int_t nmax=50000)
void create_multiclassdata (Int_t nmax=20000)
void create_array_with_different_lengths (Int_t N=100)
void create_MultipleBackground (Int_t N=50000)


Function Documentation

void create_3Bumps ( Int_t  nEvents = 5000  ) 

Definition at line 1733 of file createData.C.

References TTree::Branch(), TFile::Close(), TTree::Fill(), Form(), TRandom::Gaus(), TNamed::GetName(), nEvents, TFile::Open(), plot(), TTree::Show(), sigma, type, and TTree::Write().

void create_array_with_different_lengths ( Int_t  N = 100  ) 

Definition at line 1878 of file createData.C.

References TTree::Branch(), TFile::Close(), TTree::Fill(), getGaussRnd(), TNamed::GetName(), i, m, N, TFile::Open(), TMatrixTBase< Element >::Print(), produceSqrtMat(), R, TTree::Show(), TTree::Write(), and x.

void create_circ ( Int_t  N = 6000,
Bool_t  distort = false 
)

Definition at line 1333 of file createData.C.

References TTree::Branch(), TFile::Close(), cos(), TMath::DegToRad(), Form(), TRandom::Gaus(), TNamed::GetName(), i, N, TFile::Open(), phi, plot(), R, r1, r2, r3, TRandom3::Rndm(), TTree::Show(), sin(), and TTree::Write().

Referenced by Boost().

void create_fullcirc ( Int_t  nmax = 20000,
Bool_t  distort = false 
)

Definition at line 1293 of file createData.C.

References TTree::Branch(), TFile::Close(), TTree::Fill(), Form(), TFile::Open(), R, TRandom3::Rndm(), and TFile::Write().

Referenced by Boost2().

void create_lin ( Int_t  N = 2000  ) 

Definition at line 1206 of file createData.C.

References TTree::Branch(), TFile::Close(), TTree::Fill(), Form(), getGaussRnd(), TNamed::GetName(), i, m, N, TFile::Open(), plot(), TMatrixTBase< Element >::Print(), produceSqrtMat(), R, TTree::Show(), TTree::Write(), and x.

void create_lin_Nvar ( Int_t  N = 50000  ) 

Definition at line 405 of file createData.C.

References TTree::Branch(), TFile::Close(), TTree::Fill(), Form(), getGaussRnd(), TNamed::GetName(), i, m, N, TFile::Open(), TMatrixTBase< Element >::Print(), produceSqrtMat(), R, TTree::Show(), TTree::Write(), and x.

void create_lin_Nvar_2 ( Int_t  N = 50000  ) 

Definition at line 375 of file createData.C.

References TFile::Close(), TNamed::GetName(), makeTree_lin_Nvar(), N, TFile::Open(), TTree::Show(), and TTree::Write().

void create_lin_Nvar_Arr ( Int_t  N = 1000  ) 

Definition at line 740 of file createData.C.

References TTree::Branch(), TFile::Close(), TTree::Fill(), Form(), getGaussRnd(), TNamed::GetName(), gRandom, i, m, N, TFile::Open(), TMatrixTBase< Element >::Print(), produceSqrtMat(), R, TRandom::Rndm(), TTree::Show(), TTree::Write(), and x.

void create_lin_Nvar_categories ( Int_t  N = 10000,
Int_t  type = 2 
)

Definition at line 491 of file createData.C.

References TMath::Abs(), TTree::Branch(), TFile::Close(), TTree::Fill(), Form(), getGaussRnd(), TNamed::GetName(), i, m, N, TFile::Open(), TMatrixTBase< Element >::Print(), produceSqrtMat(), R, TRandom3::Rndm(), TTree::Show(), type, TTree::Write(), and x.

void create_lin_Nvar_discrete (  ) 

Definition at line 938 of file createData.C.

References TTree::Branch(), TFile::Close(), TTree::Fill(), Form(), getGaussRnd(), TNamed::GetName(), i, m, N, TMath::Nint(), TFile::Open(), plot(), TMatrixTBase< Element >::Print(), produceSqrtMat(), R, TTree::Show(), TTree::Write(), and x.

void create_lin_Nvar_double (  ) 

Definition at line 838 of file createData.C.

References TTree::Branch(), TFile::Close(), TTree::Fill(), Form(), getGaussRnd(), TNamed::GetName(), i, m, N, TFile::Open(), plot(), TMatrixTBase< Element >::Print(), produceSqrtMat(), R, TTree::Show(), TTree::Write(), and x.

void create_lin_Nvar_weighted ( Int_t  N = 10000,
int  WeightedSignal = 0,
int  WeightedBkg = 1 
)

Definition at line 594 of file createData.C.

References TTree::Branch(), buffer, c, TH1::Draw(), TTree::Fill(), TH1::Fill(), Form(), TMath::Gaus(), TTree::GetEntries(), TTree::GetEntry(), getGaussRnd(), TNamed::GetName(), h, i, m, N, TFile::Open(), TMatrixTBase< Element >::Print(), produceSqrtMat(), R, TAttLine::SetLineColor(), TTree::Show(), sprintf(), TRandom::Uniform(), TTree::Write(), and x.

void create_lin_Nvar_withFriend ( Int_t  N = 2000  ) 

Definition at line 150 of file createData.C.

References TTree::Branch(), TFile::Close(), TTree::Fill(), Form(), getGaussRnd(), TNamed::GetName(), i, m, N, TFile::Open(), TMatrixTBase< Element >::Print(), produceSqrtMat(), R, TTree::Show(), TTree::Write(), and x.

void create_lin_NvarObsolete (  ) 

Definition at line 1117 of file createData.C.

References TTree::Branch(), TFile::Close(), TTree::Fill(), Form(), getGaussRnd(), TNamed::GetName(), i, m, N, TFile::Open(), plot(), TMatrixTBase< Element >::Print(), produceSqrtMat(), R, TTree::Show(), TTree::Write(), and x.

void create_ManyVars (  ) 

Definition at line 1036 of file createData.C.

References TTree::Branch(), TFile::Close(), TTree::Fill(), Form(), TRandom::Gaus(), TNamed::GetName(), i, N, TFile::Open(), plot(), R, TTree::Show(), TTree::Write(), and x.

void create_multiclassdata ( Int_t  nmax = 20000  ) 

Definition at line 1823 of file createData.C.

References TTree::Branch(), TFile::Close(), TTree::Fill(), Form(), TRandom::Gaus(), TRandom::Integer(), TFile::Open(), R, and TFile::Write().

void create_MultipleBackground ( Int_t  N = 50000  ) 

Definition at line 1969 of file createData.C.

References TFile::Close(), TNamed::GetName(), makeTree_circ(), makeTree_lin_Nvar(), N, TFile::Open(), TTree::Write(), and xB1.

void create_schachbrett ( Int_t  nEvents = 20000  ) 

Definition at line 1413 of file createData.C.

References TTree::Branch(), TFile::Close(), TTree::Fill(), Form(), TRandom::Gaus(), TNamed::GetName(), i, j, nEvents, TFile::Open(), plot(), TTree::Show(), sigma, type, and TTree::Write().

void create_schachbrett_2D ( Int_t  nEvents = 100000,
Int_t  nbumps = 2 
)

Definition at line 1673 of file createData.C.

References TTree::Branch(), TFile::Close(), TTree::Fill(), Form(), TRandom::Gaus(), TNamed::GetName(), i, nEvents, TFile::Open(), plot(), TTree::Show(), sigma, type, and TTree::Write().

void create_schachbrett_3D ( Int_t  nEvents = 20000  ) 

Definition at line 1610 of file createData.C.

References TTree::Branch(), TFile::Close(), TTree::Fill(), Form(), TRandom::Gaus(), TNamed::GetName(), i, nEvents, TFile::Open(), plot(), TTree::Show(), sigma, type, and TTree::Write().

void create_schachbrett_4D ( Int_t  nEvents = 200000  ) 

Definition at line 1543 of file createData.C.

References TTree::Branch(), TFile::Close(), TTree::Fill(), Form(), TRandom::Gaus(), TNamed::GetName(), i, nEvents, TFile::Open(), plot(), TTree::Show(), sigma, type, and TTree::Write().

void create_schachbrett_5D ( Int_t  nEvents = 200000  ) 

Definition at line 1473 of file createData.C.

References TTree::Branch(), TFile::Close(), TTree::Fill(), Form(), TRandom::Gaus(), TNamed::GetName(), i, nEvents, TFile::Open(), plot(), TTree::Show(), sigma, type, and TTree::Write().

void createOnionData ( Int_t  nmax = 50000  ) 

Definition at line 1789 of file createData.C.

References acos(), TTree::Branch(), TFile::Close(), TTree::Fill(), Form(), i, TFile::Open(), R, TRandom3::Rndm(), sin(), and TFile::Write().

void getGaussRnd ( TArrayD v,
const TMatrixD sqrtMat,
TRandom R 
)

Definition at line 122 of file createData.C.

References TMatrixTBase< Element >::GetNrows(), i, j, TMath::Log(), TMath::Pi(), R, TRandom3::Rndm(), TMath::Sin(), size, TMath::Sqrt(), x, and y.

Referenced by create_array_with_different_lengths(), create_lin(), create_lin_Nvar(), create_lin_Nvar_Arr(), create_lin_Nvar_categories(), create_lin_Nvar_discrete(), create_lin_Nvar_double(), create_lin_Nvar_weighted(), create_lin_Nvar_withFriend(), create_lin_NvarObsolete(), and makeTree_lin_Nvar().

TTree* makeTree_circ ( TString  treeName,
TString  treeTitle,
Int_t  nvar = 2,
Int_t  N = 6000,
Float_t  radius = 1.0,
Bool_t  distort = false 
)

Definition at line 313 of file createData.C.

References TTree::Branch(), cos(), TMath::DegToRad(), TTree::Fill(), Form(), TRandom::Gaus(), TNamed::GetName(), i, j, N, phi, R, r1, r2, r3, TRandom3::Rndm(), TTree::Show(), and sin().

Referenced by create_MultipleBackground().

TTree* makeTree_lin_Nvar ( TString  treeName,
TString  treeTitle,
Float_t x,
Float_t dx,
const Int_t  nvar,
Int_t  N 
)

Definition at line 255 of file createData.C.

References TTree::Branch(), TTree::Fill(), Form(), getGaussRnd(), TNamed::GetName(), i, produceSqrtMat(), R, and TTree::Show().

Referenced by create_lin_Nvar_2(), and create_MultipleBackground().

void plot ( TString  fname = "data.root",
TString  var0 = "var0",
TString  var1 = "var1" 
)

Definition at line 17 of file createData.C.

References TLegend::AddEntry(), c, TStyle::cd(), TH1::Draw(), TTree::Draw(), TLegend::Draw(), Form(), TDirectoryFile::Get(), TTree::GetMaximum(), TTree::GetMinimum(), TROOT::GetStyle(), TH1::GetXaxis(), TH1::GetYaxis(), gROOT, legend, TMath::Max(), TMath::Min(), TFile::Open(), TPave::SetBorderSize(), TAttFill::SetFillStyle(), TH1::SetLabelSize(), TLegend::SetMargin(), TAttMarker::SetMarkerColor(), TAttMarker::SetMarkerSize(), TAttMarker::SetMarkerStyle(), TStyle::SetOptStat(), TStyle::SetOptTitle(), TStyle::SetPadBottomMargin(), TStyle::SetPadGridX(), TStyle::SetPadGridY(), TStyle::SetPadLeftMargin(), TStyle::SetPadRightMargin(), TStyle::SetPadTopMargin(), TNamed::SetTitle(), TH1::SetTitle(), TStyle::SetTitleH(), TH1::SetTitleSize(), TStyle::SetTitleW(), TStyle::SetTitleX(), TStyle::SetTitleY(), xmax, xmin, ymax, and ymin.

Referenced by ClassImp(), create_3Bumps(), create_circ(), create_lin(), create_lin_Nvar_discrete(), create_lin_Nvar_double(), create_lin_NvarObsolete(), create_ManyVars(), create_schachbrett(), create_schachbrett_2D(), create_schachbrett_3D(), create_schachbrett_4D(), create_schachbrett_5D(), TGWin32GLManager::GetPlotInfo(), TX11GLManager::GetPlotInfo(), IntervalExamples(), JeffreysPriorDemo(), main(), ROOT::Minuit2::operator<<(), PlotDecisionBoundary(), TGWin32GLManager::PlotSelected(), TX11GLManager::PlotSelected(), rs701_BayesianCalculator(), StandardBayesianMCMCDemo(), StandardBayesianNumericalDemo(), StandardProfileLikelihoodDemo(), TestBinomial(), TestJeffreysGaussMean(), TestJeffreysGaussSigma(), and TestNonCentral().

TMatrixD* produceSqrtMat ( const TMatrixD covMat  ) 

Definition at line 97 of file createData.C.

References TMath::Abs(), TMatrixTBase< Element >::GetNrows(), i, j, k, l, size, and TMath::Sqrt().

Referenced by create_array_with_different_lengths(), create_lin(), create_lin_Nvar(), create_lin_Nvar_Arr(), create_lin_Nvar_categories(), create_lin_Nvar_discrete(), create_lin_Nvar_double(), create_lin_Nvar_weighted(), create_lin_Nvar_withFriend(), create_lin_NvarObsolete(), and makeTree_lin_Nvar().


Generated on Tue Jul 5 16:09:14 2011 for ROOT_528-00b_version by  doxygen 1.5.1