CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
JetTracksAssociationDRCalo Class Reference

#include <JetTracksAssociationDRCalo.h>

Public Member Functions

 JetTracksAssociationDRCalo (double fDr)
 
void produce (reco::JetTracksAssociation::Container *fAssociation, const std::vector< edm::RefToBase< reco::Jet > > &fJets, const std::vector< reco::TrackRef > &fTracks, const MagneticField &fField, const Propagator &fPropagator) const
 
 ~JetTracksAssociationDRCalo ()
 

Static Public Member Functions

static math::XYZPoint propagateTrackToCalorimeter (const reco::Track &fTrack, const MagneticField &fField, const Propagator &fPropagator)
 propagating the track to the Calorimeter More...
 

Private Attributes

double mDeltaR2Threshold
 fidutial dR between track in the vertex and jet's reference direction More...
 

Detailed Description

Definition at line 14 of file JetTracksAssociationDRCalo.h.

Constructor & Destructor Documentation

◆ JetTracksAssociationDRCalo()

JetTracksAssociationDRCalo::JetTracksAssociationDRCalo ( double  fDr)

Definition at line 96 of file JetTracksAssociationDRCalo.cc.

96 : mDeltaR2Threshold(fDr * fDr) {}

◆ ~JetTracksAssociationDRCalo()

JetTracksAssociationDRCalo::~JetTracksAssociationDRCalo ( )
inline

Definition at line 17 of file JetTracksAssociationDRCalo.h.

17 {}

Member Function Documentation

◆ produce()

void JetTracksAssociationDRCalo::produce ( reco::JetTracksAssociation::Container fAssociation,
const std::vector< edm::RefToBase< reco::Jet > > &  fJets,
const std::vector< reco::TrackRef > &  fTracks,
const MagneticField fField,
const Propagator fPropagator 
) const

Definition at line 98 of file JetTracksAssociationDRCalo.cc.

102  {
103  // cache track parameters
104  std::vector<ImpactPoint> impacts;
105  for (unsigned t = 0; t < fTracks.size(); ++t) {
106  GlobalPoint impact = propagateTrackToCalo(*(fTracks[t]), fField, fPropagator);
107  if (impact.mag() > 0) { // successful extrapolation
108  ImpactPoint goodTrack;
109  goodTrack.index = t;
110  goodTrack.eta = impact.eta();
111  goodTrack.phi = impact.barePhi();
112  impacts.push_back(goodTrack);
113  }
114  }
115 
116  for (unsigned j = 0; j < fJets.size(); ++j) {
117  reco::TrackRefVector assoTracks;
118  const reco::Jet* jet = &*(fJets[j]);
119  double jetEta = jet->eta();
120  double jetPhi = jet->phi();
121  for (unsigned t = 0; t < impacts.size(); ++t) {
122  double dR2 = deltaR2(jetEta, jetPhi, impacts[t].eta, impacts[t].phi);
123  if (dR2 < mDeltaR2Threshold)
124  assoTracks.push_back(fTracks[impacts[t].index]);
125  }
126  reco::JetTracksAssociation::setValue(fAssociation, fJets[j], assoTracks);
127  }
128 }

References PV3DBase< T, PVType, FrameType >::barePhi(), HLTMuonOfflineAnalyzer_cfi::deltaR2, PVValHelper::eta, PV3DBase< T, PVType, FrameType >::eta(), spr::goodTrack(), dqmiolumiharvest::j, metsig::jet, reco::btau::jetEta, reco::btau::jetPhi, PV3DBase< T, PVType, FrameType >::mag(), mDeltaR2Threshold, phi, edm::RefVector< C, T, F >::push_back(), reco::JetTracksAssociation::setValue(), and submitPVValidationJobs::t.

◆ propagateTrackToCalorimeter()

math::XYZPoint JetTracksAssociationDRCalo::propagateTrackToCalorimeter ( const reco::Track fTrack,
const MagneticField fField,
const Propagator fPropagator 
)
static

propagating the track to the Calorimeter

Definition at line 130 of file JetTracksAssociationDRCalo.cc.

132  {
133  GlobalPoint result(propagateTrackToCalo(fTrack, fField, fPropagator));
134  return math::XYZPoint(result.x(), result.y(), result.z());
135 }

References mps_fire::result.

Member Data Documentation

◆ mDeltaR2Threshold

double JetTracksAssociationDRCalo::mDeltaR2Threshold
private

fidutial dR between track in the vertex and jet's reference direction

Definition at line 32 of file JetTracksAssociationDRCalo.h.

Referenced by produce().

reco::Jet
Base class for all types of Jets.
Definition: Jet.h:20
JetTracksAssociationDRCalo::mDeltaR2Threshold
double mDeltaR2Threshold
fidutial dR between track in the vertex and jet's reference direction
Definition: JetTracksAssociationDRCalo.h:32
spr::goodTrack
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
Definition: TrackSelection.cc:10
edm::RefVector< TrackCollection >
PVValHelper::eta
Definition: PVValidationHelpers.h:69
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
Point3DBase< float, GlobalTag >
reco::btau::jetPhi
Definition: TaggingVariable.h:36
reco::btau::jetEta
Definition: TaggingVariable.h:34
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
PV3DBase::barePhi
T barePhi() const
Definition: PV3DBase.h:65
PV3DBase::eta
T eta() const
Definition: PV3DBase.h:73
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
PV3DBase::mag
T mag() const
Definition: PV3DBase.h:64
HLTMuonOfflineAnalyzer_cfi.deltaR2
deltaR2
Definition: HLTMuonOfflineAnalyzer_cfi.py:105
metsig::jet
Definition: SignAlgoResolutions.h:47
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
mps_fire.result
result
Definition: mps_fire.py:311
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644