CMS 3D CMS Logo

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

#include <StandAloneMuonProducer.h>

Inheritance diagram for StandAloneMuonProducer:
edm::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void produce (edm::Event &, const edm::EventSetup &) override
 reconstruct muons More...
 
 StandAloneMuonProducer (const edm::ParameterSet &)
 constructor with config More...
 
 ~StandAloneMuonProducer () override
 destructor More...
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void setAlias (std::string alias)
 

Private Attributes

edm::EDGetTokenT< edm::View< TrajectorySeed > > seedToken
 
std::string theAlias
 
edm::InputTag theSeedCollectionLabel
 MuonSeed Collection Label. More...
 
MuonServiceProxytheService
 the event setup proxy, it takes care the services update More...
 
MuonTrackFindertheTrackFinder
 the track finder More...
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

StandAlone muon reconstructor: reconstructs muons using DT, CSC and RPC information,
starting from internal seeds (L2 muon track segments).

Author
R.Bellan - INFN TO

Definition at line 25 of file StandAloneMuonProducer.h.

Constructor & Destructor Documentation

StandAloneMuonProducer::StandAloneMuonProducer ( const edm::ParameterSet parameterSet)

constructor with config

Definition at line 44 of file StandAloneMuonProducer.cc.

References edm::ParameterSet::getParameter(), LogTrace, MuonServiceProxy_cff::MuonServiceProxy, and AlCaHLTBitMon_QueryRunRegistry::string.

44  {
45  LogTrace("Muon|RecoMuon|StandAloneMuonProducer")<<"constructor called"<<endl;
46 
47  // Parameter set for the Builder
48  ParameterSet trajectoryBuilderParameters = parameterSet.getParameter<ParameterSet>("STATrajBuilderParameters");
49 
50  // MuonSeed Collection Label
51  theSeedCollectionLabel = parameterSet.getParameter<InputTag>("InputObjects");
52 
53  // service parameters
54  ParameterSet serviceParameters = parameterSet.getParameter<ParameterSet>("ServiceParameters");
55 
56  // TrackLoader parameters
57  ParameterSet trackLoaderParameters = parameterSet.getParameter<ParameterSet>("TrackLoaderParameters");
59 
60  // the services
61  theService = new MuonServiceProxy(serviceParameters);
62 
63  MuonTrackLoader * trackLoader = new MuonTrackLoader(trackLoaderParameters,iC,theService);
64  MuonTrajectoryBuilder * trajectoryBuilder = nullptr;
65  // instantiate the concrete trajectory builder in the Track Finder
66  string typeOfBuilder = parameterSet.getParameter<string>("MuonTrajectoryBuilder");
67  if(typeOfBuilder == "StandAloneMuonTrajectoryBuilder")
68  trajectoryBuilder = new StandAloneMuonTrajectoryBuilder(trajectoryBuilderParameters,theService,iC);
69  else if(typeOfBuilder == "DirectMuonTrajectoryBuilder")
70  trajectoryBuilder = new DirectMuonTrajectoryBuilder(trajectoryBuilderParameters,theService);
71  else if(typeOfBuilder == "Exhaustive")
72  trajectoryBuilder = new ExhaustiveMuonTrajectoryBuilder(trajectoryBuilderParameters,theService,iC);
73  else{
74  LogWarning("Muon|RecoMuon|StandAloneMuonProducer") << "No Trajectory builder associated with "<<typeOfBuilder
75  << ". Falling down to the default (StandAloneMuonTrajectoryBuilder)";
76  trajectoryBuilder = new StandAloneMuonTrajectoryBuilder(trajectoryBuilderParameters,theService,iC);
77  }
78  theTrackFinder = new MuonTrackFinder(trajectoryBuilder, trackLoader);
79 
80  setAlias(parameterSet.getParameter<std::string>("@module_label"));
81 
82  produces<reco::TrackCollection>().setBranchAlias(theAlias + "Tracks");
83  produces<reco::TrackCollection>("UpdatedAtVtx").setBranchAlias(theAlias + "UpdatedAtVtxTracks");
84  produces<TrackingRecHitCollection>().setBranchAlias(theAlias + "RecHits");
85  produces<reco::TrackExtraCollection>().setBranchAlias(theAlias + "TrackExtras");
86  produces<reco::TrackToTrackMap>().setBranchAlias(theAlias + "TrackToTrackMap");
87 
88  produces<std::vector<Trajectory> >().setBranchAlias(theAlias + "Trajectories");
89  produces<TrajTrackAssociationCollection>().setBranchAlias(theAlias + "TrajToTrackMap");
90 
91 
92 
93  seedToken = consumes<edm::View<TrajectorySeed> >(theSeedCollectionLabel);
94 
95 
96 }
T getParameter(std::string const &) const
edm::InputTag theSeedCollectionLabel
MuonSeed Collection Label.
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
void setAlias(std::string alias)
#define LogTrace(id)
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
MuonTrackFinder * theTrackFinder
the track finder
edm::EDGetTokenT< edm::View< TrajectorySeed > > seedToken
StandAloneMuonProducer::~StandAloneMuonProducer ( )
override

