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 Member Functions | Private Attributes
StandAloneMuonProducer Class Reference

#include <StandAloneMuonProducer.h>

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

Public Member Functions

virtual void produce (edm::Event &, const edm::EventSetup &)
 reconstruct muons More...
 
 StandAloneMuonProducer (const edm::ParameterSet &)
 constructor with config More...
 
virtual ~StandAloneMuonProducer ()
 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 Member Functions

void setAlias (std::string alias)
 

Private Attributes

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::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
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

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

Date:
2010/06/11 00:17:04
Revision:
1.32
Author
R.Bellan - INFN TO

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

Date:
2010/02/11 00:14:31
Revision:
1.9
Author
R.Bellan - INFN TO

Definition at line 26 of file StandAloneMuonProducer.h.

Constructor & Destructor Documentation

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

constructor with config

Definition at line 48 of file StandAloneMuonProducer.cc.

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

48  {
49  LogTrace("Muon|RecoMuon|StandAloneMuonProducer")<<"constructor called"<<endl;
50 
51  // Parameter set for the Builder
52  ParameterSet trajectoryBuilderParameters = parameterSet.getParameter<ParameterSet>("STATrajBuilderParameters");
53 
54  // MuonSeed Collection Label
55  theSeedCollectionLabel = parameterSet.getParameter<InputTag>("InputObjects");
56 
57  // service parameters
58  ParameterSet serviceParameters = parameterSet.getParameter<ParameterSet>("ServiceParameters");
59 
60  // TrackLoader parameters
61  ParameterSet trackLoaderParameters = parameterSet.getParameter<ParameterSet>("TrackLoaderParameters");
62 
63  // the services
64  theService = new MuonServiceProxy(serviceParameters);
65 
66  MuonTrackLoader * trackLoader = new MuonTrackLoader(trackLoaderParameters,theService);
67  MuonTrajectoryBuilder * trajectoryBuilder = 0;
68  // instantiate the concrete trajectory builder in the Track Finder
69  string typeOfBuilder = parameterSet.getParameter<string>("MuonTrajectoryBuilder");
70  if(typeOfBuilder == "StandAloneMuonTrajectoryBuilder")
71  trajectoryBuilder = new StandAloneMuonTrajectoryBuilder(trajectoryBuilderParameters,theService);
72  else if(typeOfBuilder == "DirectMuonTrajectoryBuilder")
73  trajectoryBuilder = new DirectMuonTrajectoryBuilder(trajectoryBuilderParameters,theService);
74  else if(typeOfBuilder == "Exhaustive")
75  trajectoryBuilder = new ExhaustiveMuonTrajectoryBuilder(trajectoryBuilderParameters,theService);
76  else{
77  LogWarning("Muon|RecoMuon|StandAloneMuonProducer") << "No Trajectory builder associated with "<<typeOfBuilder
78  << ". Falling down to the default (StandAloneMuonTrajectoryBuilder)";
79  trajectoryBuilder = new StandAloneMuonTrajectoryBuilder(trajectoryBuilderParameters,theService);
80  }
81  theTrackFinder = new MuonTrackFinder(trajectoryBuilder, trackLoader);
82 
83  setAlias(parameterSet.getParameter<std::string>("@module_label"));
84 
85  produces<reco::TrackCollection>().setBranchAlias(theAlias + "Tracks");
86  produces<reco::TrackCollection>("UpdatedAtVtx").setBranchAlias(theAlias + "UpdatedAtVtxTracks");
87  produces<TrackingRecHitCollection>().setBranchAlias(theAlias + "RecHits");
88  produces<reco::TrackExtraCollection>().setBranchAlias(theAlias + "TrackExtras");
89  produces<reco::TrackToTrackMap>().setBranchAlias(theAlias + "TrackToTrackMap");
90 
91  produces<std::vector<Trajectory> >().setBranchAlias(theAlias + "Trajectories");
92  produces<TrajTrackAssociationCollection>().setBranchAlias(theAlias + "TrajToTrackMap");
93 }
T getParameter(std::string const &) const
edm::InputTag theSeedCollectionLabel
MuonSeed Collection Label.
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
StandAloneMuonProducer::~StandAloneMuonProducer ( )
virtual

destructor

Definition at line 96 of file StandAloneMuonProducer.cc.

References LogTrace.

96  {
97  LogTrace("Muon|RecoMuon|StandAloneMuonProducer")<<"StandAloneMuonProducer destructor called"<<endl;
98  if (theService) delete theService;
99  if (theTrackFinder) delete theTrackFinder;
100 }
#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 
)
virtual

reconstruct muons

Implements edm::EDProducer.

Definition at line 103 of file StandAloneMuonProducer.cc.

References LogTrace, and metname.

103  {
104  const std::string metname = "Muon|RecoMuon|StandAloneMuonProducer";
105 
106  LogTrace(metname)<<endl<<endl<<endl;
107  LogTrace(metname)<<"Stand Alone Muon Reconstruction Started"<<endl;
108 
109  // Take the seeds container
110  LogTrace(metname)<<"Taking the seeds: "<<theSeedCollectionLabel.label()<<endl;
112  event.getByLabel(theSeedCollectionLabel,seeds);
113 
114  // Update the services
115  theService->update(eventSetup);
116  NavigationSetter setter(*theService->muonNavigationSchool());
117 
118  // Reconstruct
119  LogTrace(metname)<<"Track Reconstruction"<<endl;
120  theTrackFinder->reconstruct(seeds,event);
121 
122  LogTrace(metname)<<"Event loaded"
123  <<"================================"
124  <<endl<<endl;
125 }
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:25
MuonTrackFinder * theTrackFinder
the track finder
edm::OrphanHandle< reco::TrackCollection > reconstruct(const edm::Handle< edm::View< TrajectorySeed > > &, edm::Event &)
reconstruct standalone tracks starting from a collection of seeds
void StandAloneMuonProducer::setAlias ( std::string  alias)
inlineprivate

Definition at line 52 of file StandAloneMuonProducer.h.

References theAlias.

52  {
53  alias.erase( alias.size() - 1, alias.size() );
54  theAlias=alias;
55  }

Member Data Documentation

std::string StandAloneMuonProducer::theAlias
private

Definition at line 50 of file StandAloneMuonProducer.h.

Referenced by setAlias().

edm::InputTag StandAloneMuonProducer::theSeedCollectionLabel
private

MuonSeed Collection Label.

Definition at line 42 of file StandAloneMuonProducer.h.

MuonServiceProxy* StandAloneMuonProducer::theService
private

the event setup proxy, it takes care the services update

Definition at line 48 of file StandAloneMuonProducer.h.

MuonTrackFinder* StandAloneMuonProducer::theTrackFinder
private

the track finder

Definition at line 45 of file StandAloneMuonProducer.h.