GRSISort
Created by P.C. Bender
Developement Team: P.C. Bender, R. Dunlop, V. Bildstein
An extension of the ROOT analysis Framework
GHSym Class Reference

Definition at line 12 of file GHSym.h.

Public Member Functions

 GHSym ()
 
 GHSym (const char *name, const char *title, Int_t nbins, Double_t low, Double_t up)
 
 GHSym (const char *name, const char *title, Int_t nbins, const Double_t *bins)
 
 GHSym (const char *name, const char *title, Int_t nbins, const Float_t *bins)
 
 ~GHSym () override
 
Int_t BufferEmpty (Int_t action=0) override
 
Int_t BufferFill (Double_t, Double_t) override
 
virtual Int_t BufferFill (Double_t x, Double_t y, Double_t w)
 
void Copy (TObject &obj) const override
 
Int_t Fill (Double_t) override
 
Int_t Fill (const char *, Double_t) override
 
Int_t Fill (Double_t x, Double_t y) override
 
virtual Int_t Fill (Double_t x, Double_t y, Double_t w)
 
virtual Int_t Fill (const char *namex, const char *namey, Double_t w)
 
void FillN (Int_t, const Double_t *, const Double_t *, Int_t) override
 
void FillN (Int_t ntimes, const Double_t *x, const Double_t *y, const Double_t *w, Int_t stride=1) override
 
void FillRandom (const char *fname, Int_t ntimes=5000, TRandom *rng=nullptr) override
 
void FillRandom (TH1 *h, Int_t ntimes=5000, TRandom *rng=nullptr) override
 
Int_t FindFirstBinAbove (Double_t threshold=0, Int_t axis=1, Int_t firstBin=1, Int_t lastBin=-1) const override
 
Int_t FindLastBinAbove (Double_t threshold=0, Int_t axis=1, Int_t firstBin=1, Int_t lastBin=-1) const override
 
virtual void FitSlices (TF1 *f1=nullptr, Int_t firstbin=0, Int_t lastbin=-1, Int_t cut=0, Option_t *option="QNR", TObjArray *arr=nullptr)
 
Int_t GetBin (Int_t binx, Int_t biny=0, Int_t binz=0) const override
 
virtual Double_t GetBinWithContent2 (Double_t c, Int_t &binx, Int_t &biny, Int_t firstxbin=1, Int_t lastxbin=-1, Int_t firstybin=1, Int_t lastybin=-1, Double_t maxdiff=0) const
 
Double_t GetCellContent (Int_t binx, Int_t biny) const override
 
Double_t GetCellError (Int_t binx, Int_t biny) const override
 
virtual Double_t GetCorrelationFactor (Int_t axis1=1, Int_t axis2=2) const
 
virtual Double_t GetCovariance (Int_t axis1=1, Int_t axis2=2) const
 
virtual void GetRandom2 (Double_t &x, Double_t &y)
 
void GetStats (Double_t *stats) const override
 
Double_t Integral (Option_t *option="") const override
 
virtual Double_t Integral (Int_t firstxbin, Int_t lastxbin, Int_t firstybin, Int_t lastybin, Option_t *option="") const
 
virtual Double_t Integral (Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Option_t *="") const
 
virtual Double_t IntegralAndError (Int_t firstxbin, Int_t lastxbin, Int_t firstybin, Int_t lastybin, Double_t &error, Option_t *option="") const
 
Double_t Interpolate (Double_t) const override
 
Double_t Interpolate (Double_t, Double_t) const override
 
Double_t Interpolate (Double_t, Double_t, Double_t) const override
 
Double_t KolmogorovTest (const TH1 *h2, Option_t *option="") const override
 
Long64_t Merge (TCollection *list) override
 
virtual TProfile * Profile (const char *name="_pf", Int_t firstbin=1, Int_t lastbin=-1, Option_t *option="") const
 
virtual TH1D * Projection (const char *name="_pr", Int_t firstBin=0, Int_t lastBin=-1, Option_t *option="") const
 
void PutStats (Double_t *stats) override
 
