23 const double rBarrel = 129.;
24 const double zEndcap = 320.;
25 const double zVF = 1100.;
26 const double rEndcapMin = zEndcap *
tan(2 * atan(
exp(-3.)));
27 const double rVFMin = zEndcap *
tan(2 * atan(
exp(-5.191)));
56 if (fabs(
result.z()) < zEndcap) {
65 double zTarget = trackMomentum.
z() > 0 ? zEndcap : -zEndcap;
70 if (fabs(
result.perp()) > rEndcapMin) {
78 zTarget = trackMomentum.
z() > 0 ? zVF : -zVF;
83 if (fabs(
result.perp()) > rVFMin) {
100 const std::vector<reco::TrackRef>& fTracks,
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) {
110 goodTrack.eta = impact.
eta();
111 goodTrack.phi = impact.
barePhi();
112 impacts.push_back(goodTrack);
116 for (
unsigned j = 0;
j < fJets.size(); ++
j) {
121 for (
unsigned t = 0;
t < impacts.size(); ++
t) {
double outerPy() const
y coordinate of momentum vector at the outermost hit position
const TrackExtraRef & extra() const
reference to "extra" object
JetTracksAssociationDRCalo(double fDr)
Base class for all types of Jets.
Global3DPoint GlobalPoint
GlobalPoint globalPosition() const
Exp< T >::type exp(const T &t)
double px() const
x coordinate of momentum vector
double outerZ() const
z coordinate of the outermost hit position
double mDeltaR2Threshold
fidutial dR between track in the vertex and jet's reference direction
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
bool setValue(Container &, const reco::JetBaseRef &, reco::TrackRefVector)
associate jet with value. Returns false and associate nothing if jet is already associated ...
static PlanePointer build(Args &&...args)
Tan< T >::type tan(const T &t)
static math::XYZPoint propagateTrackToCalorimeter(const reco::Track &fTrack, const MagneticField &fField, const Propagator &fPropagator)
propagating the track to the Calorimeter
double outerX() const
x coordinate of the outermost hit position
double outerPz() const
z coordinate of momentum vector at the outermost hit position
double pz() const
z coordinate of momentum vector
double vz() const
z coordinate of the reference point on track
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
static CylinderPointer build(const PositionType &pos, const RotationType &rot, Scalar radius, Bounds *bounds=nullptr)
XYZPointD XYZPoint
point in space with cartesian internal representation
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
double vy() const
y coordinate of the reference point on track
double outerY() const
y coordinate of the outermost hit position
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
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
int charge() const
track electric charge
double phi() const final
momentum azimuthal angle
double outerPx() const
x coordinate of momentum vector at the outermost hit position
double py() const
y coordinate of momentum vector
double vx() const
x coordinate of the reference point on track
Global3DVector GlobalVector
double eta() const final
momentum pseudorapidity