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

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
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

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

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 38 of file L2MuonProducer.h.

Constructor & Destructor Documentation

◆ L2MuonProducer()

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

constructor with config

Definition at line 50 of file L2MuonProducer.cc.

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

References edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), LogTrace, eostools::move(), and edm::parameterSet().

◆ ~L2MuonProducer()

L2MuonProducer::~L2MuonProducer ( )
override

destructor

Definition at line 107 of file L2MuonProducer.cc.

107  {
108  LogTrace("Muon|RecoMuon|L2eMuonProducer") << "L2MuonProducer destructor called" << endl;
109 }

References LogTrace.

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 135 of file L2MuonProducer.cc.

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

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

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

References LogTrace, metname, InitialStep_cff::seeds, and AlCaHLTBitMon_QueryRunRegistry::string.

Member Data Documentation

◆ seedsToken

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

Definition at line 60 of file L2MuonProducer.h.

◆ theSeedCollectionLabel

edm::InputTag L2MuonProducer::theSeedCollectionLabel
private

Definition at line 52 of file L2MuonProducer.h.

◆ theService

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

the event setup proxy, it takes care the services update

Definition at line 58 of file L2MuonProducer.h.

◆ theTrackFinder

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

the track finder

Definition at line 55 of file L2MuonProducer.h.

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:89281
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.h:58
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
InitialStep_cff.seeds
seeds
Definition: InitialStep_cff.py:231
edm::ParameterSetDescription::addUntracked
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:100
edm::ParameterSet
Definition: ParameterSet.h:47
L2MuonProducer::theTrackFinder
std::unique_ptr< MuonTrackFinder > theTrackFinder
the track finder
Definition: L2MuonProducer.h:55
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
L2MuonProducer::seedsToken
edm::EDGetTokenT< edm::View< TrajectorySeed > > seedsToken
Definition: L2MuonProducer.h:60
L2MuonProducer::theSeedCollectionLabel
edm::InputTag theSeedCollectionLabel
Definition: L2MuonProducer.h:52
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