14 #define DBG_PRINT(arg)
28 produces<reco::CaloJetCollection>();
61 std::vector<CaloJetRef> tau_jets;
63 const size_t n_jets = tau_jets.size();
67 vector<TinyTrack> good_tracks;
68 for(TrackCollection::const_iterator itrk = tracksHandle->begin(); itrk != tracksHandle->end(); ++itrk)
75 trk.
phi = itrk->phi();
76 trk.
eta = itrk->eta();
77 double dz = itrk->dz(beam_spot);
79 good_tracks.push_back(trk);
81 DBG_PRINT(
cout<<
"got "<<good_tracks.size()<<
" good tracks; "<<n_jets<<
" tau jets"<<endl);
89 if (good_tracks.size())
for (
size_t i=0;
i < n_jets; ++
i)
96 size_t n0 = new_tau_jets->size();
98 for(vector<TinyTrack>::const_iterator itrk = good_tracks.begin(); itrk != good_tracks.end(); ++itrk)
100 DBG_PRINT(
cout<<
" trk pt,eta,phi,z: "<<itrk->pt<<
" "<<itrk->eta<<
" "<<itrk->phi<<
" "<<itrk->vtx.z()<<
" \t\t ");
104 float deta = new_jet_dir.eta() - itrk->eta;
106 DBG_PRINT(
cout<<
" jet pt,deta,dphi,dr: "<<jet->pt()<<
" "<<deta<<
" "<<dphi<<
" "<<
sqrt(dphi*dphi + deta*deta)<<endl);
116 new_tau_jets->push_back(new_jet);
118 DBG_PRINT(
cout<<
" nmatchedjets "<<new_tau_jets->size() - n0<<endl);
119 if (new_tau_jets->size() - n0 > 0 ) n_uniq++;
123 DBG_PRINT(
cout<<
"n_uniq_matched_jets "<<n_uniq<<endl<<
"storing njets "<<new_tau_jets->size()<<endl);
126 ev.
put(new_tau_jets);
L2TauPixelTrackMatch(const edm::ParameterSet &)
T getParameter(std::string const &) const
Jets made from CaloTowers.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > m_jetSrc
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< reco::TrackCollection > m_trackSrc
Abs< T >::type abs(const T &t)
virtual void setVertex(const Point &vertex)
set vertex
double deltaPhi(double phi1, double phi2)
XYZPointD XYZPoint
point in space with cartesian internal representation
edm::EDGetTokenT< reco::BeamSpot > m_beamSpotTag
virtual void produce(edm::Event &, const edm::EventSetup &) override
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects