CMS 3D CMS Logo

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 
35 #ifndef HITFIT_TOP_FIT_H
36 #define HITFIT_TOP_FIT_H
37 
40 #include <iosfwd>
41 
42 namespace hitfit {
43 
44  class Lepjets_Event;
45  class Fit_Results;
46 
47  //
48  // Indices for the various results lists we make in Fit_Results.
49  //
53  enum Lists {
54  all_list = 0, // All events.
55  noperm_list = 1, // All jet assignments are correct.
56  semicorrect_list = 2, // Jets assigned to the correct top.
57  limited_isr_list = 3, // Top three jets are not ISR.
58  topfour_list = 4, // Top four jets are not ISR, any other jets are ISR.
59  btag_list = 5, // All tagged jets were assigned as b-jets.
60  htag_list = 6, // All tagged jets were assigned as b-jets or higgs.
61  n_lists = 7
62  };
63 
64  //*************************************************************************
65 
70  //
71  // Purpose: Hold on to parameters for the Top_Fit class.
72  //
73  // bool print_event_flag - If true, print the event after the fit.
74  // bool do_higgs_flag - If true, fit ttH events.
75  // double jet_mass_cut - Reject events with jet masses larger than this.
76  // double mwhad_min_cut - Reject events with hadronic W mass before
77  // fitting smaller than this.
78  // double mwhad_max_cut - Reject events with hadronic W mass before
79  // fitting larger than this.
80  // double mtdiff_max_cut - Reject events where the difference between
81  // leptonic and hadronic top masses before fitting
82  // is larger than this.
83  // int nkeep - Number of results to keep in each list.
84  // bool solve_nu_tmass - If true, use hadronic top mass to constrain
85  // the neutrino pz. Otherwise constrain the
86  // neutrino + lepton mass to W mass.
87  //
88  {
89  public:
90  // Constructor. Initialize from a Defaults object.
107  Top_Fit_Args(const Defaults& defs);
108 
109  // Retrieve parameter values.
113  bool print_event_flag() const;
114 
118  bool do_higgs_flag() const;
119 
123  double jet_mass_cut() const;
124 
128  double mwhad_min_cut() const;
129 
133  double mwhad_max_cut() const;
134 
138  double mtdiff_max_cut() const;
139 
143  int nkeep() const;
144 
148  bool solve_nu_tmass() const;
149 
150  // Arguments for subobjects.
151  const Constrained_Top_Args& constrainer_args() const;
152 
153  private:
154  // Hold on to parameter values.
160 
166 
172 
178 
184 
190 
207  int _nkeep;
208 
217 
223  };
224 
225  //*************************************************************************
226 
232  class Top_Fit
233  //
234  // Purpose: Handle jet permutations.
235  //
236  {
237  public:
238  // Constructor.
239  // LEPW_MASS, HADW_MASS, and TOP_MASS are the masses to which
240  // those objects should be constrained. To remove a constraint,
241  // set the mass to 0.
256  Top_Fit(const Top_Fit_Args& args, double lepw_mass, double hadw_mass, double top_mass);
257 
258  // Fit a single jet permutation. Return the results for that fit.
282  double fit_one_perm(Lepjets_Event& ev,
283  bool& nuz,
284  double& umwhad,
285  double& utmass,
286  double& mt,
287  double& sigmt,
288  Column_Vector& pullx,
289  Column_Vector& pully);
290 
291  // Fit all jet permutations in EV.
301 
302  // Print.
303  friend std::ostream& operator<<(std::ostream& s, const Top_Fit& fitter);
304 
308  const Top_Fit_Args& args() const;
309 
310  private:
311  // The object state.
314  double _lepw_mass;
315  double _hadw_mass;
316  };
317 
318 } // namespace hitfit
319 
320 #endif // not HITFIT_TOP_FIT_H
double mtdiff_max_cut() const
Return the mwhad_max_cut parameter.
Definition: Top_Fit.cc:126
Hold on to parameters for the Constrained_Top class.
bool do_higgs_flag() const
Return the do_higgs_flag parameter.
Definition: Top_Fit.cc:90
double _hadw_mass
Definition: Top_Fit.h:315
Top_Fit(const Top_Fit_Args &args, double lepw_mass, double hadw_mass, double top_mass)
Constructor.
Definition: Top_Fit.cc:337
Hold on to parameters for the Top_Fit class.
Definition: Top_Fit.h:69
double _mtdiff_max_cut
Definition: Top_Fit.h:189
Do a constrained kinematic fitting for a event.
Lists
Definition: Top_Fit.h:53
CLHEP::HepVector Column_Vector
Definition: matutil.h:63
Define matrix types for the HitFit package, and supply a few additional operations.
bool solve_nu_tmass() const
Return the solve_nu_tmass parameter.
Definition: Top_Fit.cc:144
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:355
const Top_Fit_Args _args
Definition: Top_Fit.h:312
double mwhad_max_cut() const
Return the mwhad_min_cut parameter.
Definition: Top_Fit.cc:117
const Constrained_Top_Args & constrainer_args() const
Definition: Top_Fit.cc:153
double _mwhad_min_cut
Definition: Top_Fit.h:177
double _jet_mass_cut
Definition: Top_Fit.h:171
Represent a simple event consisting of lepton(s) and jet(s). An instance of this class holds a list o...
Definition: Lepjets_Event.h:62
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:456
Top_Fit_Args(const Defaults &defs)
Constructor, initialize an instance of Top_Fit_Args from an instance of Defaults object.
Definition: Top_Fit.cc:64
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:548
Constrained_Top_Args _args
Definition: Top_Fit.h:222
Do a constrained kinematic fit of a event.
double _mwhad_max_cut
Definition: Top_Fit.h:183
Constrained_Top _constrainer
Definition: Top_Fit.h:313
double _lepw_mass
Definition: Top_Fit.h:314
const Top_Fit_Args & args() const
Return a constant reference to the fit arguments.
Definition: Top_Fit.cc:563
Define an interface for getting parameter settings.
Definition: Defaults.h:57
double jet_mass_cut() const
Return the jet_mass_cut parameter.
Definition: Top_Fit.cc:99
int nkeep() const
Return the nkeep parameter.
Definition: Top_Fit.cc:135
Handle and fit jet permutations of an event. This is the primary interface between user&#39;s Lepjets_Eve...
Definition: Top_Fit.h:232
double mwhad_min_cut() const
Return the mwhad_min_cut parameter.
Definition: Top_Fit.cc:108
Holds set(s) of results from more than one kinematic fits.
Definition: Fit_Results.h:55
bool print_event_flag() const
Return the print_event_flag parameter.
Definition: Top_Fit.cc:81