Represent an event for kinematic fitting as a collection of four-momenta. Each object is represented as an instance of FE_Obj. There may be an object for a neutrino. If that is the case, it is always at the end of the object list. It is not included in the count returned by nobjs(). But is is included in nobjs_all(). More...
#include <Fourvec_Event.h>
Public Member Functions | |
void | add (const FE_Obj &obj) |
Add an object to the event. The object should not be a neutrino, use the method set_nu_p for that. More... | |
Fourvec_Event () | |
Default constructor. More... | |
bool | has_neutrino () const |
Return TRUE is this event contains a neutrino, otherwise returns FALSE. More... | |
const Fourvec & | kt () const |
Access the four-momentum. More... | |
double | kt_x_error () const |
Return the x uncertainty in . More... | |
double | kt_xy_covar () const |
Return the xy covariance in . More... | |
double | kt_y_error () const |
Return the y uncertainty in . More... | |
int | nobjs () const |
Return the number of objects in the event not including any neutrinos. More... | |
int | nobjs_all () const |
Return the number of objects in the event including any neutrinos. More... | |
const Fourvec & | nu () const |
Access the neutrino four-momentum. More... | |
const FE_Obj & | obj (std::vector< FE_Obj >::size_type i) const |
Access object at index i, with the convention that the index starts at 0. More... | |
void | set_kt_error (double kt_x_error, double kt_y_error, double kt_xy_covar) |
Set the uncertainties on . More... | |
void | set_nu_p (const Fourvec &p) |
Set the neutrino four-momentum to . This method adds a neutrino if there wasn't already one. More... | |
void | set_obj_p (std::vector< FE_Obj >::size_type i, const Fourvec &p) |
Set the four-momentum of object at index i to . More... | |
void | set_x_p (const Fourvec &p) |
Set the four-momentum of the object. More... | |
const Fourvec & | x () const |
Access the four-momentum. More... | |
Private Attributes | |
bool | _has_neutrino |
Fourvec | _kt |
double | _kt_x_error |
double | _kt_xy_covar |
double | _kt_y_error |
std::vector< FE_Obj > | _objs |
Fourvec | _x |
Friends | |
std::ostream & | operator<< (std::ostream &s, const Fourvec_Event &fe) |
Output stream operator, print the content of this Fourvec_Event object to an output stream. More... | |
Represent an event for kinematic fitting as a collection of four-momenta. Each object is represented as an instance of FE_Obj. There may be an object for a neutrino. If that is the case, it is always at the end of the object list. It is not included in the count returned by nobjs(). But is is included in nobjs_all().
We can also record the other momentum, that will be added into the sum. This can be used to store a missing transverse energy that is not attributed to a neutrino but is instead due to mismeasurement. Typically this will be set to zero in events that have a neutrino, and to the measured missing transverse energy in events that do not.
Definition at line 201 of file Fourvec_Event.h.
hitfit::Fourvec_Event::Fourvec_Event | ( | ) |
void hitfit::Fourvec_Event::add | ( | const FE_Obj & | obj | ) |
Add an object to the event. The object should not be a neutrino, use the method set_nu_p for that.
obj | The FE_Obj to add. |
Definition at line 267 of file Fourvec_Event.cc.
References _has_neutrino, _kt, _objs, hitfit::FE_Obj::label, hitfit::nu_label, obj(), and hitfit::FE_Obj::p.
Referenced by counter.Counter::register().
bool hitfit::Fourvec_Event::has_neutrino | ( | ) | const |
Return TRUE is this event contains a neutrino, otherwise returns FALSE.
Definition at line 123 of file Fourvec_Event.cc.
References _has_neutrino.
Referenced by hitfit::Fourvec_Constrainer::constrain(), and hitfit::Fourvec_Constraint_Calculator::eval().
const Fourvec & hitfit::Fourvec_Event::kt | ( | ) | const |
double hitfit::Fourvec_Event::kt_x_error | ( | ) | const |
Return the x uncertainty in .
Definition at line 201 of file Fourvec_Event.cc.
References _kt_x_error.
Referenced by set_kt_error().
double hitfit::Fourvec_Event::kt_xy_covar | ( | ) | const |
Return the xy covariance in .
Definition at line 225 of file Fourvec_Event.cc.
References _kt_xy_covar.
Referenced by set_kt_error().
double hitfit::Fourvec_Event::kt_y_error | ( | ) | const |
Return the y uncertainty in .
Definition at line 213 of file Fourvec_Event.cc.
References _kt_y_error.
Referenced by set_kt_error().
int hitfit::Fourvec_Event::nobjs | ( | ) | const |
Return the number of objects in the event not including any neutrinos.
Definition at line 135 of file Fourvec_Event.cc.
References _has_neutrino, and _objs.
Referenced by hitfit::Fourvec_Constrainer::constrain(), and hitfit::Fourvec_Constraint_Calculator::eval().
int hitfit::Fourvec_Event::nobjs_all | ( | ) | const |
Return the number of objects in the event including any neutrinos.
Definition at line 148 of file Fourvec_Event.cc.
References _objs.
Referenced by hitfit::Pair_Table::Pair_Table().
const Fourvec & hitfit::Fourvec_Event::nu | ( | ) | const |
Access the neutrino four-momentum.
Definition at line 173 of file Fourvec_Event.cc.
References _has_neutrino, and _objs.
Access object at index i, with the convention that the index starts at 0.
i | The index of the desired object. |
Definition at line 160 of file Fourvec_Event.cc.
References i.
Referenced by add(), and hitfit::Pair_Table::Pair_Table().
void hitfit::Fourvec_Event::set_kt_error | ( | double | kt_x_error, |
double | kt_y_error, | ||
double | kt_xy_covar | ||
) |
Set the uncertainties on .
kt_x_error | The uncertainty in the component of . |
kt_y_error | The uncertainty in the component of . |
kt_xy_covar | The covariance between the and component of . |
Definition at line 343 of file Fourvec_Event.cc.
References _kt_x_error, _kt_xy_covar, _kt_y_error, kt_x_error(), kt_xy_covar(), and kt_y_error().
void hitfit::Fourvec_Event::set_nu_p | ( | const Fourvec & | p | ) |
Set the neutrino four-momentum to . This method adds a neutrino if there wasn't already one.
p | The new four-momentum of the neutrino. |
Definition at line 291 of file Fourvec_Event.cc.
References _has_neutrino, _kt, _objs, hitfit::nu_label, and AlCaHLTBitMon_ParallelJobs::p.
Set the four-momentum of object at index i to .
i | The position index of the object to change. |
p | The new four-momentum of object at index i. |
Definition at line 313 of file Fourvec_Event.cc.
References _kt, _objs, i, and AlCaHLTBitMon_ParallelJobs::p.
void hitfit::Fourvec_Event::set_x_p | ( | const Fourvec & | p | ) |
Set the four-momentum of the object.
p | The new four-momentum of the object. |
Definition at line 329 of file Fourvec_Event.cc.
References _kt, _x, and AlCaHLTBitMon_ParallelJobs::p.
const Fourvec & hitfit::Fourvec_Event::x | ( | ) | const |
Access the four-momentum.
Definition at line 192 of file Fourvec_Event.cc.
References _x.
Referenced by svgfig.Curve.Sample::__repr__(), svgfig.Ellipse::__repr__(), Vispa.Gui.WidgetContainer.WidgetContainer::autosize(), Vispa.Gui.VispaWidget.VispaWidget::boundingRect(), geometryXMLparser.Alignable::pos(), and Vispa.Gui.ConnectableWidget.ConnectableWidget::positionizeMenuWidget().
|
friend |
Output stream operator, print the content of this Fourvec_Event object to an output stream.
s | The stream to which to write. |
fe | The instance of Fourvec_Event to be printed. |
Definition at line 245 of file Fourvec_Event.cc.
|
private |
Flag that a neutrino has been added to the event.
Definition at line 384 of file Fourvec_Event.h.
Referenced by add(), has_neutrino(), nobjs(), nu(), and set_nu_p().
|
private |
Cached , this should always be equal to the sum of all the object momenta, including .
Definition at line 357 of file Fourvec_Event.h.
Referenced by add(), kt(), hitfit::operator<<(), set_nu_p(), set_obj_p(), and set_x_p().
|
private |
The uncertainty in the component of .
Definition at line 368 of file Fourvec_Event.h.
Referenced by kt_x_error(), hitfit::operator<<(), and set_kt_error().
|
private |
The covariance between the and component of .
Definition at line 378 of file Fourvec_Event.h.
Referenced by kt_xy_covar(), hitfit::operator<<(), and set_kt_error().
|
private |
The uncertainty in the component of .
Definition at line 372 of file Fourvec_Event.h.
Referenced by kt_y_error(), hitfit::operator<<(), and set_kt_error().
|
private |
The list of contained objects in the event.
Definition at line 349 of file Fourvec_Event.h.
Referenced by add(), nobjs(), nobjs_all(), nu(), hitfit::operator<<(), set_nu_p(), and set_obj_p().
|
private |
Four-momentum of the object.
Definition at line 363 of file Fourvec_Event.h.
Referenced by hitfit::operator<<(), set_x_p(), and x().