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...
 

Detailed Description

Definition at line 11 of file LowPtClusterShapeSeedComparitor.h.

Constructor & Destructor Documentation

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

Definition at line 14 of file LowPtClusterShapeSeedComparitor.h.

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

Definition at line 15 of file LowPtClusterShapeSeedComparitor.h.

15 {}

Member Function Documentation

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

Implements SeedComparitor.

Definition at line 107 of file LowPtClusterShapeSeedComparitor.cc.

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

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

Implements SeedComparitor.

Definition at line 18 of file LowPtClusterShapeSeedComparitor.h.

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

Implements SeedComparitor.

Definition at line 19 of file LowPtClusterShapeSeedComparitor.h.

20  { 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 21 of file LowPtClusterShapeSeedComparitor.h.

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

Implements SeedComparitor.

Definition at line 25 of file LowPtClusterShapeSeedComparitor.h.

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

Implements SeedComparitor.

Definition at line 103 of file LowPtClusterShapeSeedComparitor.cc.

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

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

Member Data Documentation

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

something

Definition at line 31 of file LowPtClusterShapeSeedComparitor.h.

Referenced by compatible(), and init().