29 maxDz_(c.getParameter<double>(
"maxDz"))
33 if ( trackTypeName ==
"muonBestTrack" ) trackType_ =
MUONBESTTRACK;
34 else if ( trackTypeName ==
"innerTrack" ) trackType_ =
INNERTRACK;
37 edm::LogError(
"MuonDzCut") <<
"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->dz(vtxPos));
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
bool isNonnull() const
Checks for non-null.
double value(const reco::CandidatePtr &) const final
virtual TrackRef innerTrack() const
enum MuonDzCut::BestTrackType trackType_
edm::Handle< reco::VertexCollection > vtxs_
std::unordered_map< std::string, edm::EDGetToken > contentTokens_
std::vector< Vertex > VertexCollection
collection of Vertex objects
MuonDzCut(const edm::ParameterSet &c)
std::unordered_map< std::string, edm::InputTag > contentTags_
CandidateType candidateType() const final
virtual TrackRef muonBestTrack() const
result_type operator()(const reco::MuonPtr &) const final
Abs< T >::type abs(const T &t)
bool isNull() const
Checks for null.
void setConsumes(edm::ConsumesCollector &) final
void getEventContent(const edm::EventBase &) final
bool getByLabel(InputTag const &, Handle< T > &) const
#define DEFINE_EDM_PLUGIN(factory, type, name)