#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 | 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) | |
| const StatSelection * | eventSelection (unsigned int n=0) const |
| return event selection by number | |
| const StatSelection * | 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 | |
| double | correctedEff (const StatWeight *w=0) const |
| return efficiency corrected by weight (global event weight by default) | |
| double | correctedEffErr (const StatWeight *w=0) const |
| return efficiency corrected by weight errors (global event weight by default) | |
| const std::pair< StatWeight *, StatWeight * > & | systematics (unsigned int n=0) const |
| return systematics by number | |
| unsigned int | systsize () const |
| return number of systematics for this sample | |
| double | totalsyst_pos () const |
| total systematics for the positive shift | |
| double | totalsyst_neg () const |
| total systematics for the negative shift | |
| 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 | |
| double | calculateGlobalWeight (cafe::Event *event) |
| calculate global 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 | |
| ostream & | print_tex_syst (ostream &os) const |
| Print systematics as a tex table. | |
| 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< StatSelection * > | _events |
| StatWeight * | _weight |
| std::vector< std::pair< StatWeight *, StatWeight * > > | _syst |
|
|
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. |
|
|
add tag required for this sample with AND logic
Definition at line 47 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 38 of file StatSample.hpp. References _tags. Referenced by cafe::Syst::Syst(). |
|
||||||||||||||||||||||||
|
apply event weight
Definition at line 63 of file StatSample.cpp. References _events, _weight, cafe::StatWeight::applyWeight(), and tagged(). |
|
|
calculate global event weight
Definition at line 87 of file StatSample.cpp. References _events, _syst, _weight, cafe::StatSelection::name(), tagged(), cafe::StatWeight::weight(), cafe::StatWeight::weight_average_neg(), cafe::StatWeight::weight_average_pos(), cafe::StatWeight::weight_neg(), and cafe::StatWeight::weight_pos(). |
|
||||||||||||
|
|
|
|
reset selection flags _selected
Definition at line 173 of file StatSample.cpp. References _events, _syst, _weight, and cafe::StatWeight::Clear(). |
|
|
return true if all selection names in both samples are equal
Definition at line 389 of file StatSample.cpp. References _events. |
|
|
return efficiency corrected by weight (global event weight by default)
Definition at line 399 of file StatSample.cpp. References _events, _weight, effGlob(), cafe::StatSelection::name(), and cafe::StatWeight::weight_average(). Referenced by HtmlTable(), and print_tex(). |
|
|
return efficiency corrected by weight errors (global event weight by default)
Definition at line 413 of file StatSample.cpp. References _weight, effErrGlob(), effGlob(), cafe::StatWeight::err(), and cafe::StatWeight::weight_average(). Referenced by HtmlTable(), and print_tex(). |
|
|
return the event selection efficiency by name
Definition at line 272 of file StatSample.cpp. |
|
|
return event selection efficiency or the average weight for a weight by number
Definition at line 256 of file StatSample.cpp. References _events, and _name. Referenced by HtmlTable(), and print_tex(). |
|
|
return event selection efficiency error by name
Definition at line 304 of file StatSample.cpp. |
|
|
return event selection efficiency error or the average weight for a weight by number
Definition at line 289 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 371 of file StatSample.cpp. |
|
|
return global event selection efficiency error (n = 0 means last selection / first one)
Definition at line 356 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 337 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 321 of file StatSample.cpp. References _events, and _name. Referenced by correctedEff(), correctedEffErr(), HtmlTable(), and print_tex(). |
|
|
return event selection by name
Definition at line 242 of file StatSample.cpp. |
|
|
return event selection by number
Definition at line 223 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 188 of file StatSample.cpp. |
|
|
return event weight by number in the selection vector
Definition at line 209 of file StatSample.cpp. References _events, and _name. Referenced by HtmlTable(), and print_tex(). |
|
|
Print sample as a html table.
Definition at line 452 of file StatSample.cpp. References correctedEff(), correctedEffErr(), eff(), effErr(), effErrGlob(), effGlob(), eventSelection(), eventWeight(), cafe::StatSelection::isWeight(), cafe::StatSelection::name(), name(), cafe::StatSelection::nevents(), nevents(), and size(). |
|
|
Definition at line 33 of file StatSample.hpp. References _name. Referenced by HtmlTable(), print_tex(), print_tex_syst(), and tex(). |
|
|
return number of events for the selection with specified name
Definition at line 160 of file StatSample.cpp. |
|
|
return number of events for the selection n
Definition at line 150 of file StatSample.cpp. References _events, and _name. Referenced by HtmlTable(), and print_tex(). |
|
||||||||||||
|
output operator
Definition at line 530 of file StatSample.cpp. References correctedEff(), correctedEffErr(), eff(), effErr(), effErrGlob(), effGlob(), eventSelection(), eventWeight(), cafe::StatSelection::isWeight(), name(), cafe::StatSelection::nevents(), nevents(), size(), and tex(). |
|
|
Print systematics as a tex table.
Definition at line 585 of file StatSample.cpp. References _syst, _weight, name(), tex(), totalsyst_neg(), totalsyst_pos(), and cafe::StatWeight::weight_average(). |
|
|
return number of selections for this sample (The initial selection always exist)
Definition at line 53 of file StatSample.hpp. References _events. Referenced by HtmlTable(), cafe::Stat::inheritWeights(), and print_tex(). |
|
|
return systematics by number
Definition at line 232 of file StatSample.cpp. |
|
|
return number of systematics for this sample
Definition at line 108 of file StatSample.hpp. References _syst. |
|
|
Definition at line 439 of file StatSample.cpp. References _tags, _tags_and, and cafe::EventBase::hasTag(). Referenced by add(), applyWeight(), and calculateGlobalWeight(). |
|
|
Definition at line 34 of file StatSample.hpp. References _tags. Referenced by cafe::Syst::Syst(). |
|
|
Definition at line 35 of file StatSample.hpp. References _tags_and. Referenced by cafe::Syst::Syst(). |
|
|
Convert string to the tex usable format.
Definition at line 624 of file StatSample.cpp. References name(). Referenced by print_tex(), and print_tex_syst(). |
|
|
total systematics for the negative shift
Definition at line 429 of file StatSample.cpp. References _syst, _weight, and cafe::StatWeight::weight_average(). Referenced by print_tex_syst(). |
|
|
total systematics for the positive shift
Definition at line 419 of file StatSample.cpp. References _syst, _weight, and cafe::StatWeight::weight_average(). Referenced by print_tex_syst(). |
|
|
Definition at line 24 of file StatSample.hpp. Referenced by add(), applyWeight(), calculateGlobalWeight(), Clear(), compareNames(), correctedEff(), eff(), effErr(), effErrGlob(), effGlob(), eventSelection(), eventWeight(), nevents(), size(), and StatSample(). |
|
|
Definition at line 21 of file StatSample.hpp. Referenced by eff(), effErr(), effErrGlob(), effGlob(), eventSelection(), eventWeight(), name(), nevents(), and systematics(). |
|
|
Definition at line 26 of file StatSample.hpp. Referenced by calculateGlobalWeight(), Clear(), print_tex_syst(), systematics(), systsize(), totalsyst_neg(), and totalsyst_pos(). |
|
|
Definition at line 22 of file StatSample.hpp. |
|
|
Definition at line 23 of file StatSample.hpp. Referenced by AddAndTags(), tagged(), and tagsAnd(). |
|
|
Definition at line 25 of file StatSample.hpp. Referenced by applyWeight(), calculateGlobalWeight(), Clear(), correctedEff(), correctedEffErr(), eventWeight(), print_tex_syst(), StatSample(), totalsyst_neg(), and totalsyst_pos(). |
1.3.4