CMS 3D CMS Logo

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

#include <L2MuonSeedGenerator.h>

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

Public Member Functions

 L2MuonSeedGenerator (const edm::ParameterSet &)
 Constructor. More...
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~L2MuonSeedGenerator () 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
 

Private Member Functions

const TrajectorySeedassociateOfflineSeedToL1 (edm::Handle< edm::View< TrajectorySeed > > &, std::vector< int > &, TrajectoryStateOnSurface &)
 

Private Attributes

edm::EDGetTokenT< L1MuGMTReadoutCollectiongmtToken_
 
edm::EDGetTokenT< l1extra::L1MuonParticleCollectionmuCollToken_
 
edm::EDGetTokenT< edm::View< TrajectorySeed > > offlineSeedToken_
 
MeasurementEstimatortheEstimator
 
edm::InputTag theL1GMTReadoutCollection
 
const double theL1MaxEta
 
const double theL1MinPt
 
const unsigned theL1MinQuality
 
edm::InputTag theOfflineSeedLabel
 
std::string thePropagatorName
 
MuonServiceProxytheService
 the event setup proxy, it takes care the services update More...
 
edm::InputTag theSource
 
const bool useOfflineSeed
 
const bool useUnassociatedL1
 

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 seed generator: Transform the L1 informations in seeds for the L2 muon reconstruction

Author
A.Everett, R.Bellan, J. Alcaraz

ORCA's author: N. Neumeister

L2 muon seed generator: Transform the L1 informations in seeds for the L2 muon reconstruction

Author
A.Everett, R.Bellan

ORCA's author: N. Neumeister

Definition at line 54 of file L2MuonSeedGenerator.h.

Constructor & Destructor Documentation

◆ L2MuonSeedGenerator()

L2MuonSeedGenerator::L2MuonSeedGenerator ( const edm::ParameterSet iConfig)
explicit

Constructor.

Definition at line 44 of file L2MuonSeedGenerator.cc.

References Chi2MeasurementEstimator_cfi::Chi2MeasurementEstimator, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), gmtToken_, muCollToken_, MuonServiceProxy_cff::MuonServiceProxy, offlineSeedToken_, theEstimator, theL1GMTReadoutCollection, theOfflineSeedLabel, theService, theSource, and useOfflineSeed.

