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
L3MuonProducer Class Reference

#include <L3MuonProducer.h>

Inheritance diagram for L3MuonProducer:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 L3MuonProducer (const edm::ParameterSet &)
 constructor with config More...
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 reconstruct muons More...
 
virtual ~L3MuonProducer ()
 destructor More...
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 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
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

edm::InputTag theL2CollectionLabel
 Seed STA Label. More...
 
std::string theL2SeededTkLabel
 Label for L2SeededTracks. More...
 
MuonServiceProxytheService
 the event setup proxy, it takes care the services update More...
 
MuonTrackFindertheTrackFinder
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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

L3 muon reconstructor: reconstructs muons using DT, CSC, RPC and tracker information,
starting from a L2 reonstructed muon.

Date:
2009/07/29 12:26:48
Revision:
1.15
Author
A. Everett - Purdue University

L3 muon reconstructor: reconstructs muons using DT, CSC, RPC and tracker information,
starting from a L2 reonstructed muon.

Date:
2008/02/14 16:26:32
Revision:
1.4
Author
A. Everett - Purdue University

Definition at line 23 of file L3MuonProducer.h.

Constructor & Destructor Documentation

L3MuonProducer::L3MuonProducer ( const edm::ParameterSet parameterSet)

constructor with config

Definition at line 44 of file L3MuonProducer.cc.

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

44  {
45 
46  LogTrace("L3MuonProducer") << "constructor called" << endl;
47 
48  // Parameter set for the Builder
49  ParameterSet trajectoryBuilderParameters = parameterSet.getParameter<ParameterSet>("L3TrajBuilderParameters");
50 
51  // L2 Muon Collection Label
52  theL2CollectionLabel = parameterSet.getParameter<InputTag>("MuonCollectionLabel");
53 
54  // service parameters
55  ParameterSet serviceParameters = parameterSet.getParameter<ParameterSet>("ServiceParameters");
56 
57  // TrackLoader parameters
58  ParameterSet trackLoaderParameters = parameterSet.getParameter<ParameterSet>("TrackLoaderParameters");
59 
60  // the services
61  theService = new MuonServiceProxy(serviceParameters);
62 
63  // instantiate the concrete trajectory builder in the Track Finder
64  MuonTrackLoader* mtl = new MuonTrackLoader(trackLoaderParameters,theService);
65  L3MuonTrajectoryBuilder* l3mtb = new L3MuonTrajectoryBuilder(trajectoryBuilderParameters, theService);
66  theTrackFinder = new MuonTrackFinder(l3mtb, mtl);
67 
68  theL2SeededTkLabel = trackLoaderParameters.getUntrackedParameter<std::string>("MuonSeededTracksInstance",std::string());
69 
70  produces<reco::TrackCollection>(theL2SeededTkLabel);
71  produces<TrackingRecHitCollection>(theL2SeededTkLabel);
72  produces<reco::TrackExtraCollection>(theL2SeededTkLabel);
73  produces<vector<Trajectory> >(theL2SeededTkLabel) ;
74  produces<TrajTrackAssociationCollection>(theL2SeededTkLabel);
75 
76  produces<reco::TrackCollection>();
77  produces<TrackingRecHitCollection>();
78  produces<reco::TrackExtraCollection>();
79  produces<vector<Trajectory> >() ;
80  produces<TrajTrackAssociationCollection>();
81 
82  produces<reco::MuonTrackLinksCollection>();
83 
84 }
T getParameter(std::string const &) const
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
MuonTrackFinder * theTrackFinder
#define LogTrace(id)
edm::InputTag theL2CollectionLabel
Seed STA Label.
std::string theL2SeededTkLabel
Label for L2SeededTracks.
L3MuonProducer::~L3MuonProducer ( )
virtual

destructor

Definition at line 90 of file L3MuonProducer.cc.

References LogTrace.