destructor

Definition at line 99 of file StandAloneMuonProducer.cc.

References LogTrace.

99  {
100  LogTrace("Muon|RecoMuon|StandAloneMuonProducer")<<"StandAloneMuonProducer destructor called"<<endl;
101  if (theService) delete theService;
102  if (theTrackFinder) delete theTrackFinder;
103 }
#define LogTrace(id)
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
MuonTrackFinder * theTrackFinder
the track finder

Member Function Documentation

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

reconstruct muons

Definition at line 106 of file StandAloneMuonProducer.cc.

References LogTrace, metname, and AlCaHLTBitMon_QueryRunRegistry::string.

106  {
107  const std::string metname = "Muon|RecoMuon|StandAloneMuonProducer";
108 
109  LogTrace(metname)<<endl<<endl<<endl;
110  LogTrace(metname)<<"Stand Alone Muon Reconstruction Started"<<endl;
111 
112  // Take the seeds container
113  LogTrace(metname)<<"Taking the seeds: "<<theSeedCollectionLabel.label()<<endl;
115  event.getByToken(seedToken,seeds);
116 
117  // Update the services
118  theService->update(eventSetup);
119 
120  // Reconstruct
121  LogTrace(metname)<<"Track Reconstruction"<<endl;
122  theTrackFinder->reconstruct(seeds,event, eventSetup);
123 
124  LogTrace(metname)<<"Event loaded"
125  <<"================================"
126  <<endl<<endl;
127 }
edm::InputTag theSeedCollectionLabel
MuonSeed Collection Label.
const std::string metname
#define LogTrace(id)
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
std::string const & label() const
Definition: InputTag.h:36
MuonTrackFinder * theTrackFinder
the track finder
edm::OrphanHandle< reco::TrackCollection > reconstruct(const edm::Handle< edm::View< TrajectorySeed > > &, edm::Event &, const edm::EventSetup &)
reconstruct standalone tracks starting from a collection of seeds
edm::EDGetTokenT< edm::View< TrajectorySeed > > seedToken
void StandAloneMuonProducer::setAlias ( std::string  alias)
inlineprivate

Definition at line 54 of file StandAloneMuonProducer.h.

References met_cff::alias.

54  {
55  alias.erase( alias.size() - 1, alias.size() );
57  }

Member Data Documentation

edm::EDGetTokenT<edm::View<TrajectorySeed> > StandAloneMuonProducer::seedToken
private

Definition at line 50 of file StandAloneMuonProducer.h.

std::string StandAloneMuonProducer::theAlias
private

Definition at line 52 of file StandAloneMuonProducer.h.

edm::InputTag StandAloneMuonProducer::theSeedCollectionLabel
private

MuonSeed Collection Label.

Definition at line 41 of file StandAloneMuonProducer.h.

MuonServiceProxy* StandAloneMuonProducer::theService
private

the event setup proxy, it takes care the services update

Definition at line 47 of file StandAloneMuonProducer.h.

MuonTrackFinder* StandAloneMuonProducer::theTrackFinder
private

the track finder

Definition at line 44 of file StandAloneMuonProducer.h.