CMS 3D CMS Logo

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