virtual GHSymRebin2D (Int_t ngroup=2, const char *newname="")
 
void Reset (Option_t *option="") override
 
void SetCellContent (Int_t binx, Int_t biny, Double_t content) override
 
void SetCellError (Int_t binx, Int_t biny, Double_t content) override
 
virtual void SetShowProjectionX (Int_t nbins=1)
 
virtual void SetShowProjectionY (Int_t nbins=1)
 
TH1 * ShowBackground (Int_t niter=20, Option_t *option="same") override
 
Int_t ShowPeaks (Double_t sigma=2, Option_t *option="", Double_t threshold=0.05) override
 
void Smooth (Int_t ntimes=1, Option_t *option="") override
 

Protected Member Functions

virtual Double_t DoIntegral (Int_t binx1, Int_t binx2, Int_t biny1, Int_t biny2, Double_t &error, Option_t *option, Bool_t doError=kFALSE) const
 

Protected Attributes

TH2 * fMatrix {nullptr}
 
Double_t fTsumwxy {0.}
 
Double_t fTsumwy {0.}
 
Double_t fTsumwy2 {0.}
 

Private Member Functions

 GHSym (const GHSym &)
 
 ClassDefOverride (GHSym, 1)
 
GHSymoperator= (const GHSym &)
 

#include <GHSym.h>

+ Inheritance diagram for GHSym:
+ Collaboration diagram for GHSym:

Constructor & Destructor Documentation

◆ GHSym() [1/5]

GHSym::GHSym ( )

Definition at line 34 of file GHSym.cxx.

◆ GHSym() [2/5]

GHSym::GHSym ( const char *  name,
const char *  title,
Int_t  nbins,
Double_t  low,
Double_t  up 
)

Definition at line 45 of file GHSym.cxx.

References fMatrix, fTsumwxy, fTsumwy, and fTsumwy2.

◆ GHSym() [3/5]

GHSym::GHSym ( const char *  name,
const char *  title,
Int_t  nbins,
const Double_t *  bins 
)

Definition at line 59 of file GHSym.cxx.

References fMatrix, fTsumwxy, fTsumwy, and fTsumwy2.

◆ GHSym() [4/5]

GHSym::GHSym ( const char *  name,
const char *  title,
Int_t  nbins,
const Float_t *  bins 
)

Definition at line 72 of file GHSym.cxx.

References fMatrix, fTsumwxy, fTsumwy, and fTsumwy2.

◆ ~GHSym()

GHSym::~GHSym ( )
overridedefault

◆ GHSym() [5/5]

GHSym::GHSym ( const GHSym rhs)
private

Definition at line 85 of file GHSym.cxx.

References Copy().

Member Function Documentation

◆ BufferEmpty()

Int_t GHSym::BufferEmpty ( Int_t  action = 0)
override

Fill histogram with all entries in the buffer. action = -1 histogram is reset and refilled from the buffer (called by THistPainter::Paint) action = 0 histogram is filled from the buffer action = 1 histogram is filled and buffer is deleted The buffer is automatically deleted when the number of entries in the buffer is greater than the number of entries in the histogram

Definition at line 92 of file GHSym.cxx.

References pygui.grut-view::action, Fill(), and Reset().

Referenced by BufferFill(), GHSymF::GetBinContent(), GHSymD::GetBinContent(), GetStats(), and Merge().

◆ BufferFill() [1/2]

Int_t GHSym::BufferFill ( Double_t  ,
Double_t   
)
inlineoverride

Definition at line 21 of file GHSym.h.

Referenced by Fill().

◆ BufferFill() [2/2]

Int_t GHSym::BufferFill ( Double_t  x,
Double_t  y,
Double_t  w 
)
virtual

Definition at line 189 of file GHSym.cxx.

References BufferEmpty(), Fill(), and Reset().

◆ ClassDefOverride()

GHSym::ClassDefOverride ( GHSym  ,
 
)
private

◆ Copy()

void GHSym::Copy ( TObject &  obj) const
override

