CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
HLTBTagPerformanceAnalyzer.cc File Reference
#include "HLTriggerOffline/Btag/interface/HLTBTagPerformanceAnalyzer.h"

Go to the source code of this file.

Functions

template<typename T , typename V >
int closestJet (const RefToBase< reco::Jet > jet, const edm::AssociationVector< T, V > &association, double distance)
 
static const
edm::ParameterSetDescriptionFillerPluginFactory::PMaker
< edm::ParameterSetDescriptionFiller
< HLTBTagPerformanceAnalyzer > > 
s_filler__LINE__ ("HLTBTagPerformanceAnalyzer")
 
static const
edm::MakerPluginFactory::PMaker
< edm::WorkerMaker
< HLTBTagPerformanceAnalyzer > > 
s_maker__LINE__ ("HLTBTagPerformanceAnalyzer")
 

Function Documentation

template<typename T , typename V >
int closestJet ( const RefToBase< reco::Jet jet,
const edm::AssociationVector< T, V > &  association,
double  distance 
)

Definition at line 8 of file HLTBTagPerformanceAnalyzer.cc.

References ztail::d, HLT_25ns14e33_v1_cff::DeltaR, i, reco::LeafCandidate::momentum(), and edm::AssociationVector< KeyRefProd, CVal, KeyRef, SizeType, KeyReferenceHelper >::size().

Referenced by HLTBTagPerformanceAnalyzer::analyze().

8  {
9  int closest = -1;
10  for (unsigned int i = 0; i < association.size(); ++i) {
11  double d = ROOT::Math::VectorUtil::DeltaR(jet->momentum(), association[i].first->momentum());
12  if (d < distance) {
13  distance = d;
14  closest = i;
15  }
16  }
17  return closest;
18 }
int i
Definition: DBlmapReader.cc:9
virtual Vector momentum() const
spatial momentum vector
tuple d
Definition: ztail.py:151
size_type size() const
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller< HLTBTagPerformanceAnalyzer > > s_filler__LINE__ ( "HLTBTagPerformanceAnalyzer"  )
static
static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< HLTBTagPerformanceAnalyzer > > s_maker__LINE__ ( "HLTBTagPerformanceAnalyzer"  )
static