CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 ( const edm::ParameterSet parameterSet)

constructor with config

Definition at line 71 of file L2MuonProducer.cc.

References edm::ParameterSet::getParameter(), LogTrace, eostools::move(), 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
79  theSeedCollectionLabel = parameterSet.getParameter<edm::InputTag>("InputObjects");
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<reco::TrackCollection>();
115  produces<reco::TrackCollection>("UpdatedAtVtx");
116  produces<TrackingRecHitCollection>();
117  produces<reco::TrackExtraCollection>();
118  produces<reco::TrackToTrackMap>();
119 
120  produces<std::vector<Trajectory>>();
121  produces<TrajTrackAssociationCollection>();
122 
123  produces<edm::AssociationMap<edm::OneToMany<std::vector<L2MuonTrajectorySeed>, std::vector<L2MuonTrajectorySeed>>>>();
124 }
std::unique_ptr< MuonServiceProxy > theService
the event setup proxy, it takes care the services update
#define LogTrace(id)
edm::EDGetTokenT< edm::View< TrajectorySeed > > seedsToken
edm::InputTag theSeedCollectionLabel
def move
Definition: eostools.py:511
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
Log< level::Warning, false > LogWarning
std::unique_ptr< MuonTrackFinder > theTrackFinder
the track finder
L2MuonProducer::~L2MuonProducer ( )
override

destructor

Definition at line 127 of file L2MuonProducer.cc.

References LogTrace.

127  {
128  LogTrace("Muon|RecoMuon|L2eMuonProducer") << "L2MuonProducer destructor called" << endl;
129 }
#define LogTrace(id)

Member Function Documentation

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

Definition at line 155 of file L2MuonProducer.cc.

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

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

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

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

Member Data Documentation

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

Definition at line 67 of file L2MuonProducer.cc.

Referenced by L2MuonProducer(), and produce().

edm::InputTag L2MuonProducer::theSeedCollectionLabel
private

Definition at line 59 of file L2MuonProducer.cc.

Referenced by L2MuonProducer(), and produce().

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

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

the track finder

Definition at line 62 of file L2MuonProducer.cc.

Referenced by L2MuonProducer(), and produce().