CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MatchStruct.cc
Go to the documentation of this file.
1 #ifndef HLTRIGGEROFFLINE_HIGGS_MATCHSTRUCT_CC
2 #define HLTRIGGEROFFLINE_HIGGS_MATCHSTRUCT_CC
3 
17 
18 #include "TLorentzVector.h"
19 
20 #include<vector>
21 
22 // Matching structure: helper structure to match gen/reco candidates with
23 // hlt trigger objects
24 struct MatchStruct
25 {
26  unsigned int objType;
27  float pt;
28  float eta;
29  float phi;
30  const void * thepointer;
32  objType(0),
33  pt(0),
34  eta(0),
35  phi(0),
36  thepointer(0)
37  {
38  }
39  MatchStruct(const reco::Candidate * cand, const unsigned int & obj) :
40  objType(obj),
41  pt(cand->pt()),
42  eta(cand->eta()),
43  phi(cand->phi()),
44  thepointer(cand)
45 
46  {
47  }
48  // FIXME: If finally the track is disappeared, then recover the last code...
49  MatchStruct(const reco::Track * cand, const unsigned int & obj) :
50  objType(obj),
51  pt(cand->pt()),
52  eta(cand->eta()),
53  phi(cand->phi()),
54  thepointer(cand)
55  {
56  }
58  {
59  return this->pt < match.pt;
60  }
62  {
63  return this->pt > match.pt;
64  }
65 };
66 
69 {
71  {
72  return a.pt > b.pt;
73  }
74 };
75 #endif
unsigned int objType
Definition: MatchStruct.cc:26
MatchStruct(const reco::Candidate *cand, const unsigned int &obj)
Definition: MatchStruct.cc:39
const void * thepointer
Definition: MatchStruct.cc:30
bool operator()(MatchStruct a, MatchStruct b)
Definition: MatchStruct.cc:70
bool operator>(MatchStruct match)
Definition: MatchStruct.cc:61
bool operator<(MatchStruct match)
Definition: MatchStruct.cc:57
MatchStruct(const reco::Track *cand, const unsigned int &obj)
Definition: MatchStruct.cc:49
double b
Definition: hdecay.h:120
Helper structure to order MatchStruct.
Definition: MatchStruct.cc:68
double a
Definition: hdecay.h:121
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:6