#include <L3MuonProducer.h>
Public Member Functions | |
L3MuonProducer (const edm::ParameterSet &) | |
constructor with config | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
reconstruct muons | |
virtual | ~L3MuonProducer () |
destructor | |
Private Attributes | |
edm::InputTag | theL2CollectionLabel |
Seed STA Label. | |
std::string | theL2SeededTkLabel |
Label for L2SeededTracks. | |
MuonServiceProxy * | theService |
the event setup proxy, it takes care the services update | |
MuonTrackFinder * | theTrackFinder |
L3 muon reconstructor: reconstructs muons using DT, CSC, RPC and tracker information,
starting from a L2 reonstructed muon.
L3 muon reconstructor: reconstructs muons using DT, CSC, RPC and tracker information,
starting from a L2 reonstructed muon.
Definition at line 23 of file L3MuonProducer.h.
L3MuonProducer::L3MuonProducer | ( | const edm::ParameterSet & | parameterSet | ) |
constructor with config
Definition at line 44 of file L3MuonProducer.cc.
References edm::ParameterSet::getParameter(), LogTrace, and MuonServiceProxy_cff::MuonServiceProxy.
{ LogTrace("L3MuonProducer") << "constructor called" << endl; // Parameter set for the Builder ParameterSet trajectoryBuilderParameters = parameterSet.getParameter<ParameterSet>("L3TrajBuilderParameters"); // L2 Muon Collection Label theL2CollectionLabel = parameterSet.getParameter<InputTag>("MuonCollectionLabel"); // service parameters ParameterSet serviceParameters = parameterSet.getParameter<ParameterSet>("ServiceParameters"); // TrackLoader parameters ParameterSet trackLoaderParameters = parameterSet.getParameter<ParameterSet>("TrackLoaderParameters"); // the services theService = new MuonServiceProxy(serviceParameters); // instantiate the concrete trajectory builder in the Track Finder MuonTrackLoader* mtl = new MuonTrackLoader(trackLoaderParameters,theService); L3MuonTrajectoryBuilder* l3mtb = new L3MuonTrajectoryBuilder(trajectoryBuilderParameters, theService); theTrackFinder = new MuonTrackFinder(l3mtb, mtl); theL2SeededTkLabel = trackLoaderParameters.getUntrackedParameter<std::string>("MuonSeededTracksInstance",std::string()); produces<reco::TrackCollection>(theL2SeededTkLabel); produces<TrackingRecHitCollection>(theL2SeededTkLabel); produces<reco::TrackExtraCollection>(theL2SeededTkLabel); produces<vector<Trajectory> >(theL2SeededTkLabel) ; produces<TrajTrackAssociationCollection>(theL2SeededTkLabel); produces<reco::TrackCollection>(); produces<TrackingRecHitCollection>(); produces<reco::TrackExtraCollection>(); produces<vector<Trajectory> >() ; produces<TrajTrackAssociationCollection>(); produces<reco::MuonTrackLinksCollection>(); }
L3MuonProducer::~L3MuonProducer | ( | ) | [virtual] |
destructor
Definition at line 90 of file L3MuonProducer.cc.
References LogTrace.
{ LogTrace("L3MuonProducer") << "destructor called" << endl; if (theService) delete theService; if (theTrackFinder) delete theTrackFinder; }
void L3MuonProducer::produce | ( | edm::Event & | event, |
const edm::EventSetup & | eventSetup | ||
) | [virtual] |
reconstruct muons
Implements edm::EDProducer.
Definition at line 102 of file L3MuonProducer.cc.
References edm::Ref< C, T, F >::isNonnull(), edm::Ref< C, T, F >::key(), L2Muons_cfi::L2Muons, LogTrace, and metname.
{ const string metname = "Muon|RecoMuon|L3MuonProducer"; LogTrace(metname)<<endl<<endl<<endl; LogTrace(metname)<<"L3 Muon Reconstruction started"<<endl; typedef vector<Trajectory> TrajColl; // Update the services theService->update(eventSetup); // Take the L2 muon container(s) LogTrace(metname)<<"Taking the L2 Muons "<<theL2CollectionLabel<<endl; Handle<reco::TrackCollection> L2Muons; event.getByLabel(theL2CollectionLabel,L2Muons); Handle<vector<Trajectory> > L2MuonsTraj; vector<MuonTrajectoryBuilder::TrackCand> L2TrackCands; event.getByLabel(theL2CollectionLabel.label(), L2MuonsTraj); edm::Handle<TrajTrackAssociationCollection> L2AssoMap; event.getByLabel(theL2CollectionLabel.label(),L2AssoMap); edm::Handle<reco::TrackToTrackMap> updatedL2AssoMap; event.getByLabel(theL2CollectionLabel.label(),updatedL2AssoMap); for(TrajTrackAssociationCollection::const_iterator it = L2AssoMap->begin(); it != L2AssoMap->end(); ++it){ const Ref<vector<Trajectory> > traj = it->key; const reco::TrackRef tkRegular = it->val; reco::TrackRef tkUpdated; reco::TrackToTrackMap::const_iterator iEnd; reco::TrackToTrackMap::const_iterator iii; if ( theL2CollectionLabel.instance() == "UpdatedAtVtx") { iEnd = updatedL2AssoMap->end(); iii = updatedL2AssoMap->find(it->val); if (iii != iEnd ) tkUpdated = (*updatedL2AssoMap)[it->val] ; } const reco::TrackRef tk = ( tkUpdated.isNonnull() ) ? tkUpdated : tkRegular ; MuonTrajectoryBuilder::TrackCand L2Cand = MuonTrajectoryBuilder::TrackCand((Trajectory*)(0),tk); if( traj->isValid() ) L2Cand.first = &*traj ; L2TrackCands.push_back(L2Cand); } theTrackFinder->reconstruct(L2TrackCands, event); LogTrace(metname)<<"Event loaded" <<"================================" <<endl<<endl; }
Seed STA Label.
Definition at line 40 of file L3MuonProducer.h.
std::string L3MuonProducer::theL2SeededTkLabel [private] |
Label for L2SeededTracks.
Definition at line 43 of file L3MuonProducer.h.
MuonServiceProxy* L3MuonProducer::theService [private] |
the event setup proxy, it takes care the services update
Definition at line 48 of file L3MuonProducer.h.
MuonTrackFinder* L3MuonProducer::theTrackFinder [private] |
Definition at line 45 of file L3MuonProducer.h.