36 m_muonToken(consumes(m_L3CollectionLabel)),
37 m_displacedReco(
parameterSet.getParameter<
bool>(
"DisplacedReconstruction")) {
39 produces<RecoChargedCandidateCollection>();
50 desc.add<
bool>(
"DisplacedReconstruction",
false);
58 auto candidates = std::make_unique<RecoChargedCandidateCollection>();
65 if (not
muons.isValid()) {
68 for (
unsigned int i = 0;
i <
muons->size();
i++) {
72 tkref = (*muons)[
i].isGlobalMuon() ? (*muons)[
i].globalTrack() : (*muons)[
i].muonBestTrack();
74 tkref = (*muons)[
i].innerTrack().
isNonnull() ? (*muons)[
i].innerTrack() : (*muons)[
i].muonBestTrack();
82 pid =
q < 0 ? 13 : -13;
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
descriptions
bool const m_displacedReco
bool isNonnull() const
Checks for non-null.
Log< level::Error, false > LogError
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
edm::EDGetTokenT< reco::MuonCollection > const m_muonToken
~L3MuonCandidateProducerFromMuons() override
destructor
Abs< T >::type abs(const T &t)
L3MuonCandidateProducerFromMuons(const edm::ParameterSet &)
constructor with config
edm::InputTag const m_L3CollectionLabel
static const std::string category("Muon|RecoMuon|L3MuonCandidateProducerFromMuons")
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
produce candidates
Log< level::Warning, false > LogWarning
math::PtEtaPhiELorentzVectorF LorentzVector