CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
JetTracksAssociationDR Class Referenceabstract

#include <JetTracksAssociationDR.h>

Public Types

typedef
reco::JetTracksAssociation::Container 
Association
 Container for jet-track associations. More...
 
typedef edm::RefToBase< reco::JetJetRef
 
typedef std::vector< JetRefJetRefs
 
typedef edm::Handle< edm::View
< reco::Jet > > 
Jets
 Handle to jet collection. More...
 
typedef
reco::TrackBase::TrackQuality 
TrackQuality
 
typedef std::vector
< reco::TrackRef
TrackRefs
 
typedef edm::Handle
< reco::TrackCollection
Tracks
 Handle to track collection. More...
 

Public Member Functions

virtual void associateTracksToJet (reco::TrackRefVector &, const reco::Jet &, const TrackRefs &)=0
 Associate tracks to the given jet. More...
 
void associateTracksToJets (Association *, const JetRefs &, const TrackRefs &)
 
 JetTracksAssociationDR (double dr_threshold)
 Constructor taking dR threshold as argument. More...
 
virtual ~JetTracksAssociationDR ()
 Destructor. More...
 

Static Public Member Functions

static void createJetRefs (JetRefs &, const Jets &)
 
static void createTrackRefs (TrackRefs &, const Tracks &, const TrackQuality &)
 

Protected Member Functions

 JetTracksAssociationDR ()
 Private default constructor. More...
 

Protected Attributes

double mDeltaR2Threshold
 Threshold used to associate tracks to jets. More...
 

Detailed Description

Definition at line 16 of file JetTracksAssociationDR.h.

Member Typedef Documentation

Container for jet-track associations.

Definition at line 31 of file JetTracksAssociationDR.h.

Definition at line 40 of file JetTracksAssociationDR.h.

Definition at line 43 of file JetTracksAssociationDR.h.

Handle to jet collection.

Definition at line 34 of file JetTracksAssociationDR.h.

Definition at line 49 of file JetTracksAssociationDR.h.

Definition at line 46 of file JetTracksAssociationDR.h.

Handle to track collection.

Definition at line 37 of file JetTracksAssociationDR.h.

Constructor & Destructor Documentation

JetTracksAssociationDR::JetTracksAssociationDR ( double  dr_threshold)
explicit

Constructor taking dR threshold as argument.

Definition at line 9 of file JetTracksAssociationDR.cc.

10  : mDeltaR2Threshold(fDr*fDr)
11 {;}
double mDeltaR2Threshold
Threshold used to associate tracks to jets.
JetTracksAssociationDR::~JetTracksAssociationDR ( )
virtual

Destructor.

Definition at line 15 of file JetTracksAssociationDR.cc.

16 {;}
JetTracksAssociationDR::JetTracksAssociationDR ( )
inlineprotected

Private default constructor.

Definition at line 75 of file JetTracksAssociationDR.h.

75 {}

Member Function Documentation

virtual void JetTracksAssociationDR::associateTracksToJet ( reco::TrackRefVector ,
const reco::Jet ,
const TrackRefs  
)
pure virtual

Associate tracks to the given jet.

Referenced by associateTracksToJets().

void JetTracksAssociationDR::associateTracksToJets ( Association fAssociation,
const JetRefs fJets,
const TrackRefs fTracks 
)

Definition at line 20 of file JetTracksAssociationDR.cc.

References associateTracksToJet(), cuy::ii, findQualityFiles::jj, and reco::JetTracksAssociation::setValue().

23 {
24  JetRefs::const_iterator ii = fJets.begin();
25  JetRefs::const_iterator jj = fJets.end();
26  for ( ; ii != jj; ++ii ) {
27  reco::TrackRefVector associated;
28  associateTracksToJet( associated, **ii, fTracks );
29  reco::JetTracksAssociation::setValue( fAssociation, *ii, associated );
30  }
31 }
int ii
Definition: cuy.py:588
virtual void associateTracksToJet(reco::TrackRefVector &, const reco::Jet &, const TrackRefs &)=0
Associate tracks to the given jet.
bool setValue(Container &, const reco::JetBaseRef &, reco::TrackRefVector)
associate jet with value. Returns false and associate nothing if jet is already associated ...
void JetTracksAssociationDR::createJetRefs ( JetRefs output,
const Jets input 
)
static

Definition at line 35 of file JetTracksAssociationDR.cc.

References cuy::ii, edm::View< T >::refAt(), and edm::View< T >::size().

36  {
37  output.clear();
38  output.reserve( input->size() );
39  for ( unsigned ii = 0; ii < input->size(); ++ii ) {
40  output.push_back( input->refAt(ii) );
41  }
42 }
int ii
Definition: cuy.py:588
static std::string const input
Definition: EdmProvDump.cc:44
void JetTracksAssociationDR::createTrackRefs ( TrackRefs output,
const Tracks input,
const TrackQuality quality 
)
static

Definition at line 46 of file JetTracksAssociationDR.cc.

References cuy::ii, HLT_FULL_cff::quality, and reco::TrackBase::undefQuality.

48  {
49 
50  if ( quality == reco::TrackBase::undefQuality ) {
51  edm::LogError("JetTracksAssociationDR")
52  << " Unknown TrackQuality value: "
53  << static_cast<int>( quality )
54  << ". See possible values in 'reco::TrackBase::TrackQuality'";
55  }
56 
57  output.clear();
58  output.reserve( input->size() );
59  for ( unsigned ii = 0; ii < input->size(); ++ii ) {
60  if ( (*input)[ii].quality( quality ) ) {
61  output.push_back( reco::TrackRef( input, ii ) );
62  }
63  }
64 
65 }
int ii
Definition: cuy.py:588
static std::string const input
Definition: EdmProvDump.cc:44

Member Data Documentation

double JetTracksAssociationDR::mDeltaR2Threshold
protected

Threshold used to associate tracks to jets.

Definition at line 78 of file JetTracksAssociationDR.h.