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
 
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
< 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 108 of file LowPtClusterShapeSeedComparitor.cc.

108  :
110 {}
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
virtual

Implements SeedComparitor.

Definition at line 120 of file LowPtClusterShapeSeedComparitor.cc.

References assert(), Exception, alcazmumu_cfi::filter, HitInfo::getInfo(), i, TrackingRecHit::isValid(), LogDebug, LogTrace, convertSQLiteXML::ok, and SeedingHitSet::size().

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

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

113  {
114  es.get<CkfComponentsRecord>().get("ClusterShapeHitFilter", theShapeFilter);
115  es.get<TrackerTopologyRcd>().get(theTTopo);
116 
118 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
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 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 init().

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

Definition at line 32 of file LowPtClusterShapeSeedComparitor.h.

Referenced by init().