CMS 3D CMS Logo

CkfTrackCandidateMakerBase.cc
Go to the documentation of this file.
7 
12 
14 
19 
25 
26 
31 
33 
36 
38 
39 #include<algorithm>
40 #include<functional>
41 
42 // #define VI_SORTSEED
43 // #define VI_REPRODUCIBLE
44 // #define VI_TBB
45 
46 #include <thread>
47 #ifdef VI_TBB
48 #include "tbb/parallel_for.h"
49 #endif
50 
52 
53 using namespace edm;
54 using namespace std;
55 
56 namespace {
57  BaseCkfTrajectoryBuilder *createBaseCkfTrajectoryBuilder(const edm::ParameterSet& pset, edm::ConsumesCollector& iC) {
58  return BaseCkfTrajectoryBuilderFactory::get()->create(pset.getParameter<std::string>("ComponentType"), pset, iC);
59  }
60 }
61 
62 namespace cms{
63  CkfTrackCandidateMakerBase::CkfTrackCandidateMakerBase(edm::ParameterSet const& conf, edm::ConsumesCollector && iC) :
64  theTrackCandidateOutput(true),
65  theTrajectoryOutput(false),
66  useSplitting(conf.getParameter<bool>("useHitsSplitting")),
67  doSeedingRegionRebuilding(conf.getParameter<bool>("doSeedingRegionRebuilding")),
68  cleanTrajectoryAfterInOut(conf.getParameter<bool>("cleanTrajectoryAfterInOut")),
69  reverseTrajectories(conf.existsAs<bool>("reverseTrajectories") && conf.getParameter<bool>("reverseTrajectories")),
70  produceSeedStopReasons_(false),
71  theMaxNSeeds(conf.getParameter<unsigned int>("maxNSeeds")),
72  theTrajectoryBuilder(createBaseCkfTrajectoryBuilder(conf.getParameter<edm::ParameterSet>("TrajectoryBuilderPSet"), iC)),
73  theTrajectoryCleanerName(conf.getParameter<std::string>("TrajectoryCleaner")),
74  theTrajectoryCleaner(0),
75  theInitialState(new TransientInitialStateEstimator(conf.getParameter<ParameterSet>("TransientInitialStateEstimatorParameters"))),
76  theMagFieldName(conf.exists("SimpleMagneticField") ? conf.getParameter<std::string>("SimpleMagneticField") : ""),
77  theNavigationSchoolName(conf.getParameter<std::string>("NavigationSchool")),
78  theNavigationSchool(0),
79  theSeedCleaner(0),
80  maxSeedsBeforeCleaning_(0),
81  theMTELabel(iC.consumes<MeasurementTrackerEvent>(conf.getParameter<edm::InputTag>("MeasurementTrackerEvent"))),
82  skipClusters_(false),
83  phase2skipClusters_(false)
84  {
86 #ifndef VI_REPRODUCIBLE
87  if ( conf.exists("maxSeedsBeforeCleaning") )
88  maxSeedsBeforeCleaning_=conf.getParameter<unsigned int>("maxSeedsBeforeCleaning");
89 #endif
90  if (conf.existsAs<edm::InputTag>("clustersToSkip")) {
91  skipClusters_ = true;
92  maskPixels_ = iC.consumes<PixelClusterMask>(conf.getParameter<edm::InputTag>("clustersToSkip"));
93  maskStrips_ = iC.consumes<StripClusterMask>(conf.getParameter<edm::InputTag>("clustersToSkip"));
94  }
95  //FIXME:: just temporary solution for phase2!
96  if (conf.existsAs<edm::InputTag>("phase2clustersToSkip")) {
97  phase2skipClusters_ = true;
98  maskPixels_ = iC.consumes<PixelClusterMask>(conf.getParameter<edm::InputTag>("phase2clustersToSkip"));
99  maskPhase2OTs_ = iC.consumes<Phase2OTClusterMask>(conf.getParameter<edm::InputTag>("phase2clustersToSkip"));
100  }
101 #ifndef VI_REPRODUCIBLE
102  std::string cleaner = conf.getParameter<std::string>("RedundantSeedCleaner");
103  if (cleaner == "SeedCleanerByHitPosition") {
105  } else if (cleaner == "SeedCleanerBySharedInput") {
107  } else if (cleaner == "CachingSeedCleanerByHitPosition") {
109  } else if (cleaner == "CachingSeedCleanerBySharedInput") {
110  int numHitsForSeedCleaner = conf.existsAs<int>("numHitsForSeedCleaner") ?
111  conf.getParameter<int>("numHitsForSeedCleaner") : 4;
112  int onlyPixelHits = conf.existsAs<bool>("onlyPixelHitsForSeedCleaner") ?
113  conf.getParameter<bool>("onlyPixelHitsForSeedCleaner") : false;
114  theSeedCleaner = new CachingSeedCleanerBySharedInput(numHitsForSeedCleaner,onlyPixelHits);
115  } else if (cleaner == "none") {
116  theSeedCleaner = 0;
117  } else {
118  throw cms::Exception("RedundantSeedCleaner not found", cleaner);
119  }
120 #endif
121 
122 #ifdef VI_REPRODUCIBLE
123  std::cout << "CkfTrackCandidateMaker in reproducible setting" << std::endl;
124  assert(nullptr==theSeedCleaner);
125  assert(0>=maxSeedsBeforeCleaning_);
126 #endif
127 
128  }
129 
130 
131  // Virtual destructor needed.
133  if (theSeedCleaner) delete theSeedCleaner;
134  }
135 
137  {
138  /* no op*/
139  }
140 
142 
143  //services
146  // edm::ESInputTag mfESInputTag(mfName);
147  // es.get<IdealMagneticFieldRecord>().get(mfESInputTag,theMagField );
148 
149  edm::ESHandle<TrajectoryCleaner> trajectoryCleanerH;
150  es.get<TrajectoryCleaner::Record>().get(theTrajectoryCleanerName, trajectoryCleanerH);
151  theTrajectoryCleaner= trajectoryCleanerH.product();
152 
153  edm::ESHandle<NavigationSchool> navigationSchoolH;
154  es.get<NavigationSchoolRecord>().get(theNavigationSchoolName, navigationSchoolH);
155  theNavigationSchool = navigationSchoolH.product();
156  theTrajectoryBuilder->setNavigationSchool(theNavigationSchool);
157  }
158 
159  // Functions that gets called by framework every event
161  {
162  // getting objects from the EventSetup
163  setEventSetup( es );
164 
165  // set the correct navigation
166  // NavigationSetter setter( *theNavigationSchool);
167 
168  // propagator
169  edm::ESHandle<Propagator> thePropagator;
170  es.get<TrackingComponentsRecord>().get("AnyDirectionAnalyticalPropagator",
171  thePropagator);
172 
173  // method for Debugging
175 
176  // Step A: set Event for the TrajectoryBuilder
178  e.getByToken(theMTELabel, data);
179 
180  std::unique_ptr<MeasurementTrackerEvent> dataWithMasks;
181  if (skipClusters_) {
183  e.getByToken(maskPixels_, pixelMask);
185  e.getByToken(maskStrips_, stripMask);
186  dataWithMasks = std::make_unique<MeasurementTrackerEvent>(*data, *stripMask, *pixelMask);
187  //std::cout << "Trajectory builder " << conf_.getParameter<std::string>("@module_label") << " created with masks " << std::endl;
188  theTrajectoryBuilder->setEvent(e, es, &*dataWithMasks);
189  } else if (phase2skipClusters_) {
190  //FIXME:just temporary solution for phase2!
192  e.getByToken(maskPixels_, pixelMask);
194  e.getByToken(maskPhase2OTs_, phase2OTMask);
195  dataWithMasks = std::make_unique<MeasurementTrackerEvent>(*data, *pixelMask, *phase2OTMask);
196  //std::cout << "Trajectory builder " << conf_.getParameter<std::string>("@module_label") << " created with phase2 masks " << std::endl;
197  theTrajectoryBuilder->setEvent(e, es, &*dataWithMasks);
198  } else {
199  //std::cout << "Trajectory builder " << conf_.getParameter<std::string>("@module_label") << " created without masks " << std::endl;
200  theTrajectoryBuilder->setEvent(e, es, &*data);
201  }
202  // TISE ES must be set here due to dependence on theTrajectoryBuilder
203  theInitialState->setEventSetup( es, static_cast<TkTransientTrackingRecHitBuilder const *>(theTrajectoryBuilder->hitBuilder())->cloner() );
204 
205  // Step B: Retrieve seeds
206 
208  e.getByToken(theSeedLabel, collseed);
209 
210  // Step C: Create empty output collection
211  auto output = std::make_unique<TrackCandidateCollection>();
212  auto outputT = std::make_unique<std::vector<Trajectory>>();
213  std::unique_ptr<std::vector<short> > outputSeedStopReasons;
215  outputSeedStopReasons = std::make_unique<std::vector<short> >(collseed->size(), SeedStopReason::UNINITIALIZED);
216  }
217 
218  if ( (*collseed).size()>theMaxNSeeds ) {
219  LogError("TooManySeeds")<<"Exceeded maximum numeber of seeds! theMaxNSeeds="<<theMaxNSeeds<<" nSeed="<<(*collseed).size();
221  if (theTrajectoryOutput){e.put(std::move(outputT));}
222  if (produceSeedStopReasons_){e.put(std::move(outputSeedStopReasons));}
223  return;
224  }
225 
226  // Step D: Invoke the building algorithm
227  if ((*collseed).size()>0){
228 
229  unsigned int lastCleanResult=0;
230  std::vector<Trajectory> rawResult;
231  rawResult.reserve(collseed->size() * 4);
232 
233  if (theSeedCleaner) theSeedCleaner->init( &rawResult );
234 
235  // method for debugging
237 
238  // the mutex
239  std::mutex theMutex;
240  using Lock = std::unique_lock<std::mutex>;
241 
242  // Loop over seeds
243  size_t collseed_size = collseed->size();
244 
245  unsigned int indeces[collseed_size]; for (auto i=0U; i< collseed_size; ++i) indeces[i]=i;
246 
247 
248 
249 
250 #ifdef VI_SORTSEED
251  // std::random_shuffle(indeces,indeces+collseed_size);
252 
253  // here only for reference: does not seems to help
254 
255  auto const & seeds = *collseed;
256 
257 
258  float val[collseed_size];
259  for (auto i=0U; i< collseed_size; ++i)
260  { val[i] = seeds[i].startingState().pt();};
261  // { val[i] = std::abs((*seeds[i].recHits().first).surface()->eta());}
262 
263  /*
264  unsigned long long val[collseed_size];
265  for (auto i=0U; i< collseed_size; ++i) {
266  if (seeds[i].nHits()<2) { val[i]=0; continue;}
267  auto h = seeds[i].recHits().first;
268  auto const & hit = static_cast<BaseTrackerRecHit const&>(*h);
269  val[i] = hit.firstClusterRef().key();
270  if (++h != seeds[i].recHits().second) {
271  auto const & hit = static_cast<BaseTrackerRecHit const&>(*h);
272  val[i] |= (unsigned long long)(hit.firstClusterRef().key())<<32;
273  }
274  }
275  */
276  std::sort(indeces,indeces+collseed_size, [&](unsigned int i, unsigned int j){return val[i]<val[j];});
277 
278 
279  // std::cout << spt(indeces[0]) << ' ' << spt(indeces[collseed_size-1]) << std::endl;
280 #endif
281 
282  std::atomic<unsigned int> ntseed(0);
283  auto theLoop = [&](size_t ii) {
284  auto j = indeces[ii];
285 
286  ntseed++;
287 
288  // to be moved inside a par section (how with tbb??)
289  std::vector<Trajectory> theTmpTrajectories;
290 
291 
292  LogDebug("CkfPattern") << "======== Begin to look for trajectories from seed " << j << " ========\n";
293 
294  { Lock lock(theMutex);
295  // Check if seed hits already used by another track
296  if (theSeedCleaner && !theSeedCleaner->good( &((*collseed)[j])) ) {
297  LogDebug("CkfTrackCandidateMakerBase")<<" Seed cleaning kills seed "<<j;
298  if(produceSeedStopReasons_) (*outputSeedStopReasons)[j] = SeedStopReason::SEED_CLEANING;
299  return; // from the lambda!
300  }}
301 
302 
303  // Build trajectory from seed outwards
304  theTmpTrajectories.clear();
305  auto const & startTraj = theTrajectoryBuilder->buildTrajectories( (*collseed)[j], theTmpTrajectories, nullptr );
306  if(theTmpTrajectories.empty()) {
308  Lock lock(theMutex);
309  (*outputSeedStopReasons)[j] = SeedStopReason::NO_TRAJECTORY;
310  }
311  return; // from the lambda!
312  }
313 
314  LogDebug("CkfPattern") << "======== In-out trajectory building found " << theTmpTrajectories.size()
315  << " trajectories from seed " << j << " ========\n"
316  <<PrintoutHelper::dumpCandidates(theTmpTrajectories);
317 
319 
320  // Select the best trajectory from this seed (declare others invalid)
321  theTrajectoryCleaner->clean(theTmpTrajectories);
322 
323  LogDebug("CkfPattern") << "======== In-out trajectory cleaning gave the following " << theTmpTrajectories.size()
324  << " valid trajectories from seed "
325  << j << " ========\n"
326  << PrintoutHelper::dumpCandidates(theTmpTrajectories);
327  }
328 
329  // Optionally continue building trajectory back through
330  // seed and if possible further inwards.
331 
333  theTrajectoryBuilder->rebuildTrajectories(startTraj,(*collseed)[j],theTmpTrajectories);
334 
335  LogDebug("CkfPattern") << "======== Out-in trajectory building found " << theTmpTrajectories.size()
336  << " valid/invalid trajectories from seed " << j << " ========\n"
337  <<PrintoutHelper::dumpCandidates(theTmpTrajectories);
338  }
339 
340 
341  // Select the best trajectory from this seed (after seed region rebuilding, can be more than one)
342  theTrajectoryCleaner->clean(theTmpTrajectories);
343 
344  LogDebug("CkfPattern") << "======== Trajectory cleaning gave the following " << theTmpTrajectories.size() << " valid trajectories from seed "
345  << j << " ========\n"
346  <<PrintoutHelper::dumpCandidates(theTmpTrajectories);
347 
348  { Lock lock(theMutex);
349  for(vector<Trajectory>::iterator it=theTmpTrajectories.begin();
350  it!=theTmpTrajectories.end(); it++){
351  if( it->isValid() ) {
352  it->setSeedRef(collseed->refAt(j));
353  if(produceSeedStopReasons_) (*outputSeedStopReasons)[j] = SeedStopReason::NOT_STOPPED;
354  // Store trajectory
355  rawResult.push_back(std::move(*it));
356  // Tell seed cleaner which hits this trajectory used.
357  //TO BE FIXED: this cut should be configurable via cfi file
358  if (theSeedCleaner && rawResult.back().foundHits()>3) theSeedCleaner->add( &rawResult.back() );
359  //if (theSeedCleaner ) theSeedCleaner->add( & (*it) );
360  }
361  }}
362 
363  theTmpTrajectories.clear();
364 
365  LogDebug("CkfPattern") << "rawResult trajectories found so far = " << rawResult.size();
366 
367  { Lock lock(theMutex);
368  if ( maxSeedsBeforeCleaning_ >0 && rawResult.size() > maxSeedsBeforeCleaning_+lastCleanResult) {
369  theTrajectoryCleaner->clean(rawResult);
370  rawResult.erase(std::remove_if(rawResult.begin()+lastCleanResult,rawResult.end(),
371  std::not1(std::mem_fun_ref(&Trajectory::isValid))),
372  rawResult.end());
373  lastCleanResult=rawResult.size();
374  }
375  }
376 
377  };
378  // end of loop over seeds
379 
380 
381 #ifdef VI_TBB
382  tbb::parallel_for(0UL,collseed_size,1UL,theLoop);
383 #else
384 #ifdef VI_OMP
385 #pragma omp parallel for schedule(dynamic,4)
386 #endif
387  for (size_t j = 0; j < collseed_size; j++){
388  theLoop(j);
389  }
390 #endif
391  assert(ntseed==collseed_size);
393 
394  // std::cout << "VICkfPattern " << "rawResult trajectories found = " << rawResult.size() << " in " << ntseed << " seeds " << collseed_size << std::endl;
395 
396 #ifdef VI_REPRODUCIBLE
397  // sort trajectory
398  std::sort(rawResult.begin(), rawResult.end(),[](const Trajectory & a, const Trajectory & b)
399  { return a.seedRef().key() < b.seedRef().key();});
400  //{ return a.chiSquared()*b.ndof() < b.chiSquared()*a.ndof();});
401 #endif
402 
403  // Step E: Clean the results to avoid duplicate tracks
404  // Rejected ones just flagged as invalid.
405  theTrajectoryCleaner->clean(rawResult);
406 
407  LogDebug("CkfPattern") << "======== Final cleaning of entire event found " << rawResult.size()
408  << " valid/invalid trajectories ======="<<endl
409  <<PrintoutHelper::dumpCandidates(rawResult);
410 
411  LogDebug("CkfPattern") << "removing invalid trajectories.";
412 
414  // Assuming here that theLoop() gives at most one Trajectory per seed
415  for(const auto& traj: rawResult) {
416  if(!traj.isValid()) {
417  const auto seedIndex = traj.seedRef().key();
418  if((*outputSeedStopReasons)[seedIndex] == SeedStopReason::NOT_STOPPED) {
419  (*outputSeedStopReasons)[seedIndex] = SeedStopReason::FINAL_CLEAN;
420  }
421  }
422  }
423  }
424 
425  vector<Trajectory> & unsmoothedResult(rawResult);
426  unsmoothedResult.erase(std::remove_if(unsmoothedResult.begin(),unsmoothedResult.end(),
427  std::not1(std::mem_fun_ref(&Trajectory::isValid))),
428  unsmoothedResult.end());
429  unsmoothedResult.shrink_to_fit();
430  // If requested, reverse the trajectories creating a new 1-hit seed on the last measurement of the track
431  if (reverseTrajectories) {
432  for (auto it = unsmoothedResult.begin(), ed = unsmoothedResult.end(); it != ed; ++it) {
433  // reverse the trajectory only if it has valid hit on the last measurement (should happen)
434  if (it->lastMeasurement().updatedState().isValid() &&
435  it->lastMeasurement().recHit().get() != 0 &&
436  it->lastMeasurement().recHit()->isValid()) {
437  // I can't use reverse in place, because I want to change the seed
438  // 1) reverse propagation direction
439  PropagationDirection direction = it->direction();
440  if (direction == alongMomentum) direction = oppositeToMomentum;
441  else if (direction == oppositeToMomentum) direction = alongMomentum;
442  // 2) make a seed
443  TrajectoryStateOnSurface const & initState = it->lastMeasurement().updatedState();
444  auto initId = it->lastMeasurement().recHitR().rawId();
447  hits.push_back(it->lastMeasurement().recHit()->hit()->clone());
448  boost::shared_ptr<const TrajectorySeed> seed(new TrajectorySeed(state, std::move(hits), direction));
449  // 3) make a trajectory
450  Trajectory trajectory(seed, direction);
451  trajectory.setNLoops(it->nLoops());
452  trajectory.setSeedRef(it->seedRef());
453  trajectory.setStopReason(it->stopReason());
454  // 4) push states in reversed order
455  Trajectory::DataContainer &meas = it->measurements();
456  trajectory.reserve(meas.size());
457  for (auto itmeas = meas.rbegin(), endmeas = meas.rend(); itmeas != endmeas; ++itmeas) {
458  trajectory.push(std::move(*itmeas));
459  }
460  // replace
461  (*it)= std::move(trajectory);
462  } else {
463  edm::LogWarning("CkfPattern_InvalidLastMeasurement") << "Last measurement of the trajectory is invalid, cannot reverse it";
464  }
465  }
466  }
467 
468 
469  int viTotHits=0;
470 
472  // Step F: Convert to TrackCandidates
473  output->reserve(unsmoothedResult.size());
474  Traj2TrackHits t2t(theTrajectoryBuilder->hitBuilder(),true);
475 
476  for (vector<Trajectory>::const_iterator it = unsmoothedResult.begin();
477  it != unsmoothedResult.end(); ++it) {
478 
479  LogDebug("CkfPattern") << "copying "<<(useSplitting?"splitted":"un-splitted")<<" hits from trajectory";
481  if(it->direction() != alongMomentum) LogDebug("CkfPattern") << "not along momentum... " << std::endl;
482  t2t(*it,recHits,useSplitting);
483 
484  viTotHits+=recHits.size();
485 
486 
487  LogDebug("CkfPattern") << "getting initial state.";
488  Trajectory trialTrajectory = (*it);
489  std::pair<TrajectoryStateOnSurface, const GeomDet*> initState;
490  bool failed = false;
491 
492  do {
493  // Drop last hit if previous backFitter was not successful
494  if(failed) {
495  LogDebug("CkfPattern") << "removing last hit";
496  trialTrajectory.pop();
497  LogDebug("CkfPattern") << "hits remaining " << trialTrajectory.foundHits();
498  }
499 
500  // Get inner state
501  const bool doBackFit = (!doSeedingRegionRebuilding) & (!reverseTrajectories);
502  initState = theInitialState->innerState(trialTrajectory, doBackFit);
503 
504  // Check if that was successful
505  failed = (!initState.first.isValid()) || initState.second == nullptr || edm::isNotFinite(initState.first.globalPosition().x());
506  } while(failed && trialTrajectory.foundHits() > 3);
507 
508  if(failed) {
510  const auto seedIndex = it->seedRef().key();
511  (*outputSeedStopReasons)[seedIndex] = SeedStopReason::SMOOTHING_FAILED;
512  }
513  continue;
514  }
515 
516 
517 
518  PTrajectoryStateOnDet state;
519  if(useSplitting && (initState.second != recHits.front().det()) && recHits.front().det() ){
520  LogDebug("CkfPattern") << "propagating to hit front in case of splitting.";
521  TrajectoryStateOnSurface && propagated = thePropagator->propagate(initState.first,recHits.front().det()->surface());
522  if (!propagated.isValid()) continue;
524  recHits.front().rawId());
525  }
526  else state = trajectoryStateTransform::persistentState( initState.first,
527  initState.second->geographicalId().rawId());
528  LogDebug("CkfPattern") << "pushing a TrackCandidate.";
529  output->emplace_back(recHits,it->seed(),state,it->seedRef(),it->nLoops(), (uint8_t)it->stopReason());
530  }
531  }//output trackcandidates
532 
534  es.get<TrackerDigiGeometryRecord>().get(tracker);
535  LogTrace("CkfPattern|TrackingRegressionTest") << "========== CkfTrackCandidateMaker Info =========="
536  << "number of Seed: " << collseed->size()<<'\n'
537  <<PrintoutHelper::regressionTest(*tracker,unsmoothedResult);
538 
539  assert(viTotHits>=0); // just to use it...
540  // std::cout << "VICkfPattern result " << output->size() << " " << viTotHits << std::endl;
541 
542  if (theTrajectoryOutput){ outputT->swap(unsmoothedResult);}
543 
544  }// end of ((*collseed).size()>0)
545 
546  // method for debugging
548 
549  // Step G: write output to file
551  if (theTrajectoryOutput){e.put(std::move(outputT));}
552  if (produceSeedStopReasons_){e.put(std::move(outputSeedStopReasons));}
553  }
554 
555 }
#define LogDebug(id)
T getParameter(std::string const &) const
static boost::mutex mutex
Definition: Proxy.cc:11
int foundHits() const
Definition: Trajectory.h:225
static std::string dumpCandidates(collection &candidates)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:122
virtual void clean(TempTrajectoryContainer &) const
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:186
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
edm::EDGetTokenT< StripClusterMask > maskStrips_
void setStopReason(StopReason s)
Definition: Trajectory.h:352
std::unique_ptr< TransientInitialStateEstimator > theInitialState
size_type size() const
Definition: OwnVector.h:264
void setNLoops(signed char value)
Definition: Trajectory.h:349
PTrajectoryStateOnDet persistentState(const TrajectoryStateOnSurface &ts, unsigned int detid)
bool exists(std::string const &parameterName) const
checks if a parameter exists
#define noexcept
virtual void printHitsDebugger(edm::Event &e)
edm::ESHandle< GeometricSearchTracker > theGeomSearchTracker
PropagationDirection
virtual void done()=0
Tells the cleaner that the seeds are finished, and so it can clear any cache it has.
void reserve(unsigned int n)
Definition: Trajectory.h:150
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:42
virtual void add(const Trajectory *traj)=0
Informs the cleaner that a new trajectory has been made, in case the cleaner keeps a local collection...
virtual bool good(const TrajectorySeed *seed)=0
Returns true if the seed is not overlapping with another trajectory.
static std::string regressionTest(const TrackerGeometry &tracker, std::vector< Trajectory > &unsmoothedResult)
void push_back(D *&d)
Definition: OwnVector.h:290
edm::EDGetTokenT< PixelClusterMask > maskPixels_
std::vector< TrajectoryMeasurement > DataContainer
Definition: Trajectory.h:44
bool isNotFinite(T x)
Definition: isFinite.h:10
reverseTrajectories
reverse trajectories after pattern-reco creating new seed on last hit
const TrajectoryCleaner * theTrajectoryCleaner
const NavigationSchool * theNavigationSchool
const GeomDet * det() const
virtual void produceBase(edm::Event &e, const edm::EventSetup &es)
size_t key() const
Definition: RefToBase.h:250
std::unique_ptr< BaseCkfTrajectoryBuilder > theTrajectoryBuilder
edm::EDGetTokenT< MeasurementTrackerEvent > theMTELabel
edm::RefToBase< TrajectorySeed > seedRef(void) const
Definition: Trajectory.h:321
edm::EDGetTokenT< Phase2OTClusterMask > maskPhase2OTs_
#define LogTrace(id)
edm::EDGetTokenT< edm::View< TrajectorySeed > > theSeedLabel
ii
Definition: cuy.py:588
bool isValid() const
Definition: Trajectory.h:279
void pop()
Definition: Trajectory.cc:29
const T & get() const
Definition: EventSetup.h:55
double b
Definition: hdecay.h:120
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:53
void setSeedRef(const edm::RefToBase< TrajectorySeed > &seedRef)
Definition: Trajectory.h:323
void setEventSetup(const edm::EventSetup &es)
Initialize EventSetup objects at each event.
virtual void beginRunBase(edm::Run const &, edm::EventSetup const &es)
HLT enums.
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
double a
Definition: hdecay.h:121
numHitsForSeedCleaner
these two parameters are relevant only for the CachingSeedCleanerBySharedInput
T const * product() const
Definition: ESHandle.h:86
void push(const TrajectoryMeasurement &tm)
Definition: Trajectory.cc:50
virtual void init(const std::vector< Trajectory > *vect)=0
Provides the cleaner a pointer to the vector where trajectories are stored, in case it does not want ...
reference front()
Definition: OwnVector.h:423
def move(src, dest)
Definition: eostools.py:510
id_type rawId() const
T get(const Candidate &c)
Definition: component.h:55
Definition: Run.h:42
edm::ESHandle< MagneticField > theMagField