CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
reco::MatchLessByDPt< C1, C2 > Struct Template Reference

#include <MatchLessByDPt.h>

Public Member Functions

 MatchLessByDPt (const edm::ParameterSet &cfg, const C1 &c1, const C2 &c2)
 
bool operator() (const std::pair< size_t, size_t > &p1, const std::pair< size_t, size_t > &p2) const
 

Private Attributes

const C1 & c1_
 
const C2 & c2_
 

Detailed Description

template<typename C1, typename C2>
struct reco::MatchLessByDPt< C1, C2 >

Definition at line 12 of file MatchLessByDPt.h.

Constructor & Destructor Documentation

◆ MatchLessByDPt()

template<typename C1 , typename C2 >
reco::MatchLessByDPt< C1, C2 >::MatchLessByDPt ( const edm::ParameterSet cfg,
const C1 &  c1,
const C2 &  c2 
)
inline

Definition at line 14 of file MatchLessByDPt.h.

15  : // deltaR_(cfg),
16  c1_(c1),
17  c2_(c2) {}

Member Function Documentation

◆ operator()()

template<typename C1 , typename C2 >
bool reco::MatchLessByDPt< C1, C2 >::operator() ( const std::pair< size_t, size_t > &  p1,
const std::pair< size_t, size_t > &  p2 
) const
inline

Definition at line 18 of file MatchLessByDPt.h.

18  {
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() < fabs(p2_1.pt() - p2_2.pt()) / p2_2.pt())
26  return true;
27  return false;
28  }

References reco::MatchLessByDPt< C1, C2 >::c1_, reco::MatchLessByDPt< C1, C2 >::c2_, p1, and p2.

Member Data Documentation

◆ c1_

template<typename C1 , typename C2 >
const C1& reco::MatchLessByDPt< C1, C2 >::c1_
private

Definition at line 32 of file MatchLessByDPt.h.

Referenced by reco::MatchLessByDPt< C1, C2 >::operator()().

◆ c2_

template<typename C1 , typename C2 >
const C2& reco::MatchLessByDPt< C1, C2 >::c2_
private

Definition at line 33 of file MatchLessByDPt.h.

Referenced by reco::MatchLessByDPt< C1, C2 >::operator()().

p2
double p2[4]
Definition: TauolaWrapper.h:90
reco::MatchLessByDPt::c2_
const C2 & c2_
Definition: MatchLessByDPt.h:33
alignmentValidation.c1
c1
do drawing
Definition: alignmentValidation.py:1025
p1
double p1[4]
Definition: TauolaWrapper.h:89
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition: JetExtendedAssociation.h:30
reco::MatchLessByDPt::c1_
const C1 & c1_
Definition: MatchLessByDPt.h:32