#include <RecoMuon/MuonSeedGenerator/src/MuonSeedMerger.h>
Public Member Functions | |
MuonSeedMerger (const edm::ParameterSet &) | |
Constructor. | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
virtual | ~MuonSeedMerger () |
Destructor. | |
Private Attributes | |
std::vector< edm::InputTag > | theSeedCollectionLabels |
Currently it does not contain any seed cleaner, so the number of ghosts seed can be high. This is still a preliminary implementation.
Definition at line 20 of file MuonSeedMerger.h.
MuonSeedMerger::MuonSeedMerger | ( | const edm::ParameterSet & | parameterSet | ) |
Constructor.
Definition at line 28 of file MuonSeedMerger.cc.
References edm::ParameterSet::getParameter(), label, LogTrace, and theSeedCollectionLabels.
00028 { 00029 const string metname = "Muon|RecoMuon|MuonSeedMerger"; 00030 00031 theSeedCollectionLabels = parameterSet.getParameter<vector<InputTag> >("SeedCollections"); 00032 00033 LogTrace(metname)<< "MuonSeedMerger will Merge the following seed collections:"; 00034 for(vector<InputTag>::const_iterator label = theSeedCollectionLabels.begin(); 00035 label != theSeedCollectionLabels.end(); ++label) 00036 LogTrace(metname) << *label; 00037 00038 00039 produces<TrajectorySeedCollection>(); 00040 }
MuonSeedMerger::~MuonSeedMerger | ( | ) | [virtual] |
void MuonSeedMerger::produce | ( | edm::Event & | event, | |
const edm::EventSetup & | eventSetup | |||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 45 of file MuonSeedMerger.cc.
References label, LogTrace, output(), and theSeedCollectionLabels.
00045 { 00046 00047 const string metname = "Muon|RecoMuon|MuonSeedMerger"; 00048 00049 std::auto_ptr<TrajectorySeedCollection> output(new TrajectorySeedCollection()); 00050 00051 Handle<View<TrajectorySeed> > seeds; 00052 00053 for(vector<InputTag>::const_iterator label = theSeedCollectionLabels.begin(); 00054 label != theSeedCollectionLabels.end(); ++label){ 00055 event.getByLabel(*label,seeds); 00056 LogTrace(metname) << *label << " has "<< seeds->size() <<" seeds"; 00057 for(View<TrajectorySeed>::const_iterator seed = seeds->begin(); seed != seeds->end(); ++seed) 00058 output->push_back(*seed); 00059 } 00060 00061 event.put(output); 00062 }
std::vector<edm::InputTag> MuonSeedMerger::theSeedCollectionLabels [private] |