00001 // 00002 // $Id: Constrained_Top.h,v 1.1 2011/05/26 09:46:53 mseidel Exp $ 00003 // 00004 // File: hitfit/Constrained_Top.h 00005 // Purpose: Do kinematic fitting for a ttbar -> ljets event. 00006 // Created: Jul, 2000, sss, based on run 1 mass analysis code. 00007 // 00008 // CMSSW File : interface/Constrained_Top.h 00009 // Original Author : Scott Stuart Snyder <snyder@bnl.gov> for D0 00010 // Imported to CMSSW by Haryo Sumowidagdo <Suharyo.Sumowidagdo@cern.ch> 00011 00012 00036 #ifndef HITFIT_CONSTRAINED_TOP_H 00037 #define HITFIT_CONSTRAINED_TOP_H 00038 00039 00040 #include "TopQuarkAnalysis/TopHitFit/interface/Fourvec_Constrainer.h" 00041 #include "TopQuarkAnalysis/TopHitFit/interface/matutil.h" 00042 #include <iosfwd> 00043 00044 00045 namespace hitfit { 00046 00047 00048 class Defaults; 00049 class Lepjets_Event; 00050 00058 class Constrained_Top_Args 00059 // 00060 // Purpose: Hold on to parameters for the Constrained_Top class. 00061 // 00062 // Parameters controlling the operation of the fitter: 00063 // float bmass - The mass to which b jets should be fixed. 00064 // 00065 { 00066 public: 00067 // Constructor. Initialize from a Defaults object. 00078 Constrained_Top_Args (const Defaults& defs); 00079 00080 // Retrieve parameter values. 00084 double bmass () const; 00085 00086 // Arguments for subobjects. 00090 const Fourvec_Constrainer_Args& fourvec_constrainer_args () const; 00091 00092 // Retrieve requirement for equal mass on both sides 00096 bool equal_side() const; 00097 00098 private: 00099 // Hold on to parameter values. 00100 00104 double _bmass; 00105 00110 Fourvec_Constrainer_Args _fourvec_constrainer_args; 00111 00116 bool _equal_side; 00117 00118 }; 00119 00120 00121 //************************************************************************* 00122 00123 00129 class Constrained_Top 00130 // 00131 // Purpose: Do kinematic fitting for a ttbar -> ljets event. 00132 // 00133 { 00134 public: 00135 // Constructor. 00136 // LEPW_MASS, HADW_MASS, and TOP_MASS are the masses to which 00137 // those objects should be constrained. To remove a constraint, 00138 // set the mass to 0. 00155 Constrained_Top (const Constrained_Top_Args& args, 00156 double lepw_mass, 00157 double hadw_mass, 00158 double top_mass); 00159 00160 // Do a constrained fit. 00194 double constrain (Lepjets_Event& ev, 00195 double& mt, 00196 double& sigmt, 00197 Column_Vector& pullx, 00198 Column_Vector& pully); 00199 00200 // Dump out our state. 00201 friend std::ostream& operator<< (std::ostream& s, const Constrained_Top& ct); 00202 00203 00204 private: 00205 // Parameter settings. 00209 const Constrained_Top_Args _args; 00210 00211 // The guy that actually does the work. 00215 Fourvec_Constrainer _constrainer; 00216 }; 00217 00218 00219 } // namespace hitfit 00220 00221 00222 #endif // not HITFIT_CONSTRAINED_TOP_H