19 #define DBG_PRINT(arg)
33 produces<reco::CaloJetCollection>();
66 std::vector<CaloJetRef> tau_jets;
68 const size_t n_jets = tau_jets.size();
72 vector<TinyTrack> good_tracks;
73 for(TrackCollection::const_iterator itrk = tracksHandle->begin(); itrk != tracksHandle->end(); ++itrk)
80 trk.
phi = itrk->phi();
81 trk.
eta = itrk->eta();
82 double dz = itrk->dz(beam_spot);
84 good_tracks.push_back(trk);
86 DBG_PRINT(
cout<<
"got "<<good_tracks.size()<<
" good tracks; "<<n_jets<<
" tau jets"<<endl);
94 if (good_tracks.size())
for (
size_t i=0;
i < n_jets; ++
i)
101 size_t n0 = new_tau_jets->size();
103 for(vector<TinyTrack>::const_iterator itrk = good_tracks.begin(); itrk != good_tracks.end(); ++itrk)
105 DBG_PRINT(
cout<<
" trk pt,eta,phi,z: "<<itrk->pt<<
" "<<itrk->eta<<
" "<<itrk->phi<<
" "<<itrk->vtx.z()<<
" \t\t ");
109 float deta = new_jet_dir.eta() - itrk->eta;
111 DBG_PRINT(
cout<<
" jet pt,deta,dphi,dr: "<<jet->pt()<<
" "<<deta<<
" "<<dphi<<
" "<<
sqrt(dphi*dphi + deta*deta)<<endl);
121 new_tau_jets->push_back(new_jet);
123 DBG_PRINT(
cout<<
" nmatchedjets "<<new_tau_jets->size() - n0<<endl);
124 if (new_tau_jets->size() - n0 > 0 ) n_uniq++;
128 DBG_PRINT(
cout<<
"n_uniq_matched_jets "<<n_uniq<<endl<<
"storing njets "<<new_tau_jets->size()<<endl);
131 ev.
put(new_tau_jets);
L2TauPixelTrackMatch(const edm::ParameterSet &)
T getParameter(std::string const &) const
Jets made from CaloTowers.
virtual void produce(edm::Event &, const edm::EventSetup &)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
virtual void setVertex(const Point &vertex)
set vertex
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
edm::InputTag m_beamSpotTag
double deltaPhi(double phi1, double phi2)
XYZPointD XYZPoint
point in space with cartesian internal representation
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects