CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
L3MuonProducer Class Reference

#include <L3MuonProducer.h>

Inheritance diagram for L3MuonProducer:
edm::stream::EDProducer<>

Public Member Functions

 L3MuonProducer (const edm::ParameterSet &)
 constructor with config More...
 
void produce (edm::Event &, const edm::EventSetup &) override
 reconstruct muons More...
 
 ~L3MuonProducer () override
 destructor More...
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Attributes

edm::EDGetTokenT< TrajTrackAssociationCollectionl2AssoMapToken_
 
edm::EDGetTokenT< reco::TrackCollectionl2MuonToken_
 
edm::EDGetTokenT< std::vector< Trajectory > > l2MuonTrajToken_
 
edm::InputTag theL2CollectionLabel
 Seed STA Label. More...
 
std::string theL2SeededTkLabel
 Label for L2SeededTracks. More...
 
MuonServiceProxytheService
 the event setup proxy, it takes care the services update More...
 
MuonTrackFindertheTrackFinder
 
edm::EDGetTokenT< reco::TrackToTrackMapupdatedL2AssoMapToken_
 

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

L3 muon reconstructor: reconstructs muons using DT, CSC, RPC and tracker information,
starting from a L2 reonstructed muon.

Author
A. Everett - Purdue University

Definition at line 31 of file L3MuonProducer.h.

Constructor & Destructor Documentation

L3MuonProducer::L3MuonProducer ( const edm::ParameterSet parameterSet)

constructor with config

Definition at line 35 of file L3MuonProducer.cc.

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

35  {
36 
37  LogTrace("L3MuonProducer") << "constructor called" << endl;
38 
39  // Parameter set for the Builder
40  ParameterSet trajectoryBuilderParameters = parameterSet.getParameter<ParameterSet>("L3TrajBuilderParameters");
41 
42  // L2 Muon Collection Label
43  theL2CollectionLabel = parameterSet.getParameter<InputTag>("MuonCollectionLabel");
44  l2MuonToken_ = consumes<reco::TrackCollection>(theL2CollectionLabel);
45  l2MuonTrajToken_ = consumes<std::vector<Trajectory> >(theL2CollectionLabel.label());
46  l2AssoMapToken_ = consumes<TrajTrackAssociationCollection>(theL2CollectionLabel.label());
47  updatedL2AssoMapToken_ = consumes<reco::TrackToTrackMap>(theL2CollectionLabel.label());
48 
49  // service parameters
50  ParameterSet serviceParameters = parameterSet.getParameter<ParameterSet>("ServiceParameters");
51 
52  // TrackLoader parameters
53  ParameterSet trackLoaderParameters = parameterSet.getParameter<ParameterSet>("TrackLoaderParameters");
54 
55  // the services
56  theService = new MuonServiceProxy(serviceParameters);
57  ConsumesCollector iC = consumesCollector();
58 
59  // instantiate the concrete trajectory builder in the Track Finder
60  MuonTrackLoader* mtl = new MuonTrackLoader(trackLoaderParameters,iC,theService);
61  L3MuonTrajectoryBuilder* l3mtb = new L3MuonTrajectoryBuilder(trajectoryBuilderParameters, theService,iC);
62  theTrackFinder = new MuonTrackFinder(l3mtb, mtl);
63 
64  theL2SeededTkLabel = trackLoaderParameters.getUntrackedParameter<std::string>("MuonSeededTracksInstance",std::string());
65 
66  produces<reco::TrackCollection>(theL2SeededTkLabel);
67  produces<TrackingRecHitCollection>(theL2SeededTkLabel);
68  produces<reco::TrackExtraCollection>(theL2SeededTkLabel);
69  produces<vector<Trajectory> >(theL2SeededTkLabel) ;
70  produces<TrajTrackAssociationCollection>(theL2SeededTkLabel);
71 
72  produces<reco::TrackCollection>();
73  produces<TrackingRecHitCollection>();
74  produces<reco::TrackExtraCollection>();
75  produces<vector<Trajectory> >() ;
76  produces<TrajTrackAssociationCollection>();
77 
78  produces<reco::MuonTrackLinksCollection>();
79 
80 }
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::TrackToTrackMap > updatedL2AssoMapToken_
edm::EDGetTokenT< reco::TrackCollection > l2MuonToken_
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
MuonTrackFinder * theTrackFinder
edm::EDGetTokenT< std::vector< Trajectory > > l2MuonTrajToken_
#define LogTrace(id)
edm::EDGetTokenT< TrajTrackAssociationCollection > l2AssoMapToken_
edm::InputTag theL2CollectionLabel
Seed STA Label.
std::string theL2SeededTkLabel
Label for L2SeededTracks.
L3MuonProducer::~L3MuonProducer ( )
override

destructor

Definition at line 86 of file L3MuonProducer.cc.

References LogTrace.

86  {
87 
88  LogTrace("L3MuonProducer") << "destructor called" << endl;
89  if (theService) delete theService;
90  if (theTrackFinder) delete theTrackFinder;
91 
92 }
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
MuonTrackFinder * theTrackFinder
#define LogTrace(id)

Member Function Documentation

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

Definition at line 156 of file L3MuonProducer.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), funct::false, TrackTransformer::fillPSetDescription(), and AlCaHLTBitMon_QueryRunRegistry::string.

156  {
158  {
160  psd0.addUntracked<std::vector<std::string>>("Propagators", {
161  "hltESPSmartPropagatorAny",
162  "SteppingHelixPropagatorAny",
163  "hltESPSmartPropagator",
164  "hltESPSteppingHelixPropagatorOpposite",
165  });
166  psd0.add<bool>("RPCLayers", true);
167  psd0.addUntracked<bool>("UseMuonNavigation", true);
168  desc.add<edm::ParameterSetDescription>("ServiceParameters", psd0);
169  }
170  desc.add<edm::InputTag>("MuonCollectionLabel", edm::InputTag("hltL2Muons","UpdatedAtVtx"));
171  {
173  psd0.addUntracked<bool>("PutTkTrackIntoEvent", false);
174  psd0.add<std::string>("TTRHBuilder", "hltESPTTRHBWithTrackAngle");
175  psd0.add<edm::InputTag>("beamSpot", edm::InputTag("hltOnlineBeamSpot"));
176  psd0.addUntracked<bool>("SmoothTkTrack", false);
177  psd0.addUntracked<std::string>("MuonSeededTracksInstance", "L2Seeded");
178  psd0.add<std::string>("Smoother", "hltESPKFTrajectorySmootherForMuonTrackLoader");
179  {
181  psd1.add<double>("MaxChi2", 1000000.0);
182  psd1.add<std::string>("Propagator", "hltESPSteppingHelixPropagatorOpposite");
183  psd1.add<std::vector<double>>("BeamSpotPositionErrors", {
184  0.1,
185  0.1,
186  5.3,
187  });
188  psd0.add<edm::ParameterSetDescription>("MuonUpdatorAtVertexParameters", psd1);
189  }
190  psd0.add<bool>("VertexConstraint", false);
191  psd0.add<bool>("DoSmoothing", false);
192  desc.add<edm::ParameterSetDescription>("TrackLoaderParameters", psd0);
193  }
194  {
196  psd0.add<double>("ScaleTECyFactor", -1.0);
197  psd0.add<edm::InputTag>("tkTrajVertex", edm::InputTag("hltPixelVertices"));
198  psd0.add<bool>("tkTrajUseVertex", false);
199  {
201  psd1.add<int>("TrackerSkipSection", -1);
202  psd1.add<bool>("DoPredictionsOnly", false);
203  psd1.add<bool>("PropDirForCosmics", false);
204  psd1.add<int>("HitThreshold", 1);
205  psd1.add<int>("MuonHitsOption", 1);
206  psd1.add<bool>("RefitFlag", true);
207  psd1.add<std::string>("Fitter", "hltESPL3MuKFTrajectoryFitter");
208  psd1.add<int>("SkipStation", -1);
209  psd1.add<std::string>("TrackerRecHitBuilder", "hltESPTTRHBWithTrackAngle");
210  psd1.add<double>("Chi2CutRPC", 1.0);
211  psd1.add<std::string>("MuonRecHitBuilder", "hltESPMuonTransientTrackingRecHitBuilder");
212  psd1.add<std::string>("RefitDirection", "insideOut");
213  psd1.add<edm::InputTag>("CSCRecSegmentLabel", edm::InputTag("hltCscSegments"));
214  psd1.add<edm::InputTag>("GEMRecHitLabel", edm::InputTag("gemRecHits"));
215  psd1.add<edm::InputTag>("ME0RecHitLabel", edm::InputTag("me0Segments"));
216  psd1.add<std::vector<int>>("DYTthrs", {
217  30,
218  15,
219  });
220  psd1.add<int>("DYTselector",1);
221  psd1.add<bool>("DYTupdator", false);
222  psd1.add<bool>("DYTuseAPE", false );
223  psd1.add<bool>("DYTuseThrsParametrization", true);
224  {
226  psd2.add<std::vector<double>>("eta0p8", {1,-0.919853, 0.990742});
227  psd2.add<std::vector<double>>("eta1p2", {1,-0.897354, 0.987738});
228  psd2.add<std::vector<double>>("eta2p0", {1,-0.986855, 0.998516});
229  psd2.add<std::vector<double>>("eta2p2", {1,-0.940342, 0.992955});
230  psd2.add<std::vector<double>>("eta2p4", {1,-0.947633, 0.993762});
231  psd1.add<edm::ParameterSetDescription>("DYTthrsParameters", psd2);
232  }
233  psd1.add<double>("Chi2CutCSC", 150.0);
234  psd1.add<double>("Chi2CutDT", 10.0);
235  psd1.add<double>("Chi2CutGEM", 1.0);
236  psd1.add<double>("Chi2CutME0", 1.0);
237  psd1.add<bool>("RefitRPCHits", true);
238  psd1.add<edm::InputTag>("DTRecSegmentLabel", edm::InputTag("hltDt4DSegments"));
239  psd1.add<std::string>("Propagator", "hltESPSmartPropagatorAny");
240  psd1.add<int>("TrackerSkipSystem", -1);
241  psd0.add<edm::ParameterSetDescription>("GlbRefitterParameters", psd1);
242  }
243  psd0.add<double>("tkTrajMaxChi2", 9999.0);
244  psd0.add<double>("ScaleTECxFactor", -1.0);
245  psd0.add<std::string>("TrackerRecHitBuilder", "hltESPTTRHBWithTrackAngle");
246  psd0.add<edm::InputTag>("tkTrajBeamSpot", edm::InputTag("hltOnlineBeamSpot"));
247  psd0.add<std::string>("MuonRecHitBuilder", "hltESPMuonTransientTrackingRecHitBuilder");
248  psd0.add<double>("tkTrajMaxDXYBeamSpot", 9999.0);
249  psd0.add<std::string>("TrackerPropagator", "SteppingHelixPropagatorAny");
250  {
252  psd1.add<bool>("precise", true);
253  psd1.add<bool>("Eta_fixed", true);
254  psd1.add<double>("Eta_min", 0.1);
255  psd1.add<bool>("Z_fixed", false);
256  psd1.add<edm::InputTag>("MeasurementTrackerName", edm::InputTag("hltESPMeasurementTracker"));
257  psd1.add<int>("maxRegions", 2);
258  psd1.add<double>("Pt_min", 3.0);
259  psd1.add<double>("Rescale_Dz", 4.0);
260  psd1.add<double>("PhiR_UpperLimit_Par1", 0.6);
261  psd1.add<double>("PhiR_UpperLimit_Par2", 0.2);
262  psd1.add<edm::InputTag>("vertexCollection", edm::InputTag("pixelVertices"));
263  psd1.add<bool>("Phi_fixed", true);
264  psd1.add<edm::InputTag>("input", edm::InputTag("hltL2Muons","UpdatedAtVtx"));
265  psd1.add<double>("DeltaR", 0.025);
266  psd1.add<int>("OnDemand", -1);
267  psd1.add<double>("DeltaZ", 24.2);
268  psd1.add<double>("Rescale_phi", 3.0);
269  psd1.add<double>("Rescale_eta", 3.0);
270  psd1.add<double>("DeltaEta", 0.04);
271  psd1.add<double>("DeltaPhi", 0.15);
272  psd1.add<double>("Phi_min", 0.1);
273  psd1.add<bool>("UseVertex", false);
274  psd1.add<double>("EtaR_UpperLimit_Par1", 0.25);
275  psd1.add<double>("EtaR_UpperLimit_Par2", 0.15);
276  psd1.add<edm::InputTag>("beamSpot", edm::InputTag("hltOnlineBeamSpot"));
277  psd1.add<double>("EscapePt", 3.0);
278  psd1.add<bool>("Pt_fixed", false);
279  psd0.add<edm::ParameterSetDescription>("MuonTrackingRegionBuilder", psd1);
280  }
281  psd0.add<bool>("RefitRPCHits", true);
282  psd0.add<double>("PCut", 2.5);
283  {
286  false, // do predictions only
287  "hltESPL3MuKFTrajectoryFitter", // fitter
288  "hltESPKFTrajectorySmootherForMuonTrackLoader", // smoother
289  "hltESPSmartPropagatorAny", // propagator
290  "insideOut", // refit direction
291  true, // refit rpc hits
292  "hltESPTTRHBWithTrackAngle", // tracker rechit builder
293  "hltESPMuonTransientTrackingRecHitBuilder" // muon rechit builder
294  );
295  psd0.add<edm::ParameterSetDescription>("TrackTransformer", psd1);
296  }
297  {
299  psd1.add<double>("Quality_3", 7.0);
300  psd1.add<double>("DeltaRCut_1", 0.1);
301  psd1.add<double>("MinP", 2.5);
302  psd1.add<double>("MinPt", 1.0);
303  psd1.add<double>("Quality_2", 15.0);
304  psd1.add<double>("Pt_threshold2", 999999999.0);
305  psd1.add<double>("LocChi2Cut", 0.001);
306  psd1.add<double>("Eta_threshold", 1.2);
307  psd1.add<double>("Pt_threshold1", 0.0);
308  psd1.add<double>("Chi2Cut_1", 50.0);
309  psd1.add<double>("Quality_1", 20.0);
310  psd1.add<double>("Chi2Cut_3", 200.0);
311  psd1.add<double>("DeltaRCut_3", 1.0);
312  psd1.add<double>("DeltaRCut_2", 0.2);
313  psd1.add<double>("DeltaDCut_1", 40.0);
314  psd1.add<double>("DeltaDCut_2", 10.0);
315  psd1.add<double>("DeltaDCut_3", 15.0);
316  psd1.add<double>("Chi2Cut_2", 50.0);
317  psd1.add<std::string>("Propagator", "hltESPSmartPropagator");
318  psd0.add<edm::ParameterSetDescription>("GlobalMuonTrackMatcher", psd1);
319  }
320  psd0.add<double>("PtCut", 1.0);
321  psd0.add<bool>("matchToSeeds", true);
322  psd0.add<edm::InputTag>("tkTrajLabel", edm::InputTag("hltBRSMuonSeededTracksOutIn"));
323  desc.add<edm::ParameterSetDescription>("L3TrajBuilderParameters", psd0);
324  }
325  descriptions.add("L3MuonProducer", desc);
326 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void fillPSetDescription(edm::ParameterSetDescription &descriptions, bool DoPredictionsOnly=false, const std::string &Fitter="KFFitterForRefitInsideOut", const std::string &Smoother="KFSmootherForRefitInsideOut", const std::string &Propagator="SmartPropagatorAnyRK", const std::string &RefitDirection="alongMomentum", bool RefitRPCHits=true, const std::string &TrackerRecHitBuilder="WithTrackAngle", const std::string &MuonRecHitBuilder="MuonRecHitBuilder", const std::string &MTDRecHitBuilder="MTDRecHitBuilder")
fillDescriptions
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void L3MuonProducer::produce ( edm::Event event,
const edm::EventSetup eventSetup 
)
override

