CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Top_Fit.h
Go to the documentation of this file.
1 //
2 // $Id: Top_Fit.h,v 1.1 2011/05/26 09:46:53 mseidel Exp $
3 //
4 // File: hitfit/Top_Fit.h
5 // Purpose: Handle jet permutations.
6 // Created: Jul, 2000, sss, based on run 1 mass analysis code.
7 //
8 // CMSSW File : interface/Top_Fit.h
9 // Original Author : Scott Stuart Snyder <snyder@bnl.gov> for D0
10 // Imported to CMSSW by Haryo Sumowidagdo <Suharyo.Sumowidagdo@cern.ch>
11 //
12 
13 
37 #ifndef HITFIT_TOP_FIT_H
38 #define HITFIT_TOP_FIT_H
39 
40 
43 #include <iosfwd>
44 
45 
46 namespace hitfit {
47 
48 
49 class Lepjets_Event;
50 class Fit_Results;
51 
52 
53 //
54 // Indices for the various results lists we make in Fit_Results.
55 //
59 enum Lists
60 {
61  all_list = 0, // All events.
62  noperm_list = 1, // All jet assignments are correct.
63  semicorrect_list = 2, // Jets assigned to the correct top.
64  limited_isr_list = 3, // Top three jets are not ISR.
65  topfour_list = 4, // Top four jets are not ISR, any other jets are ISR.
66  btag_list = 5, // All tagged jets were assigned as b-jets.
67  htag_list = 6, // All tagged jets were assigned as b-jets or higgs.
68  n_lists = 7
69 };
70 
71 
72 //*************************************************************************
73 
74 
79 //
80 // Purpose: Hold on to parameters for the Top_Fit class.
81 //
82 // bool print_event_flag - If true, print the event after the fit.
83 // bool do_higgs_flag - If true, fit ttH events.
84 // double jet_mass_cut - Reject events with jet masses larger than this.
85 // double mwhad_min_cut - Reject events with hadronic W mass before
86 // fitting smaller than this.
87 // double mwhad_max_cut - Reject events with hadronic W mass before
88 // fitting larger than this.
89 // double mtdiff_max_cut - Reject events where the difference between
90 // leptonic and hadronic top masses before fitting
91 // is larger than this.
92 // int nkeep - Number of results to keep in each list.
93 // bool solve_nu_tmass - If true, use hadronic top mass to constrain
94 // the neutrino pz. Otherwise constrain the
95 // neutrino + lepton mass to W mass.
96 //
97 {
98 public:
99  // Constructor. Initialize from a Defaults object.
116  Top_Fit_Args (const Defaults& defs);
117 
118  // Retrieve parameter values.
122  bool print_event_flag () const;
123 
127  bool do_higgs_flag () const;
128 
132  double jet_mass_cut () const;
133 
137  double mwhad_min_cut () const;
138 
142  double mwhad_max_cut () const;
143 
147  double mtdiff_max_cut () const;
148 
152  int nkeep () const;
153 
157  bool solve_nu_tmass() const;
158 
159  // Arguments for subobjects.
160  const Constrained_Top_Args& constrainer_args () const;
161 
162 
163 private:
164  // Hold on to parameter values.
170 
176 
182 
188 
194 
200 
217  int _nkeep;
218 
227 
233 
234 };
235 
236 
237 //*************************************************************************
238 
244 class Top_Fit
245 //
246 // Purpose: Handle jet permutations.
247 //
248 {
249 public:
250  // Constructor.
251  // LEPW_MASS, HADW_MASS, and TOP_MASS are the masses to which
252  // those objects should be constrained. To remove a constraint,
253  // set the mass to 0.
268  Top_Fit (const Top_Fit_Args& args,
269  double lepw_mass,
270  double hadw_mass,
271  double top_mass);
272 
273  // Fit a single jet permutation. Return the results for that fit.
297  double fit_one_perm (Lepjets_Event& ev,
298  bool& nuz,
299  double& umwhad,
300  double& utmass,
301  double& mt,
302  double& sigmt,
303  Column_Vector& pullx,
304  Column_Vector& pully);
305 
306  // Fit all jet permutations in EV.
315  Fit_Results fit (const Lepjets_Event& ev);
316 
317  // Print.
318  friend std::ostream& operator<< (std::ostream& s, const Top_Fit& fitter);
319 
323  const Top_Fit_Args& args() const;
324 
325 private:
326  // The object state.
329  double _lepw_mass;
330  double _hadw_mass;
331 };
332 
333 
334 } // namespace hitfit
335 
336 
337 #endif // not HITFIT_TOP_FIT_H
bool solve_nu_tmass() const
Return the solve_nu_tmass parameter.
Definition: Top_Fit.cc:159
Hold on to parameters for the Constrained_Top class.
double _hadw_mass
Definition: Top_Fit.h:330
Top_Fit(const Top_Fit_Args &args, double lepw_mass, double hadw_mass, double top_mass)
Constructor.
Definition: Top_Fit.cc:368
Hold on to parameters for the Top_Fit class.
Definition: Top_Fit.h:78
double mwhad_min_cut() const
Return the mwhad_min_cut parameter.
Definition: Top_Fit.cc:119
double _mtdiff_max_cut
Definition: Top_Fit.h:199
Do a constrained kinematic fitting for a event.
Lists
Definition: Top_Fit.h:59
CLHEP::HepVector Column_Vector
Definition: matutil.h:67
double mwhad_max_cut() const
Return the mwhad_min_cut parameter.
Definition: Top_Fit.cc:129
Define matrix types for the HitFit package, and supply a few additional operations.
bool print_event_flag() const
Return the print_event_flag parameter.
Definition: Top_Fit.cc:89
double fit_one_perm(Lepjets_Event &ev, bool &nuz, double &umwhad, double &utmass, double &mt, double &sigmt, Column_Vector &pullx, Column_Vector &pully)
Fit for a single jet permutation.
Definition: Top_Fit.cc:393
const Top_Fit_Args _args
Definition: Top_Fit.h:327
double jet_mass_cut() const
Return the jet_mass_cut parameter.
Definition: Top_Fit.cc:109
double _mwhad_min_cut
Definition: Top_Fit.h:187
double _jet_mass_cut
Definition: Top_Fit.h:181
Represent a simple event consisting of lepton(s) and jet(s). An instance of this class holds a list o...
Definition: Lepjets_Event.h:67
const Constrained_Top_Args & constrainer_args() const
Definition: Top_Fit.cc:169
Fit_Results fit(const Lepjets_Event &ev)
Fit all jets permutations in ev. This function returns a Fit_Results object, which is not easy to ext...
Definition: Top_Fit.cc:499
double mtdiff_max_cut() const
Return the mwhad_max_cut parameter.
Definition: Top_Fit.cc:139
Top_Fit_Args(const Defaults &defs)
Constructor, initialize an instance of Top_Fit_Args from an instance of Defaults object.
Definition: Top_Fit.cc:69
friend std::ostream & operator<<(std::ostream &s, const Top_Fit &fitter)
Output stream operator, print the content of this Top_Fit object to an output stream.
Definition: Top_Fit.cc:593
Constrained_Top_Args _args
Definition: Top_Fit.h:232
Do a constrained kinematic fit of a event.
double _mwhad_max_cut
Definition: Top_Fit.h:193
const Top_Fit_Args & args() const
Return a constant reference to the fit arguments.
Definition: Top_Fit.cc:609
Constrained_Top _constrainer
Definition: Top_Fit.h:328
double _lepw_mass
Definition: Top_Fit.h:329
Define an interface for getting parameter settings.
Definition: Defaults.h:62
bool do_higgs_flag() const
Return the do_higgs_flag parameter.
Definition: Top_Fit.cc:99
int nkeep() const
Return the nkeep parameter.
Definition: Top_Fit.cc:149
Handle and fit jet permutations of an event. This is the primary interface between user&#39;s Lepjets_Eve...
Definition: Top_Fit.h:244
Holds set(s) of results from more than one kinematic fits.
Definition: Fit_Results.h:60