Main Page
Namespaces
Classes
Package Documentation
CommonTools
UtilAlgos
interface
MatchLessByDPt.h
Go to the documentation of this file.
1
#ifndef MatchLessByDPt_h_
2
#define MatchLessByDPt_h_
3
7
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
8
// #include "CommonTools/UtilAlgos/interface/DeltaR.h"
9
10
namespace
reco
{
11
template
<
typename
C1,
typename
C2>
struct
MatchLessByDPt
{
12
public
:
13
MatchLessByDPt
(
const
edm::ParameterSet
&
cfg
,
14
const
C1&
c1
,
const
C2& c2) :
15
// deltaR_(cfg),
16
c1_
(c1),
c2_
(c2) {}
17
bool
operator()
(
const
std::pair<size_t,size_t>&
p1
,
18
const
std::pair<size_t,size_t>&
p2
)
const
{
19
typedef
typename
C1::value_type
T1;
20
typedef
typename
C2::value_type
T2;
21
const
T1& p1_1 =
c1_
[p1.first];
22
const
T2& p1_2 =
c2_
[p1.second];
23
const
T1& p2_1 =
c1_
[p2.first];
24
const
T2& p2_2 =
c2_
[p2.second];
25
if
( fabs(p1_1.pt()-p1_2.pt())/p1_2.pt() <
26
fabs(p2_1.pt()-p2_2.pt())/p2_2.pt() )
return
true
;
27
return
false
;
28
}
29
private
:
30
// DeltaR deltaR_;
31
const
C1&
c1_
;
32
const
C2&
c2_
;
33
};
34
}
35
36
#endif
reco::MatchLessByDPt::operator()
bool operator()(const std::pair< size_t, size_t > &p1, const std::pair< size_t, size_t > &p2) const
Definition:
MatchLessByDPt.h:17
reco::MatchLessByDPt::c2_
const C2 & c2_
Definition:
MatchLessByDPt.h:32
ParameterSet.h
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition:
JetExtendedAssociation.h:30
p2
double p2[4]
Definition:
TauolaWrapper.h:90
looper.cfg
cfg
Definition:
looper.py:297
alignmentValidation.c1
c1
do drawing
Definition:
alignmentValidation.py:1025
reco::MatchLessByDPt::MatchLessByDPt
MatchLessByDPt(const edm::ParameterSet &cfg, const C1 &c1, const C2 &c2)
Definition:
MatchLessByDPt.h:13
reco::MatchLessByDPt::c1_
const C1 & c1_
Definition:
MatchLessByDPt.h:31
reco
fixed size matrix
Definition:
AlignmentAlgorithmBase.h:44
p1
double p1[4]
Definition:
TauolaWrapper.h:89
reco::MatchLessByDPt
Definition:
MatchLessByDPt.h:11
edm::ParameterSet
Definition:
ParameterSet.h:36
Generated for CMSSW Reference Manual by
1.8.11