test
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 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 TrackingRegion region 
) const
virtual

Implements SeedComparitor.

Definition at line 120 of file LowPtClusterShapeSeedComparitor.cc.

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

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