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 102 of file Constrained_Z.h.

Constructor & Destructor Documentation

◆ Constrained_Z()

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 78 of file Constrained_Z.cc.

85  : _args(args), _constrainer(args.fourvec_constrainer_args()) {
86  char buf[256];
87  sprintf(buf, "(%d) = %f", lepton_label, _args.zmass());
89  }

References _args, _constrainer, hitfit::Fourvec_Constrainer::add_constraint(), visDQMUpload::buf, hitfit::lepton_label, and hitfit::Constrained_Z_Args::zmass().

Member Function Documentation

◆ constrain()

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 201 of file Constrained_Z.cc.

218  {
219  Fourvec_Event fe;
220  do_import(ev, fe);
221  Column_Vector pully;
222  double m, sigm;
223  double chisq = _constrainer.constrain(fe, m, sigm, pull, pully);
224  do_export(fe, ev);
225 
226  return chisq;
227  }

References _constrainer, hitfit::Fourvec_Constrainer::constrain(), ev, and visualization-live-secondInstance_cfg::m.

Friends And Related Function Documentation

◆ operator<<

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 236 of file Constrained_Z.cc.

247  {
248  return s << cz._constrainer;
249  }

Member Data Documentation

◆ _args

const Constrained_Z_Args& hitfit::Constrained_Z::_args
private

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

Definition at line 147 of file Constrained_Z.h.

Referenced by Constrained_Z().

◆ _constrainer

Fourvec_Constrainer hitfit::Constrained_Z::_constrainer
private

The guy that actually does the work.

Definition at line 153 of file Constrained_Z.h.

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

writedatasetfile.args
args
Definition: writedatasetfile.py:18
hitfit::Constrained_Z_Args::zmass
double zmass() const
Definition: Constrained_Z.cc:59
hitfit::Column_Vector
CLHEP::HepVector Column_Vector
Definition: matutil.h:63
hitfit::Constrained_Z::_args
const Constrained_Z_Args & _args
Definition: Constrained_Z.h:147
alignCSCRings.s
s
Definition: alignCSCRings.py:92
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
hitfit::Constrained_Z::_constrainer
Fourvec_Constrainer _constrainer
Definition: Constrained_Z.h:153
hitfit::Fourvec_Constrainer::constrain
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,...
Definition: Fourvec_Constrainer.cc:1612
visDQMUpload.buf
buf
Definition: visDQMUpload.py:154
hitfit::Fourvec_Constrainer::add_constraint
void add_constraint(std::string s)
Specify an additional constraint s for the problem. The format for s is described in the class descri...
Definition: Fourvec_Constrainer.cc:183
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
hitfit::lepton_label
Definition: Lepjets_Event_Lep.h:52