CMS 3D CMS Logo

Public Member Functions | Private Attributes

LowPtClusterShapeSeedComparitor Class Reference

#include <LowPtClusterShapeSeedComparitor.h>

Inheritance diagram for LowPtClusterShapeSeedComparitor:
SeedComparitor

List of all members.

Public Member Functions

virtual bool compatible (const SeedingHitSet &hits, const TrackingRegion &region) const
virtual bool compatible (const TrajectorySeed &seed) const
virtual bool compatible (const SeedingHitSet &hits, const GlobalTrajectoryParameters &helixStateAtVertex, const FastHelix &helix, const TrackingRegion &region) const
virtual bool compatible (const SeedingHitSet &hits, const GlobalTrajectoryParameters &straightLineStateAtVertex, const TrackingRegion &region) const
virtual bool compatible (const TrajectoryStateOnSurface &, const TransientTrackingRecHit::ConstRecHitPointer &hit) const
virtual void init (const edm::EventSetup &es)
 LowPtClusterShapeSeedComparitor (const edm::ParameterSet &ps)
virtual ~LowPtClusterShapeSeedComparitor ()

Private Attributes

edm::ESHandle
< ClusterShapeHitFilter
theShapeFilter
 something
edm::ESHandle< TrackerTopologytheTTopo

Detailed Description

Definition at line 13 of file LowPtClusterShapeSeedComparitor.h.


Constructor & Destructor Documentation

LowPtClusterShapeSeedComparitor::LowPtClusterShapeSeedComparitor ( const edm::ParameterSet ps) [inline]

Definition at line 16 of file LowPtClusterShapeSeedComparitor.h.

{}
virtual LowPtClusterShapeSeedComparitor::~LowPtClusterShapeSeedComparitor ( ) [inline, virtual]

Definition at line 17 of file LowPtClusterShapeSeedComparitor.h.

{}

Member Function Documentation

bool LowPtClusterShapeSeedComparitor::compatible ( const SeedingHitSet hits,
const TrackingRegion region 
) const [virtual]

Implements SeedComparitor.

Definition at line 109 of file LowPtClusterShapeSeedComparitor.cc.

References alcazmumu_cfi::filter, HitInfo::getInfo(), i, LogDebug, LogTrace, convertSQLiteXML::ok, edm::ESHandle< T >::product(), SeedingHitSet::size(), theShapeFilter, and theTTopo.

{
  assert(hits.size()==3);

  const ClusterShapeHitFilter * filter = theShapeFilter.product();
  assert(filter != 0 && "LowPtClusterShapeSeedComparitor: init(EventSetup) method was not called");

   // Get global positions
   GlobalPoint  globalPoss[3];
   getGlobalPos(hits, globalPoss);

  // Get global directions
  GlobalVector globalDirs[3]; 

  bool ok = getGlobalDirs(globalPoss,globalDirs);

  // Check whether shape of pixel cluster is compatible
  // with local track direction

  if (!ok)
    {
      LogDebug("LowPtClusterShapeSeedComparitor")<<"curvarture 0:"
                                                 <<"\nnHits: "<<hits.size()
                                                 <<" will say the seed is good anyway.";
      return true;
    }

  for(int i = 0; i < 3; i++)
  {
    const SiPixelRecHit* pixelRecHit =
      dynamic_cast<const SiPixelRecHit *>(hits[i]->hit());

    if (!pixelRecHit){
      edm::LogError("LowPtClusterShapeSeedComparitor")<<"this is not a pixel cluster";
      ok = false; break;
    }

    if(!pixelRecHit->isValid())
    { 
      ok = false; break; 
    }
    
    LogDebug("LowPtClusterShapeSeedComparitor")<<"about to compute compatibility."
                                               <<"hit ptr: "<<pixelRecHit
                                               <<"global direction:"<< globalDirs[i];


    if(! filter->isCompatible(*pixelRecHit, globalDirs[i]) )
    {
      LogTrace("LowPtClusterShapeSeedComparitor")
         << " clusShape is not compatible"
         << HitInfo::getInfo(*hits[i]->hit(),theTTopo.product());

      ok = false; break;
    }
  }

  return ok;
}
virtual bool LowPtClusterShapeSeedComparitor::compatible ( const SeedingHitSet hits,
const GlobalTrajectoryParameters straightLineStateAtVertex,
const TrackingRegion region 
) const [inline, virtual]

Implements SeedComparitor.

Definition at line 27 of file LowPtClusterShapeSeedComparitor.h.

                                                               { return true; }
virtual bool LowPtClusterShapeSeedComparitor::compatible ( const SeedingHitSet hits,
const GlobalTrajectoryParameters helixStateAtVertex,
const FastHelix helix,
const TrackingRegion region 
) const [inline, virtual]

Implements SeedComparitor.

Definition at line 23 of file LowPtClusterShapeSeedComparitor.h.

                                                               { return true; }
virtual bool LowPtClusterShapeSeedComparitor::compatible ( const TrajectoryStateOnSurface ,
const TransientTrackingRecHit::ConstRecHitPointer hit 
) const [inline, virtual]

Implements SeedComparitor.

Definition at line 21 of file LowPtClusterShapeSeedComparitor.h.

                                                                                      { return true; }
virtual bool LowPtClusterShapeSeedComparitor::compatible ( const TrajectorySeed seed) const [inline, virtual]

Implements SeedComparitor.

Definition at line 20 of file LowPtClusterShapeSeedComparitor.h.

{ return true; }
void LowPtClusterShapeSeedComparitor::init ( const edm::EventSetup es) [virtual]

Implements SeedComparitor.

Definition at line 104 of file LowPtClusterShapeSeedComparitor.cc.

References edm::EventSetup::get(), theShapeFilter, and theTTopo.

                                                                  {
  es.get<CkfComponentsRecord>().get("ClusterShapeHitFilter", theShapeFilter);
  es.get<IdealGeometryRecord>().get(theTTopo);
}

Member Data Documentation

something

Definition at line 33 of file LowPtClusterShapeSeedComparitor.h.

Referenced by compatible(), and init().

Definition at line 34 of file LowPtClusterShapeSeedComparitor.h.

Referenced by compatible(), and init().