29 maxDxy_(c.getParameter<double>(
"maxDxy"))
33 if ( trackTypeName ==
"muonBestTrack" ) trackType_ =
MUONBESTTRACK;
34 else if ( trackTypeName ==
"innerTrack" ) trackType_ =
INNERTRACK;
37 edm::LogError(
"MuonDxyCut") <<
"Wrong cut id name, " << trackTypeName
38 <<
"Choose among \"muonBestTrack\", \"innerTrack\"";
61 const auto& vtxPos =
vtxs_->at(0).position();
76 if ( trackRef.
isNull() )
return -1;
78 const auto& vtxPos =
vtxs_->at(0).position();
79 return std::abs(trackRef->dxy(vtxPos));
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
bool isNonnull() const
Checks for non-null.
virtual TrackRef innerTrack() const
std::unordered_map< std::string, edm::EDGetToken > contentTokens_
std::vector< Vertex > VertexCollection
collection of Vertex objects
void getEventContent(const edm::EventBase &) override final
MuonDxyCut(const edm::ParameterSet &c)
std::unordered_map< std::string, edm::InputTag > contentTags_
enum MuonDxyCut::BestTrackType trackType_
edm::Handle< reco::VertexCollection > vtxs_
virtual TrackRef muonBestTrack() const
Abs< T >::type abs(const T &t)
bool isNull() const
Checks for null.
CandidateType candidateType() const override final
result_type operator()(const reco::MuonPtr &) const override final
void setConsumes(edm::ConsumesCollector &) override final
bool getByLabel(InputTag const &, Handle< T > &) const
#define DEFINE_EDM_PLUGIN(factory, type, name)
double value(const reco::CandidatePtr &) const override final