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
Constrained_Top.h
Do a constrained kinematic fit of a event.
hitfit::Column_Vector
CLHEP::HepVector Column_Vector
Definition: matutil.h:63
hitfit::Top_Fit::fit
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
hitfit
Definition: Base_Constrainer.h:43
hitfit::Top_Fit_Args::jet_mass_cut
double jet_mass_cut() const
Return the jet_mass_cut parameter.
Definition: Top_Fit.cc:99
hitfit::Fit_Results
Holds set(s) of results from more than one kinematic fits.
Definition: Fit_Results.h:55
hitfit::Top_Fit_Args::_mtdiff_max_cut
double _mtdiff_max_cut
Definition: Top_Fit.h:189
hitfit::btag_list
Definition: Top_Fit.h:59
hitfit::Top_Fit_Args::_mwhad_min_cut
double _mwhad_min_cut
Definition: Top_Fit.h:177
hitfit::Top_Fit::_args
const Top_Fit_Args _args
Definition: Top_Fit.h:312
hitfit::Top_Fit_Args
Hold on to parameters for the Top_Fit class.
Definition: Top_Fit.h:69
hitfit::limited_isr_list
Definition: Top_Fit.h:57
hitfit::Top_Fit::_hadw_mass
double _hadw_mass
Definition: Top_Fit.h:315
hitfit::Top_Fit_Args::mtdiff_max_cut
double mtdiff_max_cut() const
Return the mwhad_max_cut parameter.
Definition: Top_Fit.cc:126
hitfit::Top_Fit_Args::Top_Fit_Args
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
hitfit::Top_Fit::_lepw_mass
double _lepw_mass
Definition: Top_Fit.h:314
hitfit::semicorrect_list
Definition: Top_Fit.h:56
alignCSCRings.s
s
Definition: alignCSCRings.py:92
hitfit::Lists
Lists
Definition: Top_Fit.h:53
hitfit::n_lists
Definition: Top_Fit.h:61
hitfit::Lepjets_Event
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
matutil.h
Define matrix types for the HitFit package, and supply a few additional operations.
hitfit::Top_Fit_Args::_nkeep
int _nkeep
Definition: Top_Fit.h:207
hitfit::Top_Fit_Args::solve_nu_tmass
bool solve_nu_tmass() const
Return the solve_nu_tmass parameter.
Definition: Top_Fit.cc:144
hitfit::Top_Fit_Args::do_higgs_flag
bool do_higgs_flag() const
Return the do_higgs_flag parameter.
Definition: Top_Fit.cc:90
hitfit::Top_Fit_Args::nkeep
int nkeep() const
Return the nkeep parameter.
Definition: Top_Fit.cc:135
hitfit::htag_list
Definition: Top_Fit.h:60
hitfit::Top_Fit_Args::_do_higgs_flag
bool _do_higgs_flag
Definition: Top_Fit.h:165
hitfit::Top_Fit_Args::mwhad_max_cut
double mwhad_max_cut() const
Return the mwhad_min_cut parameter.
Definition: Top_Fit.cc:117
hitfit::all_list
Definition: Top_Fit.h:54
hitfit::Top_Fit_Args::_print_event_flag
bool _print_event_flag
Definition: Top_Fit.h:159
hitfit::Constrained_Top_Args
Hold on to parameters for the Constrained_Top class.
Definition: Constrained_Top.h:52
TtSemiLepEvtBuilder_cfi.sigmt
sigmt
Definition: TtSemiLepEvtBuilder_cfi.py:48
hitfit::Top_Fit::args
const Top_Fit_Args & args() const
Return a constant reference to the fit arguments.
Definition: Top_Fit.cc:563
hitfit::Top_Fit_Args::print_event_flag
bool print_event_flag() const
Return the print_event_flag parameter.
Definition: Top_Fit.cc:81
hitfit::Top_Fit_Args::_args
Constrained_Top_Args _args
Definition: Top_Fit.h:222
hitfit::Top_Fit
Handle and fit jet permutations of an event. This is the primary interface between user's Lepjets_Eve...
Definition: Top_Fit.h:232
hitfit::Top_Fit::operator<<
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
ev
bool ev
Definition: Hydjet2Hadronizer.cc:97
hitfit::topfour_list
Definition: Top_Fit.h:58
hitfit::Defaults
Define an interface for getting parameter settings.
Definition: Defaults.h:57
TtSemiLepEvtBuilder_cfi.mt
mt
Definition: TtSemiLepEvtBuilder_cfi.py:47
hitfit::Constrained_Top
Do a constrained kinematic fitting for a event.
Definition: Constrained_Top.h:120
hitfit::Top_Fit_Args::mwhad_min_cut
double mwhad_min_cut() const
Return the mwhad_min_cut parameter.
Definition: Top_Fit.cc:108
hitfit::Top_Fit_Args::_jet_mass_cut
double _jet_mass_cut
Definition: Top_Fit.h:171
hitfit::Top_Fit::fit_one_perm
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
hitfit::Top_Fit::_constrainer
Constrained_Top _constrainer
Definition: Top_Fit.h:313
hitfit::Top_Fit_Args::_solve_nu_tmass
bool _solve_nu_tmass
Definition: Top_Fit.h:216
hitfit::noperm_list
Definition: Top_Fit.h:55
hitfit::Top_Fit::Top_Fit
Top_Fit(const Top_Fit_Args &args, double lepw_mass, double hadw_mass, double top_mass)
Constructor.
Definition: Top_Fit.cc:337
hitfit::Top_Fit_Args::constrainer_args
const Constrained_Top_Args & constrainer_args() const
Definition: Top_Fit.cc:153
hitfit::Top_Fit_Args::_mwhad_max_cut
double _mwhad_max_cut
Definition: Top_Fit.h:183