cafe::StatWeight Class Reference

#include <StatWeight.hpp>

Inheritance diagram for cafe::StatWeight:

cafe::StatSelection List of all members.

Public Member Functions

 StatWeight (const std::string &name="NoName", bool event_selection=false)
 ~StatWeight ()
double weight_average () const
 return average event weight

double weight_average_pos () const
 return average event weight (+1sigma)

double weight_average_neg () const
 return average event weight (-1sigma)

double weight () const
 return current event weight

double weight_pos () const
 return current event weight shifted by +1 sigma

double weight_neg () const
 return current event weight shifted by -1 sigma

double rms () const
 return weight rms

double err () const
 return weight rms/Sqrt(N)

double err (const StatWeight &selection) const
 return efficiencies errors calculated relative to the previous selection

double rms_pos () const
 return weight (shifted by +1 sigma) rms

double err_pos () const
 return weight (shifted by +1 sigma) rms/Sqrt(N)

double rms_neg () const
 return weight (shifted by -1 sigma) rms

double err_neg () const
 return weight (shifted by -1 sigma) rms/Sqrt(N)

void Clear ()
 Clear the weight claclutaion in the beginning of the event processing.

double applyWeight (double weight, double weight_pos=-1.0, double weight_neg=-1.0)

Private Attributes

double _weight_average
double _weight
double _rms2
double _weight_old
double _rms2_old
double _weight_average_pos
double _weight_pos
double _rms2_pos
double _weight_old_pos
double _rms2_old_pos
double _weight_average_neg
double _weight_neg
double _rms2_neg
double _weight_old_neg
double _rms2_old_neg

Constructor & Destructor Documentation

cafe::StatWeight::StatWeight const std::string &  name = "NoName",
bool  event_selection = false
 

Definition at line 40 of file StatWeight.cpp.

cafe::StatWeight::~StatWeight  )  [inline]
 

Definition at line 78 of file StatWeight.hpp.


Member Function Documentation

double cafe::StatWeight::applyWeight double  weight,
double  weight_pos = -1.0,
double  weight_neg = -1.0
 

Definition at line 59 of file StatWeight.cpp.

References _rms2, _rms2_neg, _rms2_old, _rms2_old_neg, _rms2_old_pos, _rms2_pos, _weight, _weight_average, _weight_average_neg, _weight_average_pos, _weight_neg, _weight_old, _weight_old_neg, _weight_old_pos, _weight_pos, cafe::StatSelection::addEvent(), cafe::StatSelection::isUpdated(), cafe::StatSelection::isWeight(), and cafe::StatSelection::nevents().

Referenced by cafe::StatSample::applyWeight().

void cafe::StatWeight::Clear  )  [virtual]
 

Clear the weight claclutaion in the beginning of the event processing.

Reimplemented from cafe::StatSelection.

Definition at line 49 of file StatWeight.cpp.

References _weight, _weight_neg, _weight_old, _weight_old_neg, _weight_old_pos, and _weight_pos.

Referenced by cafe::StatSample::Clear().

double cafe::StatWeight::err const StatWeight selection  )  const [inline]
 

return efficiencies errors calculated relative to the previous selection

Definition at line 105 of file StatWeight.hpp.

double cafe::StatWeight::err  )  const
 

return weight rms/Sqrt(N)

Definition at line 111 of file StatWeight.cpp.

References _rms2, and cafe::StatSelection::nevents().

Referenced by cafe::StatSample::correctedEffErr(), cafe::Stat::syst_neg(), and cafe::Stat::syst_pos().

double cafe::StatWeight::err_neg  )  const
 

return weight (shifted by -1 sigma) rms/Sqrt(N)

Definition at line 121 of file StatWeight.cpp.

References _rms2_neg, and cafe::StatSelection::nevents().

double cafe::StatWeight::err_pos  )  const
 

return weight (shifted by +1 sigma) rms/Sqrt(N)

Definition at line 116 of file StatWeight.cpp.

References _rms2_pos, and cafe::StatSelection::nevents().

double cafe::StatWeight::rms  )  const
 

return weight rms

Definition at line 127 of file StatWeight.cpp.

References _rms2.

double cafe::StatWeight::rms_neg  )  const
 

return weight (shifted by -1 sigma) rms

Definition at line 135 of file StatWeight.cpp.

References _rms2_neg.

double cafe::StatWeight::rms_pos  )  const
 

return weight (shifted by +1 sigma) rms

Definition at line 131 of file StatWeight.cpp.

