Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #include "TopQuarkAnalysis/TopHitFit/interface/Fit_Results.h"
00015 #include "TopQuarkAnalysis/TopHitFit/interface/Fit_Result.h"
00016 #include <ostream>
00017 #include <cassert>
00018
00019
00042 using std::ostream;
00043
00044
00045 namespace hitfit {
00046
00047
00048 Fit_Results::Fit_Results (int max_len, int n_lists)
00049
00050
00051
00052
00053
00054
00055
00056 : _v (n_lists, Fit_Result_Vec (max_len))
00057 {
00058 }
00059
00060
00061 const Fit_Result_Vec& Fit_Results::operator[] (std::vector<Fit_Result_Vec>::size_type i) const
00062 {
00063 assert (i < _v.size());
00064 return _v[i];
00065 }
00066
00067
00068 void Fit_Results::push (double chisq,
00069 const Lepjets_Event& ev,
00070 const Column_Vector& pullx,
00071 const Column_Vector& pully,
00072 double umwhad,
00073 double utmass,
00074 double mt,
00075 double sigmt,
00076 const std::vector<int>& list_flags)
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096 {
00097 assert (list_flags.size() == _v.size());
00098
00099 Fit_Result* res = new Fit_Result (chisq, ev, pullx, pully,
00100 umwhad, utmass, mt, sigmt);
00101 res->incref ();
00102 for (std::vector<Fit_Result_Vec>::size_type i=0; i < _v.size(); i++) {
00103 if (list_flags[i])
00104 _v[i].push (res);
00105 }
00106 res->decref ();
00107 }
00108
00109
00118 std::ostream& operator<< (std::ostream& s, const Fit_Results& res)
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129 {
00130 for (std::vector<Fit_Result_Vec>::size_type i=0; i < res._v.size(); i++)
00131 s << "List " << i << "\n" << res._v[i];
00132 return s;
00133 }
00134
00135
00136 }