Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:31:17

0001 //
0002 //
0003 // File: hitfit/Fit_Results.h
0004 // Purpose: Hold the results from kinematic fitting.
0005 // Created: Jul, 2000, sss, based on run 1 mass analysis code.
0006 //
0007 // This is a set of lists of fit results.
0008 // Each list corresponds to some subset of jet permutations:
0009 //   all permutations, btagged permutations, etc.
0010 //
0011 // CMSSW File      : interface/Fit_Results.h
0012 // Original Author : Scott Stuart Snyder <snyder@bnl.gov> for D0
0013 // Imported to CMSSW by Haryo Sumowidagdo <Suharyo.Sumowidagdo@cern.ch>
0014 //
0015 
0016 /**
0017     @file Fit_Results.h
0018 
0019     @brief Hold set(s) of results from
0020     more than one kinematic fits.  Each set correspond to some
0021     subset of jet permutation: all permutations, btagged permutations, etc.
0022 
0023     @author Scott Stuart Snyder <snyder@bnl.gov>
0024 
0025     @par Creation date:
0026     Jul 2000.
0027 
0028     @par Modification History:
0029     Apr 2009: Haryo Sumowidagdo <Suharyo.Sumowidagdo@cern.ch>:
0030     Imported to CMSSW.<br>
0031     Nov 2009: Haryo Sumowidagdo <Suharyo.Sumowidagdo@cern.ch>:
0032     Added Doxygen tags for automatic generation of documentation.
0033 
0034     @par Terms of Usage:
0035     With consent from the original author (Scott Snyder).
0036  */
0037 
0038 #ifndef HITFIT_FIT_RESULTS_H
0039 #define HITFIT_FIT_RESULTS_H
0040 
0041 #include "TopQuarkAnalysis/TopHitFit/interface/Fit_Result_Vec.h"
0042 #include "TopQuarkAnalysis/TopHitFit/interface/matutil.h"
0043 #include <vector>
0044 #include <iosfwd>
0045 
0046 namespace hitfit {
0047 
0048   class Lepjets_Event;
0049 
0050   /**
0051     @class Fit_Results
0052 
0053     @brief Holds set(s) of results from more than one kinematic fits.
0054 */
0055   class Fit_Results
0056   //
0057   // Purpose: Hold the results from kinematic fitting.
0058   //
0059   {
0060   public:
0061     // Constructor.  Make N_LISTS lists, each of maximum length MAX_LEN.
0062     /**
0063      @brief Constructor, make <i>n_list</i> of lists, each of maximum
0064      length <i>max_len</i>.
0065 
0066      @param max_len The maximum length of each list.
0067 
0068      @param n_lists The number of lists.
0069    */
0070     Fit_Results(int max_len, int n_lists);
0071 
0072     // Return the Ith list.
0073     /**
0074      @brief Access the <i>i-</i>th list
0075 
0076      @param i The index of the list.
0077    */
0078     const Fit_Result_Vec& operator[](std::vector<Fit_Result_Vec>::size_type i) const;
0079 
0080     // Add a new result.  LIST_FLAGS tells on which lists to enter it.
0081     /**
0082      @brief Add a new fit result.
0083 
0084      @param chisq The fit \f$\chi^{2}\f$.
0085 
0086      @param ev The event kinematics.
0087 
0088      @param pullx The pull quantities for the well-measured variables.
0089 
0090      @param pully The pull quantities for the poorly-measured variables.
0091 
0092      @param umwhad The hadronic W mass before fit.
0093 
0094      @param utmass The top quark mass before the fit.
0095 
0096      @param mt The top quark mass after the fit.
0097 
0098      @param sigmt The top quark mass uncertainty after the fit.
0099 
0100      @param list_flags Vector indicating to which lists the result should
0101      be added.  This vector should have a same length as the internal
0102      object _v.
0103    */
0104     void push(double chisq,
0105               const Lepjets_Event& ev,
0106               const Column_Vector& pullx,
0107               const Column_Vector& pully,
0108               double umwhad,
0109               double utmass,
0110               double mt,
0111               double sigmt,
0112               const std::vector<int>& list_flags);
0113 
0114     // Print this object.
0115     friend std::ostream& operator<<(std::ostream& s, const Fit_Results& res);
0116 
0117   private:
0118     // The object state.
0119     std::vector<Fit_Result_Vec> _v;
0120   };
0121 
0122 }  // namespace hitfit
0123 
0124 #endif  // not HITFIT_FIT_RESULT_H