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::existsAs(), 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.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 }
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:171
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 129 of file L2MuonProducer.cc.

References LogTrace.

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

Member Function Documentation

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

Definition at line 157 of file L2MuonProducer.cc.

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

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

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

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