|
|
Go to the documentation of this file.
49 : filterName_(
cfg.getParameter<
std::
string>(
"ClusterShapeHitFilterName")),
50 pixelClusterShapeCache_(nullptr),
51 filterAtHelixStage_(
cfg.getParameter<
bool>(
"FilterAtHelixStage")),
52 filterPixelHits_(
cfg.getParameter<
bool>(
"FilterPixelHits")),
53 filterStripHits_(
cfg.getParameter<
bool>(
"FilterStripHits")) {
87 edm::LogWarning(
"InvalidHelix") <<
"PixelClusterShapeSeedComparitor helix is not valid, result is bad";
94 for (
unsigned int i = 0,
n =
hits.size();
i <
n; ++
i) {
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));
121 if (
hit.geographicalId().subdetId() <= 2) {
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);
144 assert(precHit !=
nullptr);
GlobalVector globalDirection() const
unsigned int monoId() const
const bool filterPixelHits_
const bool filterAtHelixStage_
T const * product() const
bool compatibleHit(const TrackingRecHit &hit, const GlobalVector &direction) const
SiStripCluster const & stereoCluster() const
GlobalPoint position() const
PixelClusterShapeSeedComparitor(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
BaseTrackerRecHit const * ConstRecHitPointer
SiStripRecHit2D originalHit() const
bool isCompatible(const SiPixelRecHit &recHit, const LocalVector &ldir, const SiPixelClusterShapeCache &clusterShapeCache, PixelData const *pd=nullptr) const
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
#define DEFINE_EDM_PLUGIN(factory, type, name)
GlobalVector momentum() const
const FastCircle & circle() const
bool compatible(const SeedingHitSet &hits) const override
unsigned int stereoId() const
T perp2() const
Squared magnitude of transverse component.
const bool filterStripHits_
void init(const edm::Event &ev, const edm::EventSetup &es) override
edm::EDGetTokenT< SiPixelClusterShapeCache > pixelClusterShapeCacheToken_
SiStripCluster const & monoCluster() const
~PixelClusterShapeSeedComparitor() override
const SiPixelClusterShapeCache * pixelClusterShapeCache_
edm::ESHandle< ClusterShapeHitFilter > filterHandle_