The Gaudi Framework  v38r3 (c3fc9673)
GaudiAlg.HistoUtils Namespace Reference

Classes

class  HistoFile
 

Functions

def _getAppMgr (**kwargs)
 
def _getHistoSvc (**kwargs)
 
def _getEvtSvc (**kwargs)
 
def book (*args, **kwargs)
 
def bookProf (*args, **kwargs)
 
def getAsAIDA (path, **kwargs)
 
def getAsROOT (path, **kwargs)
 
def fill (histo, data, fun=lambda x:x, cut=lambda x:True, **kwargs)
 
def _to_root_ (self)
 
def _moment_ (self, order, value=0)
 
def _momentErr_ (self, order)
 
def _centralMoment_ (self, order)
 
def _centralMomentErr_ (self, order)
 
def _skewness_ (self)
 
def _skewnessErr_ (self)
 
def _kurtosis_ (self)
 
def _kurtosisErr_ (self)
 
def _nEff_ (self)
 
def _mean_ (self)
 
def _meanErr_ (self)
 
def _rms_ (self)
 
def _rmsErr_ (self)
 
def _sumBinHeightErr_ (self)
 
def _sumAllBinHeightErr_ (self)
 
def _overflowEntriesFrac_ (self)
 
def _overflowEntriesFracErr_ (self)
 
def _underflowEntriesFrac_ (self)
 
def _underflowEntriesFracErr_ (self)
 
def _overflowIntegralFrac_ (self)
 
def _overflowIntegralFracErr_ (self)
 
def _underflowIntegralFrac_ (self)
 
def _underflowIntegralFracErr_ (self)
 
def _nEntries_ (self, i1, i2=-10000000)
 
def _nEntriesFrac_ (self, i1, i2=-10000000)
 
def _nEntriesFracErr_ (self, i1, i2=-10000000)
 
def _path_ (self)
 
def __dumpHisto__ (histo, *args)
 