45  : theSource(iConfig.getParameter<InputTag>("InputObjects")),
46  theL1GMTReadoutCollection(iConfig.getParameter<InputTag>("GMTReadoutCollection")),
47  thePropagatorName(iConfig.getParameter<string>("Propagator")),
48  theL1MinPt(iConfig.getParameter<double>("L1MinPt")),
49  theL1MaxEta(iConfig.getParameter<double>("L1MaxEta")),
50  theL1MinQuality(iConfig.getParameter<unsigned int>("L1MinQuality")),
51  useOfflineSeed(iConfig.getUntrackedParameter<bool>("UseOfflineSeed", false)),
52  useUnassociatedL1(iConfig.existsAs<bool>("UseUnassociatedL1") ? iConfig.getParameter<bool>("UseUnassociatedL1")
53  : true) {
54  gmtToken_ = consumes<L1MuGMTReadoutCollection>(theL1GMTReadoutCollection);
55  muCollToken_ = consumes<L1MuonParticleCollection>(theSource);
56 
57  if (useOfflineSeed) {
58  theOfflineSeedLabel = iConfig.getUntrackedParameter<InputTag>("OfflineSeedLabel");
59  offlineSeedToken_ = consumes<edm::View<TrajectorySeed> >(theOfflineSeedLabel);
60  }
61 
62  // service parameters
63  ParameterSet serviceParameters = iConfig.getParameter<ParameterSet>("ServiceParameters");
64 
65  // the services
66  theService = new MuonServiceProxy(serviceParameters, consumesCollector());
67 
68  // the estimator
70 
71  produces<L2MuonTrajectorySeedCollection>();
72 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::EDGetTokenT< l1extra::L1MuonParticleCollection > muCollToken_
edm::InputTag theL1GMTReadoutCollection
edm::EDGetTokenT< edm::View< TrajectorySeed > > offlineSeedToken_
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:172
T getUntrackedParameter(std::string const &, T const &) const
const unsigned theL1MinQuality
MeasurementEstimator * theEstimator
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
edm::EDGetTokenT< L1MuGMTReadoutCollection > gmtToken_
edm::InputTag theOfflineSeedLabel

◆ ~L2MuonSeedGenerator()

L2MuonSeedGenerator::~L2MuonSeedGenerator ( )
override

Destructor.

Definition at line 75 of file L2MuonSeedGenerator.cc.

References theEstimator, and theService.

75  {
76  if (theService)
77  delete theService;
78  if (theEstimator)
79  delete theEstimator;
80 }
MeasurementEstimator * theEstimator
MuonServiceProxy * theService
the event setup proxy, it takes care the services update

Member Function Documentation

◆ associateOfflineSeedToL1()

const TrajectorySeed * L2MuonSeedGenerator::associateOfflineSeedToL1 ( edm::Handle< edm::View< TrajectorySeed > > &  offseeds,
std::vector< int > &  offseedMap,
TrajectoryStateOnSurface newTsos 
)
private

Definition at line 325 of file L2MuonSeedGenerator.cc.

References edm::View< T >::begin(), PbPb_ZMuSkimMuonDPG_cff::deltaR, MuonPatternRecoDumper::dumpMuonId(), PV3DBase< T, PVType, FrameType >::eta(), TrajectoryStateOnSurface::globalPosition(), LogDebug, PV3DBase< T, PVType, FrameType >::phi(), Geom::Phi< T1, Range >::phi(), AlCaHLTBitMon_QueryRunRegistry::string, TrajectoryStateOnSurface::surface(), thePropagatorName, and theService.

Referenced by produce().

327  {
328  const std::string metlabel = "Muon|RecoMuon|L2MuonSeedGenerator";
329  MuonPatternRecoDumper debugtmp;
330 
331  edm::View<TrajectorySeed>::const_iterator offseed, endOffseed = offseeds->end();
332  const TrajectorySeed* selOffseed = nullptr;
333  double bestDr = 99999.;
334  unsigned int nOffseed(0);
335  int lastOffseed(-1);
336 
337  for (offseed = offseeds->begin(); offseed != endOffseed; ++offseed, ++nOffseed) {
338  if (offseedMap[nOffseed] != 0)
339  continue;
340  GlobalPoint glbPos = theService->trackingGeometry()
341  ->idToDet(offseed->startingState().detId())
342  ->surface()
343  .toGlobal(offseed->startingState().parameters().position());
344  GlobalVector glbMom = theService->trackingGeometry()
345  ->idToDet(offseed->startingState().detId())
346  ->surface()
347  .toGlobal(offseed->startingState().parameters().momentum());
348 
349  // Preliminary check
350  double preDr = deltaR(newTsos.globalPosition().eta(), newTsos.globalPosition().phi(), glbPos.eta(), glbPos.phi());
351  if (preDr > 1.0)
352  continue;
353 
354  const FreeTrajectoryState offseedFTS(
355  glbPos, glbMom, offseed->startingState().parameters().charge(), &*theService->magneticField());
356  TrajectoryStateOnSurface offseedTsos =
357  theService->propagator(thePropagatorName)->propagate(offseedFTS, newTsos.surface());
358  LogDebug(metlabel) << "Offline seed info: Det and State" << std::endl;
359  LogDebug(metlabel) << debugtmp.dumpMuonId(offseed->startingState().detId()) << std::endl;
360  //LogDebug(metlabel) << "(x, y, z) = (" << newTSOS.globalPosition().x() << ", "
361  // << newTSOS.globalPosition().y() << ", " << newTSOS.globalPosition().z() << ")" << std::endl;
362  LogDebug(metlabel) << "pos: (r=" << offseedFTS.position().mag() << ", phi=" << offseedFTS.position().phi()
363  << ", eta=" << offseedFTS.position().eta() << ")" << std::endl;
364  LogDebug(metlabel) << "mom: (q*pt=" << offseedFTS.charge() * offseedFTS.momentum().perp()
365  << ", phi=" << offseedFTS.momentum().phi() << ", eta=" << offseedFTS.momentum().eta() << ")"
366  << std::endl
367  << std::endl;
368  //LogDebug(metlabel) << debugtmp.dumpFTS(offseedFTS) << std::endl;
369 
370  if (offseedTsos.isValid()) {
371  LogDebug(metlabel) << "Offline seed info after propagation to L1 layer:" << std::endl;
372  //LogDebug(metlabel) << "(x, y, z) = (" << offseedTsos.globalPosition().x() << ", "
373  // << offseedTsos.globalPosition().y() << ", " << offseedTsos.globalPosition().z() << ")" << std::endl;
374  LogDebug(metlabel) << "pos: (r=" << offseedTsos.globalPosition().mag()
375  << ", phi=" << offseedTsos.globalPosition().phi()
376  << ", eta=" << offseedTsos.globalPosition().eta() << ")" << std::endl;
377  LogDebug(metlabel) << "mom: (q*pt=" << offseedTsos.charge() * offseedTsos.globalMomentum().perp()
378  << ", phi=" << offseedTsos.globalMomentum().phi()
379  << ", eta=" << offseedTsos.globalMomentum().eta() << ")" << std::endl
380  << std::endl;
381  //LogDebug(metlabel) << debugtmp.dumpTSOS(offseedTsos) << std::endl;
382  double newDr = deltaR(newTsos.globalPosition().eta(),
383  newTsos.globalPosition().phi(),
384  offseedTsos.globalPosition().eta(),
385  offseedTsos.globalPosition().phi());
386  LogDebug(metlabel) << " -- DR = " << newDr << std::endl;
387  if (newDr < 0.3 && newDr < bestDr) {
388  LogDebug(metlabel) << " --> OK! " << newDr << std::endl << std::endl;
389  selOffseed = &*offseed;
390  bestDr = newDr;
391  offseedMap[nOffseed] = 1;
392  if (lastOffseed > -1)
393  offseedMap[lastOffseed] = 0;
394  lastOffseed = nOffseed;
395  } else {
396  LogDebug(metlabel) << " --> Rejected. " << newDr << std::endl << std::endl;
397  }
398  } else {
399  LogDebug(metlabel) << "Invalid offline seed TSOS after propagation!" << std::endl << std::endl;
400  }
401  }
402 
403  return selOffseed;
404 }
std::string dumpMuonId(const DetId &id) const
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
T eta() const
Definition: PV3DBase.h:73
const SurfaceType & surface() const
GlobalPoint globalPosition() const
T1 phi() const
Definition: Phi.h:78
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:88
#define LogDebug(id)

◆ produce()

void L2MuonSeedGenerator::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 82 of file L2MuonSeedGenerator.cc.

References alongMomentum, associateOfflineSeedToL1(), Reference_intrackfit_cff::barrel, ALCARECOTkAlJpsiMuMu_cff::charge, TrajectoryStateOnSurface::charge(), L1MuGMTCand::charge_valid(), GeometricSearchDet::compatibleDets(), funct::cos(), debug, L1MuGMTCand::empty(), relativeConstraints::error, PVValHelper::eta, PV3DBase< T, PVType, FrameType >::eta(), JetChargeProducer_cfi::exp, GeomDet::geographicalId(), L1MuGMTReadoutRecord::getBrlRPCCands(), L1MuGMTReadoutRecord::getCSCCands(), L1MuGMTReadoutRecord::getDTBXCands(), L1MuGMTExtendedCand::getDTCSCIndex(), L1MuGMTReadoutRecord::getFwdRPCCands(), L1MuGMTExtendedCand::getRPCIndex(), TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), gmtToken_, l1ctLayer2EG_cff::id, heavyIonCSV_trainingSettings::idx, iEvent, L1MuGMTExtendedCand::isFwd(), L1MuGMTExtendedCand::isRPC(), TrajectoryStateOnSurface::isValid(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, LogDebug, LogTrace, PV3DBase< T, PVType, FrameType >::mag(), metname, eostools::move(), muCollToken_, offlineSeedToken_, PV3DBase< T, PVType, FrameType >::perp(), trajectoryStateTransform::persistentState(), phi, PV3DBase< T, PVType, FrameType >::phi(), Geom::pi(), GeometricSearchDet::position(), DiDispStaMuonMonitor_cfi::pt, edm::OwnVector< T, P >::push_back(), quality, L1MuGMTCand::quality(), CosmicsPD_Skims::radius, DetId::rawId(), TrajectorySeed::recHits(), funct::sin(), TrajectorySeed::startingState(), AlCaHLTBitMon_QueryRunRegistry::string, GeometricSearchDet::surface(), theEstimator, theL1MaxEta, theL1MinPt, theL1MinQuality, thePropagatorName, theService, theta(), useOfflineSeed, useUnassociatedL1, and PV3DBase< T, PVType, FrameType >::z().

82  {
83  const std::string metname = "Muon|RecoMuon|L2MuonSeedGenerator";
85 
86  auto output = std::make_unique<L2MuonTrajectorySeedCollection>();
87 
88  // Muon particles and GMT readout collection
90  iEvent.getByToken(gmtToken_, gmtrc_handle);
91  L1MuGMTReadoutRecord const& gmtrr = gmtrc_handle.product()->getRecord(0);
92 
94  iEvent.getByToken(muCollToken_, muColl);
95  LogTrace(metname) << "Number of muons " << muColl->size() << endl;
96 
97  edm::Handle<edm::View<TrajectorySeed> > offlineSeedHandle;
98  vector<int> offlineSeedMap;
99  if (useOfflineSeed) {
100  iEvent.getByToken(offlineSeedToken_, offlineSeedHandle);
101  LogTrace(metname) << "Number of offline seeds " << offlineSeedHandle->size() << endl;
102  offlineSeedMap = vector<int>(offlineSeedHandle->size(), 0);
103  }
104 
105  L1MuonParticleCollection::const_iterator it;
106  L1MuonParticleRef::key_type l1ParticleIndex = 0;
107 
108  for (it = muColl->begin(); it != muColl->end(); ++it, ++l1ParticleIndex) {
109  const L1MuGMTExtendedCand muonCand = (*it).gmtMuonCand();
110  unsigned int quality = 0;
111  bool valid_charge = false;
112  ;
113 
114  if (muonCand.empty()) {
115  LogWarning(metname) << "L2MuonSeedGenerator: WARNING, no L1MuGMTCand! " << endl;
116  LogWarning(metname) << "L2MuonSeedGenerator: this should make sense only within MC tests" << endl;
117  // FIXME! Temporary to handle the MC input
118  quality = 7;
119  valid_charge = true;
120  } else {
121  quality = muonCand.quality();
122  valid_charge = muonCand.charge_valid();
123  }
124 
125  float pt = (*it).pt();
126  float eta = (*it).eta();
127  float theta = 2 * atan(exp(-eta));
128  float phi = (*it).phi();
129  int charge = (*it).charge();
130  // Set charge=0 for the time being if the valid charge bit is zero
131  if (!valid_charge)
132  charge = 0;
133  bool barrel = !(*it).isForward();
134 
135  // Get a better eta and charge from regional information
136  // Phi has the same resolution in GMT than regionally, is not it?
137  if (!(muonCand.empty())) {
138  int idx = -1;
139  vector<L1MuRegionalCand> rmc;
140  if (!muonCand.isRPC()) {
141  idx = muonCand.getDTCSCIndex();
142  if (muonCand.isFwd())
143  rmc = gmtrr.getCSCCands();
144  else
145  rmc = gmtrr.getDTBXCands();
146  } else {
147  idx = muonCand.getRPCIndex();
148  if (muonCand.isFwd())
149  rmc = gmtrr.getFwdRPCCands();
150  else
151  rmc = gmtrr.getBrlRPCCands();
152  }
153  if (idx >= 0) {
154  eta = rmc[idx].etaValue();
155  //phi = rmc[idx].phiValue();
156  // Use this charge if the valid charge bit is zero
157  if (!valid_charge)
158  charge = rmc[idx].chargeValue();
159  }
160  }
161 
162  if (pt < theL1MinPt || fabs(eta) > theL1MaxEta)
163  continue;
164 
165  LogTrace(metname) << "New L2 Muon Seed";
166  LogTrace(metname) << "Pt = " << pt << " GeV/c";
167  LogTrace(metname) << "eta = " << eta;
168  LogTrace(metname) << "theta = " << theta << " rad";
169  LogTrace(metname) << "phi = " << phi << " rad";
170  LogTrace(metname) << "charge = " << charge;
171  LogTrace(metname) << "In Barrel? = " << barrel;
172 
173  if (quality <= theL1MinQuality)
174  continue;
175  LogTrace(metname) << "quality = " << quality;
176 
177  // Update the services
178  theService->update(iSetup);
179 
180  const DetLayer* detLayer = nullptr;
181  float radius = 0.;
182 
183  CLHEP::Hep3Vector vec(0., 1., 0.);
184  vec.setTheta(theta);
185  vec.setPhi(phi);
186 
187  // Get the det layer on which the state should be put
188  if (barrel) {
189  LogTrace(metname) << "The seed is in the barrel";
190 
191  // MB2
192  DetId id = DTChamberId(0, 2, 0);
193  detLayer = theService->detLayerGeometry()->idToLayer(id);
194  LogTrace(metname) << "L2 Layer: " << debug.dumpLayer(detLayer);
195 
196  const BoundSurface* sur = &(detLayer->surface());
197  const BoundCylinder* bc = dynamic_cast<const BoundCylinder*>(sur);
198 
199  radius = fabs(bc->radius() / sin(theta));
200 
201  LogTrace(metname) << "radius " << radius;
202 
203  if (pt < 3.5)
204  pt = 3.5;
205  } else {
206  LogTrace(metname) << "The seed is in the endcap";
207 
208  DetId id;
209  // ME2
210  if (theta < Geom::pi() / 2.)
211  id = CSCDetId(1, 2, 0, 0, 0);
212  else
213  id = CSCDetId(2, 2, 0, 0, 0);
214 
215  detLayer = theService->detLayerGeometry()->idToLayer(id);
216  LogTrace(metname) << "L2 Layer: " << debug.dumpLayer(detLayer);
217 
218  radius = fabs(detLayer->position().z() / cos(theta));
219 
220  if (pt < 1.0)
221  pt = 1.0;
222  }
223 
224  vec.setMag(radius);
225 
226  GlobalPoint pos(vec.x(), vec.y(), vec.z());
227 
228  GlobalVector mom(pt * cos(phi), pt * sin(phi), pt * cos(theta) / sin(theta));
229 
230  GlobalTrajectoryParameters param(pos, mom, charge, &*theService->magneticField());
232 
233  mat[0][0] = (0.25 / pt) * (0.25 / pt); // sigma^2(charge/abs_momentum)
234  if (!barrel)
235  mat[0][0] = (0.4 / pt) * (0.4 / pt);
236 
237  //Assign q/pt = 0 +- 1/pt if charge has been declared invalid
238  if (!valid_charge)
239  mat[0][0] = (1. / pt) * (1. / pt);
240 
241  mat[1][1] = 0.05 * 0.05; // sigma^2(lambda)
242  mat[2][2] = 0.2 * 0.2; // sigma^2(phi)
243  mat[3][3] = 20. * 20.; // sigma^2(x_transverse))
244  mat[4][4] = 20. * 20.; // sigma^2(y_transverse))
245 
247 
248  const FreeTrajectoryState state(param, error);
249 
250  LogTrace(metname) << "Free trajectory State from the parameters";
251  LogTrace(metname) << debug.dumpFTS(state);
252 
253  // Propagate the state on the MB2/ME2 surface
254  TrajectoryStateOnSurface tsos = theService->propagator(thePropagatorName)->propagate(state, detLayer->surface());
255 
256  LogTrace(metname) << "State after the propagation on the layer";
257  LogTrace(metname) << debug.dumpLayer(detLayer);
258  LogTrace(metname) << debug.dumpFTS(state);
259 
260  if (tsos.isValid()) {
261  // Get the compatible dets on the layer
262  std::vector<pair<const GeomDet*, TrajectoryStateOnSurface> > detsWithStates =
263  detLayer->compatibleDets(tsos, *theService->propagator(thePropagatorName), *theEstimator);
264  if (!detsWithStates.empty()) {
265  TrajectoryStateOnSurface newTSOS = detsWithStates.front().second;
266  const GeomDet* newTSOSDet = detsWithStates.front().first;
267 
268  LogTrace(metname) << "Most compatible det";
269  LogTrace(metname) << debug.dumpMuonId(newTSOSDet->geographicalId());
270 
271  LogDebug(metname) << "L1 info: Det and State:";
272  LogDebug(metname) << debug.dumpMuonId(newTSOSDet->geographicalId());
273 
274  if (newTSOS.isValid()) {
275  //LogDebug(metname) << "(x, y, z) = (" << newTSOS.globalPosition().x() << ", "
276  // << newTSOS.globalPosition().y() << ", " << newTSOS.globalPosition().z() << ")";
277  LogDebug(metname) << "pos: (r=" << newTSOS.globalPosition().mag()
278  << ", phi=" << newTSOS.globalPosition().phi() << ", eta=" << newTSOS.globalPosition().eta()
279  << ")";
280  LogDebug(metname) << "mom: (q*pt=" << newTSOS.charge() * newTSOS.globalMomentum().perp()
281  << ", phi=" << newTSOS.globalMomentum().phi() << ", eta=" << newTSOS.globalMomentum().eta()
282  << ")";
283 
284  //LogDebug(metname) << "State on it";
285  //LogDebug(metname) << debug.dumpTSOS(newTSOS);
286 
287  //PTrajectoryStateOnDet seedTSOS;
289 
290  if (useOfflineSeed) {
291  const TrajectorySeed* assoOffseed = associateOfflineSeedToL1(offlineSeedHandle, offlineSeedMap, newTSOS);
292 
293  if (assoOffseed != nullptr) {
294  PTrajectoryStateOnDet const& seedTSOS = assoOffseed->startingState();
295  for (auto const& tsci : assoOffseed->recHits()) {
296  container.push_back(tsci);
297  }
298  output->push_back(
299  L2MuonTrajectorySeed(seedTSOS, container, alongMomentum, L1MuonParticleRef(muColl, l1ParticleIndex)));
300  } else {
301  if (useUnassociatedL1) {
302  // convert the TSOS into a PTSOD
303  PTrajectoryStateOnDet const& seedTSOS =
305  output->push_back(L2MuonTrajectorySeed(
306  seedTSOS, container, alongMomentum, L1MuonParticleRef(muColl, l1ParticleIndex)));
307  }
308  }
309  } else {
310  // convert the TSOS into a PTSOD
311  PTrajectoryStateOnDet const& seedTSOS =
313  output->push_back(
314  L2MuonTrajectorySeed(seedTSOS, container, alongMomentum, L1MuonParticleRef(muColl, l1ParticleIndex)));
315  }
316  }
317  }
318  }
319  }
320 
321  iEvent.put(std::move(output));
322 }
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
virtual const Surface::PositionType & position() const
Returns position of the surface.
std::remove_cv< typename std::remove_reference< argument_type >::type >::type key_type
Definition: Ref.h:164
T perp() const
Definition: PV3DBase.h:69
virtual std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
edm::EDGetTokenT< l1extra::L1MuonParticleCollection > muCollToken_
edm::EDGetTokenT< edm::View< TrajectorySeed > > offlineSeedToken_
T z() const
Definition: PV3DBase.h:61
const std::string metname
RecHitRange recHits() const
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
T eta() const
Definition: PV3DBase.h:73
unsigned getRPCIndex() const
get index of contributing RPC muon
PTrajectoryStateOnDet persistentState(const TrajectoryStateOnSurface &ts, unsigned int detid)
#define LogTrace(id)
unsigned int quality() const
get quality
Definition: L1MuGMTCand.h:93
const TrajectorySeed * associateOfflineSeedToL1(edm::Handle< edm::View< TrajectorySeed > > &, std::vector< int > &, TrajectoryStateOnSurface &)
string quality
const unsigned theL1MinQuality
bool charge_valid() const
is the charge valid ?
Definition: L1MuGMTCand.h:138
void push_back(D *&d)
Definition: OwnVector.h:326
int iEvent
Definition: GenABIO.cc:224
GlobalPoint globalPosition() const
std::vector< L1MuRegionalCand > getDTBXCands() const
get DT candidates vector
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
T mag() const
Definition: PV3DBase.h:64
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
bool isRPC() const
get RPC bit (true=RPC, false = DT/CSC or matched)
bool empty() const
is it an empty muon candidate?
Definition: L1MuGMTCand.h:64
std::vector< L1MuRegionalCand > getBrlRPCCands() const
get barrel RPC candidates vector
PTrajectoryStateOnDet const & startingState() const
std::vector< L1MuRegionalCand > getCSCCands() const
get CSC candidates vector
Definition: DetId.h:17
#define debug
Definition: HDRShower.cc:19
MeasurementEstimator * theEstimator
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
GlobalVector globalMomentum() const
MuonServiceProxy * theService
the event setup proxy, it takes care the services update
edm::EDGetTokenT< L1MuGMTReadoutCollection > gmtToken_
Definition: output.py:1
std::vector< L1MuRegionalCand > getFwdRPCCands() const
get forward RPC candidates vector
Log< level::Warning, false > LogWarning
constexpr double pi()
Definition: Pi.h:31
bool isFwd() const
get forward bit (true=forward, false=barrel)
Geom::Theta< T > theta() const
edm::Ref< L1MuonParticleCollection > L1MuonParticleRef
def move(src, dest)
Definition: eostools.py:511
#define LogDebug(id)
unsigned getDTCSCIndex() const
get index of contributing DT/CSC muon

Member Data Documentation

◆ gmtToken_

edm::EDGetTokenT<L1MuGMTReadoutCollection> L2MuonSeedGenerator::gmtToken_
private

Definition at line 70 of file L2MuonSeedGenerator.h.

Referenced by L2MuonSeedGenerator(), and produce().

◆ muCollToken_

edm::EDGetTokenT<l1extra::L1MuonParticleCollection> L2MuonSeedGenerator::muCollToken_
private

Definition at line 71 of file L2MuonSeedGenerator.h.

Referenced by L2MuonSeedGenerator(), and produce().

◆ offlineSeedToken_

edm::EDGetTokenT<edm::View<TrajectorySeed> > L2MuonSeedGenerator::offlineSeedToken_
private

Definition at line 72 of file L2MuonSeedGenerator.h.

Referenced by L2MuonSeedGenerator(), and produce().

◆ theEstimator

MeasurementEstimator* L2MuonSeedGenerator::theEstimator
private

Definition at line 83 of file L2MuonSeedGenerator.h.

Referenced by L2MuonSeedGenerator(), produce(), and ~L2MuonSeedGenerator().

◆ theL1GMTReadoutCollection

edm::InputTag L2MuonSeedGenerator::theL1GMTReadoutCollection
private

Definition at line 66 of file L2MuonSeedGenerator.h.

Referenced by L2MuonSeedGenerator().

◆ theL1MaxEta

const double L2MuonSeedGenerator::theL1MaxEta
private

Definition at line 75 of file L2MuonSeedGenerator.h.

Referenced by produce().

◆ theL1MinPt

const double L2MuonSeedGenerator::theL1MinPt
private

Definition at line 74 of file L2MuonSeedGenerator.h.

Referenced by produce().

◆ theL1MinQuality

const unsigned L2MuonSeedGenerator::theL1MinQuality
private

Definition at line 76 of file L2MuonSeedGenerator.h.

Referenced by produce().

◆ theOfflineSeedLabel

edm::InputTag L2MuonSeedGenerator::theOfflineSeedLabel
private

Definition at line 67 of file L2MuonSeedGenerator.h.

Referenced by L2MuonSeedGenerator().

◆ thePropagatorName

std::string L2MuonSeedGenerator::thePropagatorName
private

Definition at line 68 of file L2MuonSeedGenerator.h.

Referenced by associateOfflineSeedToL1(), and produce().

◆ theService

MuonServiceProxy* L2MuonSeedGenerator::theService
private

the event setup proxy, it takes care the services update

Definition at line 81 of file L2MuonSeedGenerator.h.

Referenced by associateOfflineSeedToL1(), L2MuonSeedGenerator(), produce(), and ~L2MuonSeedGenerator().

◆ theSource

edm::InputTag L2MuonSeedGenerator::theSource
private

Definition at line 65 of file L2MuonSeedGenerator.h.

Referenced by L2MuonSeedGenerator().

◆ useOfflineSeed

const bool L2MuonSeedGenerator::useOfflineSeed
private

Definition at line 77 of file L2MuonSeedGenerator.h.

Referenced by L2MuonSeedGenerator(), and produce().

◆ useUnassociatedL1

const bool L2MuonSeedGenerator::useUnassociatedL1
private

Definition at line 78 of file L2MuonSeedGenerator.h.

Referenced by produce().