Go to the documentation of this file.00001 #ifndef RecoBTag_SoftLepton_SoftLepton_h
00002 #define RecoBTag_SoftLepton_SoftLepton_h
00003
00004
00005
00006
00007
00008
00016
00017
00018
00019
00020
00021
00022
00023 #include <memory>
00024 #include <map>
00025
00026
00027 #include "FWCore/Framework/interface/Frameworkfwd.h"
00028 #include "FWCore/Framework/interface/EDProducer.h"
00029 #include "FWCore/Utilities/interface/InputTag.h"
00030 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00031 #include "DataFormats/Common/interface/RefToBase.h"
00032 #include "DataFormats/Math/interface/Vector3D.h"
00033 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
00034 #include "DataFormats/JetReco/interface/Jet.h"
00035 #include "DataFormats/VertexReco/interface/Vertex.h"
00036 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00037 #include "DataFormats/TrackReco/interface/Track.h"
00038 #include "DataFormats/MuonReco/interface/Muon.h"
00039 #include "DataFormats/MuonReco/interface/MuonSelectors.h"
00040 #include "DataFormats/BTauReco/interface/SoftLeptonTagInfo.h"
00041
00042 class TransientTrackBuilder;
00043
00044 class SoftLepton : public edm::EDProducer {
00045 public:
00046 explicit SoftLepton(const edm::ParameterSet& iConfig);
00047 ~SoftLepton();
00048
00049 struct TrackCompare :
00050 public std::binary_function<edm::RefToBase<reco::Track>,
00051 edm::RefToBase<reco::Track>, bool> {
00052 inline bool operator () (const edm::RefToBase<reco::Track> &t1,
00053 const edm::RefToBase<reco::Track> &t2) const
00054 { return t1.key() < t2.key();}
00055 };
00056
00057 typedef std::map<unsigned int, float> LeptonIds;
00058 typedef std::map<edm::RefToBase<reco::Track>, LeptonIds, TrackCompare> Leptons;
00059
00060
00061 reco::SoftLeptonTagInfo tag (
00062 const edm::RefToBase<reco::Jet> & jet,
00063 const reco::TrackRefVector & tracks,
00064 const Leptons & leptons,
00065 const reco::Vertex & primaryVertex
00066 ) const;
00067
00068 protected:
00069
00070
00071 GlobalVector refineJetAxis (
00072 const edm::RefToBase<reco::Jet> & jet,
00073 const reco::TrackRefVector & tracks,
00074 const edm::RefToBase<reco::Track> & exclude = edm::RefToBase<reco::Track>()
00075 ) const;
00076
00077 static double relativeEta(
00078 const math::XYZVector& vector,
00079 const math::XYZVector& axis
00080 );
00081
00082 static double boostedPPar(
00083 const math::XYZVector& vector,
00084 const math::XYZVector& axis
00085 );
00086
00087 private:
00088 virtual void produce(edm::Event & event, const edm::EventSetup & setup);
00089
00090
00091 const edm::InputTag m_jets;
00092 const edm::InputTag m_primaryVertex;
00093 const edm::InputTag m_leptons;
00094 const edm::InputTag m_leptonCands;
00095 const edm::InputTag m_leptonId;
00096
00097
00098 const TransientTrackBuilder * m_transientTrackBuilder;
00099
00100
00101 unsigned int m_refineJetAxis;
00102 double m_deltaRCut;
00103 double m_chi2Cut;
00104
00105
00106 muon::SelectionType m_muonSelection;
00107
00108
00109 static const reco::Vertex s_nominalBeamSpot;
00110 };
00111
00112 #endif // RecoBTag_SoftLepton_SoftLepton_h