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 &, const TransientTrackingRecHit::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::EventSetup &es)
 
 LowPtClusterShapeSeedComparitor (const edm::ParameterSet &ps)
 
virtual ~LowPtClusterShapeSeedComparitor ()
 
- Public Member Functions inherited from SeedComparitor
virtual ~SeedComparitor ()
 

Private Attributes

edm::ESHandle
< ClusterShapeHitFilter
theShapeFilter
 something More...
 
edm::ESHandle< TrackerTopologytheTTopo
 

Detailed Description

Definition at line 13 of file LowPtClusterShapeSeedComparitor.h.

Constructor & Destructor Documentation

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

Definition at line 16 of file LowPtClusterShapeSeedComparitor.h.

16 {}
virtual LowPtClusterShapeSeedComparitor::~LowPtClusterShapeSeedComparitor ( )
inlinevirtual

Definition at line 17 of file LowPtClusterShapeSeedComparitor.h.

17 {}

Member Function Documentation

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

Implements SeedComparitor.

Definition at line 109 of file LowPtClusterShapeSeedComparitor.cc.

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

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

Implements SeedComparitor.

Definition at line 20 of file LowPtClusterShapeSeedComparitor.h.

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

Implements SeedComparitor.

Definition at line 21 of file LowPtClusterShapeSeedComparitor.h.

22  { 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 23 of file LowPtClusterShapeSeedComparitor.h.

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

Implements SeedComparitor.

Definition at line 27 of file LowPtClusterShapeSeedComparitor.h.

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

Implements SeedComparitor.

Definition at line 104 of file LowPtClusterShapeSeedComparitor.cc.

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

104  {
105  es.get<CkfComponentsRecord>().get("ClusterShapeHitFilter", theShapeFilter);
106  es.get<IdealGeometryRecord>().get(theTTopo);
107 }
edm::ESHandle< ClusterShapeHitFilter > theShapeFilter
something
edm::ESHandle< TrackerTopology > theTTopo
const T & get() const
Definition: EventSetup.h:55

Member Data Documentation

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

something

Definition at line 33 of file LowPtClusterShapeSeedComparitor.h.

Referenced by compatible(), and init().

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

Definition at line 34 of file LowPtClusterShapeSeedComparitor.h.

Referenced by compatible(), and init().