55 filterName_(cfg.getParameter<std::
string>(
"ClusterShapeHitFilterName")),
56 pixelClusterShapeCache_(
nullptr),
57 filterAtHelixStage_(cfg.getParameter<bool>(
"FilterAtHelixStage")),
58 filterPixelHits_(cfg.getParameter<bool>(
"FilterPixelHits")),
59 filterStripHits_(cfg.getParameter<bool>(
"FilterStripHits"))
86 assert(hit->isValid() && tsos.
isValid());
106 if(!helix.
isValid())
edm::LogWarning(
"InvalidHelix") <<
"PixelClusterShapeSeedComparitor helix is not valid, result is bad";
112 float x0 = vertex.
x(), y0 = vertex.
y();
113 for (
unsigned int i = 0,
n = hits.
size();
i <
n; ++
i) {
114 auto const &
hit = *hits[
i];
116 float x1 = pos.
x(), y1 = pos.
y(), dx1 = x1 - xc, dy1 = y1 - yc;
119 float perpx = -dy1, perpy = dx1;
120 if (perpx * (x1-x0) + perpy * (y1 - y0) < 0) {
121 perpy = -perpy; perpx = -perpx;
125 float perp2 = perpx*perpx + perpy*perpy;
126 float pmom2 = momvtx.
x()*momvtx.
x() + momvtx.
y()*momvtx.
y(), momz2 = momvtx.
z()*momvtx.
z(), mom2 = pmom2 + momz2;
127 float perpscale =
sqrt(pmom2/mom2 / perp2), zscale =
sqrt((1-pmom2/mom2));
128 GlobalVector gdir(perpx*perpscale, perpy*perpscale, (momvtx.
z() > 0 ? zscale : -zscale));
143 if (pixhit == 0)
throw cms::Exception(
"LogicError",
"Found a valid hit on the pixel detector which is not a SiPixelRecHit\n");
148 const std::type_info &tid =
typeid(*&hit);
151 assert(matchedHit != 0);
160 assert(precHit != 0);
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
virtual bool compatible(const TrajectorySeed &seed) const override
T getParameter(std::string const &) const
unsigned int stereoId() const
virtual bool compatible(const SeedingHitSet &hits, const TrackingRegion ®ion) const override
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) ...
GlobalPoint position() const
SiStripRecHit2D originalHit() const
T const * product() const
T perp2() const
Squared magnitude of transverse component.
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
virtual void init(const edm::Event &ev, const edm::EventSetup &es) override
virtual ~PixelClusterShapeSeedComparitor()
const bool filterPixelHits_
GlobalVector globalDirection() const