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 hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () 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 
93  produces<reco::TrackCollection>();
94  produces<reco::TrackCollection>("UpdatedAtVtx");
95  produces<TrackingRecHitCollection>();
96  produces<reco::TrackExtraCollection>();
97  produces<reco::TrackToTrackMap>();
98 
99  produces<std::vector<Trajectory>>();
100  produces<TrajTrackAssociationCollection>();
101 
102  produces<edm::AssociationMap<edm::OneToMany<std::vector<L2MuonTrajectorySeed>, std::vector<L2MuonTrajectorySeed>>>>();
103 }

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

◆ ~L2MuonProducer()

L2MuonProducer::~L2MuonProducer ( )
override

destructor

Definition at line 106 of file L2MuonProducer.cc.

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

References LogTrace.

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 134 of file L2MuonProducer.cc.

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

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), HLT_2018_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ produce()

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

reconstruct muons

Definition at line 111 of file L2MuonProducer.cc.

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

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
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:160
edm::Handle
Definition: AssociativeIterator.h:50
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
edm::LogWarning
Definition: MessageLogger.h:141
InitialStep_cff.seeds
seeds
Definition: InitialStep_cff.py:232
edm::ParameterSetDescription::addUntracked
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:100
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
edm::ParameterSet
Definition: ParameterSet.h:36
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
L2MuonProducer::theTrackFinder
std::unique_ptr< MuonTrackFinder > theTrackFinder
the track finder
Definition: L2MuonProducer.h:55
eostools.move
def move(src, dest)
Definition: eostools.py:511
L2MuonProducer::seedsToken
edm::EDGetTokenT< edm::View< TrajectorySeed > > seedsToken
Definition: L2MuonProducer.h:60
edm::parameterSet
ParameterSet const & parameterSet(Provenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
L2MuonProducer::theSeedCollectionLabel
edm::InputTag theSeedCollectionLabel
Definition: L2MuonProducer.h:52
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
event
Definition: event.py:1
edm::InputTag
Definition: InputTag.h:15
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
metname
const std::string metname
Definition: MuonSeedOrcaPatternRecognition.cc:43