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);
L2TauPixelTrackMatch(const edm::ParameterSet &)
T getParameter(std::string const &) const
double z0() const
z coordinate
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
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.
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)
double x(const double z) const
x coordinate of the beeam spot position at a given z value (it takes into account the dxdz slope) ...
XYZPointD XYZPoint
point in space with cartesian internal representation
edm::EDGetTokenT< reco::BeamSpot > m_beamSpotTag
double y(const double z) const
y coordinate of the beeam spot position at a given z value (it takes into account the dydz slope) ...
double y0() const
y coordinate
virtual void produce(edm::Event &, const edm::EventSetup &) override
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects
double x0() const
x coordinate