reconstruct muons

Definition at line 98 of file L3MuonProducer.cc.

References edm::AssociationMap< Tag >::begin(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::TrackCollection, unsigned short > >::const_iterator, edm::AssociationMap< Tag >::end(), edm::AssociationMap< Tag >::find(), edm::Ref< C, T, F >::isNonnull(), edm::Ref< C, T, F >::key(), L2Muons_cfi::L2Muons, LogTrace, and metname.

98  {
99  const string metname = "Muon|RecoMuon|L3MuonProducer";
100  LogTrace(metname)<<endl<<endl<<endl;
101  LogTrace(metname)<<"L3 Muon Reconstruction started"<<endl;
102 
103  typedef vector<Trajectory> TrajColl;
104 
105  // Update the services
106  theService->update(eventSetup);
107 
108  // Take the L2 muon container(s)
109  LogTrace(metname)<<"Taking the L2 Muons "<<theL2CollectionLabel<<endl;
110 
111 
113  event.getByToken(l2MuonToken_,L2Muons);
114 
115  Handle<vector<Trajectory> > L2MuonsTraj;
116  vector<MuonTrajectoryBuilder::TrackCand> L2TrackCands;
117 
118 
119  event.getByToken(l2MuonTrajToken_, L2MuonsTraj);
120 
122  event.getByToken(l2AssoMapToken_,L2AssoMap);
123 
124  edm::Handle<reco::TrackToTrackMap> updatedL2AssoMap;
125  event.getByToken(updatedL2AssoMapToken_,updatedL2AssoMap);
126 
127 
128 
129  for(TrajTrackAssociationCollection::const_iterator it = L2AssoMap->begin(); it != L2AssoMap->end(); ++it){
130  const Ref<vector<Trajectory> > traj = it->key;
131  const reco::TrackRef tkRegular = it->val;
132  reco::TrackRef tkUpdated;
135  if ( theL2CollectionLabel.instance() == "UpdatedAtVtx") {
136  iEnd = updatedL2AssoMap->end();
137  iii = updatedL2AssoMap->find(it->val);
138  if (iii != iEnd ) tkUpdated = (*updatedL2AssoMap)[it->val] ;
139  }
140 
141  const reco::TrackRef tk = ( tkUpdated.isNonnull() ) ? tkUpdated : tkRegular ;
142 
144  if( traj->isValid() ) L2Cand.first = &*traj ;
145  L2TrackCands.push_back(L2Cand);
146  }
147 
148  theTrackFinder->reconstruct(L2TrackCands, event, eventSetup);
149 
150  LogTrace(metname)<<"Event loaded"
151  <<"================================"
152  <<endl<<endl;
153 
154 }
edm::EDGetTokenT< reco::TrackToTrackMap > updatedL2AssoMapToken_
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:251
std::pair< const Trajectory *, reco::TrackRef > TrackCand
const_iterator end() const
last iterator over the map (read only)
edm::EDGetTokenT< reco::TrackCollection > l2MuonToken_
const std::string metname
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
const_iterator find(const key_type &k) const
find element with specified reference key
MuonTrackFinder * theTrackFinder
key_type key() const
Accessor for product key.
Definition: Ref.h:263
edm::EDGetTokenT< std::vector< Trajectory > > l2MuonTrajToken_
#define LogTrace(id)
edm::EDGetTokenT< TrajTrackAssociationCollection > l2AssoMapToken_
edm::InputTag theL2CollectionLabel
Seed STA Label.
const_iterator begin() const
first iterator over the map (read only)
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
std::string const & instance() const
Definition: InputTag.h:37

Member Data Documentation

edm::EDGetTokenT<TrajTrackAssociationCollection> L3MuonProducer::l2AssoMapToken_
private

Definition at line 55 of file L3MuonProducer.h.

edm::EDGetTokenT<reco::TrackCollection> L3MuonProducer::l2MuonToken_
private

Definition at line 53 of file L3MuonProducer.h.

edm::EDGetTokenT<std::vector<Trajectory> > L3MuonProducer::l2MuonTrajToken_
private

Definition at line 54 of file L3MuonProducer.h.

edm::InputTag L3MuonProducer::theL2CollectionLabel
private

Seed STA Label.

Definition at line 48 of file L3MuonProducer.h.

std::string L3MuonProducer::theL2SeededTkLabel
private

Label for L2SeededTracks.

Definition at line 51 of file L3MuonProducer.h.

MuonServiceProxy* L3MuonProducer::theService
private

the event setup proxy, it takes care the services update

Definition at line 61 of file L3MuonProducer.h.

MuonTrackFinder* L3MuonProducer::theTrackFinder
private

Definition at line 58 of file L3MuonProducer.h.

edm::EDGetTokenT<reco::TrackToTrackMap> L3MuonProducer::updatedL2AssoMapToken_
private

Definition at line 56 of file L3MuonProducer.h.