Definition at line 218 of file GHSym.cxx.

References fMatrix, fTsumwxy, fTsumwy, and fTsumwy2.

Referenced by GHSymF::Copy(), GHSymD::Copy(), GHSym(), and Merge().

◆ DoIntegral()

Double_t GHSym::DoIntegral ( Int_t  binx1,
Int_t  binx2,
Int_t  biny1,
Int_t  biny2,
Double_t &  error,
Option_t *  option,
Bool_t  doError = kFALSE 
) const
protectedvirtual

Definition at line 229 of file GHSym.cxx.

References GetBin().

Referenced by Integral(), and IntegralAndError().

◆ Fill() [1/5]

Int_t GHSym::Fill ( Double_t  )
override

Definition at line 297 of file GHSym.cxx.

Referenced by BufferEmpty(), BufferFill(), FillN(), FillRandom(), and Merge().

◆ Fill() [2/5]

Int_t GHSym::Fill ( const char *  ,
Double_t   
)
inlineoverride

Definition at line 25 of file GHSym.h.

References Fill().

Referenced by Fill().

◆ Fill() [3/5]

Int_t GHSym::Fill ( Double_t  x,
Double_t  y 
)
override

Increment cell defined by x,y by 1.

Definition at line 304 of file GHSym.cxx.

References BufferFill(), fTsumwxy, fTsumwy, and fTsumwy2.

◆ Fill() [4/5]

Int_t GHSym::Fill ( Double_t  x,
Double_t  y,
Double_t  w 
)
virtual

Increment cell defined by x,y by 1.

Definition at line 350 of file GHSym.cxx.

References BufferFill(), fTsumwxy, fTsumwy, and fTsumwy2.

◆ Fill() [5/5]

Int_t GHSym::Fill ( const char *  namex,
const char *  namey,
Double_t  w 
)
virtual

Definition at line 396 of file GHSym.cxx.

References fTsumwxy, fTsumwy, and fTsumwy2.

◆ FillN() [1/2]

void GHSym::FillN ( Int_t  ,
const Double_t *  ,
const Double_t *  ,
Int_t   
)
inlineoverride

Definition at line 29 of file GHSym.h.

◆ FillN() [2/2]

void GHSym::FillN ( Int_t  ntimes,
const Double_t *  x,
const Double_t *  y,
const Double_t *  w,
Int_t  stride = 1 
)
override

Definition at line 445 of file GHSym.cxx.

References Fill().

◆ FillRandom() [1/2]

void GHSym::FillRandom ( const char *  fname,
Int_t  ntimes = 5000,
TRandom *  rng = nullptr 
)
override

Definition at line 474 of file GHSym.cxx.

References Fill().

◆ FillRandom() [2/2]

void GHSym::FillRandom ( TH1 *  h,
Int_t  ntimes = 5000,
TRandom *  rng = nullptr 
)
override

Definition at line 550 of file GHSym.cxx.

◆ FindFirstBinAbove()

Int_t GHSym::FindFirstBinAbove ( Double_t  threshold = 0,
Int_t  axis = 1,
Int_t  firstBin = 1,
Int_t  lastBin = -1 
) const
override

Definition at line 592 of file GHSym.cxx.

◆ FindLastBinAbove()

Int_t GHSym::FindLastBinAbove ( Double_t  threshold = 0,
Int_t  axis = 1,
Int_t  firstBin = 1,
Int_t  lastBin = -1 
) const
override

Definition at line 625 of file GHSym.cxx.

◆ FitSlices()

void GHSym::FitSlices ( TF1 *  f1 = nullptr,
Int_t  firstbin = 0,
Int_t  lastbin = -1,
Int_t  cut = 0,
Option_t *  option = "QNR",
TObjArray *  arr = nullptr 
)
virtual

Definition at line 658 of file GHSym.cxx.

References Projection().

◆ GetBin()

Int_t GHSym::GetBin ( Int_t  binx,
Int_t  biny = 0,
Int_t  binz = 0 
) const
override

◆ GetBinWithContent2()

