CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
L2MuonProducer Class Reference
Inheritance diagram for L2MuonProducer:
edm::stream::EDProducer<>

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
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Attributes

edm::EDGetTokenT< edm::View< TrajectorySeed > > seedsToken
 
edm::InputTag theSeedCollectionLabel
 
std::unique_ptr< MuonServiceProxytheService
 the event setup proxy, it takes care the services update More...
 
std::unique_ptr< MuonTrackFindertheTrackFinder
 the track finder More...
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

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 45 of file L2MuonProducer.cc.

Constructor & Destructor Documentation

◆ L2MuonProducer()

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

constructor with config

Definition at line 71 of file L2MuonProducer.cc.

71  {
72  LogTrace("Muon|RecoMuon|L2MuonProducer") << "constructor called" << endl;
73 
74  // Parameter set for the Builder
75  edm::ParameterSet trajectoryBuilderParameters =
76  parameterSet.getParameter<edm::ParameterSet>("L2TrajBuilderParameters");
77 
78  // MuonSeed Collection Label
80  seedsToken = consumes<edm::View<TrajectorySeed>>(theSeedCollectionLabel);
81  // service parameters
82  edm::ParameterSet serviceParameters = parameterSet.getParameter<edm::ParameterSet>("ServiceParameters");
83 
84  // TrackLoader parameters
85  edm::ParameterSet trackLoaderParameters = parameterSet.getParameter<edm::ParameterSet>("TrackLoaderParameters");
86 
87  // the services
88  theService = std::make_unique<MuonServiceProxy>(serviceParameters, consumesCollector());
89 
90  std::unique_ptr<MuonTrajectoryBuilder> trajectoryBuilder = nullptr;
91  // instantiate the concrete trajectory builder in the Track Finder
92 
93  edm::ConsumesCollector iC = consumesCollector();
94  string typeOfBuilder = parameterSet.existsAs<string>("MuonTrajectoryBuilder")
95  ? parameterSet.getParameter<string>("MuonTrajectoryBuilder")
96  : "StandAloneMuonTrajectoryBuilder";
97  if (typeOfBuilder == "StandAloneMuonTrajectoryBuilder" || typeOfBuilder.empty())
98  trajectoryBuilder =
99  std::make_unique<StandAloneMuonTrajectoryBuilder>(trajectoryBuilderParameters, theService.get(), iC);
100  else if (typeOfBuilder == "Exhaustive")
101  trajectoryBuilder =
102  std::make_unique<ExhaustiveMuonTrajectoryBuilder>(trajectoryBuilderParameters, theService.get(), iC);
103  else {
104  edm::LogWarning("Muon|RecoMuon|StandAloneMuonProducer")
105  << "No Trajectory builder associated with " << typeOfBuilder
106  << ". Falling down to the default (StandAloneMuonTrajectoryBuilder)";
107  trajectoryBuilder =
108  std::make_unique<StandAloneMuonTrajectoryBuilder>(trajectoryBuilderParameters, theService.get(), iC);
109  }
111  std::make_unique<MuonTrackFinder>(std::move(trajectoryBuilder),
112  std::make_unique<MuonTrackLoader>(trackLoaderParameters, iC, theService.get()),
113  std::make_unique<MuonTrajectoryCleaner>(true),
114  iC);
115 
116  produces<reco::TrackCollection>();
117  produces<reco::TrackCollection>("UpdatedAtVtx");
118  produces<TrackingRecHitCollection>();
119  produces<reco::TrackExtraCollection>();
120  produces<reco::TrackToTrackMap>();
121 
122  produces<std::vector<Trajectory>>();
123  produces<TrajTrackAssociationCollection>();
124 
125  produces<edm::AssociationMap<edm::OneToMany<std::vector<L2MuonTrajectorySeed>, std::vector<L2MuonTrajectorySeed>>>>();
126 }

References edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), LogTrace, eostools::move(), edm::parameterSet(), seedsToken, theSeedCollectionLabel, theService, and theTrackFinder.

◆ ~L2MuonProducer()

L2MuonProducer::~L2MuonProducer ( )
override

destructor

Definition at line 129 of file L2MuonProducer.cc.

129  {
130  LogTrace("Muon|RecoMuon|L2eMuonProducer") << "L2MuonProducer destructor called" << endl;
131 }

References LogTrace.

Member Function Documentation

◆ fillDescriptions()

void L2MuonProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 157 of file L2MuonProducer.cc.

