CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
L2MuonProducer Class Reference

#include <L2MuonProducer.h>

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

Public Member Functions

 L2MuonProducer (const edm::ParameterSet &)
 constructor with config More...
 
virtual void produce (edm::Event &, const edm::EventSetup &) override
 reconstruct muons More...
 
virtual ~L2MuonProducer ()
 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
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

edm::EDGetTokenT< edm::View
< TrajectorySeed > > 
seedsToken
 
edm::InputTag theSeedCollectionLabel
 
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, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
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

Level-2 muon reconstructor: reconstructs muons using DT, CSC and RPC information,
starting from Level-1 trigger seeds.

Author
R.Bellan - INFN TO

L2 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 29 of file L2MuonProducer.h.

Constructor & Destructor Documentation

L2MuonProducer::L2MuonProducer ( const edm::ParameterSet parameterSet)

constructor with config

Definition at line 47 of file L2MuonProducer.cc.

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

47  {
48  LogTrace("Muon|RecoMuon|L2MuonProducer")<<"constructor called"<<endl;
49 
50  // Parameter set for the Builder
51  ParameterSet trajectoryBuilderParameters = parameterSet.getParameter<ParameterSet>("L2TrajBuilderParameters");
52 
53  // MuonSeed Collection Label
54  theSeedCollectionLabel = parameterSet.getParameter<InputTag>("InputObjects");
55  seedsToken = consumes<edm::View<TrajectorySeed> >(theSeedCollectionLabel);
56  // service parameters
57  ParameterSet serviceParameters = parameterSet.getParameter<ParameterSet>("ServiceParameters");
58 
59  // TrackLoader parameters
60  ParameterSet trackLoaderParameters = parameterSet.getParameter<ParameterSet>("TrackLoaderParameters");
61 
62  // the services
63  theService = new MuonServiceProxy(serviceParameters);
64 
65  MuonTrajectoryBuilder * trajectoryBuilder = 0;
66  // instantiate the concrete trajectory builder in the Track Finder
67 
69  string typeOfBuilder = parameterSet.existsAs<string>("MuonTrajectoryBuilder") ?
70  parameterSet.getParameter<string>("MuonTrajectoryBuilder") : "StandAloneMuonTrajectoryBuilder";
71  if(typeOfBuilder == "StandAloneMuonTrajectoryBuilder" || typeOfBuilder == "")
72  trajectoryBuilder = new StandAloneMuonTrajectoryBuilder(trajectoryBuilderParameters,theService,iC);
73  else if(typeOfBuilder == "Exhaustive")
74  trajectoryBuilder = new ExhaustiveMuonTrajectoryBuilder(trajectoryBuilderParameters,theService,iC);
75  else{
76  LogWarning("Muon|RecoMuon|StandAloneMuonProducer") << "No Trajectory builder associated with "<<typeOfBuilder
77  << ". Falling down to the default (StandAloneMuonTrajectoryBuilder)";
78  trajectoryBuilder = new StandAloneMuonTrajectoryBuilder(trajectoryBuilderParameters,theService,iC);
79  }
80  theTrackFinder = new MuonTrackFinder(trajectoryBuilder,
81  new MuonTrackLoader(trackLoaderParameters, iC, theService),
82  new MuonTrajectoryCleaner(true));
83 
84  produces<reco::TrackCollection>();
85  produces<reco::TrackCollection>("UpdatedAtVtx");
86  produces<TrackingRecHitCollection>();
87  produces<reco::TrackExtraCollection>();
88  produces<reco::TrackToTrackMap>();
89 
90  produces<std::vector<Trajectory> >();
91  produces<TrajTrackAssociationCollection>();
92 
93  produces<edm::AssociationMap<edm::OneToMany<std::vector<L2MuonTrajectorySeed>, std::vector<L2MuonTrajectorySeed> > > >();
94 }
T getParameter(std::string const &) const
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:186
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
edm::EDGetTokenT< edm::View< TrajectorySeed > > seedsToken
edm::InputTag theSeedCollectionLabel
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
#define LogTrace(id)
MuonTrackFinder * theTrackFinder
the track finder
L2MuonProducer::~L2MuonProducer ( )
virtual

destructor

Definition at line 97 of file L2MuonProducer.cc.

References LogTrace.

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

Member Function Documentation

void L2MuonProducer::produce ( edm::Event event,
const edm::EventSetup eventSetup 
)
overridevirtual

reconstruct muons

Implements edm::stream::EDProducerBase.

Definition at line 105 of file L2MuonProducer.cc.

References LogTrace, metname, and AlCaHLTBitMon_QueryRunRegistry::string.

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

Member Data Documentation

edm::EDGetTokenT<edm::View<TrajectorySeed> > L2MuonProducer::seedsToken
private

Definition at line 53 of file L2MuonProducer.h.

edm::InputTag L2MuonProducer::theSeedCollectionLabel
private

Definition at line 45 of file L2MuonProducer.h.

MuonServiceProxy* L2MuonProducer::theService
private

the event setup proxy, it takes care the services update

Definition at line 51 of file L2MuonProducer.h.

MuonTrackFinder* L2MuonProducer::theTrackFinder
private

the track finder

Definition at line 48 of file L2MuonProducer.h.