29 inline float sqr(
float x) {
return x*
x; }
33 float areaParallelogram
34 (
const Vector2D&
a,
const Vector2D&
b)
36 return a.x() * b.y() - a.y() * b.x();
50 if(0.
f == curvature) {
51 LogDebug(
"LowPtClusterShapeSeedComparitor")<<
"the curvature is null:"
54 <<
"\n point3: "<<g[2];
60 Vector2D
c = circle.center();
61 for(
int i=0;
i!=3;
i++)
62 p[
i] = g[
i].basicVector().xy() -
c;
65 float area =
std::abs(areaParallelogram(p[1] - p[0], p[1]));
67 float a12 = std::asin(
std::min(area*curvature*curvature,1.
f));
69 float slope = (g[1].
z() - g[0].
z()) / a12;
75 float cosTheta = cotTheta*sinTheta;
77 if (areaParallelogram(p[0], p[1] ) < 0) sinTheta = - sinTheta;
79 for(
int i = 0;
i!=3;
i++) {
80 Vector2D vl = p[
i]*(curvature*sinTheta);
96 for(
unsigned int i=0;
i!=hits.
size(); ++
i)
97 globalPoss[
i] = hits[
i]->globalPosition();
110 assert(hits.
size()==3);
113 assert(filter != 0 &&
"LowPtClusterShapeSeedComparitor: init(EventSetup) method was not called");
117 getGlobalPos(hits, globalPoss);
122 bool ok = getGlobalDirs(globalPoss,globalDirs);
129 LogDebug(
"LowPtClusterShapeSeedComparitor")<<
"curvarture 0:"
130 <<
"\nnHits: "<<hits.
size()
131 <<
" will say the seed is good anyway.";
135 for(
int i = 0;
i < 3;
i++)
141 edm::LogError(
"LowPtClusterShapeSeedComparitor")<<
"this is not a pixel cluster";
150 LogDebug(
"LowPtClusterShapeSeedComparitor")<<
"about to compute compatibility."
151 <<
"hit ptr: "<<pixelRecHit
152 <<
"global direction:"<< globalDirs[
i];
155 if(! filter->isCompatible(*pixelRecHit, globalDirs[
i]) )
157 LogTrace(
"LowPtClusterShapeSeedComparitor")
158 <<
" clusShape is not compatible"
static std::string getInfo(const DetId &id)
virtual void init(const edm::EventSetup &es)
static const double slope[3]
edm::ESHandle< ClusterShapeHitFilter > theShapeFilter
something
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)
virtual bool compatible(const SeedingHitSet &hits, const TrackingRegion ®ion) const
T const * product() const
Square< F >::type sqr(const F &f)
unsigned int size() const
Global3DVector GlobalVector