#include <L3MuonCandidateProducer.h>
Public Member Functions | |
L3MuonCandidateProducer (const edm::ParameterSet &) | |
constructor with config | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
produce candidates | |
virtual | ~L3MuonCandidateProducer () |
destructor | |
Private Attributes | |
edm::InputTag | theL3CollectionLabel |
Intermediate step in the L3 muons selection. This class takes the L3 muons (which are reco::Tracks) and creates the correspondent reco::RecoChargedCandidate.
Riccardo's comment: The separation between the L3MuonProducer and this class allows the interchangeability of the L3MuonProducer and the StandAloneMuonProducer This class is supposed to be removed once the L3/STA comparison will be done, then the RecoChargedCandidate production will be put into the L3MuonProducer class.
Intermediate step in the L3 muons selection. This class takes the L3 muons (which are reco::Tracks) and creates the correspondent reco::RecoChargedCandidate.
Riccardo's comment: The separation between the L3MuonProducer and this class allows the interchangeability of the L3MuonProducer and the StandAloneMuonProducer This class is supposed to be removed once the L3/STA comparison will be done, then the RecoChargedCandidate production will be done into the L3MuonProducer class.
Definition at line 26 of file L3MuonCandidateProducer.h.
L3MuonCandidateProducer::L3MuonCandidateProducer | ( | const edm::ParameterSet & | parameterSet | ) |
constructor with config
Definition at line 41 of file L3MuonCandidateProducer.cc.
References edm::ParameterSet::getParameter(), and LogTrace.
{ LogTrace("Muon|RecoMuon|L3MuonCandidateProducer")<<" constructor called"; // StandAlone Collection Label theL3CollectionLabel = parameterSet.getParameter<InputTag>("InputObjects"); produces<RecoChargedCandidateCollection>(); }
L3MuonCandidateProducer::~L3MuonCandidateProducer | ( | ) | [virtual] |
destructor
Definition at line 51 of file L3MuonCandidateProducer.cc.
References LogTrace.
{ LogTrace("Muon|RecoMuon|L3MuonCandidateProducer")<<" L3MuonCandidateProducer destructor called"; }
void L3MuonCandidateProducer::produce | ( | edm::Event & | event, |
const edm::EventSetup & | eventSetup | ||
) | [virtual] |
produce candidates
reconstruct muons
Implements edm::EDProducer.
Definition at line 57 of file L3MuonCandidateProducer.cc.
References abs, i, LogTrace, metname, p4, evf::utils::pid, lumiQueryAPI::q, reco::RecoChargedCandidate::setTrack(), and testEve_cfg::tracks.
{ const string metname = "Muon|RecoMuon|L3MuonCandidateProducer"; // Take the L3 container LogTrace(metname)<<" Taking the L3/GLB muons: "<<theL3CollectionLabel.label(); Handle<TrackCollection> tracks; event.getByLabel(theL3CollectionLabel,tracks); // Create a RecoChargedCandidate collection LogTrace(metname)<<" Creating the RecoChargedCandidate collection"; auto_ptr<RecoChargedCandidateCollection> candidates( new RecoChargedCandidateCollection()); for (unsigned int i=0; i<tracks->size(); i++) { TrackRef tkref(tracks,i); Particle::Charge q = tkref->charge(); Particle::LorentzVector p4(tkref->px(), tkref->py(), tkref->pz(), tkref->p()); Particle::Point vtx(tkref->vx(),tkref->vy(), tkref->vz()); int pid = 13; if(abs(q)==1) pid = q < 0 ? 13 : -13; else LogWarning(metname) << "L3MuonCandidate has charge = "<<q; RecoChargedCandidate cand(q, p4, vtx, pid); cand.setTrack(tkref); candidates->push_back(cand); } event.put(candidates); LogTrace(metname)<<" Event loaded" <<"================================"; }
Definition at line 42 of file L3MuonCandidateProducer.h.