18 inline float sqr(
float x) {
return x*
x; }
24 theClusterShapeCache(cache),
51 return a.
x() * b.
y() - a.
y() * b.
x();
56 (
const vector<GlobalPoint> &
g)
const 59 vector<Global2DVector>
p;
60 for(vector<GlobalPoint>::const_iterator ig = g.begin();
65 vector<GlobalVector> globalDirs;
74 float rad2 = (p[0] -
c).
mag2();
77 float slope = (g[1].z() - g[0].z()) / a12;
79 float cotTheta = slope * circle.
curvature();
80 float coshEta =
sqrt(1 +
sqr(cotTheta));
83 float sinTheta = 1. / coshEta;
84 float cosTheta = cotTheta * sinTheta;
91 for(vector<Global2DVector>::const_iterator ip = p.begin();
106 (
const vector<const TrackingRecHit *> & recHits)
const 108 vector<GlobalPoint> globalPoss;
110 for(vector<const TrackingRecHit *>::const_iterator
recHit = recHits.begin();
114 DetId detId = (*recHit)->geographicalId();
119 globalPoss.push_back(gpos);
128 const vector<const TrackingRecHit *> & recHits)
const 131 if(recHits.size() <= 2)
return true;
138 <<
" [ClusterShapeTrackFilter] pt not in range: " 148 if ( globalDirs.empty() )
return false;
154 for(
unsigned int i = 0;
i < recHits.size();
i++)
167 <<
" [ClusterShapeTrackFilter] clusShape problem"
static const double slope[3]
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
~ClusterShapeTrackFilter() override
const TrackerGeometry * theTracker
ClusterShapeTrackFilter(const SiPixelClusterShapeCache *cache, double ptmin, double ptmax, const edm::EventSetup &es)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
T curvature(T InversePt, const edm::EventSetup &iSetup)
const ClusterShapeHitFilter * theFilter
double pt() const
track transverse momentum
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
std::vector< GlobalPoint > getGlobalPoss(const std::vector< const TrackingRecHit * > &recHits) const
T y() const
Cartesian y coordinate.
bool isCompatible(const SiPixelRecHit &recHit, const LocalVector &ldir, const SiPixelClusterShapeCache &clusterShapeCache, PixelData const *pd=0) const
float areaParallelogram(const Global2DVector &a, const Global2DVector &b) const
const TrackerTopology * tTopo
std::vector< GlobalVector > getGlobalDirs(const std::vector< GlobalPoint > &globalPoss) const
const TrackerGeomDet * idToDet(DetId) const override
const SiPixelClusterShapeCache * theClusterShapeCache
static std::string getInfo(const DetId &id, const TrackerTopology *tTopo)
T const * product() const
T x() const
Cartesian x coordinate.
Global3DVector GlobalVector