Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:24:04

0001 //
0002 //
0003 
0004 #ifndef PhysicsTools_PatUtils_LeptonJetIsolationAngle_h
0005 #define PhysicsTools_PatUtils_LeptonJetIsolationAngle_h
0006 
0007 /**
0008   \class    pat::LeptonJetIsolationAngle LeptonJetIsolationAngle.h "PhysicsTools/PatUtils/interface/LeptonJetIsolationAngle.h"
0009   \brief    Calculates a lepton's jet isolation angle
0010 
0011    LeptonJetIsolationAngle calculates an isolation angle w.r.t. a list of
0012    given jets as the minimal angle to a jet in Euclidean space, as defined in
0013    CMS Note 2006/024
0014 
0015   \author   Steven Lowette
0016 */
0017 
0018 #include "FWCore/Framework/interface/Event.h"
0019 #include "FWCore/Framework/interface/ConsumesCollector.h"
0020 #include "DataFormats/Common/interface/Handle.h"
0021 #include "CLHEP/Vector/LorentzVector.h"
0022 
0023 #include "DataFormats/PatCandidates/interface/Electron.h"
0024 #include "DataFormats/PatCandidates/interface/Muon.h"
0025 #include "DataFormats/PatCandidates/interface/Jet.h"
0026 #include "PhysicsTools/PatUtils/interface/TrackerIsolationPt.h"
0027 
0028 namespace pat {
0029 
0030   class LeptonJetIsolationAngle {
0031   public:
0032     LeptonJetIsolationAngle(edm::ConsumesCollector&& iC);
0033     ~LeptonJetIsolationAngle();
0034 
0035     float calculate(const Electron& anElectron,
0036                     const edm::Handle<edm::View<reco::Track> >& trackHandle,
0037                     const edm::Event& iEvent);
0038     float calculate(const Muon& aMuon,
0039                     const edm::Handle<edm::View<reco::Track> >& trackHandle,
0040                     const edm::Event& iEvent);
0041 
0042   private:
0043     float calculate(const CLHEP::HepLorentzVector& aLepton,
0044                     const edm::Handle<edm::View<reco::Track> >& trackHandle,
0045                     const edm::Event& iEvent);
0046     float spaceAngle(const CLHEP::HepLorentzVector& aLepton, const reco::CaloJet& aJet);
0047 
0048   private:
0049     TrackerIsolationPt trkIsolator_;
0050     edm::EDGetTokenT<reco::CaloJetCollection> jetToken_;
0051     edm::EDGetTokenT<std::vector<reco::GsfElectron> > electronsToken_;
0052   };
0053 
0054 }  // namespace pat
0055 
0056 #endif