30 inline float sqr(
float x) {
return x*
x; }
34 float areaParallelogram
35 (
const Vector2D&
a,
const Vector2D&
b)
37 return a.x() * b.y() - a.y() * b.x();
51 if(0.
f == curvature) {
52 LogDebug(
"LowPtClusterShapeSeedComparitor")<<
"the curvature is null:"
55 <<
"\n point3: "<<g[2];
61 Vector2D
c = circle.center();
62 for(
int i=0;
i!=3;
i++)
63 p[
i] = g[
i].basicVector().xy() -
c;
66 float area =
std::abs(areaParallelogram(p[1] - p[0], p[1]));
68 float a12 = std::asin(
std::min(area*curvature*curvature,1.
f));
70 float slope = (g[1].
z() - g[0].
z()) / a12;
76 float cosTheta = cotTheta*sinTheta;
78 if (areaParallelogram(p[0], p[1] ) < 0) sinTheta = - sinTheta;
80 for(
int i = 0;
i!=3;
i++) {
81 Vector2D vl = p[
i]*(curvature*sinTheta);
97 for(
unsigned int i=0;
i!=hits.
size(); ++
i)
98 globalPoss[
i] = hits[
i]->globalPosition();
112 assert(hits.
size()==3);
115 assert(filter != 0 &&
"LowPtClusterShapeSeedComparitor: init(EventSetup) method was not called");
119 getGlobalPos(hits, globalPoss);
124 bool ok = getGlobalDirs(globalPoss,globalDirs);
131 LogDebug(
"LowPtClusterShapeSeedComparitor")<<
"curvarture 0:"
132 <<
"\nnHits: "<<hits.
size()
133 <<
" will say the seed is good anyway.";
137 for(
int i = 0;
i < 3;
i++)
143 edm::LogError(
"LowPtClusterShapeSeedComparitor")<<
"this is not a pixel cluster";
147 if(!pixelRecHit->isValid())
152 LogDebug(
"LowPtClusterShapeSeedComparitor")<<
"about to compute compatibility."
153 <<
"hit ptr: "<<pixelRecHit
154 <<
"global direction:"<< globalDirs[
i];
157 if(! filter->isCompatible(*pixelRecHit, globalDirs[
i]) )
159 LogTrace(
"LowPtClusterShapeSeedComparitor")
160 <<
" clusShape is not compatible"
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
edm::ESHandle< TrackerTopology > theTTopo
T curvature(T InversePt, const edm::EventSetup &iSetup)
virtual bool compatible(const SeedingHitSet &hits, const TrackingRegion ®ion) const
Abs< T >::type abs(const T &t)
T const * product() const
Square< F >::type sqr(const F &f)
unsigned int size() const
static std::string getInfo(const DetId &id, const TrackerTopology *tTopo)
Global3DVector GlobalVector