CMS 3D CMS Logo

Public Types | Public Member Functions | Private Member Functions

TrajectoryCleanerBySharedSeeds Class Reference

#include <TrajectoryCleanerBySharedSeeds.h>

Inheritance diagram for TrajectoryCleanerBySharedSeeds:
TrajectoryCleaner

List of all members.

Public Types

typedef std::vector< Trajectory * > TrajectoryPointerContainer

Public Member Functions

virtual void clean (TrajectoryPointerContainer &) const
void clean (std::vector< Trajectory > &trajs) const
 TrajectoryCleanerBySharedSeeds (const edm::ParameterSet &iConfig)
virtual ~TrajectoryCleanerBySharedSeeds ()

Private Member Functions

bool sameSeed (const TrajectorySeed &s1, const TrajectorySeed &s2) const

Detailed Description

Definition at line 8 of file TrajectoryCleanerBySharedSeeds.h.


Member Typedef Documentation

Reimplemented from TrajectoryCleaner.

Definition at line 11 of file TrajectoryCleanerBySharedSeeds.h.


Constructor & Destructor Documentation

TrajectoryCleanerBySharedSeeds::TrajectoryCleanerBySharedSeeds ( const edm::ParameterSet iConfig) [inline]

Definition at line 13 of file TrajectoryCleanerBySharedSeeds.h.

{};
virtual TrajectoryCleanerBySharedSeeds::~TrajectoryCleanerBySharedSeeds ( ) [inline, virtual]

Definition at line 14 of file TrajectoryCleanerBySharedSeeds.h.

{};

Member Function Documentation

void TrajectoryCleanerBySharedSeeds::clean ( TrajectoryPointerContainer ) const [virtual]

Implements TrajectoryCleaner.

Definition at line 39 of file TrajectoryCleanerBySharedSeeds.cc.

{
}
void TrajectoryCleanerBySharedSeeds::clean ( std::vector< Trajectory > &  trajs) const [virtual]

Reimplemented from TrajectoryCleaner.

Definition at line 39 of file DTSegmentCleaner.cc.

References query::result.

                                                                                      {
  if (inputCands.size()<2) return inputCands;
  //   cout << "[DTSegmentCleaner] # of candidates: " << inputCands.size() << endl;
  vector<DTSegmentCand*> result = solveConflict(inputCands);

  result = ghostBuster(result);
  
  return result;
}
bool TrajectoryCleanerBySharedSeeds::sameSeed ( const TrajectorySeed s1,
const TrajectorySeed s2 
) const [private]

Definition at line 14 of file TrajectoryCleanerBySharedSeeds.cc.

References TrackingRecHit::all, TrajectorySeed::nHits(), diffTwoXMLs::r1, diffTwoXMLs::r2, and TrajectorySeed::recHits().

{
  if(s1.nHits()==0 && s2.nHits()==0) return false;
  if(s1.nHits() != s2.nHits()) return false;

  TrajectorySeed::range r1 = s1.recHits();
  TrajectorySeed::range r2 = s2.recHits();

  TrajectorySeed::const_iterator h1 = r1.first;
  TrajectorySeed::const_iterator h2 = r2.first;

  do
  {
    if(!(h1->sharesInput(&(*h2),TrackingRecHit::all)))
      return false;

    h1++; h2++;
  }
  while(h1 != s1.recHits().second && 
        h2 != s2.recHits().second);

  return true;
}