26 inline float sqr(
float x) {
return x *
x; }
29 inline float areaParallelogram(
const Vector2D&
a,
const Vector2D&
b) {
return a.x() *
b.y() -
a.y() *
b.x(); }
39 LogDebug(
"LowPtClusterShapeSeedComparitor")
40 <<
"the curvature is null:"
41 <<
"\n point1: " <<
g[0] <<
"\n point2: " <<
g[1] <<
"\n point3: " <<
g[2];
48 for (
int i = 0;
i != 3;
i++)
49 p[
i] =
g[
i].basicVector().xy() -
c;
55 float slope = (
g[1].z() -
g[0].z()) / a12;
61 float cosTheta = cotTheta * sinTheta;
63 if (areaParallelogram(
p[0],
p[1]) < 0)
66 for (
int i = 0;
i != 3;
i++) {
76 for (
unsigned int i = 0;
i !=
hits.size(); ++
i)
77 globalPoss[
i] =
hits[
i]->globalPosition();
85 : thePixelClusterShapeCacheToken(
87 theShapeFilterLabel_(ps.getParameter<
std::
string>(
"clusterShapeHitFilter")) {}
104 throw cms::Exception(
"LogicError") <<
"LowPtClusterShapeSeedComparitor: init(EventSetup) method was not called";
108 getGlobalPos(
hits, globalPoss);
113 bool ok = getGlobalDirs(globalPoss, globalDirs);
119 LogDebug(
"LowPtClusterShapeSeedComparitor") <<
"curvarture 0:"
120 <<
"\nnHits: " <<
hits.size() <<
" will say the seed is good anyway.";
124 for (
int i = 0;
i < 3;
i++) {
128 edm::LogError(
"LowPtClusterShapeSeedComparitor") <<
"this is not a pixel cluster";
138 LogDebug(
"LowPtClusterShapeSeedComparitor") <<
"about to compute compatibility."
139 <<
"hit ptr: " << pixelRecHit <<
"global direction:" << globalDirs[
i];
141 if (!
filter->isCompatible(*pixelRecHit, globalDirs[
i], *thePixelClusterShapeCache)) {
142 LogTrace(
"LowPtClusterShapeSeedComparitor")