References _rms2_pos.

double cafe::StatWeight::weight  )  const [inline]
 

return current event weight

Definition at line 90 of file StatWeight.hpp.

References _weight.

Referenced by cafe::StatSample::add(), cafe::Stat::inheritWeights(), and cafe::StatSample::ListEventWeights().

double cafe::StatWeight::weight_average  )  const [inline]
 

return average event weight

Definition at line 81 of file StatWeight.hpp.

References _weight_average.

Referenced by cafe::StatSample::correctedEffErr(), cafe::StatSample::correctedEfficiency(), cafe::Stat::print_html(), cafe::Stat::syst_neg(), and cafe::Stat::syst_pos().

double cafe::StatWeight::weight_average_neg  )  const [inline]
 

return average event weight (-1sigma)

Definition at line 87 of file StatWeight.hpp.

References _weight_average_neg.

Referenced by cafe::Stat::print_html(), and cafe::Stat::syst_neg().

double cafe::StatWeight::weight_average_pos  )  const [inline]
 

return average event weight (+1sigma)

Definition at line 84 of file StatWeight.hpp.

References _weight_average_pos.

Referenced by cafe::Stat::print_html(), and cafe::Stat::syst_pos().

double cafe::StatWeight::weight_neg  )  const [inline]
 

return current event weight shifted by -1 sigma

Definition at line 96 of file StatWeight.hpp.

References _weight_neg.

Referenced by cafe::StatSample::add(), cafe::Stat::inheritWeights(), and cafe::StatSample::ListEventWeights().

double cafe::StatWeight::weight_pos  )  const [inline]
 

return current event weight shifted by +1 sigma

Definition at line 93 of file StatWeight.hpp.

References _weight_pos.

Referenced by cafe::StatSample::add(), cafe::Stat::inheritWeights(), and cafe::StatSample::ListEventWeights().


Member Data Documentation

double cafe::StatWeight::_rms2 [private]
 

Definition at line 57 of file StatWeight.hpp.

Referenced by applyWeight(), err(), and rms().

double cafe::StatWeight::_rms2_neg [private]
 

Definition at line 70 of file StatWeight.hpp.

Referenced by applyWeight(), err_neg(), and rms_neg().

double cafe::StatWeight::_rms2_old [private]
 

Definition at line 59 of file StatWeight.hpp.

Referenced by applyWeight().

double cafe::StatWeight::_rms2_old_neg [private]
 

Definition at line 72 of file StatWeight.hpp.

Referenced by applyWeight().

double cafe::StatWeight::_rms2_old_pos [private]
 

Definition at line 65 of file StatWeight.hpp.

Referenced by applyWeight().

double cafe::StatWeight::_rms2_pos [private]
 

Definition at line 63 of file StatWeight.hpp.

Referenced by applyWeight(), err_pos(), and rms_pos().

double cafe::StatWeight::_weight [private]
 

Reimplemented from cafe::StatSelection.

Definition at line 56 of file StatWeight.hpp.

Referenced by applyWeight(), Clear(), and weight().

double cafe::StatWeight::_weight_average [private]
 

Definition at line 55 of file StatWeight.hpp.

Referenced by applyWeight(), and weight_average().

double cafe::StatWeight::_weight_average_neg [private]
 

Definition at line 68 of file StatWeight.hpp.

Referenced by applyWeight(), and weight_average_neg().

double cafe::StatWeight::_weight_average_pos [private]
 

Definition at line 61 of file StatWeight.hpp.

Referenced by applyWeight(), and weight_average_pos().

double cafe::StatWeight::_weight_neg [private]
 

Definition at line 69 of file StatWeight.hpp.

Referenced by applyWeight(), Clear(), and weight_neg().

double cafe::StatWeight::_weight_old [private]
 

Definition at line 58 of file StatWeight.hpp.

Referenced by applyWeight(), and Clear().

double cafe::StatWeight::_weight_old_neg [private]
 

Definition at line 71 of file StatWeight.hpp.

Referenced by applyWeight(), and Clear().

double cafe::StatWeight::_weight_old_pos [private]
 

Definition at line 64 of file StatWeight.hpp.

Referenced by applyWeight(), and Clear().

double cafe::StatWeight::_weight_pos [private]
 

Definition at line 62 of file StatWeight.hpp.

Referenced by applyWeight(), Clear(), and weight_pos().


The documentation for this class was generated from the following files:
Generated on Thu Apr 3 04:14:28 2008 for CAF by doxygen 1.3.4