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
 
MuonServiceProxytheService
 the event setup proxy, it takes care the services update More...
 
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 37 of file L2MuonProducer.h.

Constructor & Destructor Documentation

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

constructor with config

Definition at line 49 of file L2MuonProducer.cc.

References edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), LogTrace, and MuonServiceProxy_cff::MuonServiceProxy.

49  {
50  LogTrace("Muon|RecoMuon|L2MuonProducer") << "constructor called" << endl;
51 
52  // Parameter set for the Builder
53  ParameterSet trajectoryBuilderParameters = parameterSet.getParameter<ParameterSet>("L2TrajBuilderParameters");
54 
55  // MuonSeed Collection Label
56  theSeedCollectionLabel = parameterSet.getParameter<InputTag>("InputObjects");
57  seedsToken = consumes<edm::View<TrajectorySeed>>(theSeedCollectionLabel);
58  // service parameters
59  ParameterSet serviceParameters = parameterSet.getParameter<ParameterSet>("ServiceParameters");
60 
61  // TrackLoader parameters
62  ParameterSet trackLoaderParameters = parameterSet.getParameter<ParameterSet>("TrackLoaderParameters");
63 
64  // the services
65  theService = new MuonServiceProxy(serviceParameters);
66 
67  MuonTrajectoryBuilder* trajectoryBuilder = nullptr;
68  // instantiate the concrete trajectory builder in the Track Finder
69 
70  edm::ConsumesCollector iC = consumesCollector();
71  string typeOfBuilder = parameterSet.existsAs<string>("MuonTrajectoryBuilder")
72  ? parameterSet.getParameter<string>("MuonTrajectoryBuilder")
73  : "StandAloneMuonTrajectoryBuilder";
74  if (typeOfBuilder == "StandAloneMuonTrajectoryBuilder" || typeOfBuilder.empty())
75  trajectoryBuilder = new StandAloneMuonTrajectoryBuilder(trajectoryBuilderParameters, theService, iC);
76  else if (typeOfBuilder == "Exhaustive")
77  trajectoryBuilder = new ExhaustiveMuonTrajectoryBuilder(trajectoryBuilderParameters, theService, iC);
78  else {
79  LogWarning("Muon|RecoMuon|StandAloneMuonProducer")
80  << "No Trajectory builder associated with " << typeOfBuilder
81  << ". Falling down to the default (StandAloneMuonTrajectoryBuilder)";
82  trajectoryBuilder = new StandAloneMuonTrajectoryBuilder(trajectoryBuilderParameters, theService, iC);
83  }
85  trajectoryBuilder, new MuonTrackLoader(trackLoaderParameters, iC, theService), new MuonTrajectoryCleaner(true));
86 
87  produces<reco::TrackCollection>();
88  produces<reco::TrackCollection>("UpdatedAtVtx");
89  produces<TrackingRecHitCollection>();
90  produces<reco::TrackExtraCollection>();
91  produces<reco::TrackToTrackMap>();
92 
93  produces<std::vector<Trajectory>>();
94  produces<TrajTrackAssociationCollection>();
95 
96  produces<edm::AssociationMap<edm::OneToMany<std::vector<L2MuonTrajectorySeed>, std::vector<L2MuonTrajectorySeed>>>>();
97 }
T getParameter(std::string const &) const
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:160
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
edm::EDGetTokenT< edm::View< TrajectorySeed > > seedsToken
edm::InputTag theSeedCollectionLabel
#define LogTrace(id)
MuonTrackFinder * theTrackFinder
the track finder
L2MuonProducer::~L2MuonProducer ( )
override

destructor

Definition at line 100 of file L2MuonProducer.cc.

References LogTrace.

100  {
101  LogTrace("Muon|RecoMuon|L2eMuonProducer") << "L2MuonProducer destructor called" << endl;
102  delete theService;
103  delete theTrackFinder;
104 }
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
#define LogTrace(id)
MuonTrackFinder * theTrackFinder
the track finder

Member Function Documentation

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

Definition at line 130 of file L2MuonProducer.cc.

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

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

References LogTrace, metname, and AlCaHLTBitMon_QueryRunRegistry::string.

107  {
108  const std::string metname = "Muon|RecoMuon|L2MuonProducer";
109 
110  LogTrace(metname) << endl << endl << endl;
111  LogTrace(metname) << "L2 Muon Reconstruction Started" << endl;
112 
113  // Take the seeds container
114  LogTrace(metname) << "Taking the seeds: " << theSeedCollectionLabel.label() << endl;
116  event.getByToken(seedsToken, seeds);
117 
118  // Update the services
119  theService->update(eventSetup);
120 
121  // Reconstruct
122  LogTrace(metname) << "Track Reconstruction" << endl;
123  theTrackFinder->reconstruct(seeds, event, eventSetup);
124 
125  LogTrace(metname) << "Event loaded"
126  << "================================" << endl
127  << endl;
128 }
const std::string metname
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
edm::EDGetTokenT< edm::View< TrajectorySeed > > seedsToken
edm::InputTag theSeedCollectionLabel
#define LogTrace(id)
MuonTrackFinder * theTrackFinder
the track finder
std::string const & label() const
Definition: InputTag.h:36
edm::OrphanHandle< reco::TrackCollection > reconstruct(const edm::Handle< edm::View< TrajectorySeed > > &, edm::Event &, const edm::EventSetup &)
reconstruct standalone tracks starting from a collection of seeds

Member Data Documentation

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

Definition at line 59 of file L2MuonProducer.h.

edm::InputTag L2MuonProducer::theSeedCollectionLabel
private

Definition at line 51 of file L2MuonProducer.h.

MuonServiceProxy* L2MuonProducer::theService
private

the event setup proxy, it takes care the services update

Definition at line 57 of file L2MuonProducer.h.

MuonTrackFinder* L2MuonProducer::theTrackFinder
private

the track finder

Definition at line 54 of file L2MuonProducer.h.