CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
MuonSeedMerger Class Reference

#include <MuonSeedMerger.h>

Inheritance diagram for MuonSeedMerger:
edm::stream::EDProducer<>

Public Member Functions

 MuonSeedMerger (const edm::ParameterSet &)
 Constructor. More...
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~MuonSeedMerger () override
 Destructor. More...
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Private Attributes

std::vector< edm::EDGetTokenT< edm::View< TrajectorySeed > > > seedTokens
 
std::vector< edm::InputTagtheSeedCollectionLabels
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

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.

Author
R. Bellan - CERN ricca.nosp@m.rdo..nosp@m.bella.nosp@m.n@ce.nosp@m.rn.ch

Definition at line 26 of file MuonSeedMerger.h.

Constructor & Destructor Documentation

◆ MuonSeedMerger()

MuonSeedMerger::MuonSeedMerger ( const edm::ParameterSet parameterSet)

Constructor.

Definition at line 21 of file MuonSeedMerger.cc.

References edm::ParameterSet::getParameter(), label, LogTrace, metname, and edm::parameterSet().

21  {
22  const string metname = "Muon|RecoMuon|MuonSeedMerger";
23 
24  theSeedCollectionLabels = parameterSet.getParameter<vector<InputTag> >("SeedCollections");
25 
26  LogTrace(metname) << "MuonSeedMerger will Merge the following seed collections:";
27  for (vector<InputTag>::const_iterator label = theSeedCollectionLabels.begin(); label != theSeedCollectionLabels.end();
28  ++label)
29  LogTrace(metname) << *label;
30 
31  for (vector<InputTag>::const_iterator label = theSeedCollectionLabels.begin(); label != theSeedCollectionLabels.end();
32  ++label) {
33  seedTokens.push_back(consumes<edm::View<TrajectorySeed> >(*label));
34  }
35 
36  produces<TrajectorySeedCollection>();
37 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
const std::string metname
std::vector< edm::InputTag > theSeedCollectionLabels
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
#define LogTrace(id)
char const * label
std::vector< edm::EDGetTokenT< edm::View< TrajectorySeed > > > seedTokens

◆ ~MuonSeedMerger()

MuonSeedMerger::~MuonSeedMerger ( )
override

Destructor.

Definition at line 39 of file MuonSeedMerger.cc.

39 {}

Member Function Documentation

◆ produce()

void MuonSeedMerger::produce ( edm::Event event,
const edm::EventSetup eventSetup 
)
override

Definition at line 41 of file MuonSeedMerger.cc.

References mps_fire::i, LogTrace, metname, eostools::move(), fileCollector::seed, and HLT_2024v12_cff::seeds.

41  {
42  const string metname = "Muon|RecoMuon|MuonSeedMerger";
43 
44  auto output = std::make_unique<TrajectorySeedCollection>();
45 
47 
48  for (unsigned int i = 0; i < theSeedCollectionLabels.size(); ++i) {
49  event.getByToken(seedTokens.at(i), seeds);
50 
51  LogTrace(metname) << theSeedCollectionLabels.at(i) << " has " << seeds->size() << " seeds";
52  for (View<TrajectorySeed>::const_iterator seed = seeds->begin(); seed != seeds->end(); ++seed)
53  output->push_back(*seed);
54  }
55 
56  event.put(std::move(output));
57 }
const std::string metname
std::vector< edm::InputTag > theSeedCollectionLabels
#define LogTrace(id)
std::vector< edm::EDGetTokenT< edm::View< TrajectorySeed > > > seedTokens
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:88
Definition: output.py:1
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ seedTokens

std::vector<edm::EDGetTokenT<edm::View<TrajectorySeed> > > MuonSeedMerger::seedTokens
private

Definition at line 41 of file MuonSeedMerger.h.

◆ theSeedCollectionLabels

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

Definition at line 40 of file MuonSeedMerger.h.