157  {
159  {
161  psd0.addUntracked<std::vector<std::string>>("Propagators",
162  {
163  "hltESPFastSteppingHelixPropagatorAny"
164  "hltESPFastSteppingHelixPropagatorOpposite",
165  });
166  psd0.add<bool>("RPCLayers", true);
167  psd0.addUntracked<bool>("UseMuonNavigation", true);
168  desc.add<edm::ParameterSetDescription>("ServiceParameters", psd0);
169  }
170 
171  desc.add<edm::InputTag>("InputObjects", edm::InputTag("hltL2MuonSeeds"));
172  {
174  psd0.add<std::string>("Fitter", "hltESPKFFittingSmootherForL2Muon");
175  psd0.add<std::string>("MuonRecHitBuilder", "hltESPMuonTransientTrackingRecHitBuilder");
176  psd0.add<unsigned int>("NMinRecHits", 2);
177  psd0.add<bool>("UseSubRecHits", false);
178  psd0.add<std::string>("Propagator", "hltESPFastSteppingHelixPropagatorAny");
179  psd0.add<double>("RescaleError", 100.0);
180  desc.add<edm::ParameterSetDescription>("SeedTransformerParameters", psd0);
181  }
182 
183  {
185  psd0.add<bool>("DoRefit", false);
186  psd0.add<std::string>("SeedPropagator", "hltESPFastSteppingHelixPropagatorAny");
187  {
189  psd1.add<double>("NumberOfSigma", 3.0);
190  psd1.add<std::string>("FitDirection", "insideOut");
191  psd1.add<edm::InputTag>("DTRecSegmentLabel", edm::InputTag("hltDt4DSegments"));
192  psd1.add<double>("MaxChi2", 1000.0);
193  {
195  psd2.add<double>("MaxChi2", 25.0);
196  psd2.add<double>("RescaleErrorFactor", 100.0);
197  psd2.add<int>("Granularity", 0);
198  psd2.add<bool>("ExcludeRPCFromFit", false);
199  psd2.add<bool>("UseInvalidHits", true);
200  psd2.add<bool>("RescaleError", false);
201  psd1.add<edm::ParameterSetDescription>("MuonTrajectoryUpdatorParameters", psd2);
202  }
203  psd1.add<bool>("EnableRPCMeasurement", true);
204  psd1.add<edm::InputTag>("CSCRecSegmentLabel", edm::InputTag("hltCscSegments"));
205  psd1.add<bool>("EnableDTMeasurement", true);
206  psd1.add<edm::InputTag>("RPCRecSegmentLabel", edm::InputTag("hltRpcRecHits"));
207  psd1.add<std::string>("Propagator", "hltESPFastSteppingHelixPropagatorAny");
208  psd1.add<bool>("EnableGEMMeasurement", false);
209  psd1.add<edm::InputTag>("GEMRecSegmentLabel", edm::InputTag("gemRecHits"));
210  psd1.add<bool>("EnableME0Measurement", false);
211  psd1.add<edm::InputTag>("ME0RecSegmentLabel", edm::InputTag("me0Segments"));
212  psd1.add<bool>("EnableCSCMeasurement", true);
213  psd0.add<edm::ParameterSetDescription>("FilterParameters", psd1);
214  }
215  psd0.add<std::string>("NavigationType", "Standard");
216  {
218  psd1.add<std::string>("Fitter", "hltESPKFFittingSmootherForL2Muon");
219  psd1.add<std::string>("MuonRecHitBuilder", "hltESPMuonTransientTrackingRecHitBuilder");
220  psd1.add<unsigned int>("NMinRecHits", 2);
221  psd1.add<bool>("UseSubRecHits", false);
222  psd1.add<std::string>("Propagator", "hltESPFastSteppingHelixPropagatorAny");
223  psd1.add<double>("RescaleError", 100.0);
224  psd0.add<edm::ParameterSetDescription>("SeedTransformerParameters", psd1);
225  }
226  psd0.add<bool>("DoBackwardFilter", true);
227  psd0.add<std::string>("SeedPosition", "in");
228  {
230  psd1.add<double>("NumberOfSigma", 3.0);
231  psd1.add<edm::InputTag>("CSCRecSegmentLabel", edm::InputTag("hltCscSegments"));
232  psd1.add<std::string>("FitDirection", "outsideIn");
233  psd1.add<edm::InputTag>("DTRecSegmentLabel", edm::InputTag("hltDt4DSegments"));
234  psd1.add<double>("MaxChi2", 100.0);
235  {
237  psd2.add<double>("MaxChi2", 25.0);
238  psd2.add<double>("RescaleErrorFactor", 100.0);
239  psd2.add<int>("Granularity", 0);
240  psd2.add<bool>("ExcludeRPCFromFit", false);
241  psd2.add<bool>("UseInvalidHits", true);
242  psd2.add<bool>("RescaleError", false);
243  psd1.add<edm::ParameterSetDescription>("MuonTrajectoryUpdatorParameters", psd2);
244  }
245  psd1.add<bool>("EnableRPCMeasurement", true);
246  psd1.add<std::string>("BWSeedType", "fromGenerator");
247  psd1.add<bool>("EnableDTMeasurement", true);
248  psd1.add<edm::InputTag>("RPCRecSegmentLabel", edm::InputTag("hltRpcRecHits"));
249  psd1.add<std::string>("Propagator", "hltESPFastSteppingHelixPropagatorAny");
250  psd1.add<bool>("EnableGEMMeasurement", false);
251  psd1.add<edm::InputTag>("GEMRecSegmentLabel", edm::InputTag("gemRecHits"));
252  psd1.add<bool>("EnableME0Measurement", false);
253  psd1.add<edm::InputTag>("ME0RecSegmentLabel", edm::InputTag("me0Segments"));
254  psd1.add<bool>("EnableCSCMeasurement", true);
255  psd0.add<edm::ParameterSetDescription>("BWFilterParameters", psd1);
256  }
257  psd0.add<bool>("DoSeedRefit", false);
258  desc.add<edm::ParameterSetDescription>("L2TrajBuilderParameters", psd0);
259  }
260  desc.add<bool>("DoSeedRefit", false);
261  {
263  psd0.add<std::string>("Smoother", "hltESPKFTrajectorySmootherForMuonTrackLoader");
264  psd0.add<bool>("DoSmoothing", false);
265  psd0.add<edm::InputTag>("beamSpot", edm::InputTag("hltOnlineBeamSpot"));
266  {
268  psd1.add<double>("MaxChi2", 1000000.0);
269  psd1.add<std::vector<double>>("BeamSpotPosition",
270  {
271  0.0,
272  0.0,
273  0.0,
274  });
275  psd1.add<std::string>("Propagator", "hltESPFastSteppingHelixPropagatorOpposite");
276  psd1.add<std::vector<double>>("BeamSpotPositionErrors",
277  {
278  0.1,
279  0.1,
280  5.3,
281  });
282  psd0.add<edm::ParameterSetDescription>("MuonUpdatorAtVertexParameters", psd1);
283  }
284  psd0.add<bool>("VertexConstraint", true);
285  psd0.add<std::string>("TTRHBuilder", "hltESPTTRHBWithTrackAngle");
286  desc.add<edm::ParameterSetDescription>("TrackLoaderParameters", psd0);
287  }
288  desc.add<std::string>("MuonTrajectoryBuilder", "Exhaustive");
289  descriptions.add("L2MuonProducer", desc);
290 }

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), submitPVResolutionJobs::desc, HLT_FULL_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ produce()

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

