18 #define DBG_PRINT(arg)
32 produces<reco::CaloJetCollection>();
65 std::vector<CaloJetRef> tau_jets;
67 const size_t n_jets = tau_jets.size();
71 vector<TinyTrack> good_tracks;
72 for(TrackCollection::const_iterator itrk = tracksHandle->begin(); itrk != tracksHandle->end(); ++itrk)
79 trk.
phi = itrk->phi();
80 trk.
eta = itrk->eta();
81 double dz = itrk->dz(beam_spot);
83 good_tracks.push_back(trk);
85 DBG_PRINT(
cout<<
"got "<<good_tracks.size()<<
" good tracks; "<<n_jets<<
" tau jets"<<endl);
93 if (good_tracks.size())
for (
size_t i=0;
i < n_jets; ++
i)
100 size_t n0 = new_tau_jets->size();
102 for(vector<TinyTrack>::const_iterator itrk = good_tracks.begin(); itrk != good_tracks.end(); ++itrk)
104 DBG_PRINT(
cout<<
" trk pt,eta,phi,z: "<<itrk->pt<<
" "<<itrk->eta<<
" "<<itrk->phi<<
" "<<itrk->vtx.z()<<
" \t\t ");
108 float deta = new_jet_dir.eta() - itrk->eta;
110 DBG_PRINT(
cout<<
" jet pt,deta,dphi,dr: "<<jet->pt()<<
" "<<deta<<
" "<<dphi<<
" "<<
sqrt(dphi*dphi + deta*deta)<<endl);
120 new_tau_jets->push_back(new_jet);
122 DBG_PRINT(
cout<<
" nmatchedjets "<<new_tau_jets->size() - n0<<endl);
123 if (new_tau_jets->size() - n0 > 0 ) n_uniq++;
127 DBG_PRINT(
cout<<
"n_uniq_matched_jets "<<n_uniq<<endl<<
"storing njets "<<new_tau_jets->size()<<endl);
130 ev.
put(new_tau_jets);
L2TauPixelTrackMatch(const edm::ParameterSet &)
T getParameter(std::string const &) const
Jets made from CaloTowers.
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Abs< T >::type abs(const T &t)
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
virtual void produce(edm::Event &, const edm::EventSetup &) override
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects