CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes | Friends
hitfit::Constrained_Z Class Reference

Do a constrained kinematic fitting for a $Z\to\ell^{+}\ell^{-} + \rm{jets}$ event. More...

#include <Constrained_Z.h>

Public Member Functions

double constrain (Lepjets_Event &ev, Column_Vector &pull)
 Do a constrained fit of $Z\to\ell^{+}\ell^{-} + \rm{jets}$ event. Returns the pull quantities in pull. Returns the $\chi^{2}$, this will be negative if the fit failed to converge. More...
 
 Constrained_Z (const Constrained_Z_Args &args)
 Constructor, create an instance of the Constrained_Z object from the argument object. More...
 

Private Attributes

const Constrained_Z_Args_args
 
Fourvec_Constrainer _constrainer
 

Friends

std::ostream & operator<< (std::ostream &s, const Constrained_Z &cz)
 Output stream operator, print the content of this Constrained_Z to an output stream. More...
 

Detailed Description

Do a constrained kinematic fitting for a $Z\to\ell^{+}\ell^{-} + \rm{jets}$ event.

Definition at line 110 of file Constrained_Z.h.

Constructor & Destructor Documentation

hitfit::Constrained_Z::Constrained_Z ( const Constrained_Z_Args args)

Constructor, create an instance of the Constrained_Z object from the argument object.

Parameters
argsArgument for this instance of Constrained_Z object.

Definition at line 90 of file Constrained_Z.cc.

References _args, _constrainer, hitfit::Fourvec_Event::add(), hitfit::Fourvec_Constrainer::add_constraint(), hitfit::Lepjets_Event_Lep::eta_sigma(), ev, hitfit::Resolution::inverse(), hitfit::isr_label, hitfit::Lepjets_Event::jet(), gen::k, hitfit::Lepjets_Event::kt(), hitfit::Lepjets_Event::kt_res(), hitfit::Lepjets_Event::lep(), hitfit::lepton_label, ResonanceBuilder::mass, hitfit::Lepjets_Event::met(), hitfit::Lepjets_Event::njets(), hitfit::Lepjets_Event::nleps(), hgcalPlots::obj, hitfit::Fourvec_Event::obj(), hitfit::Lepjets_Event_Lep::p(), hitfit::FE_Obj::p, hitfit::Vector_Resolution::p_res(), hitfit::Lepjets_Event_Lep::p_sigma(), hitfit::Lepjets_Event_Lep::phi_sigma(), hitfit::Lepjets_Event_Lep::res(), hitfit::Fourvec_Event::set_kt_error(), hitfit::Fourvec_Event::set_x_p(), hitfit::Resolution::sigma(), and hitfit::Constrained_Z_Args::zmass().

97  : _args (args),
98  _constrainer (args.fourvec_constrainer_args())
99 {
100  char buf[256];
101  sprintf (buf, "(%d) = %f", lepton_label, _args.zmass());
103 }
const Constrained_Z_Args & _args
Fourvec_Constrainer _constrainer
void add_constraint(std::string s)
Specify an additional constraint s for the problem. The format for s is described in the class descri...

Member Function Documentation

double hitfit::Constrained_Z::constrain ( Lepjets_Event ev,
Column_Vector pull 
)

Do a constrained fit of $Z\to\ell^{+}\ell^{-} + \rm{jets}$ event. Returns the pull quantities in pull. Returns the $\chi^{2}$, this will be negative if the fit failed to converge.

Parameters
evThe event to be fitted (input), and the event after fitting (output).
pullPull quantities for the well-measured variables.
Input:
Output:
Return:
The $\chi^{2}$ of the fit. Return a negative value if the fit didn't converge.

Definition at line 225 of file Constrained_Z.cc.

References _constrainer, hitfit::Fourvec_Constrainer::constrain(), and funct::m.

242 {
243  Fourvec_Event fe;
244  do_import (ev, fe);
245  Column_Vector pully;
246  double m, sigm;
247  double chisq = _constrainer.constrain (fe, m, sigm, pull, pully);
248  do_export (fe, ev);
249 
250  return chisq;
251 }
CLHEP::HepVector Column_Vector
Definition: matutil.h:66
bool ev
Fourvec_Constrainer _constrainer
double constrain(Fourvec_Event &ev, double &m, double &sigm, Column_Vector &pullx, Column_Vector &pully)
Do a constrained fit for event ev. Returns the requested mass and its uncertainty in m and sigm...

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const Constrained_Z cz 
)
friend

Output stream operator, print the content of this Constrained_Z to an output stream.

Parameters
sThe output stream to which to wrire.
czThe instance of Constrained_Z to be printed.

Definition at line 261 of file Constrained_Z.cc.

272 {
273  return s << cz._constrainer;
274 }

Member Data Documentation

const Constrained_Z_Args& hitfit::Constrained_Z::_args
private

Parameter settings for the $\chi^{2}$ constrainer.

Definition at line 156 of file Constrained_Z.h.

Referenced by Vispa.Main.Application.Application::_readCommandLineAttributes(), and Constrained_Z().

Fourvec_Constrainer hitfit::Constrained_Z::_constrainer
private

The guy that actually does the work.

Definition at line 162 of file Constrained_Z.h.

Referenced by constrain(), Constrained_Z(), and hitfit::operator<<().