81 assert(hit->isValid() && tsos.
isValid());
94 edm::LogWarning(
"InvalidHelix") <<
"PixelClusterShapeSeedComparitor helix is not valid, result is bad";
100 float x0 = vertex.
x(), y0 = vertex.
y();
101 for (
unsigned int i = 0,
n = hits.
size();
i <
n; ++
i) {
102 auto const &
hit = *hits[
i];
104 float x1 = pos.
x(), y1 = pos.
y(), dx1 = x1 - xc, dy1 = y1 - yc;
107 float perpx = -dy1, perpy = dx1;
108 if (perpx * (x1-x0) + perpy * (y1 - y0) < 0) {
109 perpy = -perpy; perpx = -perpx;
113 float perp2 = perpx*perpx + perpy*perpy;
114 float pmom2 = momvtx.
x()*momvtx.
x() + momvtx.
y()*momvtx.
y(), momz2 = momvtx.
z()*momvtx.
z(), mom2 = pmom2 + momz2;
115 float perpscale =
sqrt(pmom2/mom2 / perp2), zscale =
sqrt((1-pmom2/mom2));
116 GlobalVector gdir(perpx*perpscale, perpy*perpscale, (momvtx.
z() > 0 ? zscale : -zscale));
131 if (pixhit ==
nullptr)
throw cms::Exception(
"LogicError",
"Found a valid hit on the pixel detector which is not a SiPixelRecHit\n");
136 const std::type_info &tid =
typeid(*&hit);
139 assert(matchedHit !=
nullptr);
144 assert(recHit !=
nullptr);
148 assert(precHit !=
nullptr);
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
unsigned int stereoId() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
PixelClusterShapeSeedComparitor(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
SiStripCluster const & monoCluster() const
edm::ESHandle< ClusterShapeHitFilter > filterHandle_
const FastCircle & circle() const
const bool filterAtHelixStage_
BaseTrackerRecHit const * ConstRecHitPointer
edm::EDGetTokenT< SiPixelClusterShapeCache > pixelClusterShapeCacheToken_
GlobalVector momentum() const
const bool filterStripHits_
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
bool isCompatible(const SiPixelRecHit &recHit, const LocalVector &ldir, const SiPixelClusterShapeCache &clusterShapeCache, PixelData const *pd=0) const
GlobalPoint position() const
bool compatible(const SeedingHitSet &hits) const override
SiStripRecHit2D originalHit() const
T const * product() const
T perp2() const
Squared magnitude of transverse component.
~PixelClusterShapeSeedComparitor() override
SiStripCluster const & stereoCluster() const
unsigned int size() const
bool compatibleHit(const TrackingRecHit &hit, const GlobalVector &direction) const
#define DEFINE_EDM_PLUGIN(factory, type, name)
unsigned int monoId() const
const SiPixelClusterShapeCache * pixelClusterShapeCache_
DetId geographicalId() const
void init(const edm::Event &ev, const edm::EventSetup &es) override
const bool filterPixelHits_
GlobalVector globalDirection() const