CMS 3D CMS Logo

Fit_Result_Vec.h
Go to the documentation of this file.
1 //
2 //
3 // File: hitfit/Fit_Result_Vec.h
4 // Purpose: Hold a set of Fit_Result structures.
5 // Created: Jul, 2000, sss, based on run 1 mass analysis code.
6 //
7 // This class holds pointers to a set of Fit_Result's, resulting from
8 // different jet permutation with some consistent selection.
9 // The results are ordered by increasing chisq values. A maximum
10 // length for the vector may be specified; when new results are added,
11 // those with the largest chisq fall off the end.
12 //
13 // The Fit_Result objects are reference counted, in order to allow them
14 // to be entered in multiple vectors.
15 //
16 // CMSSW File : interface/Fit_Result_Vec.h
17 // Original Author : Scott Stuart Snyder <snyder@bnl.gov> for D0
18 // Imported to CMSSW by Haryo Sumowidagdo <Suharyo.Sumowidagdo@cern.ch>
19 //
20 
44 #ifndef HITFIT_FIT_RESULT_VEC_H
45 #define HITFIT_FIT_RESULT_VEC_H
46 
47 
48 #include <vector>
49 #include <iosfwd>
50 
51 
52 namespace hitfit {
53 
54 
55 class Fit_Result;
56 
57 
71 //
72 // Purpose: Hold a set of Fit_Result structures.
73 //
74 {
75 public:
76  // Constructor, destructor. The maximum length of the vector
77  // is specified here.
78 
85 
89  ~Fit_Result_Vec ();
90 
91  // Copy constructor.
96  Fit_Result_Vec (const Fit_Result_Vec& vec);
97 
98  // Assignment.
104 
105  // Get back the number of results in the vector.
110 
111  // Get back the Ith result in the vector.
118 
119  // Add a new result to the list.
125  void push (Fit_Result* res);
126 
127  // Dump out the vector.
128  friend std::ostream& operator<< (std::ostream& s,
129  const Fit_Result_Vec& resvec);
130 
131 private:
132  // The object state.
133 
137  std::vector<Fit_Result*> _v;
138 
143 };
144 
145 
146 } // namespace hitfit
147 
148 
149 #endif // not HITFIT_FIT_RESULT_H
Hold the result of one kinematic fit.
Definition: Fit_Result.h:53
Fit_Result_Vec & operator=(const Fit_Result_Vec &vec)
Assignment operator.
~Fit_Result_Vec()
Destructor.
const Fit_Result & operator[](std::vector< Fit_Result * >::size_type i) const
Return the i-th element of the Fit_Result objects in the vector.
uint16_t size_type
Definition: Electron.h:4
void push(Fit_Result *res)
Add a new Fit_Result to the list.
Fit_Result_Vec(std::vector< Fit_Result * >::size_type max_len)
Constructor.
std::vector< Fit_Result * >::size_type _max_len
std::vector< Fit_Result * > _v
Holds pointers to a set of Fit_Result objects, resulting from different jet permutation with some con...
friend std::ostream & operator<<(std::ostream &s, const Fit_Result_Vec &resvec)
Output stream operator, print the content of this Fit_Result_Vec to an output stream.
std::vector< Fit_Result * >::size_type size() const
Return the number of Fit_Result objects in the list.