Variables

 __author__
 (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations # # This software is distributed under the terms of the Apache version 2 licence, # copied verbatim in the file "LICENSE". More...
 
 __all__
 
 HID
 
 useROOT
 global flag More...
 
 aida2root
 
 __repr__
 
 __str__
 
 HistoStats
 
 i1DH
 
 moment
 
 momentErr
 
 centralMoment
 
 centralMomentErr
 
 nEff
 
 mean
 
 meanErr
 
 rms
 
 rmsErr
 
 skewness
 
 skewnessErr
 
 kurtosis
 
 kurtosisErr
 
 overflowEntriesFrac
 
 overflowEntriesFracErr
 
 underflowEntriesFrac
 
 underflowEntriesFracErr
 
 overflowIntegralFrac
 
 overflowIntegralFracErr
 
 underflowIntegralFrac
 
 underflowIntegralFracErr
 
 nEntries
 
 nEntriesFrac
 
 nEntriesFracErr
 
 iBH
 
 path
 
 TESpath
 
 location
 
 histoDump
 
 dumpHisto
 

Function Documentation

◆ __dumpHisto__()

def GaudiAlg.HistoUtils.__dumpHisto__ (   histo,
args 
)
Dump the histogram/profile in text format (a'la HBOOK)

>>> histo
>>> print(dumpHisto ( histo ))

>>> print(histo.dump())
>>> print(histo.dump( 20 , 20 ))
>>> print(histo.dump( 20 , 20 , True ))

Uses:

Definition at line 968 of file HistoUtils.py.

968 def __dumpHisto__(histo, *args):
969  """
970 
971  Dump the histogram/profile in text format (a'la HBOOK)
972 
973  >>> histo
974  >>> print(dumpHisto ( histo ))
975 
976  >>> print(histo.dump())
977  >>> print(histo.dump( 20 , 20 ))
978  >>> print(histo.dump( 20 , 20 , True ))
979 
980  Uses:
981 
982  """
983  return cpp.Gaudi.Utils.Histos.histoDump(histo, *args)
984 
985 
986 __dumpHisto__.__doc__ = "\n" + cpp.Gaudi.Utils.Histos.histoDump.__doc__
987 
988 # =============================================================================
989 # the actual function for text dump of the histogram

◆ _centralMoment_()

def GaudiAlg.HistoUtils._centralMoment_ (   self,
  order 
)
private
Evaluate 'bin-by-bin' central momentum (around mean value)
for 1D histogram

>>> h1 = ...
>>> print(h1.centralMoment ( 5 ))

Definition at line 578 of file HistoUtils.py.

578 def _centralMoment_(self, order):
579  """
580  Evaluate 'bin-by-bin' central momentum (around mean value)
581  for 1D histogram
582 
583  >>> h1 = ...
584  >>> print(h1.centralMoment ( 5 ))
585 
586  """
587  return HistoStats.centralMoment(self, order)
588 
589 
590 # =============================================================================
591 # Evaluate error in 'bin-by-bin' momentum of certain order around the value
592 
593 

◆ _centralMomentErr_()

def GaudiAlg.HistoUtils._centralMomentErr_ (   self,
  order 
)
private
Evaluate error for 'bin-by-bin' central momentum (around mean value)
for 1D histogram

>>> h1 = ...
>>> print(h1.centralMomentErr ( 5 ))

Definition at line 594 of file HistoUtils.py.

594 def _centralMomentErr_(self, order):
595  """
596  Evaluate error for 'bin-by-bin' central momentum (around mean value)
597  for 1D histogram
598 
599  >>> h1 = ...
600  >>> print(h1.centralMomentErr ( 5 ))
601 
602  """
603  return HistoStats.centralMomentErr(self, order)
604 
605 
606 # =============================================================================
607 # Evaluate 'bin-by-bin' skewness for 1D histogram
608 
609 

◆ _getAppMgr()

def GaudiAlg.HistoUtils._getAppMgr ( **  kwargs)
private
Helper private auxiliary function to get Application Manager

Definition at line 68 of file HistoUtils.py.

68 def _getAppMgr(**kwargs):
69  """
70  Helper private auxiliary function to get Application Manager
71  """
72  gaudi = kwargs.get("gaudi", None)
73  if not gaudi:
74  gaudi = AppMgr()
75  if not gaudi:
76  raise RuntimeError("Unable to get valid ApplicationMgr")
77 
78  state = gaudi._isvc.FSMState()
79  if state < cpp.Gaudi.StateMachine.CONFIGURED:
80  gaudi.config()
81  state = gaudi._isvc.FSMState()
82  if state < cpp.Gaudi.StateMachine.INITIALIZED:
83  gaudi.initialize()
84 
85  return gaudi # RETURN
86 
87 
88 # =============================================================================
89 # Helper private auxiliary function to get iHistogramSvs
90 
91 

◆ _getEvtSvc()

def GaudiAlg.HistoUtils._getEvtSvc ( **  kwargs)
private
Helper private auxiliary function to get iDataSvs

Definition at line 109 of file HistoUtils.py.

109 def _getEvtSvc(**kwargs):
110  """
111  Helper private auxiliary function to get iDataSvs
112  """
113  svc = kwargs.get("service", None)
114  if not svc:
115  svc = kwargs.get("svc", None)
116  else:
117  return svc # RETURN
118  gaudi = _getAppMgr(**kwargs)
119  return gaudi.evtsvc() # RETURN
120 
121 
122 # =============================================================================
123 # The trivial function to book the various 1D,2D&3D-histograms
124 
125 

◆ _getHistoSvc()

def GaudiAlg.HistoUtils._getHistoSvc ( **  kwargs)
private
Helper private auxiliary function to get iHistogramSvs

Definition at line 92 of file HistoUtils.py.

92 def _getHistoSvc(**kwargs):
93  """
94  Helper private auxiliary function to get iHistogramSvs
95  """
96  svc = kwargs.get("service", None)
97  if not svc:
98  svc = kwargs.get("svc", None)
99  else:
100  return svc # RETURN
101  gaudi = _getAppMgr(**kwargs)
102  return gaudi.histsvc() # RETURN
103 
104 
105 # =============================================================================
106 # Helper private auxiliary function to get iDataSvs
107 
108 

◆ _kurtosis_()

def GaudiAlg.HistoUtils._kurtosis_ (   self)
private
Evaluate 'bin-by-bin' kurtosis

>>> h1 = ...
>>> print(h1.kurtosis ())

Definition at line 640 of file HistoUtils.py.

640 def _kurtosis_(self):
641  """
642  Evaluate 'bin-by-bin' kurtosis
643 
644  >>> h1 = ...
645  >>> print(h1.kurtosis ())
646 
647  """
648  return HistoStats.kurtosis(self)
649 
650 
651 # =============================================================================
652 # Evaluate error for 'bin-by-bin' kurtosis for 1D histogram
653 
654 

◆ _kurtosisErr_()

def GaudiAlg.HistoUtils._kurtosisErr_ (   self)
private
Evaluate error for 'bin-by-bin' kurtotis for 1D AIDA histogram

>>> h1 = ...
>>> print(h1.kurtotisErr())

Definition at line 655 of file HistoUtils.py.

655 def _kurtosisErr_(self):
656  """
657  Evaluate error for 'bin-by-bin' kurtotis for 1D AIDA histogram
658 
659  >>> h1 = ...
660  >>> print(h1.kurtotisErr())
661 
662  """
663  return HistoStats.kurtosisErr(self)
664 
665 
666 # =============================================================================
667 
668 

◆ _mean_()

def GaudiAlg.HistoUtils._mean_ (   self)
private
Evaluate the MEAN value

Definition at line 679 of file HistoUtils.py.

679 def _mean_(self):
680  """
681  Evaluate the MEAN value
682  """
683  return HistoStats.mean(self)
684 
685 
686 # =============================================================================
687 
688 

◆ _meanErr_()

def GaudiAlg.HistoUtils._meanErr_ (   self)
private
Evaluate the error for MEAN estimate

Definition at line 689 of file HistoUtils.py.

689 def _meanErr_(self):
690  """
691  Evaluate the error for MEAN estimate
692  """
693  return HistoStats.meanErr(self)
694 
695 
696 # =============================================================================
697 
698 

◆ _moment_()

def GaudiAlg.HistoUtils._moment_ (   self,
  order,
  value = 0 
)
private
Evaluate 'bin-by-bin' momentum of order 'order' around the value 'value'
for 1D histogram

>>> h1 = ...
>>> print(h1.moment ( 5 ))

Definition at line 546 of file HistoUtils.py.

546 def _moment_(self, order, value=0):
547  """
548  Evaluate 'bin-by-bin' momentum of order 'order' around the value 'value'
549  for 1D histogram
550 
551  >>> h1 = ...
552  >>> print(h1.moment ( 5 ))
553 
554  """
555  return HistoStats.moment(self, order, value)
556 
557 
558 # =============================================================================
559 # Evaluate error in 'bin-by-bin' momentum of certain order around the value
560 
561 

◆ _momentErr_()

def GaudiAlg.HistoUtils._momentErr_ (   self,
  order 
)
private
Evaluate error for 'bin-by-bin' momentum of order 'order' around the value 'value'
for 1D histogram

>>> h1 = ...
>>> print(h1.momentErr ( 5 ))

Definition at line 562 of file HistoUtils.py.

562 def _momentErr_(self, order):
563  """
564  Evaluate error for 'bin-by-bin' momentum of order 'order' around the value 'value'
565  for 1D histogram
566 
567  >>> h1 = ...
568  >>> print(h1.momentErr ( 5 ))
569 
570  """
571  return HistoStats.momentErr(self, order)
572 
573 
574 # =============================================================================
575 # Evaluate 'bin-by-bin' central momentum (around mean value)
576 
577 

◆ _nEff_()

def GaudiAlg.HistoUtils._nEff_ (   self)
private
Number of equivalent entries

Definition at line 669 of file HistoUtils.py.

669 def _nEff_(self):
670  """
671  Number of equivalent entries
672  """
673  return HistoStats.nEff(self)
674 
675 
676 # =============================================================================
677 
678 

◆ _nEntries_()

def GaudiAlg.HistoUtils._nEntries_ (   self,
  i1,
  i2 = -10000000 
)
private
Get number of entries in histogram up to  the certain bin (not-included)

attention: underflow bin is included!

>>> h1
>>> print(h1.nEntries ( 10 ))

Get number of entries in histogram form the certain
minimal bin up to the certain maximal bin (not-included)

>>> h1
>>> print(h1.nEntries ( 10 , 15 ))

Definition at line 820 of file HistoUtils.py.

820 def _nEntries_(self, i1, i2=-10000000):
821  """
822  Get number of entries in histogram up to the certain bin (not-included)
823 
824  attention: underflow bin is included!
825 
826  >>> h1
827  >>> print(h1.nEntries ( 10 ))
828 
829  Get number of entries in histogram form the certain
830  minimal bin up to the certain maximal bin (not-included)
831 
832  >>> h1
833  >>> print(h1.nEntries ( 10 , 15 ))
834 
835  """
836  if i2 < i1 or i2 < 0:
837  return HistoStats.nEntries(self, i1)
838  return HistoStats.nEntries(self, i1, i2)
839 
840 
841 # =============================================================================
842 
843 

◆ _nEntriesFrac_()

def GaudiAlg.HistoUtils._nEntriesFrac_ (   self,
  i1,
  i2 = -10000000 
)
private
Get the fraction of entries in histogram up to  the certain bin (not-included)

attention: underflow bin is included!

>>> h1
>>> print(h1.nEntriesFrac ( 10 ))

Get the fraction of entries in histogram form the certain
minimal bin up to the certain maximal bin (not-included)

>>> h1
>>> print(h1.nEntriesFrac ( 10 , 15 ))

Definition at line 844 of file HistoUtils.py.

844 def _nEntriesFrac_(self, i1, i2=-10000000):
845  """
846  Get the fraction of entries in histogram up to the certain bin (not-included)
847 
848  attention: underflow bin is included!
849 
850  >>> h1
851  >>> print(h1.nEntriesFrac ( 10 ))
852 
853  Get the fraction of entries in histogram form the certain
854  minimal bin up to the certain maximal bin (not-included)
855 
856  >>> h1
857  >>> print(h1.nEntriesFrac ( 10 , 15 ))
858 
859  """
860  if i2 < i1 or i2 < 0:
861  return HistoStats.nEntriesFrac(self, i1)
862  return HistoStats.nEntriesFrac(self, i1, i2)
863 
864 
865 # =============================================================================
866 
867 

◆ _nEntriesFracErr_()

def GaudiAlg.HistoUtils._nEntriesFracErr_ (   self,
  i1,
  i2 = -10000000 
)
private
Get error for  fraction of entries in histogram up to  the certain bin (not-included)

attention: underflow bin is included!

>>> h1
>>> print(h1.nEntriesFracErr( 10 ))

Get error  fraction of entries in histogram form the certain
minimal bin up to the certain maximal bin (not-included)

>>> h1
>>> print(h1.nEntriesFracErr ( 10 , 15 ))

Definition at line 868 of file HistoUtils.py.

868 def _nEntriesFracErr_(self, i1, i2=-10000000):
869  """
870  Get error for fraction of entries in histogram up to the certain bin (not-included)
871 
872  attention: underflow bin is included!
873 
874  >>> h1
875  >>> print(h1.nEntriesFracErr( 10 ))
876 
877  Get error fraction of entries in histogram form the certain
878  minimal bin up to the certain maximal bin (not-included)
879 
880  >>> h1
881  >>> print(h1.nEntriesFracErr ( 10 , 15 ))
882 
883  """
884  if i2 < i1 or i2 < 0:
885  return HistoStats.nEntriesFracErr(self, i1)
886  return HistoStats.nEntriesFracErr(self, i1, i2)
887 
888 
889 # =============================================================================

◆ _overflowEntriesFrac_()

def GaudiAlg.HistoUtils._overflowEntriesFrac_ (   self)
private
The fraction of overflow entries  (useful for shape comparison)

Definition at line 737 of file HistoUtils.py.

737 def _overflowEntriesFrac_(self):
738  """
739  The fraction of overflow entries (useful for shape comparison)
740  """
741  return HistoStats.overflowEntriesFrac(self)
742 
743 
744 # =============================================================================
745 
746 

◆ _overflowEntriesFracErr_()

def GaudiAlg.HistoUtils._overflowEntriesFracErr_ (   self)
private
The error for fraction of overflow entries  (useful for shape comparison)

Definition at line 747 of file HistoUtils.py.

747 def _overflowEntriesFracErr_(self):
748  """
749  The error for fraction of overflow entries (useful for shape comparison)
750  """
751  return HistoStats.overflowEntriesFracErr(self)
752 
753 
754 # =============================================================================
755 
756 

◆ _overflowIntegralFrac_()

def GaudiAlg.HistoUtils._overflowIntegralFrac_ (   self)
private
The fraction of overflow integral  (useful for shape comparison)

Definition at line 777 of file HistoUtils.py.

777 def _overflowIntegralFrac_(self):
778  """
779  The fraction of overflow integral (useful for shape comparison)
780  """
781  return HistoStats.overflowIntegralFrac(self)
782 
783 
784 # =============================================================================
785 
786 

◆ _overflowIntegralFracErr_()

def GaudiAlg.HistoUtils._overflowIntegralFracErr_ (   self)
private
The error for fraction of overflow integral  (useful for shape comparison)

Definition at line 787 of file HistoUtils.py.

787 def _overflowIntegralFracErr_(self):
788  """
789  The error for fraction of overflow integral (useful for shape comparison)
790  """
791  return HistoStats.overflowIntegralFracErr(self)
792 
793 
794 # =============================================================================
795 
796 

◆ _path_()

def GaudiAlg.HistoUtils._path_ (   self)
private
Get the path in THS for the given AIDA object:

>>> aida =
>>> print(aida.path())

Definition at line 947 of file HistoUtils.py.

947 def _path_(self):
948  """
949  Get the path in THS for the given AIDA object:
950 
951  >>> aida =
952  >>> print(aida.path())
953 
954  """
955  return cpp.Gaudi.Utils.Histos.path(self)
956 
957 

◆ _rms_()

def GaudiAlg.HistoUtils._rms_ (   self)
private
Evaluate the RMS for AIDA histogram

Definition at line 699 of file HistoUtils.py.

699 def _rms_(self):
700  """
701  Evaluate the RMS for AIDA histogram
702  """
703  return HistoStats.rms(self)
704 
705 
706 # =============================================================================
707 
708 

◆ _rmsErr_()

def GaudiAlg.HistoUtils._rmsErr_ (   self)
private
Evaluate the error for RMS estimate

Definition at line 709 of file HistoUtils.py.

709 def _rmsErr_(self):
710  """
711  Evaluate the error for RMS estimate
712  """
713  return HistoStats.rmsErr(self)
714 
715 
716 # =============================================================================
717 
718 

◆ _skewness_()

def GaudiAlg.HistoUtils._skewness_ (   self)
private
Evaluate 'bin-by-bin' skewness for 1D AIDA histogram

>>> h1 = ...
>>> print(h1.skewness())

Definition at line 610 of file HistoUtils.py.

610 def _skewness_(self):
611  """
612  Evaluate 'bin-by-bin' skewness for 1D AIDA histogram
613 
614  >>> h1 = ...
615  >>> print(h1.skewness())
616 
617  """
618  return HistoStats.skewness(self)
619 
620 
621 # =============================================================================
622 # Evaluate error for 'bin-by-bin' skewness for 1D histogram
623 
624 

◆ _skewnessErr_()

def GaudiAlg.HistoUtils._skewnessErr_ (   self)
private
Evaluate error for 'bin-by-bin' skewness

>>> h1 = ...
>>> print(h1.skewnessErr())

Definition at line 625 of file HistoUtils.py.

625 def _skewnessErr_(self):
626  """
627  Evaluate error for 'bin-by-bin' skewness
628 
629  >>> h1 = ...
630  >>> print(h1.skewnessErr())
631 
632  """
633  return HistoStats.skewnessErr(self)
634 
635 
636 # =============================================================================
637 # Evaluate 'bin-by-bin' kurtosis for 1D histogram
638 
639 

◆ _sumAllBinHeightErr_()

def GaudiAlg.HistoUtils._sumAllBinHeightErr_ (   self)
private
Get an error in the sum bin height ('in-range integral')

Definition at line 729 of file HistoUtils.py.

729 def _sumAllBinHeightErr_(self):
730  """Get an error in the sum bin height ('in-range integral')"""
731  return HistoStats.sumAllBinHeightErr(self)
732 
733 
734 # =============================================================================
735 
736 

◆ _sumBinHeightErr_()

def GaudiAlg.HistoUtils._sumBinHeightErr_ (   self)
private
Get an error in the sum bin height ('in-range integral')

Definition at line 719 of file HistoUtils.py.

719 def _sumBinHeightErr_(self):
720  """
721  Get an error in the sum bin height ('in-range integral')
722  """
723  return HistoStats.sumBinHeightErr(self)
724 
725 
726 # =============================================================================
727 
728 

◆ _to_root_()

def GaudiAlg.HistoUtils._to_root_ (   self)
private
Convert AIDA to ROOT

>>> aida = ...            ## get AIDA histogram
>>> root = aida.toROOT()  ## convert it to ROOT

Definition at line 509 of file HistoUtils.py.

509 def _to_root_(self):
510  """
511  Convert AIDA to ROOT
512 
513  >>> aida = ... ## get AIDA histogram
514  >>> root = aida.toROOT() ## convert it to ROOT
515 
516  """
517  return aida2root(self)
518 
519 
520 _to_root_.__doc__ += aida2root.__doc__
521 

◆ _underflowEntriesFrac_()

def GaudiAlg.HistoUtils._underflowEntriesFrac_ (   self)
private
The fraction of underflow entries  (useful for shape comparison)

Definition at line 757 of file HistoUtils.py.

757 def _underflowEntriesFrac_(self):
758  """
759  The fraction of underflow entries (useful for shape comparison)
760  """
761  return HistoStats.underflowEntriesFrac(self)
762 
763 
764 # =============================================================================
765 
766 

◆ _underflowEntriesFracErr_()

def GaudiAlg.HistoUtils._underflowEntriesFracErr_ (   self)
private
The error for fraction of underflow entries  (useful for shape comparison)

Definition at line 767 of file HistoUtils.py.

767 def _underflowEntriesFracErr_(self):
768  """
769  The error for fraction of underflow entries (useful for shape comparison)
770  """
771  return HistoStats.underflowEntriesFracErr(self)
772 
773 
774 # =============================================================================
775 
776 

◆ _underflowIntegralFrac_()

def GaudiAlg.HistoUtils._underflowIntegralFrac_ (   self)
private
The fraction of underflow integral  (useful for shape comparison)

Definition at line 797 of file HistoUtils.py.

797 def _underflowIntegralFrac_(self):
798  """
799  The fraction of underflow integral (useful for shape comparison)
800  """
801  return HistoStats.underflowIntegralFrac(self)
802 
803 
804 # =============================================================================
805 
806 

◆ _underflowIntegralFracErr_()

def GaudiAlg.HistoUtils._underflowIntegralFracErr_ (   self)
private
The error for fraction of underflow integral (useful for shape comparison)

Definition at line 807 of file HistoUtils.py.

808  """
809  The error for fraction of underflow integral (useful for shape comparison)
810  """
811  return HistoStats.underflowIntegralFracErr(self)
812 
813 
814 # =============================================================================
815 # get number of entries in histogram up to the certain bin (not-included)
816 # get number of entries in histogram form the certain
817 # minimal bin up to the certain maximal bin (not-included)
818 
819 

◆ book()

def GaudiAlg.HistoUtils.book ( args,
**  kwargs 
)
The trivial function to book the various 1D,2D&3D-histograms

(1) book the trivial 1D histogram with full path

>>> h1D = book ( 'path/to/my/histo'       , ## path in Histogram Transient Store
                 'cosine of decay angle ' , ## histogram title
                  100                     , ## number of bins
                  -1                      , ## low edge
                  100                     ) ## high edge

(2) book the trivial 1D histogram with directory path and string ID :

>>> h1D = book ( 'path/to/directory'      , ## the path to directory in HTS
                 'H1'                     , ## string histogram identifier
                 'cosine of decay angle ' , ## histogram title
                  100                     , ## number of bins
                  -1                      , ## low edge
                  100                     ) ## high edge

(3) book the trivial 1D histogram with directory path and integer ID :

>>> h1D = book ( 'path/to/directory'      , ## the path to directory in HTS
                 124                      , ## integer histogram identifier
                 'cosine of decay angle ' , ## histogram title
                  100                     , ## number of bins
                  -1                      , ## low edge
                  100                     ) ## high edge

(4) book the trivial 2D histogram with full path

>>> h1D = book ( 'path/to/my/histo'       , ## path in Histogram Transient Store
                 'm12**2 versus m13**2'   , ## histogram title
                  50                      , ## number of X-bins
                  1.0                     , ## low X-edge
                  4.0                     , ## high X-edge
                  50                      , ## number of Y-bins
                  1                       , ## low Y-edge
                  2                       ) ## high Y-edge

(5) book the trivial 2D histogram with directory path and literal ID

>>> h1D = book ( 'path/to/directory'      , ## path in Histogram Transient Store
                 'Dalitz1'                , ## literal histogram identifier
                 'm12**2 versus m13**2'   , ## histogram title
                  50                      , ## number of X-bins
                  1.0                     , ## low X-edge
                  4.0                     , ## high X-edge
                  50                      , ## number of Y-bins
                  1                       , ## low Y-edge
                  2                       ) ## high Y-edge

(6) book the trivial 2D histogram with directory path and integer ID

>>> h1D = book ( 'path/to/directory'      , ## path in Histogram Transient Store
                 854                      , ## integer histogram identifier
                 'm12**2 versus m13**2'   , ## histogram title
                  50                      , ## number of X-bins
                  1.0                     , ## low X-edge
                  4.0                     , ## high X-edge
                  50                      , ## number of Y-bins
                  1.0                     , ## low Y-edge
                  4.0                     ) ## high Y-edge

(7) book the trivial 3D histogram with full path

>>> h1D = book ( 'path/to/my/histo'       , ## path in Histogram Transient Store
                 'x vs y vs z '           , ## histogram title
                  10                      , ## number of X-bins
                  -1.0                    , ## low X-edge
                  1.0                     , ## high X-edge
                  10                      , ## number of Y-bins
                  -1.0                    , ## low Y-edge
                  1.0                     , ## high Y-edge
                  10                      , ## number of Z-bins
                  -1.0                    , ## low Z-edge
                  1.0                     ) ## high Z-edge

(8) book the trivial 3D histogram with directory path and literal ID

>>> h1D = book ( 'path/to/directory'      , ## path in Histogram Transient Store
                 'xyz'                    , ## literal histogram identifier
                 'x vs y vs z'            , ## histogram title
                  10                      , ## number of X-bins
                  -1.0                    , ## low X-edge
                  1.0                     , ## high X-edge
                  10                      , ## number of Y-bins
                  -1.0                    , ## low Y-edge
                  1.0                     , ## high Y-edge
                  10                      , ## number of Z-bins
                  -1.0                    , ## low Z-edge
                  1.0                     ) ## high Z-edge

(9) book the trivial 3D histogram with directory path and integer ID

>>> h1D = book ( 'path/to/directory'      , ## path in Histogram Transient Store
                 888                      , ## integer histogram identifier
                 'x vs y vs z'            , ## histogram title
                  10                      , ## number of X-bins
                  -1.0                    , ## low X-edge
                  1.0                     , ## high X-edge
                  10                      , ## number of Y-bins
                  -1.0                    , ## low Y-edge
                  1.0                     , ## high Y-edge
                  10                      , ## number of Z-bins
                  -1.0                    , ## low Z-edge
                  1.0                     ) ## high Z-edge

Many other booking methods are available,
e.g. for the histograms with non-equidistant bins, see IHistogamSvc::book

Definition at line 126 of file HistoUtils.py.

126 def book(*args, **kwargs):
127  """
128  The trivial function to book the various 1D,2D&3D-histograms
129 
130  (1) book the trivial 1D histogram with full path
131 
132  >>> h1D = book ( 'path/to/my/histo' , ## path in Histogram Transient Store
133  'cosine of decay angle ' , ## histogram title
134  100 , ## number of bins
135  -1 , ## low edge
136  100 ) ## high edge
137 
138  (2) book the trivial 1D histogram with directory path and string ID :
139 
140  >>> h1D = book ( 'path/to/directory' , ## the path to directory in HTS
141  'H1' , ## string histogram identifier
142  'cosine of decay angle ' , ## histogram title
143  100 , ## number of bins
144  -1 , ## low edge
145  100 ) ## high edge
146 
147  (3) book the trivial 1D histogram with directory path and integer ID :
148 
149  >>> h1D = book ( 'path/to/directory' , ## the path to directory in HTS
150  124 , ## integer histogram identifier
151  'cosine of decay angle ' , ## histogram title
152  100 , ## number of bins
153  -1 , ## low edge
154  100 ) ## high edge
155 
156  (4) book the trivial 2D histogram with full path
157 
158  >>> h1D = book ( 'path/to/my/histo' , ## path in Histogram Transient Store
159  'm12**2 versus m13**2' , ## histogram title
160  50 , ## number of X-bins
161  1.0 , ## low X-edge
162  4.0 , ## high X-edge
163  50 , ## number of Y-bins
164  1 , ## low Y-edge
165  2 ) ## high Y-edge
166 
167  (5) book the trivial 2D histogram with directory path and literal ID
168 
169  >>> h1D = book ( 'path/to/directory' , ## path in Histogram Transient Store
170  'Dalitz1' , ## literal histogram identifier
171  'm12**2 versus m13**2' , ## histogram title
172  50 , ## number of X-bins
173  1.0 , ## low X-edge
174  4.0 , ## high X-edge
175  50 , ## number of Y-bins
176  1 , ## low Y-edge
177  2 ) ## high Y-edge
178 
179  (6) book the trivial 2D histogram with directory path and integer ID
180 
181  >>> h1D = book ( 'path/to/directory' , ## path in Histogram Transient Store
182  854 , ## integer histogram identifier
183  'm12**2 versus m13**2' , ## histogram title
184  50 , ## number of X-bins
185  1.0 , ## low X-edge
186  4.0 , ## high X-edge
187  50 , ## number of Y-bins
188  1.0 , ## low Y-edge
189  4.0 ) ## high Y-edge
190 
191  (7) book the trivial 3D histogram with full path
192 
193  >>> h1D = book ( 'path/to/my/histo' , ## path in Histogram Transient Store
194  'x vs y vs z ' , ## histogram title
195  10 , ## number of X-bins
196  -1.0 , ## low X-edge
197  1.0 , ## high X-edge
198  10 , ## number of Y-bins
199  -1.0 , ## low Y-edge
200  1.0 , ## high Y-edge
201  10 , ## number of Z-bins
202  -1.0 , ## low Z-edge
203  1.0 ) ## high Z-edge
204 
205  (8) book the trivial 3D histogram with directory path and literal ID
206 
207  >>> h1D = book ( 'path/to/directory' , ## path in Histogram Transient Store
208  'xyz' , ## literal histogram identifier
209  'x vs y vs z' , ## histogram title
210  10 , ## number of X-bins
211  -1.0 , ## low X-edge
212  1.0 , ## high X-edge
213  10 , ## number of Y-bins
214  -1.0 , ## low Y-edge
215  1.0 , ## high Y-edge
216  10 , ## number of Z-bins
217  -1.0 , ## low Z-edge
218  1.0 ) ## high Z-edge
219 
220  (9) book the trivial 3D histogram with directory path and integer ID
221 
222  >>> h1D = book ( 'path/to/directory' , ## path in Histogram Transient Store
223  888 , ## integer histogram identifier
224  'x vs y vs z' , ## histogram title
225  10 , ## number of X-bins
226  -1.0 , ## low X-edge
227  1.0 , ## high X-edge
228  10 , ## number of Y-bins
229  -1.0 , ## low Y-edge
230  1.0 , ## high Y-edge
231  10 , ## number of Z-bins
232  -1.0 , ## low Z-edge
233  1.0 ) ## high Z-edge
234 
235  Many other booking methods are available,
236  e.g. for the histograms with non-equidistant bins, see IHistogamSvc::book
237 
238  """
239  if useROOT or kwargs.get("useROOT", False) or not kwargs.get("useAIDA", True):
240  from ROOT import TH1D
241 
242  a0 = args[0]
243  a1 = args[1]
244  a2 = args[2]
245  if not isinstance(a1, str):
246  a1 = "h" + str(a1)
247  if isinstance(a2, str):
248  return TH1D(a0 + a1, a2, *args[3:])
249  else:
250  return TH1D(a0, a1, *args[2:])
251 
252  svc = _getHistoSvc(**kwargs)
253  if not svc:
254  raise RuntimeError("Unable to get valid HistogramService ")
255  # book the histogram using the service
256  return svc.book(*args) # RETURN
257 
258 
259 book.__doc__ += (
260  "\n\n" + "\thelp(iHistogramSvc.book) : \n\n" + iHistogramSvc.book.__doc__
261 )
262 book.__doc__ += (
263  "\n\n" + "\thelp(IHistogramSvc::book) : \n\n" + cpp.IHistogramSvc.book.__doc__
264 )
265 
266 # =============================================================================
267 # The trivial function to book 1D&2D profile histograms:
268 
269 

◆ bookProf()

def GaudiAlg.HistoUtils.bookProf ( args,
**  kwargs 
)
The trivial function to book 1D&2D profile histograms:

(1) book 1D-profile histogram with full path in Histogram Transient Store:
>>> histo = bookProf ( 'path/to/my/profile'  , ## path in Histogram Transient Store
                       'Energy Correction'   , ## the histogram title
                       100                   , ## number of X-bins
                       0.0                   , ## low X-edge
                       100                   ) ## high X-edge

(2) book 1D-profile histogram with directory path and literal ID
>>> histo = bookProf ( 'path/to/my/profile'  , ## path in Histogram Transient Store
                       'Calibration'         , ## the histogram literal identifier
                       'Energy Correction'   , ## the histogram title
                       100                   , ## number of X-bins
                       0.0                   , ## low X-edge
                       100                   ) ## high X-edge

(3) book 1D-profile histogram with directory path and integer  ID
>>> histo = bookProf ( 'path/to/my/profile'  , ## path in Histogram Transient Store
                       418                   , ## the histogram integer identifier
                       'Energy Correction'   , ## the histogram title
                       100                   , ## number of X-bins
                       0.0                   , ## low X-edge
                       100                   ) ## high X-edge

(4) book 2D-profile histogram with full path in Histogram Transient Store:
>>> histo = bookProf ( 'path/to/my/profile'  , ## path in Histogram Transient Store
                       'Energy Correction'   , ## the histogram title
                       50                    , ## number of X-bins
                       0.0                   , ## low X-edge
                       100                   , ## high X-edge
                       50                    , ## number of Y-bins
                       0.0                   , ## low Y-edge
                       100                   ) ## high Y-edge

(5) book 2D-profile histogram with directory path and literal ID
>>> histo = bookProf ( 'path/to/my/profile'  , ## path in Histogram Transient Store
                       'Calibration'         , ## the histogram literal identifier
                       'Energy Correction'   , ## the histogram title
                       50                    , ## number of X-bins
                       0.0                   , ## low X-edge
                       100                   , ## high X-edge
                       50                    , ## number of Y-bins
                       0.0                   , ## low Y-edge
                       100                   ) ## high Y-edge

(6) book 2D-profile histogram with directory path and integer  ID
>>> histo = bookProf ( 'path/to/my/profile'  , ## path in Histogram Transient Store
                       418                   , ## the histogram integer identifier
                       'Energy Correction'   , ## the histogram title
                       50                    , ## number of X-bins
                       0.0                   , ## low X-edge
                       100                   , ## high X-edge
                       50                    , ## number of Y-bins
                       0.0                   , ## low Y-edge
                       100                   ) ## high Y-edge

Many other booking methods are available,
e.g. for the histograms with non-equidistant bins, see IHistogamSvc::book

Definition at line 270 of file HistoUtils.py.

270 def bookProf(*args, **kwargs):
271  """
272 
273  The trivial function to book 1D&2D profile histograms:
274 
275  (1) book 1D-profile histogram with full path in Histogram Transient Store:
276  >>> histo = bookProf ( 'path/to/my/profile' , ## path in Histogram Transient Store
277  'Energy Correction' , ## the histogram title
278  100 , ## number of X-bins
279  0.0 , ## low X-edge
280  100 ) ## high X-edge
281 
282  (2) book 1D-profile histogram with directory path and literal ID
283  >>> histo = bookProf ( 'path/to/my/profile' , ## path in Histogram Transient Store
284  'Calibration' , ## the histogram literal identifier
285  'Energy Correction' , ## the histogram title
286  100 , ## number of X-bins
287  0.0 , ## low X-edge
288  100 ) ## high X-edge
289 
290  (3) book 1D-profile histogram with directory path and integer ID
291  >>> histo = bookProf ( 'path/to/my/profile' , ## path in Histogram Transient Store
292  418 , ## the histogram integer identifier
293  'Energy Correction' , ## the histogram title
294  100 , ## number of X-bins
295  0.0 , ## low X-edge
296  100 ) ## high X-edge
297 
298  (4) book 2D-profile histogram with full path in Histogram Transient Store:
299  >>> histo = bookProf ( 'path/to/my/profile' , ## path in Histogram Transient Store
300  'Energy Correction' , ## the histogram title
301  50 , ## number of X-bins
302  0.0 , ## low X-edge
303  100 , ## high X-edge
304  50 , ## number of Y-bins
305  0.0 , ## low Y-edge
306  100 ) ## high Y-edge
307 
308  (5) book 2D-profile histogram with directory path and literal ID
309  >>> histo = bookProf ( 'path/to/my/profile' , ## path in Histogram Transient Store
310  'Calibration' , ## the histogram literal identifier
311  'Energy Correction' , ## the histogram title
312  50 , ## number of X-bins
313  0.0 , ## low X-edge
314  100 , ## high X-edge
315  50 , ## number of Y-bins
316  0.0 , ## low Y-edge
317  100 ) ## high Y-edge
318 
319  (6) book 2D-profile histogram with directory path and integer ID
320  >>> histo = bookProf ( 'path/to/my/profile' , ## path in Histogram Transient Store
321  418 , ## the histogram integer identifier
322  'Energy Correction' , ## the histogram title
323  50 , ## number of X-bins
324  0.0 , ## low X-edge
325  100 , ## high X-edge
326  50 , ## number of Y-bins
327  0.0 , ## low Y-edge
328  100 ) ## high Y-edge
329 
330  Many other booking methods are available,
331  e.g. for the histograms with non-equidistant bins, see IHistogamSvc::book
332 
333  """
334  svc = _getHistoSvc(**kwargs)
335  if not svc:
336  raise RuntimeError("Unable to get valid HistogramService ")
337  # book the histogram using the service
338  return svc.bookProf(*args) # RETURN
339 
340 
341 bookProf.__doc__ += (
342  "\n\n" + "\thelp(iHistogramSvc.bookProf) : \n\n" + iHistogramSvc.bookProf.__doc__
343 )
344 bookProf.__doc__ += (
345  "\n\n"
346  + "\thelp(IHistogramSvc::bookProf) : \n\n"
347  + cpp.IHistogramSvc.bookProf.__doc__
348 )
349 
350 # =============================================================================
351 # The most trivial function to retrieve the histogram from Histogram Transient Store
352 
353 

◆ fill()

def GaudiAlg.HistoUtils.fill (   histo,
  data,
  fun = lambda x: x,
  cut = lambda x: True,
**  kwargs 
)
The function which allows 'the smart fill' of 1D-histogram

>>> histo = ...

The most trivial case, fill with the value
>>> fill ( histo , 1.0 )

Fill from any iterable object (sequence)
>>> fill ( histo , [1,,2,3,4,5,10] )

Fill from iterable object and apply the function:
>>> fill ( histo , [1,2,3,4,5] , math.sin )

Use lambda form:
>>> fill ( histo , [1,2,3,4,5] , lambda x : x*x )

The same
>>> fill ( histo , [1,2,3,4,5] , fun = lambda x : x*x )

Use internal attributes:
>>> tracks = evtSvc['Rec/Track/Best']    ## iterable container of tracks
>>> fill ( histo , tracks , lambda t : t.pt() )

Apply the predicate: fill only even numbers:
>>> fill ( histo , [1,2,3,4,5,6,7] , lambda x : x , lambda y : y%2 )

The same (omit the trivial function) :
>>> fill ( histo , [1,2,3,4,5,6,7] , cut = lambda y : y%2 )

Apply the predicate: fill only pt for positively charged tracks:
>>> tracks = evtSvc['Rec/Track/Best']
>>> fill ( histo , tracks , lambda t : t.pt() , lambda t : 0<t.charge() )

The same:
>>> fill ( histo , tracks ,
           fun = lambda t : t.pt()       ,
           cut = lambda t : 0<t.charge() )

Ordinary functions are also fine:
>>> def myfun ( track ) : return sin( track.pt() + track.p() )
>>> def mycut ( track ) : return track.p() > 100 * GeV
>>> fill ( histo , tracks , myfun , mycut )

The 'data' could be the address in TES, in this case the object
is retrieved from TES and the method is applied to the objects,
retrieved from TES:
>>> fill (  histo             , ## the reference to the histogram
           'Rec/Track/Best'   , ## the location of objects in TES
            lambda t : t.pt() ) ## function to be used for histogram fill
>>> fill (  histo             , ## the reference to the histogram
           'Rec/Track/Best'   , ## the address of objects in TES
            lambda t : t.pt() , ## the function to be used for histogram fill
            lambda t : t.charge()>0 ) ## the criteria to select tracks

The arguments 'fun' and 'cut' could be strings, in this case
they are evaluated by python before usage.
This option could be often very useful.

Definition at line 404 of file HistoUtils.py.

404 def fill(
405  histo, # histogram
406  data, # input data
407  fun=lambda x: x, # function to be used
408  cut=lambda x: True, # cut to be applied
409  **kwargs,
410 ): # optional extra arguments
411  """
412 
413  The function which allows 'the smart fill' of 1D-histogram
414 
415  >>> histo = ...
416 
417  The most trivial case, fill with the value
418  >>> fill ( histo , 1.0 )
419 
420  Fill from any iterable object (sequence)
421  >>> fill ( histo , [1,,2,3,4,5,10] )
422 
423  Fill from iterable object and apply the function:
424  >>> fill ( histo , [1,2,3,4,5] , math.sin )
425 
426  Use lambda form:
427  >>> fill ( histo , [1,2,3,4,5] , lambda x : x*x )
428 
429  The same
430  >>> fill ( histo , [1,2,3,4,5] , fun = lambda x : x*x )
431 
432  Use internal attributes:
433  >>> tracks = evtSvc['Rec/Track/Best'] ## iterable container of tracks
434  >>> fill ( histo , tracks , lambda t : t.pt() )
435 
436  Apply the predicate: fill only even numbers:
437  >>> fill ( histo , [1,2,3,4,5,6,7] , lambda x : x , lambda y : y%2 )
438 
439  The same (omit the trivial function) :
440  >>> fill ( histo , [1,2,3,4,5,6,7] , cut = lambda y : y%2 )
441 
442  Apply the predicate: fill only pt for positively charged tracks:
443  >>> tracks = evtSvc['Rec/Track/Best']
444  >>> fill ( histo , tracks , lambda t : t.pt() , lambda t : 0<t.charge() )
445 
446  The same:
447  >>> fill ( histo , tracks ,
448  fun = lambda t : t.pt() ,
449  cut = lambda t : 0<t.charge() )
450 
451  Ordinary functions are also fine:
452  >>> def myfun ( track ) : return sin( track.pt() + track.p() )
453  >>> def mycut ( track ) : return track.p() > 100 * GeV
454  >>> fill ( histo , tracks , myfun , mycut )
455 
456  The 'data' could be the address in TES, in this case the object
457  is retrieved from TES and the method is applied to the objects,
458  retrieved from TES:
459  >>> fill ( histo , ## the reference to the histogram
460  'Rec/Track/Best' , ## the location of objects in TES
461  lambda t : t.pt() ) ## function to be used for histogram fill
462  >>> fill ( histo , ## the reference to the histogram
463  'Rec/Track/Best' , ## the address of objects in TES
464  lambda t : t.pt() , ## the function to be used for histogram fill
465  lambda t : t.charge()>0 ) ## the criteria to select tracks
466 
467  The arguments 'fun' and 'cut' could be strings, in this case
468  they are evaluated by python before usage.
469  This option could be often very useful.
470 
471  """
472 
473  # if value is a string, try to get the objects from TES
474  if isinstance(data, str):
475  svc = _getEvtSvc(**kwargs)
476  data = svc[data]
477  return fill(histo, data, fun, cut, **kwargs)
478 
479  # if the function is a string: evaluate it!
480  if isinstance(fun, str):
481  fun = eval(fun, globals())
482 
483  # if the criterion is a string: evaluate it!
484  if isinstance(cut, str):
485  cut = eval(cut, globals())
486 
487  if not hasattr(data, "__iter__"):
488  data = [data]
489 
490  if not hasattr(histo, "fill") and hasattr(histo, "Fill"):
491  setattr(histo, "fill", getattr(histo, "Fill"))
492 
493  for item in data:
494  if not cut(item):
495  continue # CONTINUE
496  histo.fill(fun(item))
497 
498  return histo # RETURN
499 
500 
501 # =============================================================================
502 # AIDA -> ROOT converter

◆ getAsAIDA()

def GaudiAlg.HistoUtils.getAsAIDA (   path,
**  kwargs 
)
The most trivial function to retrieve the histogram from Histogram Transient Store
The histogram is returned by reference to its AIDA-representation (if possible)

>>> h = getAsAIDA ( 'some/path/to/my/histogram' )

Definition at line 354 of file HistoUtils.py.

354 def getAsAIDA(path, **kwargs):
355  """
356 
357  The most trivial function to retrieve the histogram from Histogram Transient Store
358  The histogram is returned by reference to its AIDA-representation (if possible)
359 
360  >>> h = getAsAIDA ( 'some/path/to/my/histogram' )
361 
362  """
363  svc = _getHistoSvc(**kwargs)
364  if not svc:
365  raise RuntimeError("Unable to get valid HistogramService ")
366  # return the histogram
367  return svc.getAsAIDA(path) # RETURN
368 
369 
370 getAsAIDA.__doc__ += (
371  "\n\n" + "\thelp(iHistogramSvc.getAsAIDA) : \n\n" + iHistogramSvc.getAsAIDA.__doc__
372 )
373 getAsAIDA.__doc__ += (
374  "\n\n" + "\thelp(iHistogramSvc.retrieve) : \n\n" + iHistogramSvc.retrieve.__doc__
375 )
376 
377 # =============================================================================
378 # The most trivial function to retrieve the histogram from Histogram Transient Store
379 
380 

◆ getAsROOT()

def GaudiAlg.HistoUtils.getAsROOT (   path,
**  kwargs 
)
The most trivial function to retrieve the histogram from Histogram Transient Store
The histogram is returned by reference to its underlying native ROOT-representation (if possible)

>>> h = getAsROOT ( 'some/path/to/my/histogram' )

Definition at line 381 of file HistoUtils.py.

381 def getAsROOT(path, **kwargs):
382  """
383 
384  The most trivial function to retrieve the histogram from Histogram Transient Store
385  The histogram is returned by reference to its underlying native ROOT-representation (if possible)
386 
387  >>> h = getAsROOT ( 'some/path/to/my/histogram' )
388 
389  """
390  svc = _getHistoSvc(**kwargs)
391  if not svc:
392  raise RuntimeError("Unable to get valid HistogramService ")
393  # return the histogram
394  return svc.getAsROOT(path) # RETURN
395 
396 
397 getAsROOT.__doc__ += (
398  "\n\n" + "\thelp(iHistogramSvc.getAsROOT) : \n\n" + iHistogramSvc.getAsROOT.__doc__
399 )
400 
401 
402 # =============================================================================
403 # The function which allows 'the smart fill' of 1D-histogram

Variable Documentation

◆ __all__

GaudiAlg.HistoUtils.__all__
private

Definition at line 40 of file HistoUtils.py.

◆ __author__

GaudiAlg.HistoUtils.__author__
private

(c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations # # This software is distributed under the terms of the Apache version 2 licence, # copied verbatim in the file "LICENSE".

# # In applying this licence, CERN does not waive the privileges and immunities # granted to it by virtue of its status as an Intergovernmental Organization # or submit itself to any jurisdiction. #


This module contains set of simple and useful utilities for booking and manipulations with Gaudi-AIDA histograms, inspired by Thomas' request

Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u

@date 2007-08-03

Definition at line 38 of file HistoUtils.py.

◆ __repr__

GaudiAlg.HistoUtils.__repr__
private

Definition at line 535 of file HistoUtils.py.

◆ __str__

GaudiAlg.HistoUtils.__str__
private

Definition at line 538 of file HistoUtils.py.

◆ aida2root

GaudiAlg.HistoUtils.aida2root

Definition at line 503 of file HistoUtils.py.

◆ centralMoment

GaudiAlg.HistoUtils.centralMoment

Definition at line 897 of file HistoUtils.py.

◆ centralMomentErr

GaudiAlg.HistoUtils.centralMomentErr

Definition at line 899 of file HistoUtils.py.

◆ dumpHisto

GaudiAlg.HistoUtils.dumpHisto

Definition at line 991 of file HistoUtils.py.

◆ HID

GaudiAlg.HistoUtils.HID

Definition at line 59 of file HistoUtils.py.

◆ histoDump

GaudiAlg.HistoUtils.histoDump

Definition at line 990 of file HistoUtils.py.

◆ HistoStats

GaudiAlg.HistoUtils.HistoStats

Definition at line 540 of file HistoUtils.py.

◆ i1DH

GaudiAlg.HistoUtils.i1DH

Definition at line 890 of file HistoUtils.py.

◆ iBH

GaudiAlg.HistoUtils.iBH

Definition at line 958 of file HistoUtils.py.

◆ kurtosis

GaudiAlg.HistoUtils.kurtosis

Definition at line 915 of file HistoUtils.py.

◆ kurtosisErr

GaudiAlg.HistoUtils.kurtosisErr

Definition at line 917 of file HistoUtils.py.

◆ location

GaudiAlg.HistoUtils.location

Definition at line 964 of file HistoUtils.py.

◆ mean

GaudiAlg.HistoUtils.mean

Definition at line 903 of file HistoUtils.py.

◆ meanErr

GaudiAlg.HistoUtils.meanErr

Definition at line 905 of file HistoUtils.py.

◆ moment

GaudiAlg.HistoUtils.moment

Definition at line 893 of file HistoUtils.py.

◆ momentErr

GaudiAlg.HistoUtils.momentErr

Definition at line 895 of file HistoUtils.py.

◆ nEff

GaudiAlg.HistoUtils.nEff

Definition at line 901 of file HistoUtils.py.

◆ nEntries

GaudiAlg.HistoUtils.nEntries

Definition at line 938 of file HistoUtils.py.

◆ nEntriesFrac

GaudiAlg.HistoUtils.nEntriesFrac

Definition at line 940 of file HistoUtils.py.

◆ nEntriesFracErr

GaudiAlg.HistoUtils.nEntriesFracErr

Definition at line 942 of file HistoUtils.py.

◆ overflowEntriesFrac

GaudiAlg.HistoUtils.overflowEntriesFrac

Definition at line 920 of file HistoUtils.py.

◆ overflowEntriesFracErr

GaudiAlg.HistoUtils.overflowEntriesFracErr

Definition at line 922 of file HistoUtils.py.

◆ overflowIntegralFrac

GaudiAlg.HistoUtils.overflowIntegralFrac

Definition at line 929 of file HistoUtils.py.

◆ overflowIntegralFracErr

GaudiAlg.HistoUtils.overflowIntegralFracErr

Definition at line 931 of file HistoUtils.py.

◆ path

GaudiAlg.HistoUtils.path

Definition at line 960 of file HistoUtils.py.

◆ rms

GaudiAlg.HistoUtils.rms

Definition at line 907 of file HistoUtils.py.

◆ rmsErr

GaudiAlg.HistoUtils.rmsErr

Definition at line 909 of file HistoUtils.py.

◆ skewness

GaudiAlg.HistoUtils.skewness

Definition at line 911 of file HistoUtils.py.

◆ skewnessErr

GaudiAlg.HistoUtils.skewnessErr

Definition at line 913 of file HistoUtils.py.

◆ TESpath

GaudiAlg.HistoUtils.TESpath

Definition at line 962 of file HistoUtils.py.

◆ underflowEntriesFrac

GaudiAlg.HistoUtils.underflowEntriesFrac

Definition at line 924 of file HistoUtils.py.

◆ underflowEntriesFracErr

GaudiAlg.HistoUtils.underflowEntriesFracErr

Definition at line 926 of file HistoUtils.py.

◆ underflowIntegralFrac

GaudiAlg.HistoUtils.underflowIntegralFrac

Definition at line 933 of file HistoUtils.py.

◆ underflowIntegralFracErr

GaudiAlg.HistoUtils.underflowIntegralFracErr

Definition at line 935 of file HistoUtils.py.

◆ useROOT

GaudiAlg.HistoUtils.useROOT

global flag

Definition at line 62 of file HistoUtils.py.

GaudiAlg.HistoUtils._getAppMgr
def _getAppMgr(**kwargs)
Definition: HistoUtils.py:68
GaudiAlg.HistoUtils.getAsROOT
def getAsROOT(path, **kwargs)
Definition: HistoUtils.py:381
GaudiAlg.HistoUtils.__dumpHisto__
def __dumpHisto__(histo, *args)
Definition: HistoUtils.py:968
GaudiPartProp.Service.AppMgr
AppMgr
Definition: Service.py:41
GaudiAlg.HistoUtils._sumBinHeightErr_
def _sumBinHeightErr_(self)
Definition: HistoUtils.py:719
GaudiAlg.HistoUtils._momentErr_
def _momentErr_(self, order)
Definition: HistoUtils.py:562
GaudiAlg.HistoUtils._overflowIntegralFrac_
def _overflowIntegralFrac_(self)
Definition: HistoUtils.py:777
GaudiAlg.HistoUtils.fill
def fill(histo, data, fun=lambda x:x, cut=lambda x:True, **kwargs)
Definition: HistoUtils.py:404
GaudiAlg.HistoUtils._centralMomentErr_
def _centralMomentErr_(self, order)
Definition: HistoUtils.py:594
GaudiAlg.HistoUtils.book
def book(*args, **kwargs)
Definition: HistoUtils.py:126
GaudiAlg.HistoUtils._centralMoment_
def _centralMoment_(self, order)
Definition: HistoUtils.py:578
GaudiAlg.HistoUtils._getHistoSvc
def _getHistoSvc(**kwargs)
Definition: HistoUtils.py:92
GaudiAlg.HistoUtils._kurtosisErr_
def _kurtosisErr_(self)
Definition: HistoUtils.py:655
GaudiAlg.HistoUtils._path_
def _path_(self)
Definition: HistoUtils.py:947
GaudiAlg.HistoUtils._mean_
def _mean_(self)
Definition: HistoUtils.py:679
GaudiAlg.HistoUtils.bookProf
def bookProf(*args, **kwargs)
Definition: HistoUtils.py:270
GaudiAlg.HistoUtils._underflowIntegralFracErr_
def _underflowIntegralFracErr_(self)
Definition: HistoUtils.py:807
GaudiAlg.HistoUtils._kurtosis_
def _kurtosis_(self)
Definition: HistoUtils.py:640
GaudiAlg.HistoUtils._underflowEntriesFrac_
def _underflowEntriesFrac_(self)
Definition: HistoUtils.py:757
GaudiAlg.HistoUtils._to_root_
def _to_root_(self)
Definition: HistoUtils.py:509
GaudiAlg.HistoUtils._underflowEntriesFracErr_
def _underflowEntriesFracErr_(self)
Definition: HistoUtils.py:767
GaudiAlg.HistoUtils._underflowIntegralFrac_
def _underflowIntegralFrac_(self)
Definition: HistoUtils.py:797
GaudiAlg.HistoUtils._rmsErr_
def _rmsErr_(self)
Definition: HistoUtils.py:709
GaudiAlg.HistoUtils._nEff_
def _nEff_(self)
Definition: HistoUtils.py:669
GaudiAlg.HistoUtils.getAsAIDA
def getAsAIDA(path, **kwargs)
Definition: HistoUtils.py:354
GaudiAlg.HistoUtils._meanErr_
def _meanErr_(self)
Definition: HistoUtils.py:689
GaudiAlg.HistoUtils._getEvtSvc
def _getEvtSvc(**kwargs)
Definition: HistoUtils.py:109
GaudiAlg.HistoUtils._skewness_
def _skewness_(self)
Definition: HistoUtils.py:610
GaudiAlg.HistoUtils._overflowIntegralFracErr_
def _overflowIntegralFracErr_(self)
Definition: HistoUtils.py:787
GaudiAlg.HistoUtils.aida2root
aida2root
Definition: HistoUtils.py:503
GaudiAlg.HistoUtils._overflowEntriesFracErr_
def _overflowEntriesFracErr_(self)
Definition: HistoUtils.py:747
GaudiAlg.HistoUtils._nEntriesFrac_
def _nEntriesFrac_(self, i1, i2=-10000000)
Definition: HistoUtils.py:844
GaudiAlg.HistoUtils._nEntries_
def _nEntries_(self, i1, i2=-10000000)
Definition: HistoUtils.py:820
GaudiAlg.HistoUtils._sumAllBinHeightErr_
def _sumAllBinHeightErr_(self)
Definition: HistoUtils.py:729
GaudiAlg.HistoUtils._rms_
def _rms_(self)
Definition: HistoUtils.py:699
GaudiAlg.HistoUtils._moment_
def _moment_(self, order, value=0)
Definition: HistoUtils.py:546
GaudiAlg.HistoUtils._skewnessErr_
def _skewnessErr_(self)
Definition: HistoUtils.py:625
GaudiAlg.HistoUtils._overflowEntriesFrac_
def _overflowEntriesFrac_(self)
Definition: HistoUtils.py:737
GaudiAlg.HistoUtils._nEntriesFracErr_
def _nEntriesFracErr_(self, i1, i2=-10000000)
Definition: HistoUtils.py:868