#include <StatSample.hpp>
Public Member Functions | |
| StatSample (const std::string &sample="data") | |
| virtual | ~StatSample () |
| const std::string & | name () const |
| const std::vector< std::string > & | tags () const |
| const std::vector< std::string > & | tagsAnd () const |
| void | AddTags (const std::string &tag) |
| add tag required for this sample with ANY logic | |
| void | AddTags (const std::vector< std::string > &tags) |
| add tags required for this sample with ANY logic | |
| void | AddAndTags (const std::vector< std::string > &tags) |
| add tags required for this sample with AND logic | |
| void | AddAndTags (const std::string &tag) |
| add tag required for this sample with AND logic | |
| bool | tagged (const cafe::Event *event) const |
| unsigned int | size () const |
| return number of selections for this sample (The initial selection always exist) | |
| unsigned long | nevents (unsigned int n=0) const |
| return number of events for the selection n | |
| unsigned long | nevents (const std::string &name) const |
| return number of events for the selection with specified name | |
| double | eff (unsigned int n=0) const |
| return event selection efficiency or the average weight for a weight by number | |
| double | eff (const std::string &name) const |
| return the event selection efficiency by name | |
| double | effGlob (unsigned int n=0) const |
| return global event selection efficiency (relative to the initial number of events) (n = 0 means last selection / first one) | |
| double | effGlob (const std::string &name) const |
| return global event selection efficiency (relative to the initial number of events) | |
| double | correctedEfficiency (unsigned int n=0) const |
| return global event selection efficiency (relative to the initial number of events) corrected by the global event weight (n = 0 means last selection / first one) | |
| double | correctedEfficiency (const std::string &name) const |
| return global event selection efficiency (relative to the initial number of events) corrected by the global event weight | |
| double | effErr (unsigned int n=0) const |
| return event selection efficiency error or the average weight for a weight by number | |
| double | effErr (const std::string &name) const |
| return event selection efficiency error by name | |
| double | effErrGlob (unsigned int n=0) const |
| return global event selection efficiency error (n = 0 means last selection / first one) | |
| double | effErrGlob (const std::string &name) const |
| return global event selection efficiency error (n = 0 means last selection / first one) | |
| double | correctedEffErr (unsigned int n=0) const |
| return global event selection efficiency error (n = 0 means last selection / first one) corrected by the global event weight | |
| double | correctedEffErr (const std::string &name) const |
| return global event selection efficiency error (n = 0 means last selection / first one) corrected by the global event weight | |
| const StatWeight * | eventSelection (unsigned int n=0) const |
| return event selection by number | |
| const StatWeight * | eventSelection (const std::string &name) const |
| return event selection by name | |
| const StatWeight * | eventWeight (unsigned int n) const |
| return event weight by number in the selection vector | |
| const StatWeight * | eventWeight (const std::string &name="global") const |
| return event weight by name. Return global event weight by default | |
| Collection< EventWeight > | ListEventWeights () const |
| return a Collection of event weights available. The global event weight comes first | |
| bool | compareNames (const StatSample &sample) const |
| return true if all selection names in both samples are equal | |
| unsigned long | add (cafe::Event *event, const std::string &name="Initial") |
| increase event number for the selection by 1 | |
| double | applyWeight (cafe::Event *event, const std::string &name, double weight, double weight_pos, double weight_neg) |
| apply event weight | |
| void | Clear () |
| reset selection flags _selected | |
| ostream & | HtmlTable (ostream &os) const |
| Print sample as a html table. | |
| ostream & | print_tex (ostream &os, const std::string title) const |
| output operator | |
| ClassDef (StatSample, 0) | |
Static Public Member Functions | |
| std::string | tex (const std::string &init) |
| Convert string to the tex usable format. | |
Private Attributes | |
| std::string | _name |
| std::vector< std::string > | _tags |
| std::vector< std::string > | _tags_and |
| std::vector< StatWeight * > | _events |
| StatWeight * | _weight |
|
|
Definition at line 8 of file StatSample.cpp. |
|
|
Definition at line 14 of file StatSample.cpp. |
|
||||||||||||
|
increase event number for the selection by 1
Definition at line 42 of file StatSample.cpp. References _events, _weight, tagged(), cafe::StatWeight::weight(), cafe::StatWeight::weight_neg(), and cafe::StatWeight::weight_pos(). |
|
|
add tag required for this sample with AND logic
Definition at line 52 of file StatSample.hpp. References _tags_and. |
|
|
add tags required for this sample with AND logic
Definition at line 30 of file StatSample.cpp. References _tags_and. Referenced by cafe::Stat::add_syst(), and cafe::Syst::Syst(). |
|
|
add tags required for this sample with ANY logic
Definition at line 17 of file StatSample.cpp. References _tags. |
|
|
add tag required for this sample with ANY logic
Definition at line 43 of file StatSample.hpp. References _tags. Referenced by cafe::Syst::Syst(). |
|
||||||||||||||||||||||||
|
apply event weight
Definition at line 62 of file StatSample.cpp. References _events, _weight, cafe::StatWeight::applyWeight(), and tagged(). |
|
||||||||||||
|
|
|
|
reset selection flags _selected
Definition at line 111 of file StatSample.cpp. References _events, _weight, and cafe::StatWeight::Clear(). |
|
|
return true if all selection names in both samples are equal
Definition at line 338 of file StatSample.cpp. References _events. |
|
|
return global event selection efficiency error (n = 0 means last selection / first one) corrected by the global event weight
Definition at line 332 of file StatSample.cpp. References effErrGlob(), effGlob(), cafe::StatWeight::err(), eventWeight(), and cafe::StatWeight::weight_average(). |
|
|
return global event selection efficiency error (n = 0 means last selection / first one) corrected by the global event weight
Definition at line 322 of file StatSample.cpp. References effErrGlob(), effGlob(), cafe::StatWeight::err(), eventWeight(), and cafe::StatWeight::weight_average(). Referenced by HtmlTable(), and print_tex(). |
|
|
return global event selection efficiency (relative to the initial number of events) corrected by the global event weight
Definition at line 328 of file StatSample.cpp. References effGlob(), eventWeight(), and cafe::StatWeight::weight_average(). |
|
|
return global event selection efficiency (relative to the initial number of events) corrected by the global event weight (n = 0 means last selection / first one)
Definition at line 318 of file StatSample.cpp. References effGlob(), eventWeight(), and cafe::StatWeight::weight_average(). Referenced by HtmlTable(), and print_tex(). |
|
|
return the event selection efficiency by name
Definition at line 201 of file StatSample.cpp. |
|
|
return event selection efficiency or the average weight for a weight by number
Definition at line 185 of file StatSample.cpp. References _events, and _name. Referenced by HtmlTable(), and print_tex(). |
|
|
return event selection efficiency error by name
Definition at line 233 of file StatSample.cpp. |
|
|
return event selection efficiency error or the average weight for a weight by number
Definition at line 218 of file StatSample.cpp. References _events, and _name. Referenced by HtmlTable(), and print_tex(). |
|
|
return global event selection efficiency error (n = 0 means last selection / first one)
Definition at line 300 of file StatSample.cpp. |
|
|
return global event selection efficiency error (n = 0 means last selection / first one)
Definition at line 285 of file StatSample.cpp. References _events, and _name. Referenced by correctedEffErr(), HtmlTable(), and print_tex(). |
|
|
return global event selection efficiency (relative to the initial number of events)
Definition at line 266 of file StatSample.cpp. |
|
|
return global event selection efficiency (relative to the initial number of events) (n = 0 means last selection / first one)
Definition at line 250 of file StatSample.cpp. References _events, and _name. Referenced by correctedEffErr(), correctedEfficiency(), HtmlTable(), and print_tex(). |
|
|
return event selection by name
Definition at line 171 of file StatSample.cpp. |
|
|
return event selection by number
Definition at line 162 of file StatSample.cpp. References _events, and _name. Referenced by HtmlTable(), cafe::Stat::inheritWeights(), and print_tex(). |
|
|
return event weight by name. Return global event weight by default
Definition at line 120 of file StatSample.cpp. |
|
|
return event weight by number in the selection vector
Definition at line 152 of file StatSample.cpp. References _events, and _name. Referenced by correctedEffErr(), correctedEfficiency(), and HtmlTable(). |
|
|
Print sample as a html table.
Definition at line 361 of file StatSample.cpp. References _weight, correctedEffErr(), correctedEfficiency(), eff(), effErr(), effErrGlob(), effGlob(), eventSelection(), eventWeight(), cafe::StatSelection::isWeight(), cafe::StatSelection::name(), name(), nevents(), cafe::StatSelection::nevents(), and size(). |
|
|
return a Collection of event weights available. The global event weight comes first
Definition at line 132 of file StatSample.cpp. References _events, _weight, cafe::Collection< T >::push_back(), cafe::StatWeight::weight(), cafe::StatWeight::weight_neg(), and cafe::StatWeight::weight_pos(). |
|
|
Definition at line 38 of file StatSample.hpp. References _name. Referenced by HtmlTable(), print_tex(), and tex(). |
|
|
return number of events for the selection with specified name
Definition at line 98 of file StatSample.cpp. |
|
|
return number of events for the selection n
Definition at line 88 of file StatSample.cpp. References _events, and _name. Referenced by HtmlTable(), and print_tex(). |
|
||||||||||||
|
output operator
Definition at line 439 of file StatSample.cpp. References _weight, correctedEffErr(), correctedEfficiency(), eff(), effErr(), effErrGlob(), effGlob(), eventSelection(), cafe::StatSelection::isWeight(), name(), nevents(), cafe::StatSelection::nevents(), size(), and tex(). |
|
|
return number of selections for this sample (The initial selection always exist)
Definition at line 58 of file StatSample.hpp. References _events. Referenced by HtmlTable(), cafe::Stat::inheritWeights(), and print_tex(). |
|
|
Definition at line 348 of file StatSample.cpp. References _tags, _tags_and, and cafe::EventBase::hasTag(). Referenced by add(), and applyWeight(). |
|
|
Definition at line 39 of file StatSample.hpp. References _tags. Referenced by cafe::Syst::Syst(). |
|
|
Definition at line 40 of file StatSample.hpp. References _tags_and. |
|
|
Convert string to the tex usable format.
Definition at line 496 of file StatSample.cpp. References name(). Referenced by print_tex(). |
|
|
Definition at line 30 of file StatSample.hpp. Referenced by add(), applyWeight(), Clear(), compareNames(), eff(), effErr(), effErrGlob(), effGlob(), eventSelection(), eventWeight(), ListEventWeights(), nevents(), size(), and StatSample(). |
|
|
Definition at line 27 of file StatSample.hpp. Referenced by eff(), effErr(), effErrGlob(), effGlob(), eventSelection(), eventWeight(), name(), and nevents(). |
|
|
Definition at line 28 of file StatSample.hpp. |
|
|
Definition at line 29 of file StatSample.hpp. Referenced by AddAndTags(), tagged(), and tagsAnd(). |
|
|
Definition at line 31 of file StatSample.hpp. Referenced by add(), applyWeight(), Clear(), eventWeight(), HtmlTable(), ListEventWeights(), print_tex(), and StatSample(). |
1.3.4