90  {
91 
92  LogTrace("L3MuonProducer") << "destructor called" << endl;
93  if (theService) delete theService;
94  if (theTrackFinder) delete theTrackFinder;
95 
96 }
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
MuonTrackFinder * theTrackFinder
#define LogTrace(id)

Member Function Documentation

void L3MuonProducer::produce ( edm::Event event,
const edm::EventSetup eventSetup 
)
virtual

reconstruct muons

Implements edm::EDProducer.

Definition at line 102 of file L3MuonProducer.cc.

References edm::Ref< C, T, F >::isNonnull(), edm::Ref< C, T, F >::key(), L2Muons_cfi::L2Muons, LogTrace, and metname.

102  {
103  const string metname = "Muon|RecoMuon|L3MuonProducer";
104  LogTrace(metname)<<endl<<endl<<endl;
105  LogTrace(metname)<<"L3 Muon Reconstruction started"<<endl;
106 
107  typedef vector<Trajectory> TrajColl;
108 
109  // Update the services
110  theService->update(eventSetup);
111 
112  // Take the L2 muon container(s)
113  LogTrace(metname)<<"Taking the L2 Muons "<<theL2CollectionLabel<<endl;
114 
116  event.getByLabel(theL2CollectionLabel,L2Muons);
117 
118  Handle<vector<Trajectory> > L2MuonsTraj;
119  vector<MuonTrajectoryBuilder::TrackCand> L2TrackCands;
120 
121 
122  event.getByLabel(theL2CollectionLabel.label(), L2MuonsTraj);
123 
125  event.getByLabel(theL2CollectionLabel.label(),L2AssoMap);
126 
127  edm::Handle<reco::TrackToTrackMap> updatedL2AssoMap;
128  event.getByLabel(theL2CollectionLabel.label(),updatedL2AssoMap);
129 
130  for(TrajTrackAssociationCollection::const_iterator it = L2AssoMap->begin(); it != L2AssoMap->end(); ++it){
131  const Ref<vector<Trajectory> > traj = it->key;
132  const reco::TrackRef tkRegular = it->val;
133  reco::TrackRef tkUpdated;
136  if ( theL2CollectionLabel.instance() == "UpdatedAtVtx") {
137  iEnd = updatedL2AssoMap->end();
138  iii = updatedL2AssoMap->find(it->val);
139  if (iii != iEnd ) tkUpdated = (*updatedL2AssoMap)[it->val] ;
140  }
141 
142  const reco::TrackRef tk = ( tkUpdated.isNonnull() ) ? tkUpdated : tkRegular ;
143 
145  if( traj->isValid() ) L2Cand.first = &*traj ;
146  L2TrackCands.push_back(L2Cand);
147  }
148 
149  theTrackFinder->reconstruct(L2TrackCands, event);
150 
151  LogTrace(metname)<<"Event loaded"
152  <<"================================"
153  <<endl<<endl;
154 
155 }
std::pair< const Trajectory *, reco::TrackRef > TrackCand
const std::string metname
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
MuonTrackFinder * theTrackFinder
tuple L2Muons
Definition: L2Muons_cfi.py:6
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:250
#define LogTrace(id)
key_type key() const
Accessor for product key.
Definition: Ref.h:266
edm::InputTag theL2CollectionLabel
Seed STA Label.
std::string const & label() const
Definition: InputTag.h:42
std::string const & instance() 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::InputTag L3MuonProducer::theL2CollectionLabel
private

Seed STA Label.

Definition at line 40 of file L3MuonProducer.h.

std::string L3MuonProducer::theL2SeededTkLabel
private

Label for L2SeededTracks.

Definition at line 43 of file L3MuonProducer.h.

MuonServiceProxy* L3MuonProducer::theService
private

the event setup proxy, it takes care the services update

Definition at line 48 of file L3MuonProducer.h.

MuonTrackFinder* L3MuonProducer::theTrackFinder
private

Definition at line 45 of file L3MuonProducer.h.