CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes
TrackListMerger Class Reference
Inheritance diagram for TrackListMerger:
edm::stream::EDProducer<>

Classes

struct  TkEDGetTokenss
 

Public Member Functions

void produce (edm::Event &e, const edm::EventSetup &c) override
 
 TrackListMerger (const edm::ParameterSet &conf)
 
 ~TrackListMerger () override
 
- 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 Types

using MVACollection = std::vector< float >
 
using QualityMaskCollection = std::vector< unsigned char >
 

Private Member Functions

TkEDGetTokenss edTokens (const edm::InputTag &tag, const edm::InputTag &mvatag)
 
TkEDGetTokenss edTokens (const edm::InputTag &tag, const edm::InputTag &seltag, const edm::InputTag &mvatag)
 

Private Attributes

bool allowFirstHitShare_
 
bool copyExtras_
 
bool copyMVA_
 
float epsilon_
 
float foundHitBonus_
 
std::vector< int > hasSelector_
 
std::vector< double > indivShareFrac_
 
std::vector< std::vector< int > > listsToMerge_
 
float lostHitPenalty_
 
bool makeReKeyedSeeds_
 
double maxNormalizedChisq_
 
unsigned int minFound_
 
double minPT_
 
std::unique_ptr< TrajectorySeedCollectionoutputSeeds
 
std::unique_ptr< std::vector< Trajectory > > outputTrajs
 
std::unique_ptr< reco::TrackExtraCollectionoutputTrkExtras
 
std::unique_ptr< TrackingRecHitCollectionoutputTrkHits
 
std::unique_ptr< reco::TrackCollectionoutputTrks
 
std::unique_ptr< TrajTrackAssociationCollectionoutputTTAss
 
std::string priorityName_
 
edm::ESGetToken< TrackAlgoPriorityOrder, CkfComponentsRecordpriorityToken
 
std::vector< bool > promoteQuality_
 
reco::TrackBase::TrackQuality qualityToSet_
 
edm::RefProd< std::vector< Trajectory > > refTrajs
 
edm::RefProd< TrajectorySeedCollectionrefTrajSeeds
 
reco::TrackExtraRefProd refTrkExtras
 
TrackingRecHitRefProd refTrkHits
 
reco::TrackRefProd refTrks
 
float shareFrac_
 
std::vector< TkEDGetTokensstrackProducers_
 
bool trkQualMod_
 
bool use_sharesInput_
 

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

Definition at line 32 of file TrackListMerger.cc.

Member Typedef Documentation

◆ MVACollection

using TrackListMerger::MVACollection = std::vector<float>
private

Definition at line 41 of file TrackListMerger.cc.

◆ QualityMaskCollection

using TrackListMerger::QualityMaskCollection = std::vector<unsigned char>
private

Definition at line 42 of file TrackListMerger.cc.

Constructor & Destructor Documentation

◆ TrackListMerger()

TrackListMerger::TrackListMerger ( const edm::ParameterSet conf)
explicit

Definition at line 206 of file TrackListMerger.cc.

206  {
207  copyExtras_ = conf.getUntrackedParameter<bool>("copyExtras", true);
208  priorityName_ = conf.getParameter<std::string>("trackAlgoPriorityOrder");
209 
210  std::vector<edm::InputTag> trackProducerTags(conf.getParameter<std::vector<edm::InputTag>>("TrackProducers"));
211  //which of these do I need to turn into vectors?
212  maxNormalizedChisq_ = conf.getParameter<double>("MaxNormalizedChisq");
213  minPT_ = conf.getParameter<double>("MinPT");
214  minFound_ = (unsigned int)conf.getParameter<int>("MinFound");
215  epsilon_ = conf.getParameter<double>("Epsilon");
216  shareFrac_ = conf.getParameter<double>("ShareFrac");
217  allowFirstHitShare_ = conf.getParameter<bool>("allowFirstHitShare");
218  foundHitBonus_ = conf.getParameter<double>("FoundHitBonus");
219  lostHitPenalty_ = conf.getParameter<double>("LostHitPenalty");
220  indivShareFrac_ = conf.getParameter<std::vector<double>>("indivShareFrac");
221  std::string qualityStr = conf.getParameter<std::string>("newQuality");
222  priorityToken = esConsumes<TrackAlgoPriorityOrder, CkfComponentsRecord>(edm::ESInputTag("", priorityName_));
223 
224  if (!qualityStr.empty()) {
226  } else
228 
229  use_sharesInput_ = true;
230  if (epsilon_ > 0.0)
231  use_sharesInput_ = false;
232 
234 
235  for (unsigned int i = 0; i < setsToMerge.size(); i++) {
236  listsToMerge_.push_back(setsToMerge[i].getParameter<std::vector<int>>("tLists"));
237  promoteQuality_.push_back(setsToMerge[i].getParameter<bool>("pQual"));
238  }
239  hasSelector_ = conf.getParameter<std::vector<int>>("hasSelector");
240  copyMVA_ = conf.getParameter<bool>("copyMVA");
241 
242  std::vector<edm::InputTag> selectors(conf.getParameter<std::vector<edm::InputTag>>("selectedTrackQuals"));
243  std::vector<edm::InputTag> mvaStores;
244  if (conf.exists("mvaValueTags")) {
245  mvaStores = conf.getParameter<std::vector<edm::InputTag>>("mvaValueTags");
246  } else {
247  for (int i = 0; i < (int)selectors.size(); i++) {
248  edm::InputTag ntag(selectors[i].label(), "MVAVals");
249  mvaStores.push_back(ntag);
250  }
251  }
252  unsigned int numTrkColl = trackProducerTags.size();
253  if (numTrkColl != hasSelector_.size() || numTrkColl != selectors.size()) {
254  throw cms::Exception("Inconsistent size") << "need same number of track collections and selectors";
255  }
256  if (numTrkColl != hasSelector_.size() || numTrkColl != mvaStores.size()) {
257  throw cms::Exception("Inconsistent size") << "need same number of track collections and MVA stores";
258  }
259  for (unsigned int i = indivShareFrac_.size(); i < numTrkColl; i++) {
260  // edm::LogWarning("TrackListMerger") << "No indivShareFrac for " << trackProducersTags <<". Using default value of 1";
261  indivShareFrac_.push_back(1.0);
262  }
263 
264  trkQualMod_ = conf.getParameter<bool>("writeOnlyTrkQuals");
265  if (trkQualMod_) {
266  bool ok = true;
267  for (unsigned int i = 1; i < numTrkColl; i++) {
268  if (!(trackProducerTags[i] == trackProducerTags[0]))
269  ok = false;
270  }
271  if (!ok) {
272  throw cms::Exception("Bad input") << "to use writeOnlyTrkQuals=True all input InputTags must be the same";
273  }
274  produces<edm::ValueMap<int>>();
275  produces<QualityMaskCollection>("QualityMasks");
276  } else {
277  produces<reco::TrackCollection>();
278 
279  makeReKeyedSeeds_ = conf.getUntrackedParameter<bool>("makeReKeyedSeeds", false);
280  if (makeReKeyedSeeds_) {
281  copyExtras_ = true;
282  produces<TrajectorySeedCollection>();
283  }
284 
285  if (copyExtras_) {
286  produces<reco::TrackExtraCollection>();
287  produces<TrackingRecHitCollection>();
288  }
289  produces<std::vector<Trajectory>>();
290  produces<TrajTrackAssociationCollection>();
291  }
292  produces<edm::ValueMap<float>>("MVAVals");
293  produces<MVACollection>("MVAValues");
294 
295  // Do all the consumes
296  trackProducers_.resize(numTrkColl);
297  for (unsigned int i = 0; i < numTrkColl; ++i) {
298  trackProducers_[i] = hasSelector_[i] > 0 ? edTokens(trackProducerTags[i], selectors[i], mvaStores[i])
299  : edTokens(trackProducerTags[i], mvaStores[i]);
300  }
301 }

