CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes

JetTracksAssociationDR Class Reference

#include <JetTracksAssociationDR.h>

List of all members.

Public Types

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

Public Member Functions

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

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.

Protected Attributes

double mDeltaR2Threshold
 Threshold used to associate tracks to jets.

Detailed Description

Definition at line 17 of file JetTracksAssociationDR.h.


Member Typedef Documentation

Container for jet-track associations.

Definition at line 32 of file JetTracksAssociationDR.h.

Definition at line 41 of file JetTracksAssociationDR.h.

Definition at line 44 of file JetTracksAssociationDR.h.

Handle to jet collection.

Definition at line 35 of file JetTracksAssociationDR.h.

Definition at line 50 of file JetTracksAssociationDR.h.

Definition at line 47 of file JetTracksAssociationDR.h.

Handle to track collection.

Definition at line 38 of file JetTracksAssociationDR.h.


Constructor & Destructor Documentation

JetTracksAssociationDR::JetTracksAssociationDR ( double  dr_threshold) [explicit]

Constructor taking dR threshold as argument.

Definition at line 10 of file JetTracksAssociationDR.cc.

  : mDeltaR2Threshold(fDr*fDr)
{;}
JetTracksAssociationDR::~JetTracksAssociationDR ( ) [virtual]

Destructor.

Definition at line 16 of file JetTracksAssociationDR.cc.

{;}
JetTracksAssociationDR::JetTracksAssociationDR ( ) [inline, protected]

Private default constructor.

Definition at line 76 of file JetTracksAssociationDR.h.

{}

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

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

{
  JetRefs::const_iterator ii = fJets.begin();
  JetRefs::const_iterator jj = fJets.end();
  for ( ; ii != jj; ++ii ) {
    reco::TrackRefVector associated;
    associateTracksToJet( associated, **ii, fTracks );
    reco::JetTracksAssociation::setValue( fAssociation, *ii, associated );
  }
}
void JetTracksAssociationDR::createJetRefs ( JetRefs output,
const Jets input 
) [static]

Definition at line 36 of file JetTracksAssociationDR.cc.

References cuy::ii.

                                                                {
  output.clear();
  output.reserve( input->size() );
  for ( unsigned ii = 0; ii < input->size(); ++ii ) { 
    output.push_back( input->refAt(ii) );
  }
}
void JetTracksAssociationDR::createTrackRefs ( TrackRefs output,
const Tracks input,
const TrackQuality quality 
) [static]

Definition at line 47 of file JetTracksAssociationDR.cc.

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

                                                                            {

  if ( quality == reco::TrackBase::undefQuality ) {
    edm::LogError("JetTracksAssociationDR")
      << " Unknown TrackQuality value: " 
      << static_cast<int>( quality )
      << ". See possible values in 'reco::TrackBase::TrackQuality'";
  }

  output.clear();
  output.reserve( input->size() );
  for ( unsigned ii = 0; ii < input->size(); ++ii ) { 
    if ( (*input)[ii].quality( quality ) ) { 
      output.push_back( reco::TrackRef( input, ii ) );
    }
  }

}

Member Data Documentation

Threshold used to associate tracks to jets.

Definition at line 79 of file JetTracksAssociationDR.h.