CMS 3D CMS Logo

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
 
virtual bool compatible (const TrajectoryStateOnSurface &, SeedingHitSet::ConstRecHitPointer hit) const
 
virtual bool compatible (const SeedingHitSet &hits, const GlobalTrajectoryParameters &helixStateAtVertex, const FastHelix &helix) 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< SiPixelClusterShapeCachethePixelClusterShapeCache
 
edm::EDGetTokenT< SiPixelClusterShapeCachethePixelClusterShapeCacheToken
 
edm::ESHandle< ClusterShapeHitFiltertheShapeFilter
 something More...
 
std::string theShapeFilterLabel_
 
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 108 of file LowPtClusterShapeSeedComparitor.cc.

108  :
110  theShapeFilterLabel_(ps.getParameter<std::string>("clusterShapeHitFilter"))
111 {}
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
edm::EDGetTokenT< SiPixelClusterShapeCache > thePixelClusterShapeCacheToken
virtual LowPtClusterShapeSeedComparitor::~LowPtClusterShapeSeedComparitor ( )
inlinevirtual

Member Function Documentation

bool LowPtClusterShapeSeedComparitor::compatible ( const SeedingHitSet hits) const
virtual

Implements SeedComparitor.

Definition at line 121 of file LowPtClusterShapeSeedComparitor.cc.

References Exception, ALCARECOTkAlBeamHalo_cff::filter, HitInfo::getInfo(), mps_fire::i, TrackingRecHit::isValid(), LogDebug, LogTrace, convertSQLiteXML::ok, edm::ESHandle< T >::product(), SeedingHitSet::size(), thePixelClusterShapeCache, theShapeFilter, and theTTopo.

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

Implements SeedComparitor.

Definition at line 23 of file LowPtClusterShapeSeedComparitor.h.

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

Implements SeedComparitor.

Definition at line 25 of file LowPtClusterShapeSeedComparitor.h.

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

Implements SeedComparitor.

Definition at line 114 of file LowPtClusterShapeSeedComparitor.cc.

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

114  {
116  es.get<TrackerTopologyRcd>().get(theTTopo);
117 
119 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
edm::ESHandle< ClusterShapeHitFilter > theShapeFilter
something
edm::ESHandle< TrackerTopology > theTTopo
edm::Handle< SiPixelClusterShapeCache > thePixelClusterShapeCache
edm::EDGetTokenT< SiPixelClusterShapeCache > thePixelClusterShapeCacheToken
const T & get() const
Definition: EventSetup.h:56

Member Data Documentation

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

Definition at line 34 of file LowPtClusterShapeSeedComparitor.h.

Referenced by compatible(), and init().

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

Definition at line 33 of file LowPtClusterShapeSeedComparitor.h.

Referenced by init().

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

something

Definition at line 31 of file LowPtClusterShapeSeedComparitor.h.

Referenced by compatible(), and init().

std::string LowPtClusterShapeSeedComparitor::theShapeFilterLabel_
private

Definition at line 35 of file LowPtClusterShapeSeedComparitor.h.

Referenced by init().

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

Definition at line 32 of file LowPtClusterShapeSeedComparitor.h.

Referenced by compatible(), and init().