CMS 3D CMS Logo

List of all members | Public Member Functions | Static 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...
 
void produce (edm::Event &, const edm::EventSetup &) override
 reconstruct muons More...
 
 ~L2MuonProducer () 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)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

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, 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
 
- 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

modified by A. Sharma to add fillDescription function

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

Author
R.Bellan - INFN TO

modified by A. Sharma to add fillDescription function

Definition at line 33 of file L2MuonProducer.h.

Constructor & Destructor Documentation

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

constructor with config

Definition at line 49 of file L2MuonProducer.cc.

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

49  {
50  LogTrace("Muon|RecoMuon|L2MuonProducer")<<"constructor called"<<endl;
51 
52  // Parameter set for the Builder
53  ParameterSet trajectoryBuilderParameters = parameterSet.getParameter<ParameterSet>("L2TrajBuilderParameters");
54 
55  // MuonSeed Collection Label
56  theSeedCollectionLabel = parameterSet.getParameter<InputTag>("InputObjects");
57  seedsToken = consumes<edm::View<TrajectorySeed> >(theSeedCollectionLabel);
58  // service parameters
59  ParameterSet serviceParameters = parameterSet.getParameter<ParameterSet>("ServiceParameters");
60 
61  // TrackLoader parameters
62  ParameterSet trackLoaderParameters = parameterSet.getParameter<ParameterSet>("TrackLoaderParameters");
63 
64  // the services
65  theService = new MuonServiceProxy(serviceParameters);
66 
67  MuonTrajectoryBuilder * trajectoryBuilder = nullptr;
68  // instantiate the concrete trajectory builder in the Track Finder
69 
71  string typeOfBuilder = parameterSet.existsAs<string>("MuonTrajectoryBuilder") ?
72  parameterSet.getParameter<string>("MuonTrajectoryBuilder") : "StandAloneMuonTrajectoryBuilder";
73  if(typeOfBuilder == "StandAloneMuonTrajectoryBuilder" || typeOfBuilder == "")
74  trajectoryBuilder = new StandAloneMuonTrajectoryBuilder(trajectoryBuilderParameters,theService,iC);
75  else if(typeOfBuilder == "Exhaustive")
76  trajectoryBuilder = new ExhaustiveMuonTrajectoryBuilder(trajectoryBuilderParameters,theService,iC);
77  else{
78  LogWarning("Muon|RecoMuon|StandAloneMuonProducer") << "No Trajectory builder associated with "<<typeOfBuilder
79  << ". Falling down to the default (StandAloneMuonTrajectoryBuilder)";
80  trajectoryBuilder = new StandAloneMuonTrajectoryBuilder(trajectoryBuilderParameters,theService,iC);
81  }
82  theTrackFinder = new MuonTrackFinder(trajectoryBuilder,
83  new MuonTrackLoader(trackLoaderParameters, iC, theService),
84  new MuonTrajectoryCleaner(true));
85 
86  produces<reco::TrackCollection>();
87  produces<reco::TrackCollection>("UpdatedAtVtx");
88  produces<TrackingRecHitCollection>();
89  produces<reco::TrackExtraCollection>();
90  produces<reco::TrackToTrackMap>();
91 
92  produces<std::vector<Trajectory> >();
93  produces<TrajTrackAssociationCollection>();
94 
95  produces<edm::AssociationMap<edm::OneToMany<std::vector<L2MuonTrajectorySeed>, std::vector<L2MuonTrajectorySeed> > > >();
96 }
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 ( )
override

destructor

Definition at line 99 of file L2MuonProducer.cc.

References LogTrace.

99  {
100  LogTrace("Muon|RecoMuon|L2eMuonProducer")<<"L2MuonProducer destructor called"<<endl;
101  delete theService;
102  delete theTrackFinder;
103 }
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::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 131 of file L2MuonProducer.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), and AlCaHLTBitMon_QueryRunRegistry::string.

