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
LowPtClusterShapeSeedComparitor Class Reference

#include <LowPtClusterShapeSeedComparitor.h>

Inheritance diagram for LowPtClusterShapeSeedComparitor:
SeedComparitor

Public Member Functions

virtual bool compatible (const SeedingHitSet &hits, const TrackingRegion &region) const
 
virtual bool compatible (const TrajectorySeed &seed) const
 
virtual bool compatible (const TrajectoryStateOnSurface &, SeedingHitSet::ConstRecHitPointer hit) 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 void init (const edm::Event &e, const edm::EventSetup &es)
 
 LowPtClusterShapeSeedComparitor (const edm::ParameterSet &ps, edm::ConsumesCollector &iC)
 
virtual ~LowPtClusterShapeSeedComparitor ()
 
- Public Member Functions inherited from SeedComparitor
virtual ~SeedComparitor ()
 

Private Attributes

edm::Handle
< SiPixelClusterShapeCache
thePixelClusterShapeCache
 
edm::EDGetTokenT
< SiPixelClusterShapeCache
thePixelClusterShapeCacheToken
 
edm::ESHandle
< ClusterShapeHitFilter
theShapeFilter
 something More...
 
edm::ESHandle< TrackerTopologytheTTopo
 

Detailed Description

Definition at line 16 of file LowPtClusterShapeSeedComparitor.h.

Constructor & Destructor Documentation

LowPtClusterShapeSeedComparitor::LowPtClusterShapeSeedComparitor ( const edm::ParameterSet ps,
edm::ConsumesCollector iC 
)

Definition at line 106 of file LowPtClusterShapeSeedComparitor.cc.

106  :
108 {}
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
edm::EDGetTokenT< SiPixelClusterShapeCache > thePixelClusterShapeCacheToken
virtual LowPtClusterShapeSeedComparitor::~LowPtClusterShapeSeedComparitor ( )
inlinevirtual

Definition at line 20 of file LowPtClusterShapeSeedComparitor.h.

20 {}

Member Function Documentation

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

Implements SeedComparitor.

Definition at line 118 of file LowPtClusterShapeSeedComparitor.cc.

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

120 {
121  assert(hits.size()==3);
122 
124  assert(filter != 0 && "LowPtClusterShapeSeedComparitor: init(EventSetup) method was not called");
125 
126  // Get global positions
127  GlobalPoint globalPoss[3];
128  getGlobalPos(hits, globalPoss);
129 
130  // Get global directions
131  GlobalVector globalDirs[3];
132 
133  bool ok = getGlobalDirs(globalPoss,globalDirs);
134 
135  // Check whether shape of pixel cluster is compatible
136  // with local track direction
137 
138  if (!ok)
139  {
140  LogDebug("LowPtClusterShapeSeedComparitor")<<"curvarture 0:"
141  <<"\nnHits: "<<hits.size()
142  <<" will say the seed is good anyway.";
143  return true;
144  }
145 
146  for(int i = 0; i < 3; i++)
147  {
148  const SiPixelRecHit* pixelRecHit =
149  dynamic_cast<const SiPixelRecHit *>(hits[i]->hit());
150 
151  if (!pixelRecHit){
152  edm::LogError("LowPtClusterShapeSeedComparitor")<<"this is not a pixel cluster";
153  ok = false; break;
154  }
155 
156  if(!pixelRecHit->isValid())
157  {
158  ok = false; break;
159  }
160 
161  LogDebug("LowPtClusterShapeSeedComparitor")<<"about to compute compatibility."
162  <<"hit ptr: "<<pixelRecHit
163  <<"global direction:"<< globalDirs[i];
164 
165 
166  if(! filter->isCompatible(*pixelRecHit, globalDirs[i], *thePixelClusterShapeCache) )
167  {
168  LogTrace("LowPtClusterShapeSeedComparitor")
169  << " clusShape is not compatible"
170  << HitInfo::getInfo(*hits[i]->hit(),theTTopo.product());
171 
172  ok = false; break;
173  }
174  }
175 
176  return ok;
177 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
edm::ESHandle< ClusterShapeHitFilter > theShapeFilter
something
edm::ESHandle< TrackerTopology > theTTopo
edm::Handle< SiPixelClusterShapeCache > thePixelClusterShapeCache
#define LogTrace(id)
T const * product() const
Definition: ESHandle.h:62
unsigned int size() const
Definition: SeedingHitSet.h:44
static std::string getInfo(const DetId &id, const TrackerTopology *tTopo)
Definition: HitInfo.cc:23
Pixel Reconstructed Hit.
virtual bool LowPtClusterShapeSeedComparitor::compatible ( const TrajectorySeed seed) const
inlinevirtual

Implements SeedComparitor.

Definition at line 23 of file LowPtClusterShapeSeedComparitor.h.

23 { return true; }
virtual bool LowPtClusterShapeSeedComparitor::compatible ( const TrajectoryStateOnSurface ,
SeedingHitSet::ConstRecHitPointer  hit 
) const
inlinevirtual

Implements SeedComparitor.

Definition at line 24 of file LowPtClusterShapeSeedComparitor.h.

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

Implements SeedComparitor.

Definition at line 26 of file LowPtClusterShapeSeedComparitor.h.

29  { return true; }
virtual bool LowPtClusterShapeSeedComparitor::compatible ( const SeedingHitSet hits,
const GlobalTrajectoryParameters straightLineStateAtVertex,
const TrackingRegion region 
) const
inlinevirtual

Implements SeedComparitor.

Definition at line 30 of file LowPtClusterShapeSeedComparitor.h.

32  { return true; }
void LowPtClusterShapeSeedComparitor::init ( const edm::Event e,
const edm::EventSetup es 
)
virtual

Implements SeedComparitor.

Definition at line 111 of file LowPtClusterShapeSeedComparitor.cc.

References edm::EventSetup::get(), edm::Event::getByToken(), thePixelClusterShapeCache, thePixelClusterShapeCacheToken, theShapeFilter, and theTTopo.

111  {
112  es.get<CkfComponentsRecord>().get("ClusterShapeHitFilter", theShapeFilter);
113  es.get<IdealGeometryRecord>().get(theTTopo);
114 
116 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
edm::ESHandle< ClusterShapeHitFilter > theShapeFilter
something
edm::ESHandle< TrackerTopology > theTTopo
edm::Handle< SiPixelClusterShapeCache > thePixelClusterShapeCache
edm::EDGetTokenT< SiPixelClusterShapeCache > thePixelClusterShapeCacheToken
const T & get() const
Definition: EventSetup.h:55

Member Data Documentation

edm::Handle<SiPixelClusterShapeCache> LowPtClusterShapeSeedComparitor::thePixelClusterShapeCache
private

Definition at line 39 of file LowPtClusterShapeSeedComparitor.h.

Referenced by compatible(), and init().

edm::EDGetTokenT<SiPixelClusterShapeCache> LowPtClusterShapeSeedComparitor::thePixelClusterShapeCacheToken
private

Definition at line 38 of file LowPtClusterShapeSeedComparitor.h.

Referenced by init().

edm::ESHandle<ClusterShapeHitFilter> LowPtClusterShapeSeedComparitor::theShapeFilter
private

something

Definition at line 36 of file LowPtClusterShapeSeedComparitor.h.

Referenced by compatible(), and init().

edm::ESHandle<TrackerTopology> LowPtClusterShapeSeedComparitor::theTTopo
private

Definition at line 37 of file LowPtClusterShapeSeedComparitor.h.

Referenced by compatible(), and init().