18 const std::vector<reco::TrackRef>& fTracks,
21 std::vector<math::RhoEtaPhiVector> trackP3s;
22 std::map<int, double> trackvert;
26 trackP3s.reserve(fTracks.size());
27 for (
unsigned i = 0;
i < fTracks.size(); ++
i) {
35 int trackhasvert = -1;
37 std::vector<reco::TrackBaseRef>::const_iterator
rr =
find((*iv).tracks_begin(), (*iv).tracks_end(), ttr1);
38 if (
rr != (*iv).tracks_end()) {
40 trackvert[
i] = (*iv).position().z();
45 if (trackhasvert < 0) {
48 trackvert[
i] =
track->dz(ppt);
55 for (
unsigned j = 0;
j < fJets.size(); ++
j) {
61 for (
unsigned t = 0;
t < fTracks.size(); ++
t) {
62 std::map<int, double>::iterator cur = trackvert.find(
t);
63 if (cur != trackvert.end()) {
64 neweta =
jet->physicsEta((*cur).second,
jetEta);
Base class for all types of Jets.
JetTracksAssociationDRVertexAssigned(double fDr)
std::vector< Vertex > VertexCollection
collection of Vertex objects
double mDeltaR2Threshold
fidutial dR between track in the vertex and jet's reference direction
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
RhoEtaPhiVectorD RhoEtaPhiVector
spatial vector with cylindrical internal representation using pseudorapidity
ALPAKA_FN_ACC static ALPAKA_FN_INLINE float dR2(Position4 pos1, Position4 pos2)
bool setValue(Container &, const reco::JetBaseRef &, reco::TrackRefVector)
associate jet with value. Returns false and associate nothing if jet is already associated ...
XYZPointD XYZPoint
point in space with cartesian internal representation
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 reco::VertexCollection &vertices) const