45 filterName_(cfg.getParameter<std::string>(
"ClusterShapeHitFilterName")),
46 filterAtHelixStage_(cfg.getParameter<bool>(
"FilterAtHelixStage")),
47 filterPixelHits_(cfg.getParameter<bool>(
"FilterPixelHits")),
48 filterStripHits_(cfg.getParameter<bool>(
"FilterStripHits"))
67 assert(hit->isValid() && tsos.
isValid());
90 float x0 = vertex.
x(), y0 = vertex.
y();
91 for (
unsigned int i = 0,
n = hits.
size();
i <
n; ++
i) {
94 float x1 = pos.
x(), y1 = pos.
y(), dx1 = x1 - xc, dy1 = y1 - yc;
97 float perpx = -dy1, perpy = dx1;
98 if (perpx * (x1-x0) + perpy * (y1 - y0) < 0) {
99 perpy = -perpy; perpx = -perpx;
103 float perp2 = perpx*perpx + perpy*perpy;
104 float pmom2 = momvtx.
x()*momvtx.
x() + momvtx.
y()*momvtx.
y(), momz2 = momvtx.
z()*momvtx.
z(), mom2 = pmom2 + momz2;
105 float perpscale =
sqrt(pmom2/mom2 / perp2), zscale =
sqrt((1-pmom2/mom2));
106 GlobalVector gdir(perpx*perpscale, perpy*perpscale, (momvtx.
z() > 0 ? zscale : -zscale));
121 if (pixhit == 0)
throw cms::Exception(
"LogicError",
"Found a valid hit on the pixel detector which is not a SiPixelRecHit\n");
126 const std::type_info &tid =
typeid(*hit.
hit());
129 assert(matchedHit != 0);
138 assert(precHit != 0);
unsigned int stereoId() const
SiStripCluster const & monoCluster() const
virtual const TrackingRecHit * hit() const =0
edm::ESHandle< ClusterShapeHitFilter > filterHandle_
const FastCircle & circle() const
virtual void init(const edm::EventSetup &es)
GlobalVector momentum() const
PixelClusterShapeSeedComparitor(const edm::ParameterSet &cfg)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
GlobalPoint position() const
T perp2() const
Squared magnitude of transverse component.
bool compatibleHit(const TransientTrackingRecHit &hit, const GlobalVector &direction) const
SiStripCluster const & stereoCluster() const
virtual GlobalPoint globalPosition() const
virtual bool compatible(const TrajectorySeed &seed) const
unsigned int size() const
#define DEFINE_EDM_PLUGIN(factory, type, name)
unsigned int monoId() const
DetId geographicalId() const
virtual ~PixelClusterShapeSeedComparitor()
const SiStripRecHit2D & originalHit() const
GlobalVector globalDirection() const
virtual bool compatible(const SeedingHitSet &hits, const TrackingRegion ®ion) const