Do a constrained kinematic fitting for a event. More...
#include <Constrained_Top.h>
Public Member Functions | |
double | constrain (Lepjets_Event &ev, double &mt, double &sigmt, Column_Vector &pullx, Column_Vector &pully) |
Do a constrained fit of events. Returns the top mass and its error in mt and sigmt, and the pull quantities in pullx and pully. Returns the , this will be negative if the fit failed to converge. | |
Constrained_Top (const Constrained_Top_Args &args, double lepw_mass, double hadw_mass, double top_mass) | |
Constructor, create an instance of the Constrained_Top object from the arguments object and the mass constraints. | |
Private Attributes | |
const Constrained_Top_Args | _args |
Fourvec_Constrainer | _constrainer |
Friends | |
std::ostream & | operator<< (std::ostream &s, const Constrained_Top &ct) |
Output stream operator, print the content of this Constrained_Top object to an output stream. |
Do a constrained kinematic fitting for a event.
Definition at line 129 of file Constrained_Top.h.
hitfit::Constrained_Top::Constrained_Top | ( | const Constrained_Top_Args & | args, |
double | lepw_mass, | ||
double | hadw_mass, | ||
double | top_mass | ||
) |
Constructor, create an instance of the Constrained_Top object from the arguments object and the mass constraints.
args | Argument for this instance of Constrained_Top object. |
lepw_mass | The mass to which the leptonic W should be constrained. If this parameter is set to 0, the constraint is skied. |
hadw_mass | The mass to which the hadronic W should be constrained. If this parameter is set to 0, the constraint is skied. |
top_mass | The mass to which the top quarks should be constrained. If this parameter is set to 0, the constraints is skied. |
Definition at line 107 of file Constrained_Top.cc.
References _constrainer, hitfit::Fourvec_Constrainer::add_constraint(), hitfit::Constrained_Top_Args::equal_side(), hitfit::hadb_label, hitfit::hadw1_label, hitfit::hadw2_label, hitfit::lepb_label, hitfit::lepton_label, hitfit::Fourvec_Constrainer::mass_constraint(), and hitfit::nu_label.
: _args (args), _constrainer (args.fourvec_constrainer_args()) { char buf[256]; if (lepw_mass > 0) { sprintf (buf, "(%d %d) = %f", nu_label, lepton_label, lepw_mass); _constrainer.add_constraint (buf); } if (hadw_mass > 0) { sprintf (buf, "(%d %d) = %f", hadw1_label, hadw2_label, hadw_mass); _constrainer.add_constraint (buf); } if (args.equal_side()) { sprintf (buf, "(%d %d %d) = (%d %d %d)", nu_label, lepton_label, lepb_label, hadw1_label, hadw2_label, hadb_label); _constrainer.add_constraint (buf); } if (top_mass > 0) { sprintf (buf, "(%d %d %d) = %f", hadw1_label, hadw2_label, hadb_label, top_mass); _constrainer.add_constraint (buf); } else { sprintf (buf, "(%d %d %d) = 0", hadw1_label, hadw2_label, hadb_label); _constrainer.mass_constraint (buf); } }
double hitfit::Constrained_Top::constrain | ( | Lepjets_Event & | ev, |
double & | mt, | ||
double & | sigmt, | ||
Column_Vector & | pullx, | ||
Column_Vector & | pully | ||
) |
Do a constrained fit of events. Returns the top mass and its error in mt and sigmt, and the pull quantities in pullx and pully. Returns the , this will be negative if the fit failed to converge.
ev | The event to be fitted (input), and the event after fitting (output). |
mt | The fitted top mass. |
sigmt | The uncertainty on the fitted top mass. |
pullx | Pull quantities for the well-measured variables. |
pully | Pull quantities for the poorly-measured variables. |
Definition at line 291 of file Constrained_Top.cc.
References _args, _constrainer, hitfit::Constrained_Top_Args::bmass(), and hitfit::Fourvec_Constrainer::constrain().
Referenced by hitfit::Top_Fit::fit_one_perm().
{ Fourvec_Event fe; do_import (ev, _args.bmass (), fe); double chisq = _constrainer.constrain (fe, mt, sigmt, pullx, pully); do_export (fe, ev); return chisq; }
std::ostream& operator<< | ( | std::ostream & | s, |
const Constrained_Top & | ct | ||
) | [friend] |
Output stream operator, print the content of this Constrained_Top object to an output stream.
s | The output stream to which to write. |
ct | The instance of Constrained_Top to be printed. |
Definition at line 334 of file Constrained_Top.cc.
{ return s << ct._constrainer; }
const Constrained_Top_Args hitfit::Constrained_Top::_args [private] |
Parameter settings for the constrainer.
Definition at line 209 of file Constrained_Top.h.
Referenced by constrain().
The guy that actually does the work.
Definition at line 215 of file Constrained_Top.h.
Referenced by constrain(), Constrained_Top(), and hitfit::operator<<().