15 void setConsumes(edm::ConsumesCollector&) override final;
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.
CandidateType candidateType() const overridefinal
std::unordered_map< std::string, edm::EDGetToken > contentTokens_
std::vector< Vertex > VertexCollection
collection of Vertex objects
MuonDxyCut(const edm::ParameterSet &c)
std::unordered_map< std::string, edm::InputTag > contentTags_
enum MuonDxyCut::BestTrackType trackType_
edm::Handle< reco::VertexCollection > vtxs_
Abs< T >::type abs(const T &t)
bool isNull() const
Checks for null.
double value(const reco::CandidatePtr &) const overridefinal
void setConsumes(edm::ConsumesCollector &) overridefinal
bool getByLabel(InputTag const &, Handle< T > &) const
#define DEFINE_EDM_PLUGIN(factory, type, name)
result_type operator()(const reco::MuonPtr &) const overridefinal
void getEventContent(const edm::EventBase &) overridefinal