/*************************************************************************** UniFluct.h ------------------- begin : Wed Feb 27 2002 copyright : (C) 2002 by Alexis Mignon email : mignon@ganil.fr ***************************************************************************/ /*************************************************************************** La classe gère trois types de scaling : Poor Man Scaling "PMS" Delta-Scaling Delta=1 "1" Delta-Scaling Delta=1/2 "1/2" ***************************************************************************/ #include "TROOT.h" #include "TH1.h" #include "TCanvas.h" #include "TObjArray.h" /************************************************************************** * Les trois fonctions : * * TH1F* PMSPhi(TH1F *h1); * * TH1F* DeltaOnePhi(TH1F *h1); * * TH1F* DeltaHalfPhi(TH1F *h1); * * renvoient un histogramme "scalé" suivant respectivement : * * - Le Poor Man Scaling * * - Le Delta Scaling avec Delta=1 * * - Le Delta Scaling avec Delta=1/2 * **************************************************************************/ TH1F* PMSPhi(TH1F *h1); TH1F* DeltaOnePhi(TH1F *h1); TH1F* DeltaHalfPhi(TH1F *h1); /************************************************************************** * La Classe ScalHist gère une collection d'histogrammes * * et effectue les transformation d'échelle suivant une des trois * * methodes : "PMS" Poor Man Scaling * * "1" Delta Scaling avec Delta=1 * * "1/2" Delta Scaling avec Delta=1/2 * * Elle permet aussi l'affichage des histogramme ainsi que des log * * des differents moments des distributions * **************************************************************************/ class ScalHist { private : TObjArray *tab; TObjArray *scaltab; static char *const sc_types[3]; int hnum; //number of hists in tab (and in tab2) bool intern_tab; //tab point-il sur un tableau créé de façon interne ? float *mean; float *rms; char *scaltype; float low_range_limit; float up_range_limit; TH1F* (*ScalingFunction)(TH1F*h1); void SetScalingFunction(); void ComputeScalTab(); void ComputeMomenta(); void ResetScalTab(); void ResetMomenta(); public : ScalHist(); ScalHist(TObjArray *tab2,char*sc_type="PMS"); ScalHist(TH1F** htab, int hnbr, char*sc_type="PMS"); ~ScalHist(); TCanvas* Plot(char *cname="histoplot" ); void SetScalingType(char*sc_type); void SetTab(TObjArray*tab2); void SetTab(TH1F** htab,int hnbr); void WhichScalType(); int GetEntries(); void SetRange(float llimit, float ulimit); TObjArray* GetScalTab(); TH1F** GetScalTab2(); TH1F* GetHist(int hist_idx); TH1F* GetScalHist(int hist_idx); friend TH1F* PMSPhi(TH1F *h1); friend TH1F* DeltaOnePhi(TH1F *h1); friend TH1F* DeltaHalfPhi(TH1F *h1); };