00001 #ifndef RecoBTag_SoftLepton_SoftLepton_h 00002 #define RecoBTag_SoftLepton_SoftLepton_h 00003 00004 // -*- C++ -*- 00005 // 00006 // Package: SoftLepton 00007 // Class: SoftLepton 00008 // 00016 // 00017 // Original Author: fwyzard 00018 // Created: Wed Oct 18 18:02:07 CEST 2006 00019 // $Id: SoftLepton.h,v 1.4 2008/08/27 11:15:58 fwyzard Exp $ 00020 // 00021 00022 // system include files 00023 #include <memory> 00024 00025 // user include files 00026 #include "FWCore/Framework/interface/Frameworkfwd.h" 00027 #include "FWCore/Framework/interface/EDProducer.h" 00028 #include "FWCore/ParameterSet/interface/InputTag.h" 00029 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00030 #include "DataFormats/Common/interface/RefToBase.h" 00031 #include "DataFormats/Math/interface/Vector3D.h" 00032 #include "DataFormats/GeometryVector/interface/GlobalVector.h" 00033 #include "DataFormats/JetReco/interface/Jet.h" 00034 #include "DataFormats/VertexReco/interface/Vertex.h" 00035 #include "DataFormats/TrackReco/interface/TrackFwd.h" 00036 #include "DataFormats/TrackReco/interface/Track.h" 00037 #include "DataFormats/BTauReco/interface/SoftLeptonTagInfo.h" 00038 00039 class edm::EventSetup; 00040 class edm::Event; 00041 class TransientTrackBuilder; 00042 00043 class SoftLepton : public edm::EDProducer { 00044 public: 00045 explicit SoftLepton(const edm::ParameterSet& iConfig); 00046 ~SoftLepton(); 00047 00048 // generic interface, using a TrackRefVector for lepton tracks 00049 reco::SoftLeptonTagInfo tag ( 00050 const edm::RefToBase<reco::Jet> & jet, 00051 const reco::TrackRefVector & tracks, 00052 const std::vector<edm::RefToBase<reco::Track> > & leptons, 00053 const reco::Vertex & primaryVertex 00054 ) const; 00055 00056 protected: 00057 GlobalVector refineJetAxis ( 00058 const edm::RefToBase<reco::Jet> & jet, 00059 const reco::TrackRefVector & tracks, 00060 const edm::RefToBase<reco::Track> & exclude = edm::RefToBase<reco::Track>() 00061 ) const; 00062 00063 static double relativeEta( 00064 const math::XYZVector& vector, 00065 const math::XYZVector& axis 00066 ); 00067 00068 static double boostedPPar( 00069 const math::XYZVector& vector, 00070 const math::XYZVector& axis 00071 ); 00072 00073 private: 00074 virtual void beginJob(const edm::EventSetup & setup); 00075 virtual void produce(edm::Event & event, const edm::EventSetup & setup); 00076 virtual void endJob(void); 00077 00078 // configuration 00079 const edm::InputTag m_jets; 00080 const edm::InputTag m_primaryVertex; 00081 const edm::InputTag m_leptons; 00082 00083 // service used to make transient tracks from tracks 00084 const TransientTrackBuilder * m_transientTrackBuilder; 00085 00086 // algorithm configuration 00087 unsigned int m_refineJetAxis; 00088 double m_deltaRCut; 00089 double m_chi2Cut; 00090 double m_qualityCut; 00091 00092 // nominal beam spot position 00093 static const reco::Vertex s_nominalBeamSpot; 00094 }; 00095 00096 #endif // RecoBTag_SoftLepton_SoftLepton_h