reconstruct muons

Definition at line 134 of file L2MuonProducer.cc.

134  {
135  const std::string metname = "Muon|RecoMuon|L2MuonProducer";
136 
137  LogTrace(metname) << endl << endl << endl;
138  LogTrace(metname) << "L2 Muon Reconstruction Started" << endl;
139 
140  // Take the seeds container
141  LogTrace(metname) << "Taking the seeds: " << theSeedCollectionLabel.label() << endl;
143  event.getByToken(seedsToken, seeds);
144 
145  // Update the services
146  theService->update(eventSetup);
147 
148  // Reconstruct
149  LogTrace(metname) << "Track Reconstruction" << endl;
150  theTrackFinder->reconstruct(seeds, event, eventSetup);
151 
152  LogTrace(metname) << "edm::Event loaded"
153  << "================================" << endl
154  << endl;
155 }

References edm::InputTag::label(), LogTrace, metname, DetachedQuadStep_cff::seeds, seedsToken, AlCaHLTBitMon_QueryRunRegistry::string, theSeedCollectionLabel, theService, and theTrackFinder.

Member Data Documentation

◆ seedsToken

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

Definition at line 67 of file L2MuonProducer.cc.

Referenced by L2MuonProducer(), and produce().

◆ theSeedCollectionLabel

edm::InputTag L2MuonProducer::theSeedCollectionLabel
private

Definition at line 59 of file L2MuonProducer.cc.

Referenced by L2MuonProducer(), and produce().

◆ theService

std::unique_ptr<MuonServiceProxy> L2MuonProducer::theService
private

the event setup proxy, it takes care the services update

Definition at line 65 of file L2MuonProducer.cc.

Referenced by L2MuonProducer(), and produce().

◆ theTrackFinder

std::unique_ptr<MuonTrackFinder> L2MuonProducer::theTrackFinder
private

the track finder

Definition at line 62 of file L2MuonProducer.cc.

Referenced by L2MuonProducer(), and produce().

edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::ParameterSet::existsAs
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:171
edm::Handle
Definition: AssociativeIterator.h:50
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
edm::parameterSet
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
edm::InputTag::label
std::string const & label() const
Definition: InputTag.h:36
L2MuonProducer::theService
std::unique_ptr< MuonServiceProxy > theService
the event setup proxy, it takes care the services update
Definition: L2MuonProducer.cc:65
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
edm::ParameterSetDescription::addUntracked
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:100
edm::ParameterSet
Definition: ParameterSet.h:47
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L2MuonProducer::theTrackFinder
std::unique_ptr< MuonTrackFinder > theTrackFinder
the track finder
Definition: L2MuonProducer.cc:62
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
DetachedQuadStep_cff.seeds
seeds
Definition: DetachedQuadStep_cff.py:195
L2MuonProducer::seedsToken
edm::EDGetTokenT< edm::View< TrajectorySeed > > seedsToken
Definition: L2MuonProducer.cc:67
L2MuonProducer::theSeedCollectionLabel
edm::InputTag theSeedCollectionLabel
Definition: L2MuonProducer.cc:59
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
event
Definition: event.py:1
edm::InputTag
Definition: InputTag.h:15
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
metname
const std::string metname
Definition: MuonSeedOrcaPatternRecognition.cc:40