51 : filterName_(
cfg.getParameter<
std::
string>(
"ClusterShapeHitFilterName")),
53 pixelClusterShapeCache_(nullptr),
54 filterAtHelixStage_(
cfg.getParameter<
bool>(
"FilterAtHelixStage")),
55 filterPixelHits_(
cfg.getParameter<
bool>(
"FilterPixelHits")),
56 filterStripHits_(
cfg.getParameter<
bool>(
"FilterStripHits")) {
90 edm::LogWarning(
"InvalidHelix") <<
"PixelClusterShapeSeedComparitor helix is not valid, result is bad";
97 for (
unsigned int i = 0,
n =
hits.size();
i <
n; ++
i) {
103 float perpx = -dy1, perpy = dx1;
104 if (perpx * (
x1 - x0) + perpy * (
y1 - y0) < 0) {
110 float perp2 = perpx * perpx + perpy * perpy;
111 float pmom2 = momvtx.
x() * momvtx.
x() + momvtx.
y() * momvtx.
y(), momz2 = momvtx.
z() * momvtx.
z(),
112 mom2 = pmom2 + momz2;
113 float perpscale =
sqrt(pmom2 / mom2 /
perp2), zscale =
sqrt((1 - pmom2 / mom2));
114 GlobalVector gdir(perpx * perpscale, perpy * perpscale, (momvtx.
z() > 0 ? zscale : -zscale));
124 if (
hit.geographicalId().subdetId() <= 2) {
128 if (pixhit ==
nullptr)
129 throw cms::Exception(
"LogicError",
"Found a valid hit on the pixel detector which is not a SiPixelRecHit\n");
135 const std::type_info &tid =
typeid(*&
hit);
138 assert(matchedHit !=
nullptr);
148 assert(precHit !=
nullptr);
bool compatible(const SeedingHitSet &hits) const override
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
bool compatibleHit(const TrackingRecHit &hit, const GlobalVector &direction) const
GlobalPoint position() const
PixelClusterShapeSeedComparitor(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
T const * product() const
const FastCircle & circle() const
unsigned int stereoId() const
bool isCompatible(const SiPixelRecHit &recHit, const LocalVector &ldir, const SiPixelClusterShapeCache &clusterShapeCache, PixelData const *pd=nullptr) const
T perp2() const
Squared magnitude of transverse component.
const bool filterAtHelixStage_
GlobalVector momentum() const
BaseTrackerRecHit const * ConstRecHitPointer
edm::EDGetTokenT< SiPixelClusterShapeCache > pixelClusterShapeCacheToken_
SiStripCluster const & monoCluster() const
const edm::ESGetToken< ClusterShapeHitFilter, CkfComponentsRecord > clusterShapeHitFilterESToken_
const bool filterStripHits_
bool getData(T &iHolder) const
unsigned int monoId() const
GlobalVector globalDirection() const
SiStripCluster const & stereoCluster() const
~PixelClusterShapeSeedComparitor() override
SiStripRecHit2D originalHit() const
const ClusterShapeHitFilter * clusterShapeHitFilter_
#define DEFINE_EDM_PLUGIN(factory, type, name)
const SiPixelClusterShapeCache * pixelClusterShapeCache_
void init(const edm::Event &ev, const edm::EventSetup &es) override
const bool filterPixelHits_