CMS 3D CMS Logo

JetVetoedTracksAssociatorDRVertex.cc
Go to the documentation of this file.
1 
3 
5 
8  const std::vector<reco::TrackRef> &fTracks,
9  TrackClassifier &classifier) const {
10  // cache tracks kinematics
11  std::vector<math::RhoEtaPhiVector> trackP3s;
12  trackP3s.reserve(fTracks.size());
13  for (unsigned i = 0; i < fTracks.size(); ++i) {
14  const reco::Track *track = &*(fTracks[i]);
15  trackP3s.push_back(math::RhoEtaPhiVector(track->p(), track->eta(), track->phi()));
16  }
17  // loop on jets and associate
18  for (unsigned j = 0; j < fJets.size(); ++j) {
19  reco::TrackRefVector assoTracks;
20  const reco::Jet *jet = &*(fJets[j]);
21  double jetEta = jet->eta();
22  double jetPhi = jet->phi();
23  for (unsigned t = 0; t < fTracks.size(); ++t) {
24  double dR2 = deltaR2(jetEta, jetPhi, trackP3s[t].eta(), trackP3s[t].phi());
25  classifier.evaluate(reco::TrackBaseRef(fTracks[t]));
26  if (dR2 < mDeltaR2Threshold &&
27  (classifier.is(TrackClassifier::BWeakDecay) || classifier.is(TrackClassifier::CWeakDecay) ||
29  assoTracks.push_back(fTracks[t]);
30  }
31  reco::JetTracksAssociation::setValue(fAssociation, fJets[j], assoTracks);
32  }
33 }
JetVetoedTracksAssociationDRVertex::mDeltaR2Threshold
double mDeltaR2Threshold
fidutial dR between track in the vertex and jet's reference direction
Definition: JetVetoedTracksAssociatorDRVertex.h:25
mps_fire.i
i
Definition: mps_fire.py:428
reco::Jet
Base class for all types of Jets.
Definition: Jet.h:20
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11779
edm::RefVector< TrackCollection >
math::RhoEtaPhiVector
RhoEtaPhiVectorD RhoEtaPhiVector
spatial vector with cylindrical internal representation using pseudorapidity
Definition: Vector3D.h:33
TrackCategories::PrimaryVertex
Definition: TrackCategories.h:59
JetVetoedTracksAssociatorDRVertex.h
JetVetoedTracksAssociationDRVertex::produce
void produce(reco::JetTracksAssociation::Container *fAssociation, const std::vector< edm::RefToBase< reco::Jet >> &fJets, const std::vector< reco::TrackRef > &fTracks, TrackClassifier &classifier) const
Definition: JetVetoedTracksAssociatorDRVertex.cc:6
PVValHelper::eta
Definition: PVValidationHelpers.h:69
TrackClassifier::evaluate
const TrackClassifier & evaluate(reco::TrackBaseRef const &)
Classify the RecoTrack in categories.
Definition: TrackClassifier.cc:75
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
reco::Track
Definition: Track.h:27
TrackCategories::BWeakDecay
Definition: TrackCategories.h:23
edm::AssociationVector
Definition: AssociationVector.h:67
reco::btau::jetPhi
Definition: TaggingVariable.h:36
reco::btau::jetEta
Definition: TaggingVariable.h:34
JetVetoedTracksAssociationDRVertex::JetVetoedTracksAssociationDRVertex
JetVetoedTracksAssociationDRVertex(double fDr)
Definition: JetVetoedTracksAssociatorDRVertex.cc:4
TrackCategories::is
bool is(Category category) const
Returns track flag for a given category.
Definition: TrackCategories.h:76
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
edm::RefVector::push_back
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
Definition: RefVector.h:67
DDAxes::phi
HLTMuonOfflineAnalyzer_cfi.deltaR2
deltaR2
Definition: HLTMuonOfflineAnalyzer_cfi.py:105
metsig::jet
Definition: SignAlgoResolutions.h:47
flavorHistoryFilter_cfi.dr
dr
Definition: flavorHistoryFilter_cfi.py:37
edm::RefToBase< reco::Jet >
TrackCategories::CWeakDecay
Definition: TrackCategories.h:24
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
TrackClassifier
Get track history and classify it in function of their .
Definition: TrackClassifier.h:29
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644