Double_t GHSym::GetBinWithContent2 ( Double_t  c,
Int_t &  binx,
Int_t &  biny,
Int_t  firstxbin = 1,
Int_t  lastxbin = -1,
Int_t  firstybin = 1,
Int_t  lastybin = -1,
Double_t  maxdiff = 0 
) const
virtual

Definition at line 854 of file GHSym.cxx.

◆ GetCellContent()

Double_t GHSym::GetCellContent ( Int_t  binx,
Int_t  biny 
) const
override

Definition at line 911 of file GHSym.cxx.

References GetBin().

Referenced by Projection().

◆ GetCellError()

Double_t GHSym::GetCellError ( Int_t  binx,
Int_t  biny 
) const
override

Definition at line 916 of file GHSym.cxx.

References GetBin().

Referenced by Projection().

◆ GetCorrelationFactor()

Double_t GHSym::GetCorrelationFactor ( Int_t  axis1 = 1,
Int_t  axis2 = 2 
) const
virtual

Definition at line 921 of file GHSym.cxx.

References GetCovariance().

◆ GetCovariance()

Double_t GHSym::GetCovariance ( Int_t  axis1 = 1,
Int_t  axis2 = 2 
) const
virtual

Definition at line 943 of file GHSym.cxx.

References GetStats().

Referenced by GetCorrelationFactor().

◆ GetRandom2()

void GHSym::GetRandom2 ( Double_t &  x,
Double_t &  y 
)
virtual

Definition at line 974 of file GHSym.cxx.

◆ GetStats()

void GHSym::GetStats ( Double_t *  stats) const
override

Definition at line 1017 of file GHSym.cxx.

References BufferEmpty(), fTsumwxy, fTsumwy, fTsumwy2, and GetBin().

Referenced by GetCovariance(), Merge(), Projection(), and Rebin2D().

◆ Integral() [1/3]

Double_t GHSym::Integral ( Option_t *  option = "") const
override

Definition at line 1103 of file GHSym.cxx.

◆ Integral() [2/3]

Double_t GHSym::Integral ( Int_t  firstxbin,
Int_t  lastxbin,
Int_t  firstybin,
Int_t  lastybin,
Option_t *  option = "" 
) const
virtual

Definition at line 1113 of file GHSym.cxx.

References DoIntegral().

◆ Integral() [3/3]

virtual Double_t GHSym::Integral ( Int_t  ,
Int_t  ,
Int_t  ,
Int_t  ,
Int_t  ,
Int_t  ,
Option_t *  = "" 
) const
inlinevirtual

Definition at line 64 of file GHSym.h.

◆ IntegralAndError()

Double_t GHSym::IntegralAndError ( Int_t  firstxbin,
Int_t  lastxbin,
Int_t  firstybin,
Int_t  lastybin,
Double_t &  error,
Option_t *  option = "" 
) const
virtual

Definition at line 1124 of file GHSym.cxx.

References DoIntegral().

◆ Interpolate() [1/3]

Double_t GHSym::Interpolate ( Double_t  ) const
override

Definition at line 1140 of file GHSym.cxx.

◆ Interpolate() [2/3]

Double_t GHSym::Interpolate ( Double_t  x,
Double_t  y 
) const
override

Definition at line 1151 of file GHSym.cxx.

◆ Interpolate() [3/3]

Double_t GHSym::Interpolate ( Double_t  ,
Double_t  ,
Double_t   
) const
override

Definition at line 1247 of file GHSym.cxx.

◆ KolmogorovTest()

Double_t GHSym::KolmogorovTest ( const TH1 *  h2,
Option_t *  option = "" 
) const
override

Definition at line 1255 of file GHSym.cxx.

◆ Merge()

Long64_t GHSym::Merge ( TCollection *  list)
override

Definition at line 1469 of file GHSym.cxx.

References BufferEmpty(), Copy(), Fill(), GetBin(), GetStats(), PutStats(), and Reset().

◆ operator=()

GHSym& GHSym::operator= ( const GHSym )
private

◆ Profile()

