HTool(const HTool&) | |
HTool(const Char_t* name = "", const Char_t* title = "") | |
virtual | ~HTool() |
void | TObject::AbstractMethod(const char* method) const |
virtual void | TObject::AppendPad(Option_t* option = "") |
static void | backTrace(Int_t level) |
virtual void | TObject::Browse(TBrowser* b) |
static TDirectory* | changeToDir(TString) |
static Bool_t | checkDir(TString, TFile*) |
static Double_t | chi2Distribution(Double_t* x, Double_t* par) |
static TF1* | chi2Distribution(Int_t nDegreeOfFreedom = 1, TString name = "chi2_distr", Bool_t norm = kFALSE, Double_t scale = 1) |
static Double_t | chi2DistributionNorm(Double_t* x, Double_t* par) |
static TClass* | Class() |
virtual const char* | TObject::ClassName() const |
static void | cleanHist(TH1* h, Double_t threshold = 3, Double_t val = 0) |
static TF1* | cleanHistArroundLine(TH2* h, TF1* f = 0, TString axis = "y", Int_t firstbin = 1, Int_t lastbin = 0, Int_t cut = 0, TString opt = "QNR", TString suffix = "", TString optline = "pol1", Float_t windowfunc = 1000., Float_t windowfunc2 = 1000.) |
static TF1* | cleanHistBelowLine(TH2* h, TF1* f = 0, TString axis = "y", Int_t firstbin = 1, Int_t lastbin = 0, Int_t cut = 0, TString opt = "QNR", TString suffix = "", TString optline = "pol1", Float_t windowfunc = 1000.) |
static Bool_t | cleanHistCutG(TH2* = 0, TCutG* = 0) |
virtual void | TNamed::Clear(Option_t* option = "") |
virtual TObject* | TNamed::Clone(const char* newname = "") const |
static Bool_t | close(TFile**) |
static Bool_t | closeAscii(FILE**) |
virtual Int_t | TNamed::Compare(const TObject* obj) const |
static Bool_t | compHistFiles(TString nameinp1 = "", TString nameinp2 = "", TString name = "") |
virtual void | TNamed::Copy(TObject& named) const |
static TH1* | copyHist(TH1* h, TString name = "", Int_t val = -99, Int_t valerr = -99) |
static TH1* | copyHistRange(TH1* h, TString name = "", Int_t val = -99, Int_t valerr = -99, Int_t start = 0, Int_t end = -99) |
static void | createNtupleMap(TString infile = "", TString prefix = "", TString ntupleName = "", TString outfile = "") |
virtual void | TObject::Delete(Option_t* option = "")MENU |
static void | deleteObject(TObject* h) |
virtual Int_t | TObject::DistancetoPrimitive(Int_t px, Int_t py) |
virtual void | TObject::Draw(Option_t* option = "") |
virtual void | TObject::DrawClass() constMENU |
virtual TObject* | TObject::DrawClone(Option_t* option = "") constMENU |
static Bool_t | drawHistComp(TString nameinp1 = "", TString nameinp2 = "", TString name = "", TCanvas* comp = 0, Int_t padn = 1) |
virtual void | TObject::Dump() constMENU |
virtual void | TObject::Error(const char* method, const char* msgfmt) const |
static TH2* | exchangeXY(TH2* h2 = 0, TString newname = "") |
static Bool_t | exchangeXYGraph(TGraph* g = 0) |
static Bool_t | exchangeXYGraphErrors(TGraphErrors* g = 0) |
static Int_t | exec(TString command, TString& output) |
virtual void | TObject::Execute(const char* method, const char* params, Int_t* error = 0) |
virtual void | TObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0) |
virtual void | TObject::ExecuteEvent(Int_t event, Int_t px, Int_t py) |
virtual void | TObject::Fatal(const char* method, const char* msgfmt) const |
virtual void | TNamed::FillBuffer(char*& buffer) |
static Int_t | findFilledRange(TH1* h, Int_t& first, Int_t& last) |
virtual TObject* | TObject::FindObject(const char* name) const |
virtual TObject* | TObject::FindObject(const TObject* obj) const |
static Bool_t | findString(TString* classes, Int_t size, TString name) |
static TObjArray* | fitArray(TObjArray* array = 0, TF1* fit = 0, TString name = "", Float_t min = 0, Float_t max = 0, Int_t opt = 0, Float_t x1 = 0, Float_t x2 = 0, Int_t markerstyle = 8, Int_t markercolor = 2, Float_t markersize = 0.7) |
static TGraphErrors* | fitScatter(TH2* h = 0, TF1* f = 0, TString opt = "QNR", Bool_t silent = kFALSE, Float_t xmin = 0, Float_t xmax = 0, Float_t ymin = 0, Float_t ymax = 0, Float_t window = 0, Bool_t clean = kFALSE) |
static Bool_t | flipAxis(TH2* h2 = 0, TString opt = "x") |
static Int_t | getDimIndex(Int_t index, Int_t& x1, Int_t& x2, Int_t& x3, Int_t& x4, Int_t& x5, UInt_t x1max = 0, UInt_t x2max = 0, UInt_t x3max = 0, UInt_t x4max = 0, UInt_t x5max = 0) |
virtual Option_t* | TObject::GetDrawOption() const |
static Long_t | TObject::GetDtorOnly() |
static TH1* | getHist(TFile* inp, TString name) |
virtual const char* | TObject::GetIconName() const |
static Int_t | getLinearIndex(Int_t x1, UInt_t x1max, Int_t x2, UInt_t x2max = 0, Int_t x3 = -1, UInt_t x3max = 0, Int_t x4 = -1, UInt_t x4max = 0, Int_t x5 = -1, UInt_t x5max = 0) |
static TList* | getListOfAllDataMembers(TClass* cl) |
static Double_t | getMaxHistArray(TH1** h, Int_t size, Int_t& index) |
static Double_t | getMinHistArray(TH1** h, Int_t size, Int_t& index) |
virtual const char* | TNamed::GetName() const |
virtual char* | TObject::GetObjectInfo(Int_t px, Int_t py) const |
static Bool_t | TObject::GetObjectStat() |
virtual Option_t* | TObject::GetOption() const |
virtual const char* | TNamed::GetTitle() const |
virtual UInt_t | TObject::GetUniqueID() const |
static TObjArray* | glob(TString pattern) |
static TH1D* | graphErrorsToHist(TGraphErrors* g = 0, Double_t firstBinWidth = -1, TString newname = "", Bool_t exchange = kFALSE, Int_t markerstyle = 8, Int_t markercolor = 2, Float_t markersize = 0.7) |
static TH1D* | graphToHist(TGraph* g = 0, Double_t firstBinWidth = -1, TString newname = "", Bool_t exchange = kFALSE, Int_t markerstyle = 8, Int_t markercolor = 2, Float_t markersize = 0.7) |
virtual Bool_t | TObject::HandleTimer(TTimer* timer) |
virtual ULong_t | TNamed::Hash() const |
static TGraph* | hist2DToGraph(TH2* h = 0, Float_t xmin = 0, Float_t xmax = 0, Float_t ymin = 0, Float_t ymax = 0) |
static TGraphErrors* | hist2DToGraphErrors(TH2* h = 0, Float_t xmin = 0, Float_t xmax = 0, Float_t ymin = 0, Float_t ymax = 0) |
static TGraph* | histToGraph(TH1* h = 0, TString newname = "", Bool_t exchange = kFALSE, Int_t markerstyle = 8, Int_t markercolor = 2, Float_t markersize = 0.7) |
static TGraphErrors* | histToGraphErrors(TH1* h = 0, TString newname = "", Bool_t exchange = kFALSE, Int_t markerstyle = 8, Int_t markercolor = 2, Float_t markersize = 0.7) |
static void | histToText(TH1*, TString filename = "hist.txt") |
virtual void | TObject::Info(const char* method, const char* msgfmt) const |
virtual Bool_t | TObject::InheritsFrom(const char* classname) const |
virtual Bool_t | TObject::InheritsFrom(const TClass* cl) const |
virtual void | TObject::Inspect() constMENU |
static Double_t | integralGraph(TGraph* g = 0, Int_t first = -1, Int_t last = -1) |
static TH1* | inverseRebinBinHist(TH1* hnonconst = 0, Double_t binw = 1, Bool_t normBinWidth = kTRUE, Double_t eps = 0.0001) |
void | TObject::InvertBit(UInt_t f) |
virtual TClass* | IsA() const |
virtual Bool_t | TObject::IsEqual(const TObject* obj) const |
virtual Bool_t | TObject::IsFolder() const |
Bool_t | TObject::IsOnHeap() const |
virtual Bool_t | TNamed::IsSortable() const |
Bool_t | TObject::IsZombie() const |
static Double_t | kurtosis(Int_t n, Short_t* data) |
static Double_t | kurtosis(Int_t n, Int_t* data) |
static Double_t | kurtosis(Int_t n, Float_t* data) |
static Double_t | kurtosis(Int_t n, Double_t* data) |
virtual void | TNamed::ls(Option_t* option = "") const |
static Bool_t | makeHists(TString infile = "", Int_t evs = 0, TString histdescriptionfile = "", TString listofClasses = "") |
void | TObject::MayNotUse(const char* method) const |
static TDirectory* | Mkdir(TDirectory*, const Char_t*, Int_t, Int_t p = 1) |
static Int_t | normalize_max(TH2* h2 = 0, TString axis = "y") |
virtual Bool_t | TObject::Notify() |
void | TObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const |
static Bool_t | open(TFile**, TString, TString) |
static Bool_t | openAscii(FILE**, TString, TString) |
static void | TObject::operator delete(void* ptr) |
static void | TObject::operator delete(void* ptr, void* vp) |
static void | TObject::operator delete[](void* ptr) |
static void | TObject::operator delete[](void* ptr, void* vp) |
void* | TObject::operator new(size_t sz) |
void* | TObject::operator new(size_t sz, void* vp) |
void* | TObject::operator new[](size_t sz) |
void* | TObject::operator new[](size_t sz, void* vp) |
HTool& | operator=(const HTool&) |
virtual void | TObject::Paint(Option_t* option = "") |
static TString* | parseString(TString options, Int_t& size, TString separator = "", Bool_t tolower = kTRUE) |
virtual void | TObject::Pop() |
virtual void | TNamed::Print(Option_t* option = "") const |
static Bool_t | printBaskets(TString infile = "", TString opt = "M", TString listofClasses = "", TString treename = "T") |
static Bool_t | printCompHistInfo(TH1* h1 = 0, TH1* h2 = 0, Int_t detail = 0) |
static void | printHist(TH1* h = 0) |
static Bool_t | printHistInfo(TH1* h1 = 0) |
static void | printProgress(Long64_t ct = -1, Long64_t total = -1, Long64_t step = 1, TString comment = "") |
static TObjArray* | projections(TH2* h2, TString axis = "y", Int_t firstbin = 0, Int_t lastbin = -1, Int_t nsteps = -99, TString opt = "e", TString suffix = "", Int_t markerstyle = 8, Int_t markercolor = 2, Float_t markersize = 0.7) |
static TH1D* | projectY(TH1* h = 0, Int_t xbin1 = 1, Int_t xbin2 = 0, TString suff = "", Int_t ybin = 0, Float_t ymin = -99, Float_t ymax = -99, Int_t markerstyle = 8, Int_t markercolor = 2, Float_t markersize = 0.7) |
virtual Int_t | TObject::Read(const char* name) |
static Bool_t | readHistsDescription(TString file, TObjArray* myhists, TString* classes = 0, Int_t sizeclass = 0) |
static TH2* | reBin(TH2* h2 = 0, Int_t groupX = 2, Int_t gropY = 2, TString newname = "") |
virtual void | TObject::RecursiveRemove(TObject* obj) |
static Int_t | removeEnds(TH1* h, Int_t first = 1, Int_t last = -1) |
void | TObject::ResetBit(UInt_t f) |
static void | resetHist(TH1* h, Float_t val = -99, Float_t valerr = -99) |
static Double_t | roundDigits(Double_t d, Int_t ndigits = -1) |
static Float_t | roundDigits(Float_t f, Int_t ndigits = -1) |
static void | roundHist(TH2* h = 0, Int_t ndigit = -1, Int_t ndigiterr = -1) |
virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU |
virtual void | TObject::SavePrimitive(ostream& out, Option_t* option = "") |
static Bool_t | scaleGraph(TGraph* g = 0, Double_t xscale = 1., Double_t yscale = 1.) |
static Bool_t | scaleGraphErrors(TGraphErrors* g = 0, Double_t xscale = 1., Double_t yscale = 1., Double_t xErrscale = 1., Double_t yErrscale = 1.) |
static void | scanOracle(TString, TString) |
void | TObject::SetBit(UInt_t f) |
void | TObject::SetBit(UInt_t f, Bool_t set) |
virtual void | TObject::SetDrawOption(Option_t* option = "")MENU |
static void | TObject::SetDtorOnly(void* obj) |
static void | setHistErrors(TH1* h, TH1* h2) |
virtual void | TNamed::SetName(const char* name)MENU |
virtual void | TNamed::SetNameTitle(const char* name, const char* title) |
static void | TObject::SetObjectStat(Bool_t stat) |
virtual void | TNamed::SetTitle(const char* title = "")MENU |
virtual void | TObject::SetUniqueID(UInt_t uid) |
static Bool_t | shiftGraph(TGraph* g = 0, Double_t xshift = 0., Double_t yshift = 0.) |
static Bool_t | shiftHist(TH1* h = 0, Float_t shift = 0) |
static Bool_t | shiftHistByBin(TH1* h = 0, Int_t shiftbin = 0) |
virtual void | ShowMembers(TMemberInspector&) |
virtual Int_t | TNamed::Sizeof() const |
static Double_t | skewness(Int_t n, Short_t* data) |
static Double_t | skewness(Int_t n, Int_t* data) |
static Double_t | skewness(Int_t n, Float_t* data) |
static Double_t | skewness(Int_t n, Double_t* data) |
static TObjArray* | slices(TH2* h = 0, TF1* f = 0, TString axis = "y", Int_t firstbin = 1, Int_t lastbin = 0, Int_t cut = 0, TString opt = "QNR", TString suffix = "", Int_t markerstyle = 8, Int_t markercolor = 2, Float_t markersize = 0.7) |
static void | smooth(TH1F* h = 0, Int_t ntimes = 1, Int_t firstbin = -1, Int_t lastbin = -1) |
static void | sort(Int_t n, Char_t* arr, Int_t* index = 0, Bool_t down = kTRUE, Bool_t overwrite = kTRUE) |
static void | sort(Int_t n, Short_t* arr, Int_t* index = 0, Bool_t down = kTRUE, Bool_t overwrite = kTRUE) |
static void | sort(Int_t n, Int_t* arr, Int_t* index = 0, Bool_t down = kTRUE, Bool_t overwrite = kTRUE) |
static void | sort(Int_t n, Float_t* arr, Int_t* index = 0, Bool_t down = kTRUE, Bool_t overwrite = kTRUE) |
static void | sort(Int_t n, Double_t* arr, Int_t* index = 0, Bool_t down = kTRUE, Bool_t overwrite = kTRUE) |
static void | sortParallel(Int_t n, Int_t nArrays, Char_t* listarr, Int_t leading = 0, Int_t* index = 0, Bool_t down = kTRUE) |
static void | sortParallel(Int_t n, Int_t nArrays, Short_t* listarr, Int_t leading = 0, Int_t* index = 0, Bool_t down = kTRUE) |
static void | sortParallel(Int_t n, Int_t nArrays, Int_t* listarr, Int_t leading = 0, Int_t* index = 0, Bool_t down = kTRUE) |
static void | sortParallel(Int_t n, Int_t nArrays, Float_t* listarr, Int_t leading = 0, Int_t* index = 0, Bool_t down = kTRUE) |
static void | sortParallel(Int_t n, Int_t nArrays, Double_t* listarr, Int_t leading = 0, Int_t* index = 0, Bool_t down = kTRUE) |
virtual void | Streamer(TBuffer&) |
void | StreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b) |
virtual void | TObject::SysError(const char* method, const char* msgfmt) const |
Bool_t | TObject::TestBit(UInt_t f) const |
Int_t | TObject::TestBits(UInt_t f) const |
static TH1* | toNonConstBinHist(TH1* hconst = 0, TH1* hnonconst = 0, Bool_t normBinWidth = kTRUE, Double_t eps = 0.0001) |
static Int_t | truncatedIndex(Int_t n, Float_t trunc = 0.1) |
static Double_t | truncatedMean(Int_t n, Short_t* arr, Float_t trunc = 0.1, Bool_t down = kTRUE, Bool_t overwrite = kTRUE) |
static Double_t | truncatedMean(Int_t n, Int_t* arr, Float_t trunc = 0.1, Bool_t down = kTRUE, Bool_t overwrite = kTRUE) |
static Double_t | truncatedMean(Int_t n, Float_t* arr, Float_t trunc = 0.1, Bool_t down = kTRUE, Bool_t overwrite = kTRUE) |
static Double_t | truncatedMean(Int_t n, Double_t* arr, Float_t trunc = 0.1, Bool_t down = kTRUE, Bool_t overwrite = kTRUE) |
static Double_t | truncatedSigma(Int_t n, Short_t* arr, Float_t trunc = 0.1) |
static Double_t | truncatedSigma(Int_t n, Int_t* arr, Float_t trunc = 0.1) |
static Double_t | truncatedSigma(Int_t n, Float_t* arr, Float_t trunc = 0.1) |
static Double_t | truncatedSigma(Int_t n, Double_t* arr, Float_t trunc = 0.1) |
virtual void | TObject::UseCurrentStyle() |
virtual void | TObject::Warning(const char* method, const char* msgfmt) const |
static Double_t | weightedMean(Int_t n, Short_t* data, Short_t* dataerr) |
static Double_t | weightedMean(Int_t n, Int_t* data, Int_t* dataerr) |
static Double_t | weightedMean(Int_t n, Float_t* data, Float_t* dataerr) |
static Double_t | weightedMean(Int_t n, Double_t* data, Double_t* dataerr) |
static Double_t | weightedMeanAndSigma(Int_t n, Short_t* data, Short_t* dataerr, Double_t* mean, Double_t* sigma) |
static Double_t | weightedMeanAndSigma(Int_t n, Int_t* data, Int_t* dataerr, Double_t* mean, Double_t* sigma) |
static Double_t | weightedMeanAndSigma(Int_t n, Float_t* data, Float_t* dataerr, Double_t* mean, Double_t* sigma) |
static Double_t | weightedMeanAndSigma(Int_t n, Double_t* data, Double_t* dataerr, Double_t* mean, Double_t* sigma) |
static Double_t | weightedSigma(Int_t n, Short_t* dataerr) |
static Double_t | weightedSigma(Int_t n, Int_t* dataerr) |
static Double_t | weightedSigma(Int_t n, Float_t* dataerr) |
static Double_t | weightedSigma(Int_t n, Double_t* dataerr) |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const |
static Bool_t | writeHistInfo(TH1* h1 = 0, FILE* anaout = 0) |
static Bool_t | writeNtupleToAscii(TString Input = "", TString ntuple = "", TString Output = "", TString separator = ",", TString selection = "", TString condition = "", Long64_t entries = -1, Long64_t startEntry = 0, Int_t ColWidth = 0) |
static void | writeObject(TObject* h) |
virtual void | TObject::DoError(int level, const char* location, const char* fmt, va_list va) const |
void | initVariables() |
void | TObject::MakeZombie() |
enum TObject::EStatusBits { | kCanDelete | |
kMustCleanup | ||
kObjInCanvas | ||
kIsReferenced | ||
kHasUUID | ||
kCannotPick | ||
kNoContextMenu | ||
kInvalidObject | ||
}; | ||
enum TObject::[unnamed] { | kIsOnHeap | |
kNotDeleted | ||
kZombie | ||
kBitMask | ||
kSingleKey | ||
kOverwrite | ||
kWriteDelete | ||
}; |
TString | TNamed::fName | object identifier |
TString | TNamed::fTitle | object title |
Opens ascii file "fName" to the pointer file with the option "r" and "w". Returns kTRUE if OK.
Close ascii file of the pointer file if file!=0 and sets the file pointr to 0 afterwards. Returns kTRUE if OK.
Expand 'pattern' as it would be done by the shell (see sh(1)): '*', '?', '~', '$ENVIRONMENT_VARIABLE' and '[', ']' are expanded. In case the expansion is successful, a TObjArray of TObjStrings with the names of all existing files is returned - otherwise NULL. The returned TObjArray must be deleted by the caller of the function! This example returns all existing .root files in /tmp as well as all .root files in your home directory starting with the characters 'a', 'b', 'c' and 'e': TObjArray* files = HTool::glob( "/tmp/*.root $HOME/[a-c,e]*.root" ); if (files) { TObjString* name = NULL; TIterator* file = files->MakeIterator(); while ((name = (TObjString*)file->Next())) { Char_t* input = name->GetString.Data(); ... } delete files; }
Util function for writing ntuple data to ascii file: Input : Input File (*.root) ntuple : name of ntuple in Input File Output : Output ascii File separator : data field separator (" " or "," or "\t" .....) selection : comma separated list of leaf names ( like x,y,z,mom ...) - the list defines the order of the columns - if empty all leafs will be written (default) - if list contains "-" all leafs but the listed ones will be written condition : like Tree->Draw() selection. Only rows which fulfill the condition will be written - if empty no condition is applied (default) entries : number of entries which should be read - if == -1 all entries are analyzied (default) startEntry: first entry to strt in in ntuple ColWidth : format width for the data field - if ==0 no format is applied (default)
create all variables to map the ntuple in oufile. opens root file, retrieves the ntuple pointer. sets all branch addresses. "infile" = input root file containing the ntuple "prefix" = this string will be prepended to the normal variable names (needed for multiple identical ntuples) "ntupleName" = name of the ntuple in the root file "outfile" = macro file which will be created. this macro can be loaded via gROOT->LoadMaco(....) + execute function as macro name (without .C) TNtuple* ntuple = mymacro(); to get the ntuple pointer in compiled code you have to use "#include mymacro.C" of the before created macro and remove gROOT->LoadMaco(....) example : //-------------------------------- // comment in if you want to compile // and the macros exist already! //#include "mymacro.C" //#include "mymacro2.C" //-------------------------------- void testNtupleMap() { //-------------------------------- comment out if you want to compile and the macros are in the #include create the first macro for ntuple HTool::createNtupleMap("myfile.root","test_" ,"myntuple","mymacro.C"); HTool::createNtupleMap("myfile.root","test2_","myntuple","mymacro2.C"); gROOT->LoadMacro("mymacro.C"); gROOT->LoadMacro("mymacro.C"); //------------------------------------- TNtuple* ntuple = mymacro (); // functions defined in marco TNtuple* ntuple2 = mymacro2(); // functions defined in marco Int_t n = ntuple->GetEntries(); Float_t* dat = ntuple->GetArgs(); for(Int_t i = 0; i < n ; i ++){ ntuple->GetEntry(i); cout<<test_var<<endl; // if var is a member of the ntuple (defined in macro) } cout<<"----------------"<<endl; Int_t n2 = ntuple2->GetEntries(); for(Int_t i = 0; i < n2 ; i ++){ ntuple2->GetEntry(i); cout<<test2_var<<endl; // if var is a member of the ntuple (defined in macro) } }
prints out level steps of function calls before the function call (backtrace) Useful for debugging
print the progress of a loop in %, where ct is the loop counter, total the total number of loops and step the step size in precent for which the print should be done.
Function to create subdirectories, where dirold is the pointer of the old Directory, "c" the name of the new Directory an "i" the number (c + i) of the directory."p" gives the formating number of digits filled with 0. If "i"==-99 the numbering part is skipped. Checks if the Directrory exists , if so changes into otherwise create it new. The pointer to the new Directory is returned.
Changes into the given path. If the Directory is not existing it will be created. The pointer to the new directory will be returned.
Checks if a given path "p" in file "input" exists. The actual directory will not be changed. Returns kTRUE if OK.
return a list of all data members of a class. contains all data members of bass classes.
scans oracle runs table source code to extract file names, run ids and number of events
Execute 'command' in a shell and return the exit code of 'command'. 'output' is filled with the data written to STDOUT and STDERR by 'command'.
Translates i.e. array coordinate 0,2,3 of array[3][8][1] in a linear unique coordinate starting from 0 according to standard memory layout of c++. Supports 2-5 dimensional addressing. Returns -1 in case of error. index = 2-dim = x2 + x1*x2max 3-dim = x3 + x1*x2max*x3max + x2*x3max 4-dim = x4 + x1*x2max*x3max*x4max + x2*x3max*x4max + x3*x4max 5-dim = x5 + x1*x2max*x3max*x4max*x5max + x2*x3max*x4max*x5max + x3*x4max*x5max + x4*x5max
sorts array arrIn. If down=kTRUE sort in decreasing order. If overwrite=kTRUE input array is sorted otherwise not and the result can be obtained from the index array (has to be provided by the caller with size >=n ) If index=NULL the index array is not used. if index=NULL and overwrite=kFALSE the function returns without doing anything.
sorts array arrIn. If down=kTRUE sort in decreasing order. If overwrite=kTRUE input array is sorted otherwise not and the result can be obtained from the index array (has to be provided by the caller with size >=n ) If index=NULL the index array is not used. if index=NULL and overwrite=kFALSE the function returns without doing anything.
sorts array arrIn. If down=kTRUE sort in decreasing order. If overwrite=kTRUE input array is sorted otherwise not and the result can be obtained from the index array (has to be provided by the caller with size >=n ) If index=NULL the index array is not used. if index=NULL and overwrite=kFALSE the function returns without doing anything.
sorts array arrIn. If down=kTRUE sort in decreasing order. If overwrite=kTRUE input array is sorted otherwise not and the result can be obtained from the index array (has to be provided by the caller with size >=n ) If index=NULL the index array is not used. if index=NULL and overwrite=kFALSE the function returns without doing anything.
sorts array arrIn. If down=kTRUE sort in decreasing order. If overwrite=kTRUE input array is sorted otherwise not and the result can be obtained from the index array (has to be provided by the caller with size >=n ) If index=NULL the index array is not used. if index=NULL and overwrite=kFALSE the function returns without doing anything.
sorts n arrays arrIn paralell (destruktive!). Array pointer arrIn[leading] will be the leading one. The other arrays will be sorted according to the reordering of the leading array. If down=kTRUE sort in decreasing order. The result can be obtained from the index array (has to be provided by the caller with size >=n ) If index=NULL the index array is not used. if index=NULL and overwrite=kFALSE the function returns without doing anything.
sorts n arrays arrIn paralell (destruktive!). Array pointer arrIn[leading] will be the leading one. The other arrays will be sorted according to the reordering of the leading array. If down=kTRUE sort in decreasing order. The result can be obtained from the index array (has to be provided by the caller with size >=n ) If index=NULL the index array is not used. if index=NULL and overwrite=kFALSE the function returns without doing anything.
sorts n arrays arrIn paralell (destruktive!). Array pointer arrIn[leading] will be the leading one. The other arrays will be sorted according to the reordering of the leading array. If down=kTRUE sort in decreasing order. The result can be obtained from the index array (has to be provided by the caller with size >=n ) If index=NULL the index array is not used. if index=NULL and overwrite=kFALSE the function returns without doing anything.
sorts n arrays arrIn paralell (destruktive!). Array pointer arrIn[leading] will be the leading one. The other arrays will be sorted according to the reordering of the leading array. If down=kTRUE sort in decreasing order. The result can be obtained from the index array (has to be provided by the caller with size >=n ) If index=NULL the index array is not used. if index=NULL and overwrite=kFALSE the function returns without doing anything.
sorts n arrays arrIn paralell (destruktive!). Array pointer arrIn[leading] will be the leading one. The other arrays will be sorted according to the reordering of the leading array. If down=kTRUE sort in decreasing order. The result can be obtained from the index array (has to be provided by the caller with size >=n ) If index=NULL the index array is not used. if index=NULL and overwrite=kFALSE the function returns without doing anything.
calculates the skew \ ( x-mean)^3 n*sigma^3 The skew will be > 0 for distributions haveing more entries in the tails larger than mean and < 0 for distributions haveing more entries small than mean
calculates the skew \ ( x-mean)^3 n*sigma^3 The skew will be > 0 for distributions haveing more entries in the tails larger than mean and < 0 for distributions haveing more entries small than mean
calculates the skew \ ( x-mean)^3 n*sigma^3 The skew will be > 0 for distributions haveing more entries in the tails larger than mean and < 0 for distributions haveing more entries small than mean
calculates the skew \ ( x-mean)^3 n*sigma^3 The skew will be > 0 for distributions haveing more entries in the tails larger than mean and < 0 for distributions haveing more entries small than mean
calculates the weighted mean \ x/sigma^2 \ 1/sigma^2 where x are the data points from data[i] and sigma the standard deviations of the points from dataerr[i]
calculates the weighted mean \ x/sigma^2 \ 1/sigma^2 where x are the data points from data[i] and sigma the standard deviations of the points from dataerr[i]
calculates the weighted mean \ x/sigma^2 \ 1/sigma^2 where x are the data points from data[i] and sigma the standard deviations of the points from dataerr[i]
calculates the weighted mean \ x/sigma^2 \ 1/sigma^2 where x are the data points from data[i] and sigma the standard deviations of the points from dataerr[i]
calculates the weighted sigma 1 sqrt ---------------- \ 1/sigma^2 where sigma is the standard deviations of the points from dataerr[i]
calculates the weighted sigma 1 sqrt ---------------- \ 1/sigma^2 where sigma is the standard deviations of the points from dataerr[i]
calculates the weighted sigma 1 sqrt ---------------- \ 1/sigma^2 where sigma is the standard deviations of the points from dataerr[i]
calculates the weighted sigma 1 sqrt ---------------- \ 1/sigma^2 where sigma is the standard deviations of the points from dataerr[i]
calculates the weighted mean and sigma \ x/sigma^2 mean = ---------------- \ 1/sigma^2 where x are the data points from data[i] and sigma the standard deviations of the points from dataerr[i] and 1 sigma = sqrt ---------------- \ 1/sigma^2 where sigma is the standard deviations of the points from dataerr[i]
calculates the weighted mean and sigma \ x/sigma^2 mean = ---------------- \ 1/sigma^2 where x are the data points from data[i] and sigma the standard deviations of the points from dataerr[i] and 1 sigma = sqrt ---------------- \ 1/sigma^2 where sigma is the standard deviations of the points from dataerr[i]
calculates the weighted mean and sigma \ x/sigma^2 mean = ---------------- \ 1/sigma^2 where x are the data points from data[i] and sigma the standard deviations of the points from dataerr[i] and 1 sigma = sqrt ---------------- \ 1/sigma^2 where sigma is the standard deviations of the points from dataerr[i]
calculates the weighted mean and sigma \ x/sigma^2 mean = ---------------- \ 1/sigma^2 where x are the data points from data[i] and sigma the standard deviations of the points from dataerr[i] and 1 sigma = sqrt ---------------- \ 1/sigma^2 where sigma is the standard deviations of the points from dataerr[i]
Calculates the truncated sigma of array arr with size n. The n * trunc (rounded down) of smallest and largest values are truncated.
Calculates the truncated sigma of array arr with size n. The n * trunc (rounded down) of smallest and largest values are truncated.
Calculates the truncated sigma of array arr with size n. The n * trunc (rounded down) of smallest and largest values are truncated.
Calculates the truncated sigma of array arr with size n. The n * trunc (rounded down) of smallest and largest values are truncated.
calulates the downrounded integer corresponding to n * trunc. Used to calulated the active range of an sorted array for a truncation fraction trunc of the smallest and largest values.
Return TF1 for Chisquare density distribution for nDegreeOfFreedom degrees of freedom. The distribution will be normalize if norm == kTRUE The function will be named name. The user will be responible of deleting the object after usage. TF1 params : par[0]=nDegreeOfFreedom , par[1]=scale The scale typical should be binwidth*integral of the histogram if the TF1 should be plotted on top
Round bin content to ndigit and binerror to ndigterr digits. for ndigit or ndigiterr =-1 the rounding will be skipped for the corresponding value.
Smooth bin contents of this histogram between firstbin and lastbin. (if firstbin=-1 and lastbin=-1 (default) all bins are smoothed. bin contents are replaced by their smooth values. Errors (if any) are not modified. algorithm can only be applied to 1-d histograms to replace removed function TH1::Smooth)
calls internal the fitslice of root. Suffix can be added to name of fitted hists. Returns a TObjArray pointer to an array containing the result hists of the fit. Numbering is the same as the the parameters of the fitfunction + chi2 at last place.
calls internal the projections function of the hist. Suffix can be added to name of fitted hists. Returns a TObjArray pointer to an array containing the result hists of the loop of projections.
Applies fit fit to all hists in array. The result of the fit will be returned in a TObjArray which contains hists for all parameters from fit (with corresponding errors set). The number of hists is equal npar+1. The ordering inside the array starts from par0 to parN and the last hist will contain the chi2. The number of bins in the hists will be equal to the the number of fitted hists. The range of the result hists can be set via min and max. If these values ar not specified the range will be 0-1. If opt=1 fit will use range x1 x2 arround max of hists
Fits h with TF1 f. Convert the hist to TGraphErrors first and than perfom the fit on the graph. With xmin/xmax/ymin,ymax a region can be selected. If window is !=0 the graph is fitted with f and in an second iteration the graph is rebuild to just contain values inside the window arround f. If clean is true all values of the hist arround the window of f are set to 0. String opt are options for the Fit. silent=kTRUE switches the prints off.
removes bins from start to first and from last to end (first and last are kept). returns hist with name newname
clean hist if bincontent is below a certain value (threshold): The bin content is replaced by val.
reset hist with val for content and valerr for errors (if this values not equal -99).
copy old hist into new one. You can decide to copy content of hist (val!=-99) and errors (valerr!=-99). Combinations are possible. if no new name is specified, _copy is appended to old name.
copy old hist into new one. You can decide to copy content of hist (val!=-99) and errors (valerr!=-99). Combinations are possible. if no new name is specified, _copy is appended to old name. Copy is done in range from start to end. If end = -99, Full histogram is copied.
Finds maximum of all hists in TH1* array of size size. return max and the index of the hist inside the array which has the highest max.
Finds minimum of all hists in TH1* array of size size. return min and the index of the hist inside the array which has the lowest min.
Rebins h2 with groups of groupX and groupY. The new created hist with name newname (if specified) or oldname_rebin will be returned.
creates new hist with name newname (if specified) or oldname_exchangeXY with exchanged x- and y-axis
Project to axis and and calc scaling factor for the bin to maximum of total hist max_total/max_proj. The bins of the hist are scaled by the factor. The result is 2D hist where each bin Projection has the same maximum height. The opration is performed on the original Hist! arguments: TH2* ht :pointer to hist which should be normalized TString axis :="x" , or "y" depending on the projection return values: -1 : In the case of zero pointer input or unknown axis argument 0 : If opreation has been succesful 3 : TH2 max is 0 (most probably empty).
Creates a TGraph from hist h. The axis can be exchanged if exchange=kTRUE; The Graph does not take empty bins into account.
Creates a TGraphErrors from hist h. The axis can be excganged if exchange=kTRUE; The Graph does not take empty bins into account.
Puts h into TGraph . With xmin/xmax/ymin,ymax a region can be selected.
Puts h into TGraphErrors . With xmin/xmax/ymin,ymax a region can be selected.
Takes hconst (constant binning) and rebins it in the same way as hnonconst. The bin width of hconst has to be such that an integer multiplier can be found to fit all bins of hnonconst (example invariant mass : hconst bin width = 1MeV/c, hnonconst bin width x * 1MeV/c (x beining an integer number) ) The new histogram will be returned. The name of the new histogram is is hconstname_varbin. If the rebin did not work out a NULL pointer will be returned.
Takes histogram and rebins it with binw binwidth, where binw is smaller than the binwidth. The bin width of the histogram has to be such that an integer multiplier can be found to fit all bins of hnonconst (example invariant mass : hnonconst bin width = 10MeV/c, rebin bin width binw =1MeV/c ). The bin content will be equaly distributed to the bins. The new histogram will be returned. The name of the new histogram is is hconstname_rebin. If the rebin did not work out a NULL pointer will be returned.
put 1D histogram to ascii file with following format : Minv BinContent BinStatError BinWidth
Creates a TH1D from TGraph g. The binwidth of the first bin has to specified. The others bins are calculated automatically. Supports also Graphs with non constant x steps. The axis of the Graph can be exchanged if exchange=kTRUE (modifies the Graph).
Creates a TH1D from TGraph g. The binwidth of the first bin has to specified. The others bins are calculated automatically. Supports also Graphs with non constant x steps. The axis of the Graph can be exchanged if exchange=kTRUE (modifies the Graph).
exchanges x-values and y-values and corresponding errors.
calulates the integral (culmulative sum) y-values. By default all points are used. "first" and "last" defines the range of points to integrate (including these points, counting from 0). If "first" and "last" are no valid numbers inside the correct range the range will be set to 0 and last point depending which boundary has been violated.
scales x-values and y-values with xscale,yscale.
scales x-values and y-values with xscale,yscale. scales x Err-values and yErr-values with xErrscale,yErrscale.
add shift to x-values and y-values
loops over TString options and find substrings separated by separator and puts them to an array of TStrings. size will hold the size of this array and the pointer to the array is returned. If tolower is kTRUE options will be made toLower.
searches name in TString array classes with size size. return kTRUE if the string is found.
reads the hist descriptions from ascii file file. Creates the hists found in TString array classes with size size and adds them to TObjArray myhists.
makeHists(TString infile,Int_t evs,TString histdescriptionfile,TString listofClasses) Takes all categories in infile and generates generic histograms of all datamembers. T->Draw() is used to fill the hists. evs is the number of entries to loop over. if evs=0 the full size of the tree will be used. INPUT: histdescriptionfile is the file with description of the histograms to fill (ascii). if histdescriptionfile=="" histograms will be filled generic and a histdescription file histDescription.txt will be generated in the working directory. listofClasses contains a list of Classes which should be taken into account, all other classes will be ignored. if listofClasses=="" all classes in infile will be taken. OUTPUT: I. a root file treeHists.root will be generated which contains all histograms of the selected variables II. if histdescriptionfile has been empty an ascii file treeHistDescription.txt will be generated in the working directory. III. an ascii file treeHistResults.txt with the analysis results of the hists will be created, which can be used for diff of different files.
Gets histogram with name name from 2 input files and plots them into into a canvas. If the canvas pointer is 0 a canvas will be created. if padn=1 they will be overlayed in on pad, if pad=2 and comp=0, a new canvas with n pads will be created and the 2 hists will be plotted single if n=2 and comp not equal 0, the 2 pads of comp will used to draw.
Gets histogram with name name from 2 input files and compares them by mean,rms,range,maximum,maxposition, entries....
prints information over hist to screen .