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

◆ Association

Container for jet-track associations.

Definition at line 29 of file JetTracksAssociationDR.h.

◆ JetRef

Definition at line 38 of file JetTracksAssociationDR.h.

◆ JetRefs

Definition at line 41 of file JetTracksAssociationDR.h.

◆ Jets

Handle to jet collection.

Definition at line 32 of file JetTracksAssociationDR.h.

◆ TrackQuality

Definition at line 47 of file JetTracksAssociationDR.h.

◆ TrackRefs

Definition at line 44 of file JetTracksAssociationDR.h.

◆ Tracks

Handle to track collection.

Definition at line 35 of file JetTracksAssociationDR.h.

Constructor & Destructor Documentation

◆ JetTracksAssociationDR() [1/2]

JetTracksAssociationDR::JetTracksAssociationDR ( double  dr_threshold)
explicit

Constructor taking dR threshold as argument.

Definition at line 9 of file JetTracksAssociationDR.cc.

9 : mDeltaR2Threshold(fDr * fDr) { ; }

◆ ~JetTracksAssociationDR()

JetTracksAssociationDR::~JetTracksAssociationDR ( )
virtual

Destructor.

Definition at line 13 of file JetTracksAssociationDR.cc.

13 { ; }

◆ JetTracksAssociationDR() [2/2]

JetTracksAssociationDR::JetTracksAssociationDR ( )
inlineprotected

Private default constructor.

Definition at line 65 of file JetTracksAssociationDR.h.

65 {}

Member Function Documentation

◆ associateTracksToJet()

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

Associate tracks to the given jet.

Referenced by associateTracksToJets().

◆ associateTracksToJets()

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

Definition at line 17 of file JetTracksAssociationDR.cc.

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 }

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

◆ createJetRefs()

void JetTracksAssociationDR::createJetRefs ( JetRefs output,
const Jets input 
)
static

Definition at line 31 of file JetTracksAssociationDR.cc.

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 }

References cuy::ii, input, and convertSQLitetoXML_cfg::output.

◆ createTrackRefs()

void JetTracksAssociationDR::createTrackRefs ( TrackRefs output,
const Tracks input,
const TrackQuality quality 
)
static

Definition at line 41 of file JetTracksAssociationDR.cc.

41  {
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 }

References cuy::ii, input, convertSQLitetoXML_cfg::output, quality, and reco::TrackBase::undefQuality.

Member Data Documentation

◆ mDeltaR2Threshold

double JetTracksAssociationDR::mDeltaR2Threshold
protected

Threshold used to associate tracks to jets.

Definition at line 68 of file JetTracksAssociationDR.h.

input
static const std::string input
Definition: EdmProvDump.cc:48
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
reco::TrackBase::undefQuality
Definition: TrackBase.h:151
edm::RefVector< TrackCollection >
edm::Ref< TrackCollection >
quality
const uint32_t *__restrict__ Quality * quality
Definition: CAHitNtupletGeneratorKernelsImpl.h:109
reco::JetTracksAssociation::setValue
bool setValue(Container &, const reco::JetBaseRef &, reco::TrackRefVector)
associate jet with value. Returns false and associate nothing if jet is already associated
Definition: JetTracksAssociation.cc:41
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
JetTracksAssociationDR::mDeltaR2Threshold
double mDeltaR2Threshold
Threshold used to associate tracks to jets.
Definition: JetTracksAssociationDR.h:68
findQualityFiles.jj
string jj
Definition: findQualityFiles.py:188
JetTracksAssociationDR::associateTracksToJet
virtual void associateTracksToJet(reco::TrackRefVector &, const reco::Jet &, const TrackRefs &)=0
Associate tracks to the given jet.
cuy.ii
ii
Definition: cuy.py:590