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

#include <FastL3MuonProducer.h>

Inheritance diagram for FastL3MuonProducer:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

 FastL3MuonProducer (const edm::ParameterSet &)
 constructor with config More...
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 reconstruct muons More...
 
virtual ~FastL3MuonProducer ()
 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 &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Attributes

L3MuonTrajectoryBuilderl3mtb
 
edm::InputTag theL2CollectionLabel
 Seed STA (input) More...
 
std::string theL2SeededTkLabel
 Label for L2SeededTracks (output) More...
 
bool theL2TrajectoryFlag
 
MuonServiceProxytheService
 the event setup proxy, it takes care the services update More...
 
edm::InputTag theTrackerTrackCollectionLabel
 Tracker tracks (input) More...
 
MuonTrackFindertheTrackFinder
 
bool updatedAtVtx
 

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)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

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

Date:
2009/03/16 15:46:50
Revision:
1.5
Author
Patrick Janot - CERN

Fast L3 muon reconstructor: reconstructs muons using DT, CSC, RPC and tracker information,
starting from a L2 reonstructed muon and from pixel seeded tracks (by default - the latter is configuratble)

Date:
2009/03/16 15:46:50
Revision:
1.3
Author
P. Janot - CERN

Definition at line 27 of file FastL3MuonProducer.h.

Constructor & Destructor Documentation

FastL3MuonProducer::FastL3MuonProducer ( const edm::ParameterSet parameterSet)

constructor with config

Definition at line 33 of file FastL3MuonProducer.cc.

References edm::ParameterSet::getParameter(), l3mtb, LogTrace, MuonServiceProxy_cff::MuonServiceProxy, theL2CollectionLabel, theL2SeededTkLabel, theService, theTrackFinder, and updatedAtVtx.

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

destructor

Definition at line 86 of file FastL3MuonProducer.cc.

References LogTrace, theService, and theTrackFinder.

86  {
87 
88  LogTrace("FastL3MuonProducer") << "destructor called" << std::endl;
89  if (theService) delete theService;
90  if (theTrackFinder) delete theTrackFinder;
91 
92 }
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
#define LogTrace(id)
MuonTrackFinder * theTrackFinder

Member Function Documentation

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

reconstruct muons

Implements edm::EDProducer.

Definition at line 98 of file FastL3MuonProducer.cc.

References edm::helpers::KeyVal< K, V >::key, L2Muons_cfi::L2Muons, edm::InputTag::label(), lt, MuonTrackFinder::reconstruct(), theL2CollectionLabel, theService, theTrackFinder, MuonServiceProxy::update(), updatedAtVtx, and edm::helpers::KeyVal< K, V >::val.

Referenced by python.JSONExport.JsonExport::export(), and python.HTMLExport.HTMLExport::export().

98  {
99  // const std::string metname = "Muon|RecoMuon|FastL3MuonProducer";
100  // LogTrace(metname)<<endl<<endl<<endl;
101  // LogTrace(metname)<<"Fast L3 Muon Reconstruction started"<<endl;
102 
103  typedef std::vector<Trajectory> TrajColl;
104 
105  // Update the services
106  theService->update(eventSetup);
107 
108  // Take the L2 muon container(s)
109  // LogTrace(metname)<<"Taking the L2 Muons "<<theL2CollectionLabel<<endl;
110 
112  event.getByLabel(theL2CollectionLabel,L2Muons);
113 
115  std::vector<MuonTrajectoryBuilder::TrackCand> L2TrackCands;
116 
117  event.getByLabel(theL2CollectionLabel.label(), L2MuonsTraj);
118 
120  event.getByLabel(theL2CollectionLabel.label(),L2AssoMap);
121 
122  edm::Handle<reco::TrackToTrackMap> updatedL2AssoMap;
123  event.getByLabel(theL2CollectionLabel.label(),updatedL2AssoMap);
124 
125  TrajTrackAssociationCollection::const_iterator it = L2AssoMap->begin();
127 
128  for( ; it!=lt; ++it){
129 
130  const edm::Ref<std::vector<Trajectory> > traj = it->key;
131  const reco::TrackRef tk
132  = updatedAtVtx && updatedL2AssoMap->find(it->val) != updatedL2AssoMap->end() ?
133  (*updatedL2AssoMap)[it->val] : it->val;
135  if( traj->isValid() ) L2Cand.first = &*traj ;
136  L2TrackCands.push_back(L2Cand);
137 
138  }
139 
140  theTrackFinder->reconstruct(L2TrackCands, event);
141  // l3mtb->clear();
142 
143  /*
144  LogTrace(metname)<<"Event loaded"
145  <<"================================"
146  <<endl<<endl;
147  */
148 }
void update(const edm::EventSetup &setup)
update the services each event
std::pair< const Trajectory *, reco::TrackRef > TrackCand
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
tuple L2Muons
Definition: L2Muons_cfi.py:6
edm::InputTag theL2CollectionLabel
Seed STA (input)
< trclass="colgroup">< tdclass="colgroup"colspan=5 > Muon Digi collections</td >< tr >< td >< ahref="classDTDigi.html"> DTDigi</a ></td >< td >< ahref="DataFormats_DTDigi.html"> MuonDigiCollection & lt
std::string const & label() const
Definition: InputTag.h:25
MuonTrackFinder * theTrackFinder
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

L3MuonTrajectoryBuilder* FastL3MuonProducer::l3mtb
private

Definition at line 55 of file FastL3MuonProducer.h.

Referenced by FastL3MuonProducer().

edm::InputTag FastL3MuonProducer::theL2CollectionLabel
private

Seed STA (input)

Definition at line 44 of file FastL3MuonProducer.h.

Referenced by FastL3MuonProducer(), and produce().

std::string FastL3MuonProducer::theL2SeededTkLabel
private

Label for L2SeededTracks (output)

Definition at line 50 of file FastL3MuonProducer.h.

Referenced by FastL3MuonProducer().

bool FastL3MuonProducer::theL2TrajectoryFlag
private

Definition at line 57 of file FastL3MuonProducer.h.

MuonServiceProxy* FastL3MuonProducer::theService
private

the event setup proxy, it takes care the services update

Definition at line 61 of file FastL3MuonProducer.h.

Referenced by FastL3MuonProducer(), produce(), and ~FastL3MuonProducer().

edm::InputTag FastL3MuonProducer::theTrackerTrackCollectionLabel
private

Tracker tracks (input)

Definition at line 47 of file FastL3MuonProducer.h.

MuonTrackFinder* FastL3MuonProducer::theTrackFinder
private

Definition at line 53 of file FastL3MuonProducer.h.

Referenced by FastL3MuonProducer(), produce(), and ~FastL3MuonProducer().

bool FastL3MuonProducer::updatedAtVtx
private

Definition at line 58 of file FastL3MuonProducer.h.

Referenced by FastL3MuonProducer(), and produce().