CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
SeedCleanerByHitPosition Class Reference

#include <SeedCleanerByHitPosition.h>

Inheritance diagram for SeedCleanerByHitPosition:
RedundantSeedCleaner

Public Member Functions

virtual void add (const Trajectory *traj)
 
virtual void done ()
 Tells the cleaner that the seeds are finished, and so it can clear any cache it has. More...
 
virtual bool good (const TrajectorySeed *seed)
 Returns true if the seed is not overlapping with another trajectory. More...
 
virtual void init (const std::vector< Trajectory > *vect)
 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(0) /*,comps_(0), tracks_(0), calls_(0)*/ {}
RedundantSeedCleaner()
constructor
const std::vector< Trajectory > * trajectories

Member Function Documentation

virtual void SeedCleanerByHitPosition::add ( const Trajectory traj)
inlinevirtual

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 ( )
virtual

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.

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

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, newFWLiteAna::found, prof2calltree::last, TrajectorySeed::recHits(), and trajectories.

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:48
range recHits() const
const std::vector< Trajectory > * trajectories
virtual void SeedCleanerByHitPosition::init ( const std::vector< Trajectory > *  vect)
inlinevirtual

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 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().