Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
HLTriggerOffline
Higgs
src
MatchStruct.cc
Go to the documentation of this file.
1
#ifndef HLTRIGGEROFFLINE_HIGGS_MATCHSTRUCT_CC
2
#define HLTRIGGEROFFLINE_HIGGS_MATCHSTRUCT_CC
3
13
#include "
DataFormats/Candidate/interface/Candidate.h
"
14
#include "
DataFormats/TrackReco/interface/Track.h
"
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
;
29
MatchStruct
():
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
}
55
bool
operator<
(
MatchStruct
match
)
56
{
57
return
this->
pt
< match.
pt
;
58
}
59
bool
operator>
(
MatchStruct
match
)
60
{
61
return
this->
pt
> match.
pt
;
62
}
63
};
64
66
struct
matchesByDescendingPt
67
{
68
bool
operator()
(
MatchStruct
a
,
MatchStruct
b
)
69
{
70
return
a.
pt
> b.
pt
;
71
}
72
};
73
#endif
MatchStruct::objType
unsigned int objType
Definition:
MatchStruct.cc:24
reco::Candidate
Definition:
Candidate.h:32
MatchStruct::MatchStruct
MatchStruct()
Definition:
MatchStruct.cc:29
MatchStruct::MatchStruct
MatchStruct(const reco::Candidate *cand, const unsigned int &obj)
Definition:
MatchStruct.cc:37
getGTfromDQMFile.obj
tuple obj
Definition:
getGTfromDQMFile.py:31
Candidate.h
MatchStruct::thepointer
const void * thepointer
Definition:
MatchStruct.cc:28
MatchStruct::eta
float eta
Definition:
MatchStruct.cc:26
matchesByDescendingPt::operator()
bool operator()(MatchStruct a, MatchStruct b)
Definition:
MatchStruct.cc:68
MatchStruct
Definition:
MatchStruct.cc:22
MatchStruct::operator>
bool operator>(MatchStruct match)
Definition:
MatchStruct.cc:59
MatchStruct::operator<
bool operator<(MatchStruct match)
Definition:
MatchStruct.cc:55
MatchStruct::MatchStruct
MatchStruct(const reco::Track *cand, const unsigned int &obj)
Definition:
MatchStruct.cc:47
b
double b
Definition:
hdecay.h:120
reco::Track
Definition:
Track.h:27
matchesByDescendingPt
Helper structure to order MatchStruct.
Definition:
MatchStruct.cc:66
a
double a
Definition:
hdecay.h:121
MatchStruct::phi
float phi
Definition:
MatchStruct.cc:27
match
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition:
Utils.h:6
Track.h
MatchStruct::pt
float pt
Definition:
MatchStruct.cc:25
Generated for CMSSW Reference Manual by
1.8.5