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 
15 
16 #include "TLorentzVector.h"
17 
18 #include<vector>
19 
20 // Matching structure: helper structure to match gen/reco candidates with
21 // hlt trigger objects
22 struct MatchStruct
23 {
24  unsigned int objType;
25  float pt;
26  float eta;
27  float phi;
28  const void * thepointer;
30  objType(0),
31  pt(0),
32  eta(0),
33  phi(0),
34  thepointer(0)
35  {
36  }
37  MatchStruct(const reco::Candidate * cand, const unsigned int & obj) :
38  objType(obj),
39  pt(cand->pt()),
40  eta(cand->eta()),
41  phi(cand->phi()),
42  thepointer(cand)
43 
44  {
45  }
46  // FIXME: If finally the track is disappeared, then recover the last code...
47  MatchStruct(const reco::Track * cand, const unsigned int & obj) :
48  objType(obj),
49  pt(cand->pt()),
50  eta(cand->eta()),
51  phi(cand->phi()),
52  thepointer(cand)
53  {
54  }
56  {
57  return this->pt < match.pt;
58  }
60  {
61  return this->pt > match.pt;
62  }
63 };
64 
67 {
69  {
70  return a.pt > b.pt;
71  }
72 };
73 #endif
unsigned int objType
Definition: MatchStruct.cc:24
MatchStruct(const reco::Candidate *cand, const unsigned int &obj)
Definition: MatchStruct.cc:37
const void * thepointer
Definition: MatchStruct.cc:28
bool operator()(MatchStruct a, MatchStruct b)
Definition: MatchStruct.cc:68
bool operator>(MatchStruct match)
Definition: MatchStruct.cc:59
bool operator<(MatchStruct match)
Definition: MatchStruct.cc:55
MatchStruct(const reco::Track *cand, const unsigned int &obj)
Definition: MatchStruct.cc:47
double b
Definition: hdecay.h:120
Helper structure to order MatchStruct.
Definition: MatchStruct.cc:66
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