CMS 3D CMS Logo

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::TrackRefTrackRefs
 
typedef edm::Handle< reco::TrackCollectionTracks
 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 29 of file JetTracksAssociationDR.h.

Definition at line 38 of file JetTracksAssociationDR.h.

Definition at line 41 of file JetTracksAssociationDR.h.

Handle to jet collection.

Definition at line 32 of file JetTracksAssociationDR.h.

Definition at line 47 of file JetTracksAssociationDR.h.

Definition at line 44 of file JetTracksAssociationDR.h.

Handle to track collection.

Definition at line 35 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.

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

Destructor.

Definition at line 13 of file JetTracksAssociationDR.cc.

13 { ; }
JetTracksAssociationDR::JetTracksAssociationDR ( )
inlineprotected

Private default constructor.

Definition at line 65 of file JetTracksAssociationDR.h.

65 {}

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 17 of file JetTracksAssociationDR.cc.

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

19  {
20  JetRefs::const_iterator ii = fJets.begin();
21  JetRefs::const_iterator jj = fJets.end();
22  for (; ii != jj; ++ii) {
23  reco::TrackRefVector associated;
24  associateTracksToJet(associated, **ii, fTracks);
25  reco::JetTracksAssociation::setValue(fAssociation, *ii, associated);
26  }
27 }
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 ...
ii
Definition: cuy.py:590
void JetTracksAssociationDR::createJetRefs ( JetRefs output,
const Jets input 
)
static

Definition at line 31 of file JetTracksAssociationDR.cc.

References cuy::ii.

31  {
32  output.clear();
33  output.reserve(input->size());
34  for (unsigned ii = 0; ii < input->size(); ++ii) {
35  output.push_back(input->refAt(ii));
36  }
37 }
static std::string const input
Definition: EdmProvDump.cc:48
ii
Definition: cuy.py:590
void JetTracksAssociationDR::createTrackRefs ( TrackRefs output,
const Tracks input,
const TrackQuality quality 
)
static

Definition at line 41 of file JetTracksAssociationDR.cc.

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

41  {
42  if (quality == reco::TrackBase::undefQuality) {
43  edm::LogError("JetTracksAssociationDR") << " Unknown TrackQuality value: " << static_cast<int>(quality)
44  << ". See possible values in 'reco::TrackBase::TrackQuality'";
45  }
46 
47  output.clear();
48  output.reserve(input->size());
49  for (unsigned ii = 0; ii < input->size(); ++ii) {
50  if ((*input)[ii].quality(quality)) {
51  output.push_back(reco::TrackRef(input, ii));
52  }
53  }
54 }
static std::string const input
Definition: EdmProvDump.cc:48
ii
Definition: cuy.py:590

Member Data Documentation

double JetTracksAssociationDR::mDeltaR2Threshold
protected

Threshold used to associate tracks to jets.

Definition at line 68 of file JetTracksAssociationDR.h.