13 #define DBG_PRINT(arg) 25 produces<reco::CaloJetCollection>();
55 std::vector<CaloJetRef> tau_jets;
57 const size_t n_jets = tau_jets.size();
61 vector<TinyTrack> good_tracks;
62 for (TrackCollection::const_iterator itrk = tracksHandle->begin(); itrk != tracksHandle->end(); ++itrk) {
70 trk.
phi = itrk->phi();
71 trk.
eta = itrk->eta();
72 double dz = itrk->dz(beam_spot);
74 good_tracks.push_back(trk);
76 DBG_PRINT(
cout <<
"got " << good_tracks.size() <<
" good tracks; " << n_jets <<
" tau jets" << endl);
83 if (!good_tracks.empty())
84 for (
size_t i = 0;
i < n_jets; ++
i) {
91 size_t n0 = new_tau_jets->size();
93 for (vector<TinyTrack>::const_iterator itrk = good_tracks.begin(); itrk != good_tracks.end(); ++itrk) {
94 DBG_PRINT(
cout <<
" trk pt,eta,phi,z: " << itrk->pt <<
" " << itrk->eta <<
" " << itrk->phi <<
" " 95 << itrk->vtx.z() <<
" \t\t ");
99 float deta = new_jet_dir.eta() - itrk->eta;
101 DBG_PRINT(
cout <<
" jet pt,deta,dphi,dr: " <<
jet->pt() <<
" " << deta <<
" " << dphi <<
" " 102 <<
sqrt(dphi * dphi + deta * deta) << endl);
113 new_tau_jets->push_back(new_jet);
115 DBG_PRINT(
cout <<
" nmatchedjets " << new_tau_jets->size() -
n0 << endl);
116 if (new_tau_jets->size() -
n0 > 0)
121 DBG_PRINT(
cout <<
"n_uniq_matched_jets " << n_uniq << endl <<
"storing njets " << new_tau_jets->size() << endl);
L2TauPixelTrackMatch(const edm::ParameterSet &)
constexpr double deltaPhi(double phi1, double phi2)
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
T getParameter(std::string const &) const
Jets made from CaloTowers.
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > m_jetSrc
void setVertex(const Point &vertex) override
set vertex
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
edm::EDGetTokenT< reco::TrackCollection > m_trackSrc
~L2TauPixelTrackMatch() override
Abs< T >::type abs(const T &t)
XYZPointD XYZPoint
point in space with cartesian internal representation
edm::EDGetTokenT< reco::BeamSpot > m_beamSpotTag
void produce(edm::Event &, const edm::EventSetup &) override
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects