CMS 3D CMS Logo

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

#include <SeedCleanerByHitPosition.h>

Inheritance diagram for SeedCleanerByHitPosition:
RedundantSeedCleaner

Public Member Functions

void add (const Trajectory *traj) override
 
void done () override
 Tells the cleaner that the seeds are finished, and so it can clear any cache it has. More...
 
bool good (const TrajectorySeed *seed) override
 Returns true if the seed is not overlapping with another trajectory. More...
 
void init (const std::vector< Trajectory > *vect) override
 Provides the cleaner a pointer to the vector where trajectories are stored, in case it does not want to keep a local collection of trajectories. More...
 
 SeedCleanerByHitPosition ()
 
- Public Member Functions inherited from RedundantSeedCleaner
void clean (const std::vector< TrajectorySeed > &, std::vector< TrajectorySeed > &)
 clean More...
 
void define (std::vector< TrajectorySeed > &)
 collection definition More...
 
 RedundantSeedCleaner ()
 constructor More...
 
virtual ~RedundantSeedCleaner ()
 
 ~RedundantSeedCleaner ()
 destructor More...
 

Private Attributes

const std::vector< Trajectory > * trajectories
 

Detailed Description

Definition at line 5 of file SeedCleanerByHitPosition.h.

Constructor & Destructor Documentation

SeedCleanerByHitPosition::SeedCleanerByHitPosition ( )
inline

Definition at line 19 of file SeedCleanerByHitPosition.h.

19 : RedundantSeedCleaner(), trajectories(nullptr) /*,comps_(0), tracks_(0), calls_(0)*/ {}
RedundantSeedCleaner()
constructor
const std::vector< Trajectory > * trajectories

Member Function Documentation

void SeedCleanerByHitPosition::add ( const Trajectory traj)
inlineoverridevirtual

In this implementation, it does nothing

Implements RedundantSeedCleaner.

Definition at line 8 of file SeedCleanerByHitPosition.h.

Referenced by counter.Counter::register().

8 { }
void SeedCleanerByHitPosition::done ( )
overridevirtual

Tells the cleaner that the seeds are finished, and so it can clear any cache it has.

Implements RedundantSeedCleaner.

Definition at line 6 of file SeedCleanerByHitPosition.cc.

References trajectories.

Referenced by init().

6  {
7  // edm::LogInfo("SeedCleanerByHitPosition") << " Calls: " << calls_ << ", Tracks: " << tracks_ <<", Comps: " << comps_ << " Vault: " << trajectories->size() << ".";
8  // calls_ = comps_ = tracks_ = 0;
9 
10  trajectories = nullptr;
11 }
const std::vector< Trajectory > * trajectories
bool SeedCleanerByHitPosition::good ( const TrajectorySeed seed)
overridevirtual

Returns true if the seed is not overlapping with another trajectory.

Implements RedundantSeedCleaner.

Definition at line 12 of file SeedCleanerByHitPosition.cc.

References AlCaHLTBitMon_QueryRunRegistry::comp, RecHitComparatorByPosition::equals(), plotBeamSpotDB::first, runEdmFileComparison::found, hfClusterShapes_cfi::hits, plotBeamSpotDB::last, TrajectorySeed::recHits(), and trajectories.

Referenced by init().

12  {
15  typedef Trajectory::RecHitContainer::const_iterator TI;
16  TrajectorySeed::range range = seed->recHits();
17  SI first = range.first, curr = range.first, last = range.second;
18  //calls_++;
19  for (std::vector<Trajectory>::const_iterator trj = trajectories->begin(),
20  trjEnd =trajectories->end();
21  trj != trjEnd; ++trj) {
22  //tracks_++;
23  Trajectory::RecHitContainer hits = trj->recHits();
24  TI ts = hits.begin(), tc = ts, te = hits.end();
25  for (curr = first; curr < last; ++curr) {
26  bool found = false;
27  for (TI it = tc; it != te; ++it) {
28  //comps_++;
29  if (comp.equals(&(*curr), &(**it))) {
30  tc = it; found = true; break;
31  }
32  }
33  if (found == false) {
34  for (TI it = ts; it != tc; ++it) {
35  //comps_++;
36  if (comp.equals(&(*curr), &(**it))) {
37  tc = it; found = true; break;
38  }
39  }
40  if (found == false) break;
41  }
42  }
43  if (curr == last) return false;
44  }
45  return true;
46 }
bool equals(const TrackingRecHit *a, const TrackingRecHit *b) const
recHitContainer::const_iterator const_iterator
std::pair< const_iterator, const_iterator > range
ConstRecHitContainer RecHitContainer
Definition: Trajectory.h:46
range recHits() const
const std::vector< Trajectory > * trajectories
void SeedCleanerByHitPosition::init ( const std::vector< Trajectory > *  vect)
inlineoverridevirtual

Provides the cleaner a pointer to the vector where trajectories are stored, in case it does not want to keep a local collection of trajectories.

Implements RedundantSeedCleaner.

Definition at line 11 of file SeedCleanerByHitPosition.h.

References done(), good(), SurveyInfoScenario_cff::seed, and trajectories.

11 { trajectories = vect; }
const std::vector< Trajectory > * trajectories

Member Data Documentation

const std::vector<Trajectory>* SeedCleanerByHitPosition::trajectories
private

Definition at line 21 of file SeedCleanerByHitPosition.h.

Referenced by done(), good(), and init().