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.

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

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.getParameter<string>("MuonTrajectoryBuilder");
95  if (typeOfBuilder == "StandAloneMuonTrajectoryBuilder" || typeOfBuilder.empty())
96  trajectoryBuilder =
97  std::make_unique<StandAloneMuonTrajectoryBuilder>(trajectoryBuilderParameters, theService.get(), iC);
98  else if (typeOfBuilder == "Exhaustive")
99  trajectoryBuilder =
100  std::make_unique<ExhaustiveMuonTrajectoryBuilder>(trajectoryBuilderParameters, theService.get(), iC);
101  else {
102  edm::LogWarning("Muon|RecoMuon|StandAloneMuonProducer")
103  << "No Trajectory builder associated with " << typeOfBuilder
104  << ". Falling down to the default (StandAloneMuonTrajectoryBuilder)";
105  trajectoryBuilder =
106  std::make_unique<StandAloneMuonTrajectoryBuilder>(trajectoryBuilderParameters, theService.get(), iC);
107  }
109  std::make_unique<MuonTrackFinder>(std::move(trajectoryBuilder),
110  std::make_unique<MuonTrackLoader>(trackLoaderParameters, iC, theService.get()),
111  std::make_unique<MuonTrajectoryCleaner>(true),
112  iC);
113 
114  produces<TrackingRecHitCollection>();
115  produces<reco::TrackExtraCollection>();
116  // TrackCollection refers to TrackingRechit and TrackExtra
117  // collections, need to declare its production after them to work
118  // around a rare race condition in framework scheduling
119  produces<reco::TrackCollection>();
120  produces<reco::TrackCollection>("UpdatedAtVtx");
121  produces<reco::TrackToTrackMap>();
122 
123  produces<std::vector<Trajectory>>();
124  produces<TrajTrackAssociationCollection>();
125 
126  produces<edm::AssociationMap<edm::OneToMany<std::vector<L2MuonTrajectorySeed>, std::vector<L2MuonTrajectorySeed>>>>();
127 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::unique_ptr< MuonServiceProxy > theService
the event setup proxy, it takes care the services update
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
#define LogTrace(id)
edm::EDGetTokenT< edm::View< TrajectorySeed > > seedsToken
edm::InputTag theSeedCollectionLabel
Log< level::Warning, false > LogWarning
std::unique_ptr< MuonTrackFinder > theTrackFinder
the track finder
def move(src, dest)
Definition: eostools.py:511

◆ ~L2MuonProducer()

L2MuonProducer::~L2MuonProducer ( )
override

destructor

Definition at line 130 of file L2MuonProducer.cc.

References LogTrace.

130  {
131  LogTrace("Muon|RecoMuon|L2eMuonProducer") << "L2MuonProducer destructor called" << endl;
132 }
#define LogTrace(id)

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 158 of file L2MuonProducer.cc.

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

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

◆ produce()

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

reconstruct muons

Definition at line 135 of file L2MuonProducer.cc.

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

135  {
136  const std::string metname = "Muon|RecoMuon|L2MuonProducer";
137 
138  LogTrace(metname) << endl << endl << endl;
139  LogTrace(metname) << "L2 Muon Reconstruction Started" << endl;
140 
141  // Take the seeds container
142  LogTrace(metname) << "Taking the seeds: " << theSeedCollectionLabel.label() << endl;
144  event.getByToken(seedsToken, seeds);
145 
146  // Update the services
147  theService->update(eventSetup);
148 
149  // Reconstruct
150  LogTrace(metname) << "Track Reconstruction" << endl;
151  theTrackFinder->reconstruct(seeds, event, eventSetup);
152 
153  LogTrace(metname) << "edm::Event loaded"
154  << "================================" << endl
155  << endl;
156 }
std::unique_ptr< MuonServiceProxy > theService
the event setup proxy, it takes care the services update
const std::string metname
std::string const & label() const
Definition: InputTag.h:36
#define LogTrace(id)
edm::EDGetTokenT< edm::View< TrajectorySeed > > seedsToken
edm::InputTag theSeedCollectionLabel
std::unique_ptr< MuonTrackFinder > theTrackFinder
the track finder
Definition: event.py:1

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().