131  {
133  {
135  psd0.addUntracked<std::vector<std::string>>("Propagators", {
136  "hltESPFastSteppingHelixPropagatorAny"
137  "hltESPFastSteppingHelixPropagatorOpposite",
138  });
139  psd0.add<bool>("RPCLayers", true);
140  psd0.addUntracked<bool>("UseMuonNavigation", true);
141  desc.add<edm::ParameterSetDescription>("ServiceParameters", psd0);
142  }
143 
144 
145  desc.add<edm::InputTag>("InputObjects", edm::InputTag("hltL2MuonSeeds"));
146  {
148  psd0.add<std::string>("Fitter", "hltESPKFFittingSmootherForL2Muon");
149  psd0.add<std::string>("MuonRecHitBuilder", "hltESPMuonTransientTrackingRecHitBuilder");
150  psd0.add<unsigned int>("NMinRecHits",2);
151  psd0.add<bool>("UseSubRecHits", false);
152  psd0.add<std::string>("Propagator", "hltESPFastSteppingHelixPropagatorAny");
153  psd0.add<double>("RescaleError", 100.0);
154  desc.add<edm::ParameterSetDescription>("SeedTransformerParameters", psd0);
155  }
156 
157  {
159  psd0.add<bool>("DoRefit", false);
160  psd0.add<std::string>("SeedPropagator", "hltESPFastSteppingHelixPropagatorAny");
161  {
163  psd1.add<double>("NumberOfSigma", 3.0);
164  psd1.add<std::string>("FitDirection", "insideOut");
165  psd1.add<edm::InputTag>("DTRecSegmentLabel", edm::InputTag("hltDt4DSegments"));
166  psd1.add<double>("MaxChi2", 1000.0);
167  {
169  psd2.add<double>("MaxChi2", 25.0);
170  psd2.add<double>("RescaleErrorFactor", 100.0);
171  psd2.add<int>("Granularity", 0);
172  psd2.add<bool>("ExcludeRPCFromFit", false);
173  psd2.add<bool>("UseInvalidHits", true);
174  psd2.add<bool>("RescaleError", false);
175  psd1.add<edm::ParameterSetDescription>("MuonTrajectoryUpdatorParameters", psd2);
176  }
177  psd1.add<bool>("EnableRPCMeasurement", true);
178  psd1.add<edm::InputTag>("CSCRecSegmentLabel", edm::InputTag("hltCscSegments"));
179  psd1.add<bool>("EnableDTMeasurement", true);
180  psd1.add<edm::InputTag>("RPCRecSegmentLabel", edm::InputTag("hltRpcRecHits"));
181  psd1.add<std::string>("Propagator", "hltESPFastSteppingHelixPropagatorAny");
182  psd1.add<bool>("EnableGEMMeasurement", false);
183  psd1.add<edm::InputTag>("GEMRecSegmentLabel", edm::InputTag("gemRecHits"));
184  psd1.add<bool>("EnableME0Measurement", false);
185  psd1.add<edm::InputTag>("ME0RecSegmentLabel", edm::InputTag("me0Segments"));
186  psd1.add<bool>("EnableCSCMeasurement", true);
187  psd0.add<edm::ParameterSetDescription>("FilterParameters", psd1);
188  }
189  psd0.add<std::string>("NavigationType", "Standard");
190  {
192  psd1.add<std::string>("Fitter", "hltESPKFFittingSmootherForL2Muon");
193  psd1.add<std::string>("MuonRecHitBuilder", "hltESPMuonTransientTrackingRecHitBuilder");
194  psd1.add<unsigned int>("NMinRecHits",2);
195  psd1.add<bool>("UseSubRecHits", false);
196  psd1.add<std::string>("Propagator", "hltESPFastSteppingHelixPropagatorAny");
197  psd1.add<double>("RescaleError", 100.0);
198  psd0.add<edm::ParameterSetDescription>("SeedTransformerParameters", psd1);
199  }
200  psd0.add<bool>("DoBackwardFilter", true);
201  psd0.add<std::string>("SeedPosition", "in");
202  {
204  psd1.add<double>("NumberOfSigma", 3.0);
205  psd1.add<edm::InputTag>("CSCRecSegmentLabel", edm::InputTag("hltCscSegments"));
206  psd1.add<std::string>("FitDirection", "outsideIn");
207  psd1.add<edm::InputTag>("DTRecSegmentLabel", edm::InputTag("hltDt4DSegments"));
208  psd1.add<double>("MaxChi2", 100.0);
209  {
211  psd2.add<double>("MaxChi2", 25.0);
212  psd2.add<double>("RescaleErrorFactor", 100.0);
213  psd2.add<int>("Granularity", 0);
214  psd2.add<bool>("ExcludeRPCFromFit", false);
215  psd2.add<bool>("UseInvalidHits", true);
216  psd2.add<bool>("RescaleError", false);
217  psd1.add<edm::ParameterSetDescription>("MuonTrajectoryUpdatorParameters", psd2);
218  }
219  psd1.add<bool>("EnableRPCMeasurement", true);
220  psd1.add<std::string>("BWSeedType", "fromGenerator");
221  psd1.add<bool>("EnableDTMeasurement", true);
222  psd1.add<edm::InputTag>("RPCRecSegmentLabel", edm::InputTag("hltRpcRecHits"));
223  psd1.add<std::string>("Propagator", "hltESPFastSteppingHelixPropagatorAny");
224  psd1.add<bool>("EnableGEMMeasurement", false);
225  psd1.add<edm::InputTag>("GEMRecSegmentLabel", edm::InputTag("gemRecHits"));
226  psd1.add<bool>("EnableME0Measurement", false);
227  psd1.add<edm::InputTag>("ME0RecSegmentLabel", edm::InputTag("me0Segments"));
228  psd1.add<bool>("EnableCSCMeasurement", true);
229  psd0.add<edm::ParameterSetDescription>("BWFilterParameters", psd1);
230  }
231  psd0.add<bool>("DoSeedRefit", false);
232  desc.add<edm::ParameterSetDescription>("L2TrajBuilderParameters", psd0);
233  }
234  desc.add<bool>("DoSeedRefit", false);
235  {
237  psd0.add<std::string>("Smoother", "hltESPKFTrajectorySmootherForMuonTrackLoader");
238  psd0.add<bool>("DoSmoothing", false);
239  psd0.add<edm::InputTag>("beamSpot", edm::InputTag("hltOnlineBeamSpot"));
240  {
242  psd1.add<double>("MaxChi2", 1000000.0);
243  psd1.add<std::vector<double>>("BeamSpotPosition", {
244  0.0,
245  0.0,
246  0.0,
247  });
248  psd1.add<std::string>("Propagator", "hltESPFastSteppingHelixPropagatorOpposite");
249  psd1.add<std::vector<double>>("BeamSpotPositionErrors", {
250  0.1,
251  0.1,
252  5.3,
253  });
254  psd0.add<edm::ParameterSetDescription>("MuonUpdatorAtVertexParameters", psd1);
255  }
256  psd0.add<bool>("VertexConstraint", true);
257  psd0.add<std::string>("TTRHBuilder", "hltESPTTRHBWithTrackAngle");
258  desc.add<edm::ParameterSetDescription>("TrackLoaderParameters", psd0);
259  }
260  desc.add<std::string>("MuonTrajectoryBuilder", "Exhaustive");
261  descriptions.add("L2MuonProducer", desc);
262 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void L2MuonProducer::produce ( edm::Event event,
const edm::EventSetup eventSetup 
)
override

reconstruct muons

Definition at line 107 of file L2MuonProducer.cc.

References LogTrace, metname, and AlCaHLTBitMon_QueryRunRegistry::string.

107  {
108 
109  const std::string metname = "Muon|RecoMuon|L2MuonProducer";
110 
111  LogTrace(metname)<<endl<<endl<<endl;
112  LogTrace(metname)<<"L2 Muon Reconstruction Started"<<endl;
113 
114  // Take the seeds container
115  LogTrace(metname)<<"Taking the seeds: "<<theSeedCollectionLabel.label()<<endl;
117  event.getByToken(seedsToken,seeds);
118 
119  // Update the services
120  theService->update(eventSetup);
121 
122  // Reconstruct
123  LogTrace(metname)<<"Track Reconstruction"<<endl;
124  theTrackFinder->reconstruct(seeds,event, eventSetup);
125 
126  LogTrace(metname)<<"Event loaded"
127  <<"================================"
128  <<endl<<endl;
129 }
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:36
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

Member Data Documentation

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

Definition at line 57 of file L2MuonProducer.h.

edm::InputTag L2MuonProducer::theSeedCollectionLabel
private

Definition at line 49 of file L2MuonProducer.h.

MuonServiceProxy* L2MuonProducer::theService
private

the event setup proxy, it takes care the services update

Definition at line 55 of file L2MuonProducer.h.

MuonTrackFinder* L2MuonProducer::theTrackFinder
private

the track finder

Definition at line 52 of file L2MuonProducer.h.