39 LogTrace(
"Muon|RecoMuon|L2MuonCandidateProducer")<<
" constructor called";
43 tracksToken = consumes<reco::TrackCollection>(theSACollectionLabel);
44 produces<RecoChargedCandidateCollection>();
49 LogTrace(
"Muon|RecoMuon|L2MuonCandidateProducer")<<
" L2MuonCandidateProducer destructor called";
55 const string metname =
"Muon|RecoMuon|L2MuonCandidateProducer";
58 LogTrace(metname)<<
" Taking the StandAlone muons: "<<theSACollectionLabel;
60 event.getByToken(tracksToken,tracks);
63 LogTrace(metname)<<
" Creating the RecoChargedCandidate collection";
64 auto candidates = std::make_unique<RecoChargedCandidateCollection>();
66 for (
unsigned int i=0;
i<tracks->size();
i++) {
68 Particle::Charge
q = tkref->charge();
72 if(
abs(q)==1) pid = q < 0 ? 13 : -13;
73 else LogWarning(metname) <<
"L2MuonCandidate has charge = "<<
q;
82 <<
"================================";
T getParameter(std::string const &) const
const std::string metname
Abs< T >::type abs(const T &t)
L2MuonCandidateProducer(const edm::ParameterSet &)
constructor with config
~L2MuonCandidateProducer() override
destructor
void produce(edm::StreamID sid, edm::Event &event, const edm::EventSetup &) const override
produce candidates
void setTrack(const reco::TrackRef &r)
set reference to track
ParameterSet const & parameterSet(Provenance const &provenance)
math::PtEtaPhiELorentzVectorF LorentzVector