References allowFirstHitShare_, copyExtras_, copyMVA_, edTokens(), epsilon_, Exception, edm::ParameterSet::exists(), foundHitBonus_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hasSelector_, mps_fire::i, indivShareFrac_, createfilelist::int, label, listsToMerge_, lostHitPenalty_, makeReKeyedSeeds_, maxNormalizedChisq_, minFound_, minPT_, convertSQLiteXML::ok, priorityName_, priorityToken, promoteQuality_, reco::TrackBase::qualityByName(), qualityToSet_, TrackValidation_cff::selectors, sistrip_dqm_sourceclient-live_cfg::setsToMerge, shareFrac_, AlCaHLTBitMon_QueryRunRegistry::string, trackProducers_, trkQualMod_, reco::TrackBase::undefQuality, and use_sharesInput_.

◆ ~TrackListMerger()

TrackListMerger::~TrackListMerger ( )
override

Definition at line 304 of file TrackListMerger.cc.

304 {}

Member Function Documentation

◆ edTokens() [1/2]

TkEDGetTokenss TrackListMerger::edTokens ( const edm::InputTag tag,
const edm::InputTag mvatag 
)
inlineprivate

Definition at line 86 of file TrackListMerger.cc.

86  {
87  return TkEDGetTokenss(tag,
88  consumes<reco::TrackCollection>(tag),
89  consumes<std::vector<Trajectory>>(tag),
90  consumes<TrajTrackAssociationCollection>(tag),
92  consumes<edm::ValueMap<float>>(mvatag));
93  }

References makeGlobalPositionRcd_cfg::tag.

◆ edTokens() [2/2]

TkEDGetTokenss TrackListMerger::edTokens ( const edm::InputTag tag,
const edm::InputTag seltag,
const edm::InputTag mvatag 
)
inlineprivate

Definition at line 78 of file TrackListMerger.cc.

78  {
79  return TkEDGetTokenss(tag,
80  consumes<reco::TrackCollection>(tag),
81  consumes<std::vector<Trajectory>>(tag),
82  consumes<TrajTrackAssociationCollection>(tag),
83  consumes<edm::ValueMap<int>>(seltag),
84  consumes<edm::ValueMap<float>>(mvatag));
85  }

References makeGlobalPositionRcd_cfg::tag.

Referenced by TrackListMerger().

◆ produce()

void TrackListMerger::produce ( edm::Event e,
const edm::EventSetup c 
)
override

Definition at line 307 of file TrackListMerger.cc.

