|
BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
|
#include <TBrowser.h>#include <TCanvas.h>#include <TChain.h>#include <TCollection.h>#include <TDirectory.h>#include <TF1.h>#include <TFile.h>#include <TGraph.h>#include <TH1.h>#include <TH2.h>#include <TList.h>#include <TMath.h>#include <TObjArray.h>#include <TObjString.h>#include <TProfile.h>#include <TROOT.h>#include <TStopwatch.h>#include <TStyle.h>#include <TSystem.h>#include <TSystemDirectory.h>#include <TSystemFile.h>#include <TVectorD.h>#include <fstream>#include <iostream>Go to the source code of this file.
Macros | |
| #define | OUTINFILE 0 |
| #define | uVERBOSE 1 |
| #define | fit_funk_name "fitFunction" |
Functions | |
| Int_t | FilesListFromDir (const TString filespath, TObjArray *const collection, Int_t max_num, TString content) |
| Int_t | SaveArrayStructInFile (TCollection *array, TFile *file, TString start_path="") |
| Int_t | SaveArrayOfObjectsArraysInFile (TObjArray *ObjectsArray=0, const TString filename="data", const TString path="./", const Int_t deleteArrays=0) |
| Int_t | FitHistogramm (TH1 *histogramm, Double_t &mean, Double_t &sigma, Double_t RangeXmin=0., Double_t RangeXmax=0., TString fit_formula="gaus") |
| Int_t | FitHistogrammInFirstMaxPeak (TH1 *histogramm, Double_t &Mean, Double_t &Sigma, Double_t peaksRangeMin, Double_t peaksRangeMax, Double_t peakRange, Double_t peakRMSRange=1.5) |
| Int_t | FitHistogrammInRMSRange (TH1 *histogramm, Double_t &mean, Double_t &sigma, Double_t RMSrange, Double_t RangeXmin=0, Double_t RangeXmax=0) |
| Int_t | FitHistogrammInMaxPeak (TH1 *histogramm, Double_t &mean, Double_t &sigma, Double_t PeakWidth, Double_t RangeXmin=0., Double_t RangeXmax=0.) |
| Int_t | ArrayStat (const Int_t nElements, const Double_t *Array, Double_t &maxElement, Double_t &minElement, Double_t &Amplitude, Double_t &Mean, Double_t &RMS) |
| void | ResetArray (TObjArray **array, const TString option) |
| Int_t | ConstructFilesListFromDirectory (const TString &Directory, TCollection *const collection) |
| Int_t | RUNnumberInString (const TString &str) |
| TObject * | CreateXprofile (const TH1 *sourcehist) |
| Int_t | CollectRAWfilesInChain (TChain *rawTree, const TString dirname, const Int_t maxNfiles=50) |
| Int_t | FitHistogrammSmartInMaxPeak (TH1 *histogramm, Double_t &mean, Double_t &sigma, Double_t nRMSfit=2., Double_t RangeXmin=0., Double_t RangeXmax=0.) |
| Int_t | ArrayStat (Int_t nElements, Double_t *Array, Double_t &maxElement, Double_t &minElement, Double_t &Amplitude, Double_t &Mean, Double_t &RMS) |
| TH1 * | CreateSmartPojection (TH2 *sourcehist, TString option="n", const Float_t minbinevX=1, const Float_t minbinevedge=0.001, const Int_t rebinX=1, const Int_t rebinY=1, Int_t ProjectionRebin=5, Float_t projWidth=1.5, TObjArray *monitor_slices_array=NULL) |
| TObjArray * | HDraw (const TObjArray *Histogramms_arr, TString name="", int Hr=4, int Vt=4, const int Pair=1, int min=0, int max=100, int Log=0, int Leg=0, const TString param="", int Norm=0) |
Variables | |
| std::ostream & | current_out = std::cout |
| #define fit_funk_name "fitFunction" |
Definition at line 45 of file utilites.h.
| #define OUTINFILE 0 |
Definition at line 36 of file utilites.h.
| #define uVERBOSE 1 |
Definition at line 44 of file utilites.h.
| Int_t ArrayStat | ( | const Int_t | nElements, |
| const Double_t * | Array, | ||
| Double_t & | maxElement, | ||
| Double_t & | minElement, | ||
| Double_t & | Amplitude, | ||
| Double_t & | Mean, | ||
| Double_t & | RMS ) |
| Int_t ArrayStat | ( | Int_t | nElements, |
| Double_t * | Array, | ||
| Double_t & | maxElement, | ||
| Double_t & | minElement, | ||
| Double_t & | Amplitude, | ||
| Double_t & | Mean, | ||
| Double_t & | RMS ) |
Definition at line 683 of file utilites.h.
References i, and TMath::Sqrt().
| Int_t CollectRAWfilesInChain | ( | TChain * | rawTree, |
| const TString | dirname, | ||
| const Int_t | maxNfiles = 50 ) |
Definition at line 155 of file utilites.h.
References TChain::AddFile(), current_out, TString::Data(), TString::EndsWith(), TChain::GetEntries(), TSystemDirectory::GetListOfFiles(), TNamed::GetName(), TSystemFile::IsDirectory(), and uVERBOSE.
| Int_t ConstructFilesListFromDirectory | ( | const TString & | Directory, |
| TCollection *const | collection ) |
Definition at line 91 of file utilites.h.
References TCollection::Add(), current_out, TString::Data(), TString::EndsWith(), TSystemDirectory::GetListOfFiles(), TNamed::GetName(), TSystemFile::IsDirectory(), and uVERBOSE.
| TH1 * CreateSmartPojection | ( | TH2 * | sourcehist, |
| TString | option = "n", | ||
| const Float_t | minbinevX = 1, | ||
| const Float_t | minbinevedge = 0.001, | ||
| const Int_t | rebinX = 1, | ||
| const Int_t | rebinY = 1, | ||
| Int_t | ProjectionRebin = 5, | ||
| Float_t | projWidth = 1.5, | ||
| TObjArray * | monitor_slices_array = NULL ) |
Definition at line 718 of file utilites.h.
References TH1::Add(), TAxis::FindBin(), fit_funk_name, FitHistogrammSmartInMaxPeak(), TAxis::GetBinCenter(), TAxis::GetBinLowEdge(), TAxis::GetBinUpEdge(), TH1::GetEntries(), TH1::GetFunction(), TH1::GetMean(), TH1::GetMeanError(), TNamed::GetName(), TH1::GetNbinsX(), TH1::GetNbinsY(), TF1::GetParError(), TH1::GetRMS(), TH1::GetRMSError(), TNamed::GetTitle(), TH1::GetXaxis(), TH2::Integral(), TH2::ProjectionY(), TH1::Rebin(), TH2::Rebin2D(), TAxis::Set(), TH1::SetBinContent(), TH1::SetBinError(), TAttMarker::SetMarkerStyle(), TH1::SetOption(), TH1::SetTitle(), TH2::Smooth(), and uVERBOSE.
Definition at line 143 of file utilites.h.
References current_out, TNamed::GetName(), TNamed::GetTitle(), TH1::SetTitle(), and uVERBOSE.
| Int_t FilesListFromDir | ( | const TString | filespath, |
| TObjArray *const | collection, | ||
| Int_t | max_num, | ||
| TString | content ) |
Definition at line 196 of file utilites.h.
References TObjArray::Add(), TString::Contains(), current_out, TString::Data(), TString::EndsWith(), TSystemDirectory::GetListOfFiles(), TNamed::GetName(), and TSystemFile::IsDirectory().
| Int_t FitHistogramm | ( | TH1 * | histogramm, |
| Double_t & | mean, | ||
| Double_t & | sigma, | ||
| Double_t | RangeXmin = 0., | ||
| Double_t | RangeXmax = 0., | ||
| TString | fit_formula = "gaus" ) |
Definition at line 523 of file utilites.h.
References TString::Contains(), current_out, TString::Data(), TH1::FindBin(), TH1::Fit(), fit_funk_name, TF1::GetChisquare(), TH1::GetFunction(), TH1::GetMean(), TNamed::GetName(), TF1::GetParameter(), TH1::GetRMS(), TH1::GetXaxis(), TAxis::GetXmax(), TAxis::GetXmin(), TH1::Integral(), TH1::SetAxisRange(), TF1::SetRange(), and uVERBOSE.
Referenced by FitHistogrammInFirstMaxPeak(), FitHistogrammInMaxPeak(), FitHistogrammInRMSRange(), and FitHistogrammSmartInMaxPeak().
| Int_t FitHistogrammInFirstMaxPeak | ( | TH1 * | histogramm, |
| Double_t & | Mean, | ||
| Double_t & | Sigma, | ||
| Double_t | peaksRangeMin, | ||
| Double_t | peaksRangeMax, | ||
| Double_t | peakRange, | ||
| Double_t | peakRMSRange = 1.5 ) |
Definition at line 353 of file utilites.h.
References TH1::FindFirstBinAbove(), FitHistogramm(), TH1::GetBinCenter(), TH1::GetBinContent(), TH1::GetMaximumBin(), TH1::GetRMS(), TH1::SetAxisRange(), and Sigma().
| Int_t FitHistogrammInMaxPeak | ( | TH1 * | histogramm, |
| Double_t & | mean, | ||
| Double_t & | sigma, | ||
| Double_t | PeakWidth, | ||
| Double_t | RangeXmin = 0., | ||
| Double_t | RangeXmax = 0. ) |
Definition at line 416 of file utilites.h.
References current_out, FitHistogramm(), TH1::GetBinCenter(), TH1::GetMaximumBin(), TNamed::GetName(), TH1::GetXaxis(), TAxis::GetXmax(), TAxis::GetXmin(), TH1::SetAxisRange(), and uVERBOSE.
| Int_t FitHistogrammInRMSRange | ( | TH1 * | histogramm, |
| Double_t & | mean, | ||
| Double_t & | sigma, | ||
| Double_t | RMSrange, | ||
| Double_t | RangeXmin = 0, | ||
| Double_t | RangeXmax = 0 ) |
Definition at line 379 of file utilites.h.
References current_out, FitHistogramm(), TH1::GetMean(), TH1::GetRMS(), TH1::GetXaxis(), TAxis::GetXmax(), TAxis::GetXmin(), TH1::SetAxisRange(), and uVERBOSE.
| Int_t FitHistogrammSmartInMaxPeak | ( | TH1 * | histogramm, |
| Double_t & | mean, | ||
| Double_t & | sigma, | ||
| Double_t | nRMSfit = 2., | ||
| Double_t | RangeXmin = 0., | ||
| Double_t | RangeXmax = 0. ) |
Definition at line 457 of file utilites.h.
References TMath::Abs(), TH1::Clone(), current_out, FitHistogramm(), TH1::GetBinCenter(), TH1::GetMaximumBin(), TNamed::GetName(), TH1::GetRMS(), TH1::GetXaxis(), TAxis::GetXmax(), TAxis::GetXmin(), TH1::SetAxisRange(), TH1::Smooth(), and uVERBOSE.
Referenced by CreateSmartPojection().
| TObjArray * HDraw | ( | const TObjArray * | Histogramms_arr, |
| TString | name = "", | ||
| int | Hr = 4, | ||
| int | Vt = 4, | ||
| const int | Pair = 1, | ||
| int | min = 0, | ||
| int | max = 100, | ||
| int | Log = 0, | ||
| int | Leg = 0, | ||
| const TString | param = "", | ||
| int | Norm = 0 ) |
Definition at line 907 of file utilites.h.
References TObjArray::Add(), TObjArray::At(), TObjArray::GetLast(), TCollection::GetName(), TObjArray::Last(), max(), min(), and TCollection::SetOwner().
Definition at line 631 of file utilites.h.
References TString::Contains(), current_out, TString::Data(), TObject::GetName(), and uVERBOSE.
Referenced by SaveArrayOfObjectsArraysInFile().
Definition at line 126 of file utilites.h.
References TString::Atoi().
| Int_t SaveArrayOfObjectsArraysInFile | ( | TObjArray * | ObjectsArray = 0, |
| const TString | filename = "data", | ||
| const TString | path = "./", | ||
| const Int_t | deleteArrays = 0 ) |
Definition at line 268 of file utilites.h.
References TObjArray::At(), TDirectory::cd(), TObjArray::Clear(), TFile::Close(), current_out, TString::Data(), TString::EndsWith(), TObjArray::GetEntries(), TObjArray::GetLast(), TCollection::GetName(), TObject::GetName(), TFile::IsOpen(), TDirectoryFile::mkdir(), n, ResetArray(), TDirectoryFile::rmdir(), uVERBOSE, and TObject::Write().
| Int_t SaveArrayStructInFile | ( | TCollection * | array, |
| TFile * | file, | ||
| TString | start_path = "" ) |
Definition at line 229 of file utilites.h.
References TDirectoryFile::cd(), current_out, TString::Data(), TObject::GetName(), TDirectoryFile::mkdir(), SaveArrayStructInFile(), uVERBOSE, and TObject::Write().
Referenced by SaveArrayStructInFile().
| std::ostream& current_out = std::cout |
Definition at line 41 of file utilites.h.