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 //
3 // File: hitfit/Top_Fit.h
4 // Purpose: Handle jet permutations.
5 // Created: Jul, 2000, sss, based on run 1 mass analysis code.
6 //
7 // CMSSW File : interface/Top_Fit.h
8 // Original Author : Scott Stuart Snyder <snyder@bnl.gov> for D0
9 // Imported to CMSSW by Haryo Sumowidagdo <Suharyo.Sumowidagdo@cern.ch>
10 //
11 
12 
36 #ifndef HITFIT_TOP_FIT_H
37 #define HITFIT_TOP_FIT_H
38 
39 
42 #include <iosfwd>
43 
44 
45 namespace hitfit {
46 
47 
48 class Lepjets_Event;
49 class Fit_Results;
50 
51 
52 //
53 // Indices for the various results lists we make in Fit_Results.
54 //
58 enum Lists
59 {
60  all_list = 0, // All events.
61  noperm_list = 1, // All jet assignments are correct.
62  semicorrect_list = 2, // Jets assigned to the correct top.
63  limited_isr_list = 3, // Top three jets are not ISR.
64  topfour_list = 4, // Top four jets are not ISR, any other jets are ISR.
65  btag_list = 5, // All tagged jets were assigned as b-jets.
66  htag_list = 6, // All tagged jets were assigned as b-jets or higgs.
67  n_lists = 7
68 };
69 
70 
71 //*************************************************************************
72 
73 
78 //
79 // Purpose: Hold on to parameters for the Top_Fit class.
80 //
81 // bool print_event_flag - If true, print the event after the fit.
82 // bool do_higgs_flag - If true, fit ttH events.
83 // double jet_mass_cut - Reject events with jet masses larger than this.
84 // double mwhad_min_cut - Reject events with hadronic W mass before
85 // fitting smaller than this.
86 // double mwhad_max_cut - Reject events with hadronic W mass before
87 // fitting larger than this.
88 // double mtdiff_max_cut - Reject events where the difference between
89 // leptonic and hadronic top masses before fitting
90 // is larger than this.
91 // int nkeep - Number of results to keep in each list.
92 // bool solve_nu_tmass - If true, use hadronic top mass to constrain
93 // the neutrino pz. Otherwise constrain the
94 // neutrino + lepton mass to W mass.
95 //
96 {
97 public:
98  // Constructor. Initialize from a Defaults object.
115  Top_Fit_Args (const Defaults& defs);
116 
117  // Retrieve parameter values.
121  bool print_event_flag () const;
122 
126  bool do_higgs_flag () const;
127 
131  double jet_mass_cut () const;
132 
136  double mwhad_min_cut () const;
137 
141  double mwhad_max_cut () const;
142 
146  double mtdiff_max_cut () const;
147 
151  int nkeep () const;
152 
156  bool solve_nu_tmass() const;
157 
158  // Arguments for subobjects.
159  const Constrained_Top_Args& constrainer_args () const;
160 
161 
162 private:
163  // Hold on to parameter values.
169 
175 
181 
187 
193 
199 
216  int _nkeep;
217 
226 
232 
233 };
234 
235 
236 //*************************************************************************
237 
243 class Top_Fit
244 //
245 // Purpose: Handle jet permutations.
246 //
247 {
248 public:
249  // Constructor.
250  // LEPW_MASS, HADW_MASS, and TOP_MASS are the masses to which
251  // those objects should be constrained. To remove a constraint,
252  // set the mass to 0.
267  Top_Fit (const Top_Fit_Args& args,
268  double lepw_mass,
269  double hadw_mass,
270  double top_mass);
271 
272  // Fit a single jet permutation. Return the results for that fit.
296  double fit_one_perm (Lepjets_Event& ev,
297  bool& nuz,
298  double& umwhad,
299  double& utmass,
300  double& mt,
301  double& sigmt,
302  Column_Vector& pullx,
303  Column_Vector& pully);
304 
305  // Fit all jet permutations in EV.
314  Fit_Results fit (const Lepjets_Event& ev);
315 
316  // Print.
317  friend std::ostream& operator<< (std::ostream& s, const Top_Fit& fitter);
318 
322  const Top_Fit_Args& args() const;
323 
324 private:
325  // The object state.
328  double _lepw_mass;
329  double _hadw_mass;
330 };
331 
332 
333 } // namespace hitfit
334 
335 
336 #endif // not HITFIT_TOP_FIT_H
bool solve_nu_tmass() const
Return the solve_nu_tmass parameter.
Definition: Top_Fit.cc:158
Hold on to parameters for the Constrained_Top class.
double _hadw_mass
Definition: Top_Fit.h:329
Top_Fit(const Top_Fit_Args &args, double lepw_mass, double hadw_mass, double top_mass)
Constructor.
Definition: Top_Fit.cc:367
Hold on to parameters for the Top_Fit class.
Definition: Top_Fit.h:77
double mwhad_min_cut() const
Return the mwhad_min_cut parameter.
Definition: Top_Fit.cc:118
double _mtdiff_max_cut
Definition: Top_Fit.h:198
Do a constrained kinematic fitting for a event.
Lists
Definition: Top_Fit.h:58
CLHEP::HepVector Column_Vector
Definition: matutil.h:66
double mwhad_max_cut() const
Return the mwhad_min_cut parameter.
Definition: Top_Fit.cc:128
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:88
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:392
const Top_Fit_Args _args
Definition: Top_Fit.h:326
double jet_mass_cut() const
Return the jet_mass_cut parameter.
Definition: Top_Fit.cc:108
double _mwhad_min_cut
Definition: Top_Fit.h:186
double _jet_mass_cut
Definition: Top_Fit.h:180
Represent a simple event consisting of lepton(s) and jet(s). An instance of this class holds a list o...
Definition: Lepjets_Event.h:66
const Constrained_Top_Args & constrainer_args() const
Definition: Top_Fit.cc:168
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:498
double mtdiff_max_cut() const
Return the mwhad_max_cut parameter.
Definition: Top_Fit.cc:138
Top_Fit_Args(const Defaults &defs)
Constructor, initialize an instance of Top_Fit_Args from an instance of Defaults object.
Definition: Top_Fit.cc:68
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:592
Constrained_Top_Args _args
Definition: Top_Fit.h:231
Do a constrained kinematic fit of a event.
double _mwhad_max_cut
Definition: Top_Fit.h:192
const Top_Fit_Args & args() const
Return a constant reference to the fit arguments.
Definition: Top_Fit.cc:608
Constrained_Top _constrainer
Definition: Top_Fit.h:327
double _lepw_mass
Definition: Top_Fit.h:328
Define an interface for getting parameter settings.
Definition: Defaults.h:61
bool do_higgs_flag() const
Return the do_higgs_flag parameter.
Definition: Top_Fit.cc:98
int nkeep() const
Return the nkeep parameter.
Definition: Top_Fit.cc:148
Handle and fit jet permutations of an event. This is the primary interface between user&#39;s Lepjets_Eve...
Definition: Top_Fit.h:243
Holds set(s) of results from more than one kinematic fits.
Definition: Fit_Results.h:59