307  {
308  // extract tracker geometry
309  //
310  //edm::ESHandle<TrackerGeometry> theG;
311  //es.get<TrackerDigiGeometryRecord>().get(theG);
312 
313  // using namespace reco;
314 
315  edm::ESHandle<TrackAlgoPriorityOrder> priorityH = es.getHandle(priorityToken);
316  auto const& trackAlgoPriorityOrder = *priorityH;
317 
318  // get Inputs
319  // if 1 input list doesn't exist, make an empty list, issue a warning, and continue
320  // this allows TrackListMerger to be used as a cleaner only if handed just one list
321  // if both input lists don't exist, will issue 2 warnings and generate an empty output collection
322  //
323  static const reco::TrackCollection s_empty;
324 
325  std::vector<const reco::TrackCollection*> trackColls;
326  std::vector<edm::Handle<reco::TrackCollection>> trackHandles(trackProducers_.size());
327  for (unsigned int i = 0; i < trackProducers_.size(); i++) {
328  trackColls.push_back(nullptr);
329  //edm::Handle<reco::TrackCollection> trackColl;
330  e.getByToken(trackProducers_[i].tk, trackHandles[i]);
331  if (trackHandles[i].isValid()) {
332  trackColls[i] = trackHandles[i].product();
333  } else {
334  edm::LogWarning("TrackListMerger") << "TrackCollection " << trackProducers_[i].tag << " not found";
335  trackColls[i] = &s_empty;
336  }
337  }
338 
339  unsigned int collsSize = trackColls.size();
340  unsigned int rSize = 0;
341  unsigned int trackCollSizes[collsSize];
342  unsigned int trackCollFirsts[collsSize];
343  for (unsigned int i = 0; i != collsSize; i++) {
344  trackCollSizes[i] = trackColls[i]->size();
345  trackCollFirsts[i] = rSize;
346  rSize += trackCollSizes[i];
347  }
348 
349  statCount.begin(rSize);
350 
351  //
352  // quality cuts first
353  //
354  int i = -1;
355 
356  int selected[rSize];
357  int indexG[rSize];
358  bool trkUpdated[rSize];
359  int trackCollNum[rSize];
360  int trackQuals[rSize];
361  float trackMVAs[rSize];
362  reco::TrackBase::TrackAlgorithm oriAlgo[rSize];
363  std::vector<reco::TrackBase::AlgoMask> algoMask(rSize);
364  for (unsigned int j = 0; j < rSize; j++) {
365  indexG[j] = -1;
366  selected[j] = 1;
367  trkUpdated[j] = false;
368  trackCollNum[j] = 0;
369  trackQuals[j] = 0;
370  trackMVAs[j] = -998.0;
372  }
373 
374  int ngood = 0;
375  for (unsigned int j = 0; j != collsSize; j++) {
376  const reco::TrackCollection* tC1 = trackColls[j];
377 
378  edm::Handle<edm::ValueMap<int>> trackSelColl;
379  edm::Handle<edm::ValueMap<float>> trackMVAStore;
380  if (copyMVA_)
381  e.getByToken(trackProducers_[j].tmva, trackMVAStore);
382  if (hasSelector_[j] > 0) {
383  e.getByToken(trackProducers_[j].tsel, trackSelColl);
384  }
385 
386  if (!tC1->empty()) {
387  unsigned int iC = 0;
388  for (reco::TrackCollection::const_iterator track = tC1->begin(); track != tC1->end(); track++) {
389  i++;
390  trackCollNum[i] = j;
391  trackQuals[i] = track->qualityMask();
392  oriAlgo[i] = track->originalAlgo();
393  algoMask[i] = track->algoMask();
394 
395  reco::TrackRef trkRef = reco::TrackRef(trackHandles[j], iC);
396  if (copyMVA_)
397  if ((*trackMVAStore).contains(trkRef.id()))
398  trackMVAs[i] = (*trackMVAStore)[trkRef];
399  if (hasSelector_[j] > 0) {
400  int qual = (*trackSelColl)[trkRef];
401  if (qual < 0) {
402  selected[i] = 0;
403  iC++;
404  continue;
405  } else {
406  trackQuals[i] = qual;
407  }
408  }
409  iC++;
410  selected[i] = trackQuals[i] + 10; //10 is magic number used throughout...
411  if ((short unsigned)track->ndof() < 1) {
412  selected[i] = 0;
413  continue;
414  }
415  if (track->normalizedChi2() > maxNormalizedChisq_) {
416  selected[i] = 0;
417  continue;
418  }
419  if (track->found() < minFound_) {
420  selected[i] = 0;
421  continue;
422  }
423  if (track->pt() < minPT_) {
424  selected[i] = 0;
425  continue;
426  }
427  // good!
428  indexG[i] = ngood++;
429  //if ( beVerb) std::cout << "inverb " << track->pt() << " " << selected[i] << std::endl;
430  } //end loop over tracks
431  } //end more than 0 track
432  } // loop over trackcolls
433 
434  statCount.pre(ngood);
435 
436  //cache the id and rechits of valid hits
437  typedef std::pair<unsigned int, const TrackingRecHit*> IHit;
438  std::vector<std::vector<IHit>> rh1(ngood); // "not an array" of vectors!
439  //const TrackingRecHit* fh1[ngood]; // first hit...
441  float score[ngood];
442 
443  for (unsigned int j = 0; j < rSize; j++) {
444  if (selected[j] == 0)
445  continue;
446  int i = indexG[j];
447  assert(i >= 0);
448  unsigned int collNum = trackCollNum[j];
449  unsigned int trackNum = j - trackCollFirsts[collNum];
450  const reco::Track* track = &((trackColls[collNum])->at(trackNum));
451 
452  algo[i] = track->algo();
453  int validHits = track->numberOfValidHits();
454  int validPixelHits = track->hitPattern().numberOfValidPixelHits();
455  int lostHits = track->numberOfLostHits();
456  score[i] =
457  foundHitBonus_ * validPixelHits + foundHitBonus_ * validHits - lostHitPenalty_ * lostHits - track->chi2();
458 
459  rh1[i].reserve(validHits);
460  auto compById = [](IHit const& h1, IHit const& h2) { return h1.first < h2.first; };
461  for (trackingRecHit_iterator it = track->recHitsBegin(); it != track->recHitsEnd(); ++it) {
462  const TrackingRecHit* hit = (*it);
463  unsigned int id = hit->rawId();
464  if (hit->geographicalId().subdetId() > 2)
465  id &= (~3); // mask mono/stereo in strips...
466  if LIKELY (hit->isValid()) {
467  rh1[i].emplace_back(id, hit);
468  std::push_heap(rh1[i].begin(), rh1[i].end(), compById);
469  }
470  }
471  std::sort_heap(rh1[i].begin(), rh1[i].end(), compById);
472  }
473 
474  //DL here
475  if LIKELY (ngood > 1 && collsSize > 1)
476  for (unsigned int ltm = 0; ltm < listsToMerge_.size(); ltm++) {
477  int saveSelected[rSize];
478  bool notActive[collsSize];
479  for (unsigned int cn = 0; cn != collsSize; ++cn)
480  notActive[cn] = find(listsToMerge_[ltm].begin(), listsToMerge_[ltm].end(), cn) == listsToMerge_[ltm].end();
481 
482  for (unsigned int i = 0; i < rSize; i++)
483  saveSelected[i] = selected[i];
484 
485  //DL protect against 0 tracks?
486  for (unsigned int i = 0; i < rSize - 1; i++) {
487  if (selected[i] == 0)
488  continue;
489  unsigned int collNum = trackCollNum[i];
490 
491  //check that this track is in one of the lists for this iteration
492  if (notActive[collNum])
493  continue;
494 
495  int k1 = indexG[i];
496  unsigned int nh1 = rh1[k1].size();
497  int qualityMaskT1 = trackQuals[i];
498 
499  int nhit1 = nh1; // validHits[k1];
500  float score1 = score[k1];
501 
502  // start at next collection
503  for (unsigned int j = i + 1; j < rSize; j++) {
504  if (selected[j] == 0)
505  continue;
506  unsigned int collNum2 = trackCollNum[j];
507  if ((collNum == collNum2) && indivShareFrac_[collNum] > 0.99)
508  continue;
509  //check that this track is in one of the lists for this iteration
510  if (notActive[collNum2])
511  continue;
512 
513  int k2 = indexG[j];
514 
515  int newQualityMask = -9; //avoid resetting quality mask if not desired 10+ -9 =1
516  if (promoteQuality_[ltm]) {
517  int maskT1 = saveSelected[i] > 1 ? saveSelected[i] - 10 : qualityMaskT1;
518  int maskT2 = saveSelected[j] > 1 ? saveSelected[j] - 10 : trackQuals[j];
519  newQualityMask = (maskT1 | maskT2); // take OR of trackQuality
520  }
521  unsigned int nh2 = rh1[k2].size();
522  int nhit2 = nh2;
523 
524  auto share = use_sharesInput_ ? [](const TrackingRecHit* it, const TrackingRecHit* jt, float) -> bool {
525  return it->sharesInput(jt, TrackingRecHit::some);
526  }
527  : [](const TrackingRecHit* it, const TrackingRecHit* jt, float eps) -> bool {
528  float delta = std::abs(it->localPosition().x() - jt->localPosition().x());
529  return (it->geographicalId() == jt->geographicalId()) && (delta < eps);
530  };
531 
532  statCount.start();
533 
534  //loop over rechits
535  int noverlap = 0;
536  int firstoverlap = 0;
537  // check first hit (should use REAL first hit?)
538  if UNLIKELY (allowFirstHitShare_ && rh1[k1][0].first == rh1[k2][0].first) {
539  const TrackingRecHit* it = rh1[k1][0].second;
540  const TrackingRecHit* jt = rh1[k2][0].second;
541  if (share(it, jt, epsilon_))
542  firstoverlap = 1;
543  }
544 
545  // exploit sorting
546  unsigned int jh = 0;
547  unsigned int ih = 0;
548  while (ih != nh1 && jh != nh2) {
549  // break if not enough to go...
550  // if ( nprecut-noverlap+firstoverlap > int(nh1-ih)) break;
551  // if ( nprecut-noverlap+firstoverlap > int(nh2-jh)) break;
552  auto const id1 = rh1[k1][ih].first;
553  auto const id2 = rh1[k2][jh].first;
554  if (id1 < id2)
555  ++ih;
556  else if (id2 < id1)
557  ++jh;
558  else {
559  // in case of split-hit do full conbinatorics
560  auto li = ih;
561  while ((++li) != nh1 && id1 == rh1[k1][li].first) {
562  }
563  auto lj = jh;
564  while ((++lj) != nh2 && id2 == rh1[k2][lj].first) {
565  }
566  for (auto ii = ih; ii != li; ++ii)
567  for (auto jj = jh; jj != lj; ++jj) {
568  const TrackingRecHit* it = rh1[k1][ii].second;
569  const TrackingRecHit* jt = rh1[k2][jj].second;
570  if (share(it, jt, epsilon_))
571  noverlap++;
572  }
573  jh = lj;
574  ih = li;
575  } // equal ids
576 
577  } //loop over ih & jh
578 
579  bool dupfound =
580  (collNum != collNum2)
581  ? (noverlap - firstoverlap) > (std::min(nhit1, nhit2) - firstoverlap) * shareFrac_
582  : (noverlap - firstoverlap) > (std::min(nhit1, nhit2) - firstoverlap) * indivShareFrac_[collNum];
583 
584  auto seti = [&](unsigned int ii, unsigned int jj) {
585  selected[jj] = 0;
586  selected[ii] = 10 + newQualityMask; // add 10 to avoid the case where mask = 1
587  trkUpdated[ii] = true;
588  if (trackAlgoPriorityOrder.priority(oriAlgo[jj]) < trackAlgoPriorityOrder.priority(oriAlgo[ii]))
589  oriAlgo[ii] = oriAlgo[jj];
590  algoMask[ii] |= algoMask[jj];
591  algoMask[jj] = algoMask[ii]; // in case we keep discarded
592  };
593 
594  if (dupfound) {
595  float score2 = score[k2];
596  constexpr float almostSame =
597  0.01f; // difference rather than ratio due to possible negative values for score
598  if (score1 - score2 > almostSame) {
599  seti(i, j);
600  } else if (score2 - score1 > almostSame) {
601  seti(j, i);
602  } else {
603  // If tracks from both iterations are virtually identical, choose the one with the best quality or with lower algo
604  if ((trackQuals[j] &
606  (trackQuals[i] &
608  //same quality, pick earlier algo
609  if (trackAlgoPriorityOrder.priority(algo[k1]) <= trackAlgoPriorityOrder.priority(algo[k2])) {
610  seti(i, j);
611  } else {
612  seti(j, i);
613  }
614  } else if ((trackQuals[j] & (1 << reco::TrackBase::loose | 1 << reco::TrackBase::tight |
616  (trackQuals[i] & (1 << reco::TrackBase::loose | 1 << reco::TrackBase::tight |
618  seti(i, j);
619  } else {
620  seti(j, i);
621  }
622  } //end fi < fj
623  statCount.overlap();
624  /*
625  if (at0[k1]&&at0[k2]) {
626  statCount.dp(dphi);
627  if (dz<1.f) statCount.de(deta);
628  }
629  */
630  } //end got a duplicate
631  else {
632  statCount.noOverlap();
633  }
634  //stop if the ith track is now unselected
635  if (selected[i] == 0)
636  break;
637  } //end track2 loop
638  } //end track loop
639  } //end loop over track list sets
640 
641  auto vmMVA = std::make_unique<edm::ValueMap<float>>();
642  edm::ValueMap<float>::Filler fillerMVA(*vmMVA);
643 
644  // special case - if just doing the trkquals
645  if (trkQualMod_) {
646  unsigned int tSize = trackColls[0]->size();
647  auto vm = std::make_unique<edm::ValueMap<int>>();
649 
650  std::vector<int> finalQuals(tSize, -1); //default is unselected
651  for (unsigned int i = 0; i < rSize; i++) {
652  unsigned int tNum = i % tSize;
653 
654  if (selected[i] > 1) {
655  finalQuals[tNum] = selected[i] - 10;
656  if (trkUpdated[i])
657  finalQuals[tNum] = (finalQuals[tNum] | (1 << qualityToSet_));
658  }
659  if (selected[i] == 1)
660  finalQuals[tNum] = trackQuals[i];
661  }
662 
663  filler.insert(trackHandles[0], finalQuals.begin(), finalQuals.end());
664  filler.fill();
665 
666  e.put(std::move(vm));
667  for (auto& q : finalQuals)
668  q = std::max(q, 0);
669  auto quals = std::make_unique<QualityMaskCollection>(finalQuals.begin(), finalQuals.end());
670  e.put(std::move(quals), "QualityMasks");
671 
672  std::vector<float> mvaVec(tSize, -99);
673 
674  for (unsigned int i = 0; i < rSize; i++) {
675  unsigned int tNum = i % tSize;
676  mvaVec[tNum] = trackMVAs[tNum];
677  }
678 
679  fillerMVA.insert(trackHandles[0], mvaVec.begin(), mvaVec.end());
680  fillerMVA.fill();
681  if (copyMVA_) {
682  e.put(std::move(vmMVA), "MVAVals");
683  auto mvas = std::make_unique<MVACollection>(mvaVec.begin(), mvaVec.end());
684  e.put(std::move(mvas), "MVAValues");
685  }
686  return;
687  }
688 
689  //
690  // output selected tracks - if any
691  //
692 
693  std::vector<reco::TrackRef> trackRefs(rSize);
694  std::vector<edm::RefToBase<TrajectorySeed>> seedsRefs(rSize);
695 
696  unsigned int nToWrite = 0;
697  for (unsigned int i = 0; i < rSize; i++)
698  if (selected[i] != 0)
699  nToWrite++;
700 
701  std::vector<float> mvaVec;
702 
703  outputTrks = std::make_unique<reco::TrackCollection>();
704  outputTrks->reserve(nToWrite);
705  refTrks = e.getRefBeforePut<reco::TrackCollection>();
706 
707  if (copyExtras_) {
708  outputTrkExtras = std::make_unique<reco::TrackExtraCollection>();
709  outputTrkExtras->reserve(nToWrite);
710  refTrkExtras = e.getRefBeforePut<reco::TrackExtraCollection>();
711  outputTrkHits = std::make_unique<TrackingRecHitCollection>();
712  outputTrkHits->reserve(nToWrite * 25);
713  refTrkHits = e.getRefBeforePut<TrackingRecHitCollection>();
714  if (makeReKeyedSeeds_) {
715  outputSeeds = std::make_unique<TrajectorySeedCollection>();
716  outputSeeds->reserve(nToWrite);
717  refTrajSeeds = e.getRefBeforePut<TrajectorySeedCollection>();
718  }
719  }
720 
721  outputTrajs = std::make_unique<std::vector<Trajectory>>();
722  outputTrajs->reserve(rSize);
723 
724  for (unsigned int i = 0; i < rSize; i++) {
725  if (selected[i] == 0) {
726  trackRefs[i] = reco::TrackRef();
727  continue;
728  }
729 
730  unsigned int collNum = trackCollNum[i];
731  unsigned int trackNum = i - trackCollFirsts[collNum];
732  const reco::Track* track = &((trackColls[collNum])->at(trackNum));
733  outputTrks->push_back(reco::Track(*track));
734  mvaVec.push_back(trackMVAs[i]);
735  if (selected[i] > 1) {
736  outputTrks->back().setQualityMask(selected[i] - 10);
737  if (trkUpdated[i])
738  outputTrks->back().setQuality(qualityToSet_);
739  }
740  //might duplicate things, but doesnt hurt
741  if (selected[i] == 1)
742  outputTrks->back().setQualityMask(trackQuals[i]);
743  outputTrks->back().setOriginalAlgorithm(oriAlgo[i]);
744  outputTrks->back().setAlgoMask(algoMask[i]);
745 
746  // if ( beVerb ) std::cout << "selected " << outputTrks->back().pt() << " " << outputTrks->back().qualityMask() << " " << selected[i] << std::endl;
747 
748  //fill the TrackCollection
749  if (copyExtras_) {
750  edm::RefToBase<TrajectorySeed> origSeedRef = track->seedRef();
751  //creating a seed with rekeyed clusters if required
752  if (makeReKeyedSeeds_) {
753  bool doRekeyOnThisSeed = false;
754 
755  edm::InputTag clusterRemovalInfos("");
756  //grab on of the hits of the seed
757  if (origSeedRef->nHits() != 0) {
758  TrackingRecHit const& hit = *origSeedRef->recHits().begin();
759  if (hit.isValid()) {
760  edm::ProductID pID = clusterProductB(&hit);
761  // the cluster collection either produced a removalInfo or mot
762  //get the clusterremoval info from the provenance: will rekey if this is found
764  edm::StableProvenance const& prov = e.getStableProvenance(pID);
765  clusterRemovalInfos = edm::InputTag(prov.moduleLabel(), prov.productInstanceName(), prov.processName());
766  doRekeyOnThisSeed = e.getByLabel(clusterRemovalInfos, CRIh);
767  } //valid hit
768  } //nhit!=0
769 
770  if (doRekeyOnThisSeed && !(clusterRemovalInfos == edm::InputTag(""))) {
771  ClusterRemovalRefSetter refSetter(e, clusterRemovalInfos);
772  TrajectorySeed::RecHitContainer newRecHitContainer;
773  newRecHitContainer.reserve(origSeedRef->nHits());
774  for (auto const& recHit : origSeedRef->recHits()) {
775  newRecHitContainer.push_back(recHit);
776  refSetter.reKey(&newRecHitContainer.back());
777  }
778  outputSeeds->push_back(
779  TrajectorySeed(origSeedRef->startingState(), newRecHitContainer, origSeedRef->direction()));
780  }
781  //doRekeyOnThisSeed=true
782  else {
783  //just copy the one we had before
784  outputSeeds->push_back(TrajectorySeed(*origSeedRef));
785  }
787  origSeedRef = edm::RefToBase<TrajectorySeed>(pureRef);
788  } //creating a new seed and rekeying it rechit clusters.
789 
790  // Fill TrackExtra collection
791  outputTrkExtras->push_back(reco::TrackExtra(track->outerPosition(),
792  track->outerMomentum(),
793  track->outerOk(),
794  track->innerPosition(),
795  track->innerMomentum(),
796  track->innerOk(),
797  track->outerStateCovariance(),
798  track->outerDetId(),
799  track->innerStateCovariance(),
800  track->innerDetId(),
801  track->seedDirection(),
802  origSeedRef));
803  seedsRefs[i] = origSeedRef;
804  outputTrks->back().setExtra(reco::TrackExtraRef(refTrkExtras, outputTrkExtras->size() - 1));
805  reco::TrackExtra& tx = outputTrkExtras->back();
806  tx.setResiduals(track->residuals());
807 
808  // fill TrackingRecHits
809  unsigned nh1 = track->recHitsSize();
810  tx.setHits(refTrkHits, outputTrkHits->size(), nh1);
811  tx.setTrajParams(track->extra()->trajParams(), track->extra()->chi2sX5());
812  assert(tx.trajParams().size() == tx.recHitsSize());
813  for (auto hh = track->recHitsBegin(), eh = track->recHitsEnd(); hh != eh; ++hh) {
814  outputTrkHits->push_back((*hh)->clone());
815  }
816  }
817  trackRefs[i] = reco::TrackRef(refTrks, outputTrks->size() - 1);
818 
819  } //end faux loop over tracks
820 
821  //Fill the trajectories, etc. for 1st collection
822  refTrajs = e.getRefBeforePut<std::vector<Trajectory>>();
823 
824  outputTTAss = std::make_unique<TrajTrackAssociationCollection>(refTrajs, refTrks);
825 
826  for (unsigned int ti = 0; ti < trackColls.size(); ti++) {
829  e.getByToken(trackProducers_[ti].traj, hTraj1);
830  e.getByToken(trackProducers_[ti].tass, hTTAss1);
831 
832  if (hTraj1.failedToGet() || hTTAss1.failedToGet())
833  continue;
834 
835  for (size_t i = 0, n = hTraj1->size(); i < n; ++i) {
836  edm::Ref<std::vector<Trajectory>> trajRef(hTraj1, i);
838  if (match != hTTAss1->end()) {
839  const edm::Ref<reco::TrackCollection>& trkRef = match->val;
840  uint32_t oldKey = trackCollFirsts[ti] + static_cast<uint32_t>(trkRef.key());
841  if (trackRefs[oldKey].isNonnull()) {
842  outputTrajs->push_back(*trajRef);
843  //if making extras and the seeds at the same time, change the seed ref on the trajectory
845  outputTrajs->back().setSeedRef(seedsRefs[oldKey]);
846  outputTTAss->insert(edm::Ref<std::vector<Trajectory>>(refTrajs, outputTrajs->size() - 1), trackRefs[oldKey]);
847  }
848  }
849  }
850  }
851 
852  statCount.end(outputTrks->size());
853 
854  edm::ProductID nPID = refTrks.id();
855  edm::TestHandle<reco::TrackCollection> outHandle(outputTrks.get(), nPID);
856  fillerMVA.insert(outHandle, mvaVec.begin(), mvaVec.end());
857  fillerMVA.fill();
858 
859  e.put(std::move(outputTrks));
860  if (copyMVA_) {
861  e.put(std::move(vmMVA), "MVAVals");
862  auto mvas = std::make_unique<MVACollection>(mvaVec.begin(), mvaVec.end());
863  e.put(std::move(mvas), "MVAValues");
864  }
865  if (copyExtras_) {
867  e.put(std::move(outputTrkHits));
868  if (makeReKeyedSeeds_)
869  e.put(std::move(outputSeeds));
870  }
871  e.put(std::move(outputTrajs));
872  e.put(std::move(outputTTAss));
873  return;
874 
875 } //end produce

References funct::abs(), allowFirstHitShare_, cms::cuda::assert(), edm::OwnVector< T, P >::back(), edm::Range< T >::begin(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::TrackCollection, unsigned short > >::const_iterator, copyExtras_, copyMVA_, dumpMFGeometry_cfg::delta, TrajectorySeed::direction(), MillePedeFileConverter_cfg::e, edm::AssociationMap< Tag >::end(), mps_fire::end, gpuVertexFinder::eps, epsilon_, edm::HandleBase::failedToGet(), trigObjTnPSource_cfi::filler, spr::find(), edm::AssociationMap< Tag >::find(), first, dqmMemoryStats::float, foundHitBonus_, TrackingRecHit::geographicalId(), edm::EventSetup::getHandle(), hasSelector_, hh, reco::TrackBase::highPurity, mps_fire::i, edm::RefProd< C >::id(), edm::Ref< C, T, F >::id(), globals_cff::id1, globals_cff::id2, cuy::ii, indivShareFrac_, HLT_FULL_cff::InputTag, sistrip::SpyUtilities::isValid(), dqmiolumiharvest::j, findQualityFiles::jj, edm::Ref< C, T, F >::key(), LIKELY, listsToMerge_, TrackingRecHit::localPosition(), reco::TrackBase::loose, lostHitPenalty_, electrons_cff::lostHits, makeReKeyedSeeds_, match(), SiStripPI::max, maxNormalizedChisq_, min(), minFound_, minPT_, edm::StableProvenance::moduleLabel(), eostools::move(), dqmiodumpmetadata::n, TrajectorySeed::nHits(), outputSeeds, outputTrajs, outputTrkExtras, outputTrkHits, outputTrks, outputTTAss, priorityToken, edm::StableProvenance::processName(), edm::StableProvenance::productInstanceName(), promoteQuality_, edm::OwnVector< T, P >::push_back(), submitPVResolutionJobs::q, qualityToSet_, rpcPointValidation_cfi::recHit, TrajectorySeed::recHits(), reco::TrackExtraBase::recHitsSize(), refTrajs, refTrajSeeds, refTrkExtras, refTrkHits, refTrks, ClusterRemovalRefSetter::reKey(), edm::OwnVector< T, P >::reserve(), offlineSlimmedPrimaryVertices_cfi::score, reco::TrackExtraBase::setHits(), reco::TrackExtra::setResiduals(), reco::TrackExtraBase::setTrajParams(), shareFrac_, TrackingRecHit::some, TrajectorySeed::startingState(), reco::TrackBase::tight, HLT_FULL_cff::track, trackAlgoPriorityOrder, trackProducers_, reco::TrackExtraBase::trajParams(), trkQualMod_, reco::TrackBase::undefAlgorithm, UNLIKELY, use_sharesInput_, and PV3DBase< T, PVType, FrameType >::x().

Member Data Documentation

◆ allowFirstHitShare_

bool TrackListMerger::allowFirstHitShare_
private

Definition at line 112 of file TrackListMerger.cc.

Referenced by produce(), and TrackListMerger().

◆ copyExtras_

bool TrackListMerger::copyExtras_
private

Definition at line 57 of file TrackListMerger.cc.

Referenced by produce(), and TrackListMerger().

◆ copyMVA_

bool TrackListMerger::copyMVA_
private

Definition at line 110 of file TrackListMerger.cc.

Referenced by produce(), and TrackListMerger().

◆ epsilon_

float TrackListMerger::epsilon_
private

Definition at line 101 of file TrackListMerger.cc.

Referenced by produce(), and TrackListMerger().

◆ foundHitBonus_

float TrackListMerger::foundHitBonus_
private

Definition at line 103 of file TrackListMerger.cc.

Referenced by produce(), and TrackListMerger().

◆ hasSelector_

std::vector<int> TrackListMerger::hasSelector_
private

Definition at line 109 of file TrackListMerger.cc.

Referenced by produce(), and TrackListMerger().

◆ indivShareFrac_

std::vector<double> TrackListMerger::indivShareFrac_
private

Definition at line 105 of file TrackListMerger.cc.

Referenced by produce(), and TrackListMerger().

◆ listsToMerge_

std::vector<std::vector<int> > TrackListMerger::listsToMerge_
private

Definition at line 107 of file TrackListMerger.cc.

Referenced by produce(), and TrackListMerger().

◆ lostHitPenalty_

float TrackListMerger::lostHitPenalty_
private

Definition at line 104 of file TrackListMerger.cc.

Referenced by produce(), and TrackListMerger().

◆ makeReKeyedSeeds_

bool TrackListMerger::makeReKeyedSeeds_
private

Definition at line 58 of file TrackListMerger.cc.

Referenced by produce(), and TrackListMerger().

◆ maxNormalizedChisq_

double TrackListMerger::maxNormalizedChisq_
private

Definition at line 98 of file TrackListMerger.cc.

Referenced by produce(), and TrackListMerger().

◆ minFound_

unsigned int TrackListMerger::minFound_
private

Definition at line 100 of file TrackListMerger.cc.

Referenced by produce(), and TrackListMerger().

◆ minPT_

double TrackListMerger::minPT_
private

Definition at line 99 of file TrackListMerger.cc.

Referenced by produce(), and TrackListMerger().

◆ outputSeeds

std::unique_ptr<TrajectorySeedCollection> TrackListMerger::outputSeeds
private

Definition at line 49 of file TrackListMerger.cc.

Referenced by produce().

◆ outputTrajs

std::unique_ptr<std::vector<Trajectory> > TrackListMerger::outputTrajs
private

Definition at line 47 of file TrackListMerger.cc.

Referenced by produce().

◆ outputTrkExtras

std::unique_ptr<reco::TrackExtraCollection> TrackListMerger::outputTrkExtras
private

Definition at line 45 of file TrackListMerger.cc.

Referenced by produce().

◆ outputTrkHits

std::unique_ptr<TrackingRecHitCollection> TrackListMerger::outputTrkHits
private

Definition at line 46 of file TrackListMerger.cc.

Referenced by produce().

◆ outputTrks

std::unique_ptr<reco::TrackCollection> TrackListMerger::outputTrks
private

Definition at line 44 of file TrackListMerger.cc.

Referenced by produce().

◆ outputTTAss

std::unique_ptr<TrajTrackAssociationCollection> TrackListMerger::outputTTAss
private

Definition at line 48 of file TrackListMerger.cc.

Referenced by produce().

◆ priorityName_

std::string TrackListMerger::priorityName_
private

Definition at line 96 of file TrackListMerger.cc.

Referenced by TrackListMerger().

◆ priorityToken

edm::ESGetToken<TrackAlgoPriorityOrder, CkfComponentsRecord> TrackListMerger::priorityToken
private

Definition at line 60 of file TrackListMerger.cc.

Referenced by produce(), and TrackListMerger().

◆ promoteQuality_

std::vector<bool> TrackListMerger::promoteQuality_
private

Definition at line 108 of file TrackListMerger.cc.

Referenced by produce(), and TrackListMerger().

◆ qualityToSet_

reco::TrackBase::TrackQuality TrackListMerger::qualityToSet_
private

Definition at line 113 of file TrackListMerger.cc.

Referenced by produce(), and TrackListMerger().

◆ refTrajs

edm::RefProd<std::vector<Trajectory> > TrackListMerger::refTrajs
private

Definition at line 54 of file TrackListMerger.cc.

Referenced by produce().

◆ refTrajSeeds

edm::RefProd<TrajectorySeedCollection> TrackListMerger::refTrajSeeds
private

Definition at line 55 of file TrackListMerger.cc.

Referenced by produce().

◆ refTrkExtras

reco::TrackExtraRefProd TrackListMerger::refTrkExtras
private

Definition at line 52 of file TrackListMerger.cc.

Referenced by produce().

◆ refTrkHits

TrackingRecHitRefProd TrackListMerger::refTrkHits
private

Definition at line 53 of file TrackListMerger.cc.

Referenced by produce().

◆ refTrks

reco::TrackRefProd TrackListMerger::refTrks
private

Definition at line 51 of file TrackListMerger.cc.

Referenced by produce().

◆ shareFrac_

float TrackListMerger::shareFrac_
private

Definition at line 102 of file TrackListMerger.cc.

Referenced by produce(), and TrackListMerger().

◆ trackProducers_

std::vector<TkEDGetTokenss> TrackListMerger::trackProducers_
private

Definition at line 94 of file TrackListMerger.cc.

Referenced by produce(), and TrackListMerger().

◆ trkQualMod_

bool TrackListMerger::trkQualMod_
private

Definition at line 115 of file TrackListMerger.cc.

Referenced by produce(), and TrackListMerger().

◆ use_sharesInput_

bool TrackListMerger::use_sharesInput_
private

Definition at line 114 of file TrackListMerger.cc.

Referenced by produce(), and TrackListMerger().

trackAlgoPriorityOrder
constexpr std::array< unsigned int, reco::TrackBase::algoSize > trackAlgoPriorityOrder
Definition: trackAlgoPriorityOrder.h:157
TrackListMerger::foundHitBonus_
float foundHitBonus_
Definition: TrackListMerger.cc:103
TrackListMerger::trackProducers_
std::vector< TkEDGetTokenss > trackProducers_
Definition: TrackListMerger.cc:94
edm::AssociationMap::find
const_iterator find(const key_type &k) const
find element with specified reference key
Definition: AssociationMap.h:173
TrackListMerger::outputTTAss
std::unique_ptr< TrajTrackAssociationCollection > outputTTAss
Definition: TrackListMerger.cc:48
mps_fire.i
i
Definition: mps_fire.py:428
edm::ESInputTag
Definition: ESInputTag.h:87
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11724
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
reco::TrackBase::tight
Definition: TrackBase.h:153
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
edm::RefProd::id
ProductID id() const
Accessor for product ID.
Definition: RefProd.h:124
reco::TrackBase::loose
Definition: TrackBase.h:152
TrajectorySeedCollection
std::vector< TrajectorySeed > TrajectorySeedCollection
Definition: TrajectorySeedCollection.h:6
TrackListMerger::outputTrkExtras
std::unique_ptr< reco::TrackExtraCollection > outputTrkExtras
Definition: TrackListMerger.cc:45
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
min
T min(T a, T b)
Definition: MathUtil.h:58
TrajectorySeed::nHits
unsigned int nHits() const
Definition: TrajectorySeed.h:53
sistrip_dqm_sourceclient-live_cfg.setsToMerge
setsToMerge
Definition: sistrip_dqm_sourceclient-live_cfg.py:474
edm::EDGetTokenT
Definition: EDGetToken.h:33
TrackListMerger::refTrks
reco::TrackRefProd refTrks
Definition: TrackListMerger.cc:51
reco::TrackBase::undefQuality
Definition: TrackBase.h:151
globals_cff.id1
id1
Definition: globals_cff.py:33
gpuVertexFinder::eps
WorkSpace int float eps
Definition: gpuClusterTracksDBSCAN.h:18
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
reco::TrackBase::TrackAlgorithm
TrackAlgorithm
track algorithm
Definition: TrackBase.h:89
TrackListMerger::epsilon_
float epsilon_
Definition: TrackListMerger.cc:101
TrackValidation_cff.selectors
selectors
Definition: TrackValidation_cff.py:271
TrackListMerger::outputTrkHits
std::unique_ptr< TrackingRecHitCollection > outputTrkHits
Definition: TrackListMerger.cc:46
cms::cuda::assert
assert(be >=bs)
edm::VParameterSet
std::vector< ParameterSet > VParameterSet
Definition: ParameterSet.h:34
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
TrackListMerger::minFound_
unsigned int minFound_
Definition: TrackListMerger.cc:100
TrackListMerger::hasSelector_
std::vector< int > hasSelector_
Definition: TrackListMerger.cc:109
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
TrackListMerger::makeReKeyedSeeds_
bool makeReKeyedSeeds_
Definition: TrackListMerger.cc:58
convertSQLiteXML.ok
bool ok
Definition: convertSQLiteXML.py:98
edm::Handle
Definition: AssociativeIterator.h:50
TrackingRecHit::localPosition
virtual LocalPoint localPosition() const =0
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
TrackingRecHit::geographicalId
DetId geographicalId() const
Definition: TrackingRecHit.h:120
rpcPointValidation_cfi.recHit
recHit
Definition: rpcPointValidation_cfi.py:7
edm::Ref< TrackCollection >
edm::StableProvenance::productInstanceName
std::string const & productInstanceName() const
Definition: StableProvenance.h:46
TrackListMerger::copyMVA_
bool copyMVA_
Definition: TrackListMerger.cc:110
reco::TrackExtra
Definition: TrackExtra.h:26
cmsdt::algo
algo
Definition: constants.h:171
UNLIKELY
#define UNLIKELY(x)
Definition: Likely.h:21
TrackListMerger::refTrkExtras
reco::TrackExtraRefProd refTrkExtras
Definition: TrackListMerger.cc:52
edm::AssociationMap::end
const_iterator end() const
last iterator over the map (read only)
Definition: AssociationMap.h:171
TrackListMerger::outputTrks
std::unique_ptr< reco::TrackCollection > outputTrks
Definition: TrackListMerger.cc:44
ClusterRemovalRefSetter
Definition: ClusterRemovalRefSetter.h:21
TrackListMerger::priorityToken
edm::ESGetToken< TrackAlgoPriorityOrder, CkfComponentsRecord > priorityToken
Definition: TrackListMerger.cc:60
TrackListMerger::refTrajs
edm::RefProd< std::vector< Trajectory > > refTrajs
Definition: TrackListMerger.cc:54
mps_fire.end
end
Definition: mps_fire.py:242
reco::Track
Definition: Track.h:27
edm::ESHandle
Definition: DTSurvey.h:22
reco::TrackExtraCollection
std::vector< TrackExtra > TrackExtraCollection
collection of TrackExtra objects
Definition: TrackExtraFwd.h:10
edm::StableProvenance::processName
std::string const & processName() const
Definition: StableProvenance.h:45
TrackingRecHit::some
Definition: TrackingRecHit.h:59
sistrip::SpyUtilities::isValid
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
Definition: SiStripSpyUtilities.cc:124
TrackListMerger::allowFirstHitShare_
bool allowFirstHitShare_
Definition: TrackListMerger.cc:112
first
auto first
Definition: CAHitNtupletGeneratorKernelsImpl.h:125
edm::OwnVector::const_iterator
Definition: OwnVector.h:41
reco::TrackRef
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:20
edm::OwnVector::back
reference back()
Definition: OwnVector.h:431
edm::StableProvenance::moduleLabel
std::string const & moduleLabel() const
Definition: StableProvenance.h:43
edm::OwnVector::reserve
void reserve(size_t)
Definition: OwnVector.h:320
reco::TrackExtraBase::setTrajParams
void setTrajParams(TrajParams tmps, Chi2sFive chi2s)
Definition: TrackExtraBase.h:36
reco::TrackExtra::setResiduals
void setResiduals(const TrackResiduals &r)
set the residuals
Definition: TrackExtra.h:132
edm::ParameterSet::exists
bool exists(std::string const &parameterName) const
checks if a parameter exists
Definition: ParameterSet.cc:681
edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::TrackCollection, unsigned short > >::const_iterator
friend struct const_iterator
Definition: AssociationMap.h:274
edm::TestHandle
Definition: TestHandle.h:29
hh
const auto & hh
Definition: CAHitNtupletGeneratorKernelsImpl.h:552
edm::HandleBase::failedToGet
bool failedToGet() const
Definition: HandleBase.h:72
TrackListMerger::copyExtras_
bool copyExtras_
Definition: TrackListMerger.cc:57
TrajectorySeed::direction
PropagationDirection direction() const
Definition: TrajectorySeed.h:54
edm::Range::begin
T begin() const
Definition: Range.h:15
TrackListMerger::promoteQuality_
std::vector< bool > promoteQuality_
Definition: TrackListMerger.cc:108
TrackListMerger::indivShareFrac_
std::vector< double > indivShareFrac_
Definition: TrackListMerger.cc:105
makeGlobalPositionRcd_cfg.tag
tag
Definition: makeGlobalPositionRcd_cfg.py:6
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
edm::StableProvenance
Definition: StableProvenance.h:30
selectors
Definition: selectors.py:1
trigObjTnPSource_cfi.filler
filler
Definition: trigObjTnPSource_cfi.py:21
dumpMFGeometry_cfg.delta
delta
Definition: dumpMFGeometry_cfg.py:25
match
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
reco::TrackBase::undefAlgorithm
Definition: TrackBase.h:90
createfilelist.int
int
Definition: createfilelist.py:10
TrackListMerger::outputTrajs
std::unique_ptr< std::vector< Trajectory > > outputTrajs
Definition: TrackListMerger.cc:47
reco::TrackExtraBase::trajParams
TrajParams const & trajParams() const
Definition: TrackExtraBase.h:76
TrackListMerger::maxNormalizedChisq_
double maxNormalizedChisq_
Definition: TrackListMerger.cc:98
submitPVResolutionJobs.q
q
Definition: submitPVResolutionJobs.py:84
TrajectorySeed::recHits
RecHitRange recHits() const
Definition: TrajectorySeed.h:52
cms::cuda::for
for(int i=first, nt=offsets[nh];i< nt;i+=gridDim.x *blockDim.x)
Definition: HistoContainer.h:15
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
reco::TrackExtraBase::setHits
void setHits(TrackingRecHitRefProd const &prod, unsigned firstH, unsigned int nH)
Definition: TrackExtraBase.h:30
TrackingRecHit
Definition: TrackingRecHit.h:21
TrackListMerger::shareFrac_
float shareFrac_
Definition: TrackListMerger.cc:102
TrackListMerger::outputSeeds
std::unique_ptr< TrajectorySeedCollection > outputSeeds
Definition: TrackListMerger.cc:49
reco::TrackExtraBase::recHitsSize
unsigned int recHitsSize() const
number of RecHits
Definition: TrackExtraBase.h:44
reco::TrackBase::qualityByName
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:126
TrackListMerger::trkQualMod_
bool trkQualMod_
Definition: TrackListMerger.cc:115
edm::Ref::id
ProductID id() const
Accessor for product ID.
Definition: Ref.h:244
eostools.move
def move(src, dest)
Definition: eostools.py:511
TrackListMerger::priorityName_
std::string priorityName_
Definition: TrackListMerger.cc:96
electrons_cff.lostHits
lostHits
Definition: electrons_cff.py:391
LIKELY
#define LIKELY(x)
Definition: Likely.h:20
edm::ValueMap< int >
Exception
Definition: hltDiff.cc:245
findQualityFiles.jj
string jj
Definition: findQualityFiles.py:188
TrajectorySeed
Definition: TrajectorySeed.h:18
TrackListMerger::edTokens
TkEDGetTokenss edTokens(const edm::InputTag &tag, const edm::InputTag &seltag, const edm::InputTag &mvatag)
Definition: TrackListMerger.cc:78
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::RefToBase< TrajectorySeed >
TrackListMerger::qualityToSet_
reco::TrackBase::TrackQuality qualityToSet_
Definition: TrackListMerger.cc:113
edm::OwnVector::push_back
void push_back(D *&d)
Definition: OwnVector.h:326
TrajectorySeed::startingState
PTrajectoryStateOnDet const & startingState() const
Definition: TrajectorySeed.h:55
TrackListMerger::minPT_
double minPT_
Definition: TrackListMerger.cc:99
edm::Ref::key
key_type key() const
Accessor for product key.
Definition: Ref.h:250
TrackListMerger::use_sharesInput_
bool use_sharesInput_
Definition: TrackListMerger.cc:114
edm::helper::Filler
Definition: ValueMap.h:22
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
offlineSlimmedPrimaryVertices_cfi.score
score
Definition: offlineSlimmedPrimaryVertices_cfi.py:6
globals_cff.id2
id2
Definition: globals_cff.py:34
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
TrackListMerger::lostHitPenalty_
float lostHitPenalty_
Definition: TrackListMerger.cc:104
TrackListMerger::listsToMerge_
std::vector< std::vector< int > > listsToMerge_
Definition: TrackListMerger.cc:107
cuy.ii
ii
Definition: cuy.py:589
edm::InputTag
Definition: InputTag.h:15
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
label
const char * label
Definition: PFTauDecayModeTools.cc:11
edm::ProductID
Definition: ProductID.h:27
hit
Definition: SiStripHitEffFromCalibTree.cc:88
TrackListMerger::refTrkHits
TrackingRecHitRefProd refTrkHits
Definition: TrackListMerger.cc:53
edm::OwnVector< TrackingRecHit >
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
TrackListMerger::refTrajSeeds
edm::RefProd< TrajectorySeedCollection > refTrajSeeds
Definition: TrackListMerger.cc:55
reco::TrackBase::highPurity
Definition: TrackBase.h:154