CMS 3D CMS Logo

Objpair.h
Go to the documentation of this file.
1 //
2 //
3 // File: hitfit/private/Objpair.h
4 // Purpose: Helper class for Pair_Table.
5 // Created: Jul, 2000, sss, based on run 1 mass analysis code.
6 //
7 // An `Objpair' consists of two object indices in a Fourvec_Event,
8 // plus a value for each constraint. This value is +1 if these two objects
9 // are used on the lhs of that constraint, -1 if they are used on the rhs
10 // of that constraint, and 0 if they are not used by that constraint.
11 //
12 // CMSSW File : interface/Objpair.h
13 // Original Author : Scott Stuart Snyder <snyder@bnl.gov> for D0
14 // Imported to CMSSW by Haryo Sumowidagdo <Suharyo.Sumowidagdo@cern.ch>
15 //
16 
38 #ifndef HITFIT_OBJPAIR_H
39 #define HITFIT_OBJPAIR_H
40 
41 #include <vector>
42 #include <iosfwd>
43 
44 namespace hitfit {
45 
58  class Objpair
59  //
60  // Purpose: Helper class for Pair_Table.
61  //
62  {
63  public:
64  // Constructor. I and J are the two object indices, and NCONSTRAINTS
65  // is the number of constraints in the problem.
75  Objpair(int i, int j, int nconstraints);
76 
77  // Set the value for constraint K (0-based) to VAL.
86 
87  // Get back the indices in this pair.
91  int i() const;
92 
96  int j() const;
97 
98  // Retrieve the value set for constraint K.
105 
106  // Print this object.
107 
108  friend std::ostream& operator<<(std::ostream& s, const Objpair& o);
109 
110  private:
111  // The object indices for this pair.
112 
116  int _i;
117 
121  int _j;
122 
123  // The list of values for each constraint.
127  std::vector<signed char> _for_constraint;
128  };
129 
130 } // namespace hitfit
131 
132 #include "TopQuarkAnalysis/TopHitFit/interface/Objpair.i"
133 
134 #endif // not HITFIT_OBJPAIR_H
hitfit
Definition: Base_Constrainer.h:43
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:42
alignCSCRings.s
s
Definition: alignCSCRings.py:92
trigger::size_type
uint16_t size_type
Definition: TriggerTypeDefs.h:18
dqmdumpme.k
k
Definition: dqmdumpme.py:60
hitfit::Objpair::Objpair
Objpair(int i, int j, int nconstraints)
Constructor.
Definition: Objpair.cc:42
hitfit::Objpair::for_constraint
int for_constraint(std::vector< signed char >::size_type k) const
Retrieve the value set for a constraint.
hitfit::Objpair::j
int j() const
Return the index of the second object.
hitfit::Objpair::_for_constraint
std::vector< signed char > _for_constraint
Definition: Objpair.h:127
hitfit::Objpair
Represent a pair of objects in Pair_Table.
Definition: Objpair.h:58
hitfit::Objpair::_j
int _j
Definition: Objpair.h:121
hitfit::Objpair::_i
int _i
Definition: Objpair.h:116
heppy_batch.val
val
Definition: heppy_batch.py:351
hitfit::Objpair::i
int i() const
Return the index of the first object.
hitfit::Objpair::has_constraint
void has_constraint(std::vector< signed char >::size_type k, int val)
Set the value for a constraint to a value.
Definition: Objpair.cc:53
hitfit::Objpair::operator<<
friend std::ostream & operator<<(std::ostream &s, const Objpair &o)
Output stream operator, print the content of this Objpair to an output stream.
Definition: Objpair.cc:74