CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TSGForOI.cc
Go to the documentation of this file.
1 
10 
11 #include <memory>
12 
13 using namespace edm;
14 using namespace std;
15 
17  : src_(consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("src"))),
18  numOfMaxSeedsParam_(iConfig.getParameter<uint32_t>("maxSeeds")),
19  numOfLayersToTry_(iConfig.getParameter<int32_t>("layersToTry")),
20  numOfHitsToTry_(iConfig.getParameter<int32_t>("hitsToTry")),
21  fixedErrorRescalingForHits_(iConfig.getParameter<double>("fixedErrorRescaleFactorForHits")),
22  fixedErrorRescalingForHitless_(iConfig.getParameter<double>("fixedErrorRescaleFactorForHitless")),
23  adjustErrorsDynamicallyForHits_(iConfig.getParameter<bool>("adjustErrorsDynamicallyForHits")),
24  adjustErrorsDynamicallyForHitless_(iConfig.getParameter<bool>("adjustErrorsDynamicallyForHitless")),
25  estimatorName_(iConfig.getParameter<std::string>("estimator")),
26  minEtaForTEC_(iConfig.getParameter<double>("minEtaForTEC")),
27  maxEtaForTOB_(iConfig.getParameter<double>("maxEtaForTOB")),
28  useHitLessSeeds_(iConfig.getParameter<bool>("UseHitLessSeeds")),
29  useStereoLayersInTEC_(iConfig.getParameter<bool>("UseStereoLayersInTEC")),
30  updator_(new KFUpdator()),
31  measurementTrackerTag_(
32  consumes<MeasurementTrackerEvent>(iConfig.getParameter<edm::InputTag>("MeasurementTrackerEvent"))),
33  pT1_(iConfig.getParameter<double>("pT1")),
34  pT2_(iConfig.getParameter<double>("pT2")),
35  pT3_(iConfig.getParameter<double>("pT3")),
36  eta1_(iConfig.getParameter<double>("eta1")),
37  eta2_(iConfig.getParameter<double>("eta2")),
38  SF1_(iConfig.getParameter<double>("SF1")),
39  SF2_(iConfig.getParameter<double>("SF2")),
40  SF3_(iConfig.getParameter<double>("SF3")),
41  SF4_(iConfig.getParameter<double>("SF4")),
42  SF5_(iConfig.getParameter<double>("SF5")),
43  tsosDiff_(iConfig.getParameter<double>("tsosDiff")),
44  propagatorName_(iConfig.getParameter<std::string>("propagatorName")),
45  theCategory(string("Muon|RecoMuon|TSGForOI")) {
46  produces<std::vector<TrajectorySeed> >();
47 }
48 
50 
53  unsigned int numOfMaxSeeds = numOfMaxSeedsParam_;
54  unsigned int numSeedsMade = 0;
55  bool analysedL2 = false;
56  unsigned int layerCount = 0;
57 
60 
62  edm::Handle<MeasurementTrackerEvent> measurementTrackerH;
65  edm::ESHandle<Propagator> propagatorAlongH;
66  edm::ESHandle<Propagator> propagatorOppositeH;
67  edm::ESHandle<TrackerGeometry> tmpTkGeometryH;
69 
70  iSetup.get<IdealMagneticFieldRecord>().get(magfieldH);
71  iSetup.get<TrackingComponentsRecord>().get(propagatorName_, propagatorOppositeH);
72  iSetup.get<TrackingComponentsRecord>().get(propagatorName_, propagatorAlongH);
73  iSetup.get<GlobalTrackingGeometryRecord>().get(geometryH);
74  iSetup.get<TrackerDigiGeometryRecord>().get(tmpTkGeometryH);
75  iSetup.get<TrackingComponentsRecord>().get(estimatorName_, estimatorH);
76  iEvent.getByToken(measurementTrackerTag_, measurementTrackerH);
77 
80  iEvent.getByToken(src_, l2TrackCol);
81 
82  // The product:
83  std::unique_ptr<std::vector<TrajectorySeed> > result(new std::vector<TrajectorySeed>());
84 
85  // Get vector of Detector layers once:
86  std::vector<BarrelDetLayer const*> const& tob = measurementTrackerH->geometricSearchTracker()->tobLayers();
87  std::vector<ForwardDetLayer const*> const& tecPositive =
88  tmpTkGeometryH->isThere(GeomDetEnumerators::P2OTEC)
89  ? measurementTrackerH->geometricSearchTracker()->posTidLayers()
90  : measurementTrackerH->geometricSearchTracker()->posTecLayers();
91  std::vector<ForwardDetLayer const*> const& tecNegative =
92  tmpTkGeometryH->isThere(GeomDetEnumerators::P2OTEC)
93  ? measurementTrackerH->geometricSearchTracker()->negTidLayers()
94  : measurementTrackerH->geometricSearchTracker()->negTecLayers();
95  edm::ESHandle<TrackerTopology> tTopo_handle;
96  iSetup.get<TrackerTopologyRcd>().get(tTopo_handle);
97  const TrackerTopology* tTopo = tTopo_handle.product();
98 
99  // Get the suitable propagators:
100  std::unique_ptr<Propagator> propagatorAlong = SetPropagationDirection(*propagatorAlongH, alongMomentum);
101  std::unique_ptr<Propagator> propagatorOpposite = SetPropagationDirection(*propagatorOppositeH, oppositeToMomentum);
102 
103  edm::ESHandle<Propagator> SmartOpposite;
104  edm::ESHandle<Propagator> SHPOpposite;
105  iSetup.get<TrackingComponentsRecord>().get("hltESPSmartPropagatorAnyOpposite", SmartOpposite);
106  iSetup.get<TrackingComponentsRecord>().get("hltESPSteppingHelixPropagatorOpposite", SHPOpposite);
107 
108  // Loop over the L2's and make seeds for all of them:
109  LogTrace(theCategory) << "TSGForOI::produce: Number of L2's: " << l2TrackCol->size();
110  for (unsigned int l2TrackColIndex(0); l2TrackColIndex != l2TrackCol->size(); ++l2TrackColIndex) {
111  const reco::TrackRef l2(l2TrackCol, l2TrackColIndex);
112  std::unique_ptr<std::vector<TrajectorySeed> > out(new std::vector<TrajectorySeed>());
113  LogTrace("TSGForOI") << "TSGForOI::produce: L2 muon pT, eta, phi --> " << l2->pt() << " , " << l2->eta() << " , "
114  << l2->phi() << endl;
115 
117  dummyPlane->move(fts.position() - dummyPlane->position());
118  TrajectoryStateOnSurface tsosAtIP = TrajectoryStateOnSurface(fts, *dummyPlane);
119  LogTrace("TSGForOI") << "TSGForOI::produce: Created TSOSatIP: " << tsosAtIP << std::endl;
120 
121  // get the TSOS on the innermost layer of the L2.
122  TrajectoryStateOnSurface tsosAtMuonSystem =
123  trajectoryStateTransform::innerStateOnSurface(*l2, *geometryH, magfieldH.product());
124  LogTrace("TSGForOI") << "TSGForOI::produce: Created TSOSatMuonSystem: " << tsosAtMuonSystem << endl;
125 
126  LogTrace("TSGForOI") << "TSGForOI::produce: Check the error of the L2 parameter and use hit seeds if big errors"
127  << endl;
128  StateOnTrackerBound fromInside(propagatorAlong.get());
129  TrajectoryStateOnSurface outerTkStateInside = fromInside(fts);
130 
131  StateOnTrackerBound fromOutside(&*SmartOpposite);
132  TrajectoryStateOnSurface outerTkStateOutside = fromOutside(tsosAtMuonSystem);
133 
134  // for now only checking if the two positions (using updated and not-updated) agree withing certain extent,
135  // will probably have to design something fancier for the future.
136  auto dist = 0.0;
137  bool useBoth = false;
138  if (outerTkStateInside.isValid() && outerTkStateOutside.isValid()) {
139  dist = match_Chi2(outerTkStateInside, outerTkStateOutside);
140  }
141  if (dist > tsosDiff_) {
142  useBoth = true;
143  }
144 
145  numSeedsMade = 0;
146  analysedL2 = false;
147 
148  // if both TSOSs agree, use only the one at vertex, as it uses more information. If they do not agree, search for seed based on both
149 
150  // BARREL
151  if (std::abs(l2->eta()) < maxEtaForTOB_) {
152  layerCount = 0;
153  for (auto it = tob.rbegin(); it != tob.rend(); ++it) { //This goes from outermost to innermost layer
154  LogTrace("TSGForOI") << "TSGForOI::produce: looping in TOB layer " << layerCount << endl;
155  findSeedsOnLayer(tTopo,
156  **it,
157  tsosAtIP,
158  *(propagatorAlong.get()),
159  *(propagatorOpposite.get()),
160  l2,
161  estimatorH,
162  measurementTrackerH,
163  numSeedsMade,
164  numOfMaxSeeds,
165  layerCount,
166  analysedL2,
167  out);
168  }
169  if (useBoth) {
170  numSeedsMade = 0;
171  for (auto it = tob.rbegin(); it != tob.rend(); ++it) { //This goes from outermost to innermost layer
172  LogTrace("TSGForOI") << "TSGForOI::produce: looping in TOB layer " << layerCount << endl;
173  findSeedsOnLayer(tTopo,
174  **it,
175  tsosAtMuonSystem,
176  *(propagatorOpposite.get()),
177  *(propagatorOpposite.get()),
178  l2,
179  estimatorH,
180  measurementTrackerH,
181  numSeedsMade,
182  numOfMaxSeeds,
183  layerCount,
184  analysedL2,
185  out);
186  }
187  }
188  }
189  // Reset Number of seeds if in overlap region:
190 
191  if (std::abs(l2->eta()) > minEtaForTEC_ && std::abs(l2->eta()) < maxEtaForTOB_) {
192  numSeedsMade = 0;
193  }
194 
195  // ENDCAP+
196  if (l2->eta() > minEtaForTEC_) {
197  layerCount = 0;
198  for (auto it = tecPositive.rbegin(); it != tecPositive.rend(); ++it) {
199  LogTrace("TSGForOI") << "TSGForOI::produce: looping in TEC+ layer " << layerCount << endl;
200  findSeedsOnLayer(tTopo,
201  **it,
202  tsosAtIP,
203  *(propagatorAlong.get()),
204  *(propagatorOpposite.get()),
205  l2,
206  estimatorH,
207  measurementTrackerH,
208  numSeedsMade,
209  numOfMaxSeeds,
210  layerCount,
211  analysedL2,
212  out);
213  }
214  if (useBoth) {
215  numSeedsMade = 0;
216  for (auto it = tecPositive.rbegin(); it != tecPositive.rend(); ++it) {
217  LogTrace("TSGForOI") << "TSGForOI::produce: looping in TEC+ layer " << layerCount << endl;
218  findSeedsOnLayer(tTopo,
219  **it,
220  tsosAtMuonSystem,
221  *(propagatorOpposite.get()),
222  *(propagatorOpposite.get()),
223  l2,
224  estimatorH,
225  measurementTrackerH,
226  numSeedsMade,
227  numOfMaxSeeds,
228  layerCount,
229  analysedL2,
230  out);
231  }
232  }
233  }
234 
235  // ENDCAP-
236  if (l2->eta() < -minEtaForTEC_) {
237  layerCount = 0;
238  for (auto it = tecNegative.rbegin(); it != tecNegative.rend(); ++it) {
239  LogTrace("TSGForOI") << "TSGForOI::produce: looping in TEC- layer " << layerCount << endl;
240  findSeedsOnLayer(tTopo,
241  **it,
242  tsosAtIP,
243  *(propagatorAlong.get()),
244  *(propagatorOpposite.get()),
245  l2,
246  estimatorH,
247  measurementTrackerH,
248  numSeedsMade,
249  numOfMaxSeeds,
250  layerCount,
251  analysedL2,
252  out);
253  }
254  if (useBoth) {
255  numSeedsMade = 0;
256  for (auto it = tecNegative.rbegin(); it != tecNegative.rend(); ++it) {
257  LogTrace("TSGForOI") << "TSGForOI::produce: looping in TEC- layer " << layerCount << endl;
258  findSeedsOnLayer(tTopo,
259  **it,
260  tsosAtMuonSystem,
261  *(propagatorOpposite.get()),
262  *(propagatorOpposite.get()),
263  l2,
264  estimatorH,
265  measurementTrackerH,
266  numSeedsMade,
267  numOfMaxSeeds,
268  layerCount,
269  analysedL2,
270  out);
271  }
272  }
273  }
274 
275  for (std::vector<TrajectorySeed>::iterator it = out->begin(); it != out->end(); ++it) {
276  result->push_back(*it);
277  }
278  } //L2Collection
279  edm::LogInfo(theCategory) << "TSGForOI::produce: number of seeds made: " << result->size();
280 
281  iEvent.put(std::move(result));
282 }
283 
285  const GeometricSearchDet& layer,
286  const TrajectoryStateOnSurface& tsosAtIP,
289  const reco::TrackRef l2,
291  edm::Handle<MeasurementTrackerEvent>& measurementTrackerH,
292  unsigned int& numSeedsMade,
293  unsigned int& numOfMaxSeeds,
294  unsigned int& layerCount,
295  bool& analysedL2,
296  std::unique_ptr<std::vector<TrajectorySeed> >& out) const {
297  if (numSeedsMade > numOfMaxSeeds)
298  return;
299  LogTrace("TSGForOI") << "TSGForOI::findSeedsOnLayer: numSeedsMade = " << numSeedsMade
300  << " , layerCount = " << layerCount << endl;
301 
302  double errorSFHits = 1.0;
303  double errorSFHitless = 1.0;
305  errorSFHits = fixedErrorRescalingForHits_;
306  else
307  errorSFHits = calculateSFFromL2(l2);
309  errorSFHitless = fixedErrorRescalingForHitless_;
310 
311  // Hitless: TO Be discarded from here at some point.
312  if (useHitLessSeeds_) {
313  LogTrace("TSGForOI") << "TSGForOI::findSeedsOnLayer: Start hitless" << endl;
314  std::vector<GeometricSearchDet::DetWithState> dets;
315  layer.compatibleDetsV(tsosAtIP, propagatorAlong, *estimatorH, dets);
316  if (!dets.empty()) {
317  auto const& detOnLayer = dets.front().first;
318  auto const& tsosOnLayer = dets.front().second;
319  LogTrace("TSGForOI") << "TSGForOI::findSeedsOnLayer: tsosOnLayer " << tsosOnLayer << endl;
320  if (!tsosOnLayer.isValid()) {
321  edm::LogInfo(theCategory) << "ERROR!: Hitless TSOS is not valid!";
322  } else {
323  // calculate SF from L2 (only once -- if needed)
324  if (!analysedL2 && adjustErrorsDynamicallyForHitless_) {
325  errorSFHitless = calculateSFFromL2(l2);
326  analysedL2 = true;
327  }
328 
329  dets.front().second.rescaleError(errorSFHitless);
330  PTrajectoryStateOnDet const& ptsod =
331  trajectoryStateTransform::persistentState(tsosOnLayer, detOnLayer->geographicalId().rawId());
333  out->push_back(TrajectorySeed(ptsod, rHC, oppositeToMomentum));
334  LogTrace("TSGForOI") << "TSGForOI::findSeedsOnLayer: TSOD (Hitless) done " << endl;
335  numSeedsMade++;
336  }
337  }
338  }
339 
340  // Hits:
341  if (layerCount > numOfLayersToTry_)
342  return;
343  LogTrace("TSGForOI") << "TSGForOI::findSeedsOnLayer: Start Hits" << endl;
344  if (makeSeedsFromHits(tTopo,
345  layer,
346  tsosAtIP,
347  *out,
348  propagatorAlong,
349  *measurementTrackerH,
350  estimatorH,
351  numSeedsMade,
352  errorSFHits,
353  l2->eta()))
354  ++layerCount;
355 }
356 
358  double theSF = 1.0;
359  // L2 direction vs pT blowup - as was previously done:
360  // Split into 4 pT ranges: <pT1_, pT1_<pT2_, pT2_<pT3_, <pT4_: 13,30,70
361  // Split into 2 eta ranges for the middle two pT ranges: 1.0,1.4
362  double abseta = std::abs(track->eta());
363  if (track->pt() <= pT1_)
364  theSF = SF1_;
365  if (track->pt() > pT1_ && track->pt() <= pT2_) {
366  if (abseta <= eta1_)
367  theSF = SF3_;
368  if (abseta > eta1_ && abseta <= eta2_)
369  theSF = SF2_;
370  if (abseta > eta2_)
371  theSF = SF3_;
372  }
373  if (track->pt() > pT2_ && track->pt() <= pT3_) {
374  if (abseta <= eta1_)
375  theSF = SF5_;
376  if (abseta > eta1_ && abseta <= eta2_)
377  theSF = SF4_;
378  if (abseta > eta2_)
379  theSF = SF5_;
380  }
381  if (track->pt() > pT3_)
382  theSF = SF5_;
383 
384  LogTrace(theCategory) << "TSGForOI::calculateSFFromL2: SF has been calculated as: " << theSF;
385  return theSF;
386 }
387 
389  const GeometricSearchDet& layer,
390  const TrajectoryStateOnSurface& tsosAtIP,
391  std::vector<TrajectorySeed>& out,
395  unsigned int& numSeedsMade,
396  const double errorSF,
397  const double l2Eta) const {
398  // Error Rescaling:
399  TrajectoryStateOnSurface onLayer(tsosAtIP);
400  onLayer.rescaleError(errorSF);
401 
402  std::vector<GeometricSearchDet::DetWithState> dets;
403  layer.compatibleDetsV(onLayer, propagatorAlong, *estimatorH, dets);
404 
405  // Find Measurements on each DetWithState:
406  LogTrace("TSGForOI") << "TSGForOI::findSeedsOnLayer: find measurements on each detWithState " << dets.size() << endl;
407  std::vector<TrajectoryMeasurement> meas;
408  for (std::vector<GeometricSearchDet::DetWithState>::iterator it = dets.begin(); it != dets.end(); ++it) {
409  MeasurementDetWithData det = measurementTracker.idToDet(it->first->geographicalId());
410  if (det.isNull()) {
411  continue;
412  }
413  if (!it->second.isValid())
414  continue; //Skip if TSOS is not valid
415 
416  std::vector<TrajectoryMeasurement> mymeas =
417  det.fastMeasurements(it->second, onLayer, propagatorAlong, *estimatorH); //Second TSOS is not used
418  for (std::vector<TrajectoryMeasurement>::const_iterator it2 = mymeas.begin(), ed2 = mymeas.end(); it2 != ed2;
419  ++it2) {
420  if (it2->recHit()->isValid())
421  meas.push_back(*it2); //Only save those which are valid
422  }
423  }
424 
425  // Update TSOS using TMs after sorting, then create Trajectory Seed and put into vector:
426  LogTrace("TSGForOI")
427  << "TSGForOI::findSeedsOnLayer: Update TSOS using TMs after sorting, then create Trajectory Seed, number of TM = "
428  << meas.size() << endl;
429  unsigned int found = 0;
430  std::sort(meas.begin(), meas.end(), TrajMeasLessEstim());
431  for (std::vector<TrajectoryMeasurement>::const_iterator it = meas.begin(); it != meas.end(); ++it) {
432  TrajectoryStateOnSurface updatedTSOS = updator_->update(it->forwardPredictedState(), *it->recHit());
433  LogTrace("TSGForOI") << "TSGForOI::findSeedsOnLayer: TSOS for TM " << found << endl;
434  if (not updatedTSOS.isValid())
435  continue;
436 
437  // CHECK if is StereoLayer:
438  if (useStereoLayersInTEC_ && (fabs(l2Eta) > 0.8 && fabs(l2Eta) < 1.6)) {
439  DetId detid = ((*it).recHit()->hit())->geographicalId();
440  if (detid.subdetId() == StripSubdetector::TEC) {
441  if (!tTopo->tecIsStereo(detid.rawId()))
442  break; // try another layer
443  }
444  }
445 
447  seedHits.push_back(*it->recHit()->hit());
448  PTrajectoryStateOnDet const& pstate =
449  trajectoryStateTransform::persistentState(updatedTSOS, it->recHit()->geographicalId().rawId());
450  LogTrace("TSGForOI") << "TSGForOI::findSeedsOnLayer: number of seedHits: " << seedHits.size() << endl;
451  TrajectorySeed seed(pstate, std::move(seedHits), oppositeToMomentum);
452  out.push_back(seed);
453  found++;
454  numSeedsMade++;
455  if (found == numOfHitsToTry_)
456  break;
457  }
458  return found;
459 }
460 //
463 
465  if (!tsos1.isValid() || !tsos2.isValid())
466  return -1.;
467 
469  AlgebraicSymMatrix55 m(tsos1.localError().matrix() + tsos2.localError().matrix());
470 
471  bool ierr = !m.Invert();
472 
473  if (ierr) {
474  edm::LogInfo("TSGForOI") << "Error inverting covariance matrix";
475  return -1;
476  }
477 
478  double est = ROOT::Math::Similarity(v, m);
479 
480  return est;
481 }
482 
485  desc.add<edm::InputTag>("src", edm::InputTag("hltL2Muons", "UpdatedAtVtx"));
486  desc.add<int>("layersToTry", 1);
487  desc.add<double>("fixedErrorRescaleFactorForHitless", 2.0);
488  desc.add<int>("hitsToTry", 1);
489  desc.add<bool>("adjustErrorsDynamicallyForHits", false);
490  desc.add<bool>("adjustErrorsDynamicallyForHitless", false);
491  desc.add<edm::InputTag>("MeasurementTrackerEvent", edm::InputTag("hltSiStripClusters"));
492  desc.add<bool>("UseHitLessSeeds", true);
493  desc.add<bool>("UseStereoLayersInTEC", false);
494  desc.add<std::string>("estimator", "hltESPChi2MeasurementEstimator100");
495  desc.add<double>("maxEtaForTOB", 1.2);
496  desc.add<double>("minEtaForTEC", 0.8);
497  desc.addUntracked<bool>("debug", true);
498  desc.add<double>("fixedErrorRescaleFactorForHits", 2.0);
499  desc.add<unsigned int>("maxSeeds", 1);
500  desc.add<double>("pT1", 13.0);
501  desc.add<double>("pT2", 30.0);
502  desc.add<double>("pT3", 70.0);
503  desc.add<double>("eta1", 1.0);
504  desc.add<double>("eta2", 1.4);
505  desc.add<double>("SF1", 3.0);
506  desc.add<double>("SF2", 4.0);
507  desc.add<double>("SF3", 5.0);
508  desc.add<double>("SF4", 7.0);
509  desc.add<double>("SF5", 10.0);
510  desc.add<double>("tsosDiff", 0.03);
511  desc.add<std::string>("propagatorName", "PropagatorWithMaterial");
512  descriptions.add("TSGForOI", desc);
513 }
514 
const std::string estimatorName_
Estimator used to find dets and TrajectoryMeasurements.
Definition: TSGForOI.h:62
static constexpr auto TEC
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
const LocalTrajectoryParameters & localParameters() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
tuple propagatorAlong
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
tuple measurementTracker
const double tsosDiff_
Distance of TSOSs to trigger using hits or not.
Definition: TSGForOI.h:88
void findSeedsOnLayer(const TrackerTopology *tTopo, const GeometricSearchDet &layer, const TrajectoryStateOnSurface &tsosAtIP, const Propagator &propagatorAlong, const Propagator &propagatorOpposite, const reco::TrackRef l2, edm::ESHandle< Chi2MeasurementEstimatorBase > &estimator_, edm::Handle< MeasurementTrackerEvent > &measurementTrackerH, unsigned int &numSeedsMade, unsigned int &numOfMaxSeeds, unsigned int &layerCount, bool &analysedL2, std::unique_ptr< std::vector< TrajectorySeed > > &out) const
Function to find seeds on a given layer.
Definition: TSGForOI.cc:284
size_type size() const
Definition: OwnVector.h:300
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
PTrajectoryStateOnDet persistentState(const TrajectoryStateOnSurface &ts, unsigned int detid)
const std::string propagatorName_
Counters and flags for the implementation.
Definition: TSGForOI.h:91
void produce(edm::StreamID sid, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
Definition: TSGForOI.cc:51
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: TSGForOI.cc:483
const double SF3_
Definition: TSGForOI.h:85
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
const double maxEtaForTOB_
Maximum eta value to activate searching in the TOB.
Definition: TSGForOI.h:68
#define LogTrace(id)
constexpr std::array< uint8_t, layerIndexSize > layer
tuple result
Definition: mps_fire.py:311
~TSGForOI() override
Definition: TSGForOI.cc:49
AlgebraicVector5 vector() const
bool tecIsStereo(const DetId &id) const
std::unique_ptr< Propagator > SetPropagationDirection(Propagator const &iprop, PropagationDirection dir)
void push_back(D *&d)
Definition: OwnVector.h:326
const double minEtaForTEC_
Minimum eta value to activate searching in the TEC.
Definition: TSGForOI.h:65
int iEvent
Definition: GenABIO.cc:224
double match_Chi2(const TrajectoryStateOnSurface &tsos1, const TrajectoryStateOnSurface &tsos2) const
Definition: TSGForOI.cc:464
const double fixedErrorRescalingForHits_
How much to rescale errors from the L2 (fixed error vs pT, eta)
Definition: TSGForOI.h:54
const std::unique_ptr< TrajectoryStateUpdator > updator_
KFUpdator defined in constructor.
Definition: TSGForOI.h:78
std::vector< TrajectoryMeasurement > fastMeasurements(const TrajectoryStateOnSurface &stateOnThisDet, const TrajectoryStateOnSurface &tsos2, const Propagator &prop, const MeasurementEstimator &est) const
const double eta2_
Definition: TSGForOI.h:84
static PlanePointer build(Args &&...args)
Definition: Plane.h:33
const bool useHitLessSeeds_
Definition: TSGForOI.h:72
def move
Definition: eostools.py:511
const unsigned int numOfLayersToTry_
How many layers to try.
Definition: TSGForOI.h:48
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const double SF1_
Definition: TSGForOI.h:85
ROOT::Math::SVector< double, 5 > AlgebraicVector5
double calculateSFFromL2(const reco::TrackRef track) const
Function used to calculate the dynamic error SF by analysing the L2.
Definition: TSGForOI.cc:357
const bool useStereoLayersInTEC_
Switch ON to use Stereo layers instead of using every layer in TEC.
Definition: TSGForOI.h:75
const AlgebraicSymMatrix55 & matrix() const
const LocalTrajectoryError & localError() const
const double SF5_
Definition: TSGForOI.h:85
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Create L3MuonTrajectorySeeds from L2 Muons updated at vertex in an outside in manner.
Definition: TSGForOI.h:33
const bool adjustErrorsDynamicallyForHitless_
Definition: TSGForOI.h:59
const double pT1_
pT, eta ranges and scale factor values
Definition: TSGForOI.h:83
Log< level::Info, false > LogInfo
const double SF4_
Definition: TSGForOI.h:85
Definition: DetId.h:17
GlobalPoint position() const
const double pT2_
Definition: TSGForOI.h:83
int makeSeedsFromHits(const TrackerTopology *tTopo, const GeometricSearchDet &layer, const TrajectoryStateOnSurface &tsosAtIP, std::vector< TrajectorySeed > &out, const Propagator &propagatorAlong, const MeasurementTrackerEvent &measurementTracker, edm::ESHandle< Chi2MeasurementEstimatorBase > &estimator_, unsigned int &numSeedsMade, const double errorSF, const double l2Eta) const
Function to find hits on layers and create seeds from updated TSOS.
Definition: TSGForOI.cc:388
const double eta1_
Definition: TSGForOI.h:84
const double pT3_
Definition: TSGForOI.h:83
T const * product() const
Definition: ESHandle.h:86
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const edm::EDGetTokenT< reco::TrackCollection > src_
Labels for input collections.
Definition: TSGForOI.h:42
const bool adjustErrorsDynamicallyForHits_
Whether or not to use an automatically calculated scale-factor value.
Definition: TSGForOI.h:58
tuple propagatorOpposite
T get() const
Definition: EventSetup.h:88
TSGForOI(const edm::ParameterSet &iConfig)
Definition: TSGForOI.cc:16
tuple MeasurementTrackerEvent
const edm::EDGetTokenT< MeasurementTrackerEvent > measurementTrackerTag_
Definition: TSGForOI.h:80
const unsigned int numOfMaxSeedsParam_
Maximum number of seeds for each L2.
Definition: TSGForOI.h:45
const std::string theCategory
Definition: TSGForOI.h:92
const double SF2_
Definition: TSGForOI.h:85
FreeTrajectoryState initialFreeState(const reco::Track &tk, const MagneticField *field, bool withErr=true)
virtual void compatibleDetsV(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetWithState > &result) const
const unsigned int numOfHitsToTry_
How many hits to try per layer.
Definition: TSGForOI.h:51
TrajectoryStateOnSurface innerStateOnSurface(const reco::Track &tk, const TrackingGeometry &geom, const MagneticField *field, bool withErr=true)
const double fixedErrorRescalingForHitless_
Definition: TSGForOI.h:55