#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 | |
Private Attributes | |
double | mDeltaR2Threshold |
fidutial dR between track in the vertex and jet's reference direction |
Definition at line 15 of file JetTracksAssociationDRCalo.h.
JetTracksAssociationDRCalo::JetTracksAssociationDRCalo | ( | double | fDr | ) |
Definition at line 107 of file JetTracksAssociationDRCalo.cc.
: mDeltaR2Threshold (fDr*fDr) {}
JetTracksAssociationDRCalo::~JetTracksAssociationDRCalo | ( | ) | [inline] |
Definition at line 18 of file JetTracksAssociationDRCalo.h.
{}
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 111 of file JetTracksAssociationDRCalo.cc.
References PV3DBase< T, PVType, FrameType >::barePhi(), Geom::deltaR2(), eta(), reco::LeafCandidate::eta(), PV3DBase< T, PVType, FrameType >::eta(), spr::goodTrack(), getHLTprescales::index, j, metsig::jet, reco::btau::jetEta, reco::btau::jetPhi, PV3DBase< T, PVType, FrameType >::mag(), mDeltaR2Threshold, reco::LeafCandidate::phi(), phi, edm::RefVector< C, T, F >::push_back(), reco::JetExtendedAssociation::setValue(), and matplotRender::t.
{ // cache track parameters std::vector<ImpactPoint> impacts; for (unsigned t = 0; t < fTracks.size(); ++t) { GlobalPoint impact = propagateTrackToCalo (*(fTracks[t]), fField, fPropagator); if (impact.mag () > 0) { // successful extrapolation ImpactPoint goodTrack; goodTrack.index = t; goodTrack.eta = impact.eta (); goodTrack.phi = impact.barePhi(); impacts.push_back (goodTrack); } } for (unsigned j = 0; j < fJets.size(); ++j) { reco::TrackRefVector assoTracks; const reco::Jet* jet = &*(fJets[j]); double jetEta = jet->eta(); double jetPhi = jet->phi(); for (unsigned t = 0; t < impacts.size(); ++t) { double dR2 = deltaR2 (jetEta, jetPhi, impacts[t].eta, impacts[t].phi); if (dR2 < mDeltaR2Threshold) assoTracks.push_back (fTracks[impacts[t].index]); } reco::JetTracksAssociation::setValue (fAssociation, fJets[j], assoTracks); } }
math::XYZPoint JetTracksAssociationDRCalo::propagateTrackToCalorimeter | ( | const reco::Track & | fTrack, |
const MagneticField & | fField, | ||
const Propagator & | fPropagator | ||
) | [static] |
propagating the track to the Calorimeter
Definition at line 143 of file JetTracksAssociationDRCalo.cc.
References query::result, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by jptJetAnalysis::TrackPropagatorToCalo::impactPoint().
{ GlobalPoint result (propagateTrackToCalo (fTrack, fField, fPropagator)); return math::XYZPoint (result.x(), result.y(), result.z()); }
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().