CMS 3D CMS Logo

MuonSeedMerger Class Reference

Module to merge two or more muon seed collections. More...

#include <RecoMuon/MuonSeedGenerator/src/MuonSeedMerger.h>

Inheritance diagram for MuonSeedMerger:

edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

 MuonSeedMerger (const edm::ParameterSet &)
 Constructor.
virtual void produce (edm::Event &, const edm::EventSetup &)
virtual ~MuonSeedMerger ()
 Destructor.

Private Attributes

std::vector< edm::InputTagtheSeedCollectionLabels


Detailed Description

Module to merge two or more muon seed collections.

Currently it does not contain any seed cleaner, so the number of ghosts seed can be high. This is still a preliminary implementation.

Date
2008/08/11 16:13:05
Revision
1.1
Author:
R. Bellan - CERN <riccardo.bellan@cern.ch>

Definition at line 20 of file MuonSeedMerger.h.


Constructor & Destructor Documentation

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]

Destructor.

Definition at line 43 of file MuonSeedMerger.cc.

00043 {}


Member Function Documentation

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 }


Member Data Documentation

std::vector<edm::InputTag> MuonSeedMerger::theSeedCollectionLabels [private]

Definition at line 35 of file MuonSeedMerger.h.

Referenced by MuonSeedMerger(), and produce().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:28:48 2009 for CMSSW by  doxygen 1.5.4