CMS 3D CMS Logo

JetTracksAssociationDR.cc
Go to the documentation of this file.
1 // Associate jets with tracks by simple "dR" criteria
2 // Fedor Ratnikov (UMd), Aug. 28, 2007
3 
6 
7 // -----------------------------------------------------------------------------
8 //
9 JetTracksAssociationDR::JetTracksAssociationDR(double fDr) : mDeltaR2Threshold(fDr * fDr) { ; }
10 
11 // -----------------------------------------------------------------------------
12 //
14 
15 // -----------------------------------------------------------------------------
16 //
18  const JetRefs& fJets,
19  const TrackRefs& fTracks) {
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 }
28 
29 // -----------------------------------------------------------------------------
30 //
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 }
38 
39 // -----------------------------------------------------------------------------
40 //
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 }
JetTracksAssociationDR::JetRefs
std::vector< JetRef > JetRefs
Definition: JetTracksAssociationDR.h:41
input
static const std::string input
Definition: EdmProvDump.cc:48
MessageLogger.h
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:32
reco::TrackBase::undefQuality
Definition: TrackBase.h:151
JetTracksAssociationDR::associateTracksToJets
void associateTracksToJets(Association *, const JetRefs &, const TrackRefs &)
Definition: JetTracksAssociationDR.cc:17
edm::RefVector< TrackCollection >
edm::Handle< edm::View< reco::Jet > >
edm::Ref< TrackCollection >
JetTracksAssociationDR::~JetTracksAssociationDR
virtual ~JetTracksAssociationDR()
Destructor.
Definition: JetTracksAssociationDR.cc:13
JetTracksAssociationDR::createJetRefs
static void createJetRefs(JetRefs &, const Jets &)
Definition: JetTracksAssociationDR.cc:31
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
TrackQuality
This class analyses the reconstruction quality for a given track.
Definition: TrackQuality.h:28
JetTracksAssociationDR::createTrackRefs
static void createTrackRefs(TrackRefs &, const Tracks &, const TrackQuality &)
Definition: JetTracksAssociationDR.cc:41
edm::AssociationVector
Definition: AssociationVector.h:67
JetTracksAssociationDR.h
edm::LogError
Definition: MessageLogger.h:183
qcdUeDQM_cfi.quality
quality
Definition: qcdUeDQM_cfi.py:31
findQualityFiles.jj
string jj
Definition: findQualityFiles.py:188
JetTracksAssociationDR::TrackRefs
std::vector< reco::TrackRef > TrackRefs
Definition: JetTracksAssociationDR.h:44
JetTracksAssociationDR::associateTracksToJet
virtual void associateTracksToJet(reco::TrackRefVector &, const reco::Jet &, const TrackRefs &)=0
Associate tracks to the given jet.
JetTracksAssociationDR::JetTracksAssociationDR
JetTracksAssociationDR()
Private default constructor.
Definition: JetTracksAssociationDR.h:65
cuy.ii
ii
Definition: cuy.py:590