75 assert(hit->isValid() && tsos.
isValid());
87 edm::LogWarning(
"InvalidHelix") <<
"PixelClusterShapeSeedComparitor helix is not valid, result is bad";
93 float x0 = vertex.
x(), y0 = vertex.
y();
94 for (
unsigned int i = 0,
n = hits.
size();
i <
n; ++
i) {
95 auto const &
hit = *hits[
i];
97 float x1 = pos.
x(),
y1 = pos.
y(), dx1 = x1 - xc, dy1 =
y1 - yc;
100 float perpx = -dy1, perpy = dx1;
101 if (perpx * (x1 - x0) + perpy * (
y1 - y0) < 0) {
107 float perp2 = perpx * perpx + perpy * perpy;
108 float pmom2 = momvtx.
x() * momvtx.
x() + momvtx.
y() * momvtx.
y(), momz2 = momvtx.
z() * momvtx.
z(),
109 mom2 = pmom2 + momz2;
110 float perpscale =
sqrt(pmom2 / mom2 / perp2), zscale =
sqrt((1 - pmom2 / mom2));
111 GlobalVector gdir(perpx * perpscale, perpy * perpscale, (momvtx.
z() > 0 ? zscale : -zscale));
125 if (pixhit ==
nullptr)
126 throw cms::Exception(
"LogicError",
"Found a valid hit on the pixel detector which is not a SiPixelRecHit\n");
132 const std::type_info &tid =
typeid(*&hit);
135 assert(matchedHit !=
nullptr);
140 assert(recHit !=
nullptr);
144 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_
constexpr 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