14 electronsToken_(iC.consumes<std::
vector<
reco::GsfElectron> >(edm::
InputTag(
"pixelMatchGsfElectrons"))) {}
23 CLHEP::HepLorentzVector theElectronHLV(theElectron.
px(), theElectron.
py(), theElectron.
pz(), theElectron.
energy());
24 return this->
calculate(theElectronHLV, trackHandle, iEvent);
29 CLHEP::HepLorentzVector theMuonHLV(theMuon.
px(), theMuon.
py(), theMuon.
pz(), theMuon.
energy());
30 return this->
calculate(theMuonHLV, trackHandle, iEvent);
45 std::vector<reco::GsfElectron>
electrons = *electronsHandle;
47 std::vector<Electron> isoElectrons;
48 for (
size_t ie = 0; ie < electrons.size(); ie++) {
51 isoElectrons.push_back(electrons[ie]);
55 std::vector<reco::CaloJet> theJets;
56 for (reco::CaloJetCollection::const_iterator itJet = jetColl.begin(); itJet != jetColl.end(); itJet++) {
58 for (
size_t ie = 0; ie < isoElectrons.size(); ie++) {
59 float dr2 =
::deltaR2(*itJet, isoElectrons[ie]);
65 if (itJet->et() > 15 && mindr > 0.3)
69 float isoAngle = 1000;
70 for (std::vector<reco::CaloJet>::const_iterator itJet = theJets.begin(); itJet != theJets.end(); itJet++) {
71 float curDR = this->
spaceAngle(aLepton, *itJet);
double pz() const final
z coordinate of momentum vector
Jets made from CaloTowers.
double pt() const final
transverse momentum
TrackerIsolationPt trkIsolator_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
float spaceAngle(const CLHEP::HepLorentzVector &aLepton, const reco::CaloJet &aJet)
Sin< T >::type sin(const T &t)
double theta() const final
momentum polar angle
double px() const final
x coordinate of momentum vector
Cos< T >::type cos(const T &t)
edm::EDGetTokenT< reco::CaloJetCollection > jetToken_
float calculate(const Electron &anElectron, const edm::Handle< edm::View< reco::Track > > &trackHandle, const edm::Event &iEvent)
~LeptonJetIsolationAngle()
double py() const final
y coordinate of momentum vector
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
edm::EDGetTokenT< std::vector< reco::GsfElectron > > electronsToken_
T const * product() const
Analysis-level electron class.
float calculate(const Electron &theElectron, const edm::View< reco::Track > &theTracks, float isoConeElectron=0.3) const
calculate the TrackIsoPt for the lepton object
LeptonJetIsolationAngle(edm::ConsumesCollector &&iC)
double phi() const final
momentum azimuthal angle
Analysis-level muon class.
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects
double energy() const final
energy