Newer
Older
TB_Chris / TbEvent / xml / .svn / text-base / ChiSquare.xml.svn-base
  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE gdd SYSTEM 'gdd.dtd'>
  3. <gdd>
  4. <package name='TbEvent'>
  5. <class
  6. name = 'ChiSquare'
  7. author = 'Wouter Hulsbergen'
  8. desc = 'structure holding a chisquare and associated number of dofs'
  9. allocator = 'NO'
  10. virtual = 'FALSE'
  11. >
  12.  
  13. <constructor
  14. desc = 'Constructor'
  15. initList = "m_chi2(chi2),m_nDoF(ndof)">
  16. <arg type='double' name='chi2' const='TRUE' />
  17. <arg type='int' name='ndof' />
  18. </constructor>
  19.  
  20. <attribute
  21. type = 'double'
  22. name = 'chi2'
  23. desc = 'chi square'
  24. setMeth = 'FALSE' />
  25.  
  26. <attribute
  27. type = 'int'
  28. name = 'nDoF'
  29. desc = 'number of degrees of freedom'
  30. setMeth = 'FALSE' />
  31. <method
  32. type = 'double'
  33. name = 'chi2PerDoF'
  34. desc = 'return chi2/ndof if ndof>0. returns zero otherwise.'
  35. const = 'TRUE'>
  36. <code>
  37. return m_nDoF>0 ? m_chi2/m_nDoF : 0 ;
  38. </code>
  39. </method>
  40. <method
  41. type = 'double'
  42. name = 'prob'
  43. desc = 'return chisquare upper tail probability if ndof>0. returns zero otherwise.'
  44. const = 'TRUE'>
  45. </method>
  46.  
  47. <method
  48. type = 'LHCb::ChiSquare&amp;'
  49. name = 'operator+='
  50. desc = 'addition operator' >
  51. <arg type = 'LHCb::ChiSquare' name='rhs' const='TRUE'/>
  52. <code>
  53. m_chi2 += rhs.m_chi2 ;
  54. m_nDoF += rhs.m_nDoF ;
  55. return *this ;
  56. </code>
  57. </method>
  58.  
  59. <method
  60. type = 'LHCb::ChiSquare&amp;'
  61. name = 'operator-='
  62. desc = 'subtraction operator' >
  63. <arg type = 'LHCb::ChiSquare' name='rhs' const='TRUE'/>
  64. <code>
  65. m_chi2 -= rhs.m_chi2 ;
  66. m_nDoF -= rhs.m_nDoF ;
  67. return *this ;
  68. </code>
  69. </method>
  70.  
  71. <method
  72. type = 'LHCb::ChiSquare'
  73. name = 'operator+'
  74. desc = 'addition operator' >
  75. <arg type = 'LHCb::ChiSquare' name='rhs' const='TRUE'/>
  76. <code>
  77. ChiSquare rc = *this ;
  78. rc += rhs ;
  79. return rc ;
  80. </code>
  81. </method>
  82.  
  83. <method
  84. type = 'LHCb::ChiSquare'
  85. name = 'operator-'
  86. desc = 'subtraction operator' >
  87. <arg type = 'LHCb::ChiSquare' name='rhs' const='TRUE'/>
  88. <code>
  89. ChiSquare rc = *this ;
  90. rc -= rhs ;
  91. return rc ;
  92. </code>
  93. </method>
  94.  
  95. </class>
  96. </package>
  97. </gdd>