2 #include <Math/VectorUtil.h> 29 for(reco::TrackCollection::const_iterator
30 recTrack = recCollection->begin(); recTrack!= recCollection->end(); recTrack++)
33 if(!goodtrack)
continue;
35 double pt = recTrack->pt();
37 if(dR2 >= (0.01 * x*x))
39 if(dR2 < innerDR*innerDR)
42 TotalPt = TotalPt +
pt;
50 double SClusterEta = cluster.
eta();
55 for(reco::TrackCollection::const_iterator
56 recTrack = recCollection->begin(); recTrack!= recCollection->end(); recTrack++)
59 if(!goodtrack)
continue;
61 double pt = recTrack->pt();
62 double eta2 = recTrack->eta();
63 double dEta = fabs(eta2-SClusterEta);
67 if(dR2 < innerDR*innerDR)
71 TotalPt = TotalPt +
pt;
74 double Tx = getTrackIso(cluster,x,threshold,innerDR);
75 double CTx = (Tx - TotalPt / 40.0 * x)*(1/(1-x/40.));
virtual double eta() const final
momentum pseudorapidity
double getBkgSubTrackIso(const reco::Photon clus, const double i, const double threshold, const double innerDR=0)
Return the background-subtracted tracker energy in a cone around the photon.
static TrackQuality qualityByName(const std::string &name)
T1 deltaR2(T1 eta1, T2 phi1, T3 eta2, T4 phi2)
TrackIsoCalculator(const edm::Event &iEvent, const edm::EventSetup &iSetup, const edm::Handle< reco::TrackCollection > trackLabel, const std::string trackQuality_)
double getTrackIso(const reco::Photon clus, const double i, const double threshold, const double innerDR=0)
Return the tracker energy in a cone around the photon.