TProfile * GHSym::Profile ( const char *  name = "_pf",
Int_t  firstbin = 1,
Int_t  lastbin = -1,
Option_t *  option = "" 
) const
virtual

Definition at line 1740 of file GHSym.cxx.

References GetBin().

◆ Projection()

TH1D * GHSym::Projection ( const char *  name = "_pr",
Int_t  firstBin = 0,
Int_t  lastBin = -1,
Option_t *  option = "" 
) const
virtual

method for performing projection

Definition at line 1979 of file GHSym.cxx.

References GetCellContent(), GetCellError(), and GetStats().

Referenced by FitSlices().

◆ PutStats()

void GHSym::PutStats ( Double_t *  stats)
override

Definition at line 2221 of file GHSym.cxx.

References fTsumwxy, fTsumwy, and fTsumwy2.

Referenced by Merge(), and Rebin2D().

◆ Rebin2D()

GHSym * GHSym::Rebin2D ( Int_t  ngroup = 2,
const char *  newname = "" 
)
virtual

Definition at line 2230 of file GHSym.cxx.

References GetBin(), GetStats(), and PutStats().

◆ Reset()

void GHSym::Reset ( Option_t *  option = "")
override

Definition at line 2543 of file GHSym.cxx.

References fMatrix, fTsumwxy, fTsumwy, and fTsumwy2.

Referenced by BufferEmpty(), BufferFill(), Merge(), GHSymF::Reset(), and GHSymD::Reset().

◆ SetCellContent()

void GHSym::SetCellContent ( Int_t  binx,
Int_t  biny,
Double_t  content 
)
override

Definition at line 2568 of file GHSym.cxx.

References GetBin().

◆ SetCellError()

void GHSym::SetCellError ( Int_t  binx,
Int_t  biny,
Double_t  content 
)
override

Definition at line 2573 of file GHSym.cxx.

References GetBin().

◆ SetShowProjectionX()

void GHSym::SetShowProjectionX ( Int_t  nbins = 1)
virtual

Definition at line 2578 of file GHSym.cxx.

◆ SetShowProjectionY()

void GHSym::SetShowProjectionY ( Int_t  nbins = 1)
virtual

Definition at line 2592 of file GHSym.cxx.

◆ ShowBackground()

TH1 * GHSym::ShowBackground ( Int_t  niter = 20,
Option_t *  option = "same" 
)
override

Definition at line 2606 of file GHSym.cxx.

◆ ShowPeaks()

Int_t GHSym::ShowPeaks ( Double_t  sigma = 2,
Option_t *  option = "",
Double_t  threshold = 0.05 
)
override

Definition at line 2616 of file GHSym.cxx.

◆ Smooth()

void GHSym::Smooth ( Int_t  ntimes = 1,
Option_t *  option = "" 
)
override

Definition at line 2629 of file GHSym.cxx.

References GetBin().

Member Data Documentation

◆ fMatrix

TH2* GHSym::fMatrix {nullptr}
protected

! Transient pointer to the 2D-Matrix used in Draw() or GetMatrix()

Definition at line 101 of file GHSym.h.

Referenced by Copy(), GHSymF::GetMatrix(), GHSymD::GetMatrix(), GHSym(), and Reset().

◆ fTsumwxy

Double_t GHSym::fTsumwxy {0.}
protected

Total Sum of weight*X*Y.

Definition at line 100 of file GHSym.h.

Referenced by Copy(), Fill(), GetStats(), GHSym(), PutStats(), and Reset().

◆ fTsumwy

Double_t GHSym::fTsumwy {0.}
protected

Total Sum of weight*Y.

Definition at line 98 of file GHSym.h.

Referenced by Copy(), Fill(), GetStats(), GHSym(), PutStats(), and Reset().

◆ fTsumwy2

Double_t GHSym::fTsumwy2 {0.}
protected

Total Sum of weight*Y*Y.

Definition at line 99 of file GHSym.h.

Referenced by Copy(), Fill(), GetStats(), GHSym(), PutStats(), and Reset().