15 void setConsumes(edm::ConsumesCollector&) override final;
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.
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 overridefinal
Abs< T >::type abs(const T &t)
bool isNull() const
Checks for null.
void setConsumes(edm::ConsumesCollector &) overridefinal
result_type operator()(const reco::MuonPtr &) const overridefinal
bool getByLabel(InputTag const &, Handle< T > &) const
#define DEFINE_EDM_PLUGIN(factory, type, name)
double value(const reco::CandidatePtr &) const overridefinal
void getEventContent(const edm::EventBase &) overridefinal