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

Detailed Description

Definition at line 11 of file LowPtClusterShapeSeedComparitor.h.


Constructor & Destructor Documentation

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

Definition at line 14 of file LowPtClusterShapeSeedComparitor.h.

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

Definition at line 15 of file LowPtClusterShapeSeedComparitor.h.

{}

Member Function Documentation

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

Implements SeedComparitor.

Definition at line 107 of file LowPtClusterShapeSeedComparitor.cc.

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

{
  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());

      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 25 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 21 of file LowPtClusterShapeSeedComparitor.h.

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

Implements SeedComparitor.

Definition at line 19 of file LowPtClusterShapeSeedComparitor.h.

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

Implements SeedComparitor.

Definition at line 18 of file LowPtClusterShapeSeedComparitor.h.

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

Implements SeedComparitor.

Definition at line 103 of file LowPtClusterShapeSeedComparitor.cc.

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

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

Member Data Documentation

something

Definition at line 31 of file LowPtClusterShapeSeedComparitor.h.

Referenced by compatible(), and init().