32 inline float sqr(
float x) {
return x*
x; }
36 float areaParallelogram
37 (
const Vector2D&
a,
const Vector2D&
b)
39 return a.x() * b.y() - a.y() * b.x();
53 if(0.
f == curvature) {
54 LogDebug(
"LowPtClusterShapeSeedComparitor")<<
"the curvature is null:"
57 <<
"\n point3: "<<g[2];
63 Vector2D
c = circle.center();
64 for(
int i=0;
i!=3;
i++)
65 p[
i] = g[
i].basicVector().xy() -
c;
68 float area =
std::abs(areaParallelogram(p[1] - p[0], p[1]));
70 float a12 = std::asin(
std::min(area*curvature*curvature,1.
f));
72 float slope = (g[1].
z() - g[0].
z()) / a12;
78 float cosTheta = cotTheta*sinTheta;
80 if (areaParallelogram(p[0], p[1] ) < 0) sinTheta = - sinTheta;
82 for(
int i = 0;
i!=3;
i++) {
83 Vector2D vl = p[
i]*(curvature*sinTheta);
99 for(
unsigned int i=0;
i!=hits.
size(); ++
i)
100 globalPoss[
i] = hits[
i]->globalPosition();
107 thePixelClusterShapeCacheToken(iC.consumes<
SiPixelClusterShapeCache>(ps.getParameter<edm::InputTag>(
"clusterShapeCacheSrc")))
121 assert(hits.
size()==3);
124 assert(filter != 0 &&
"LowPtClusterShapeSeedComparitor: init(EventSetup) method was not called");
128 getGlobalPos(hits, globalPoss);
133 bool ok = getGlobalDirs(globalPoss,globalDirs);
140 LogDebug(
"LowPtClusterShapeSeedComparitor")<<
"curvarture 0:"
141 <<
"\nnHits: "<<hits.
size()
142 <<
" will say the seed is good anyway.";
146 for(
int i = 0;
i < 3;
i++)
152 edm::LogError(
"LowPtClusterShapeSeedComparitor")<<
"this is not a pixel cluster";
161 LogDebug(
"LowPtClusterShapeSeedComparitor")<<
"about to compute compatibility."
162 <<
"hit ptr: "<<pixelRecHit
163 <<
"global direction:"<< globalDirs[
i];
168 LogTrace(
"LowPtClusterShapeSeedComparitor")
169 <<
" clusShape is not compatible"
bool getByToken(EDGetToken token, Handle< PROD > &result) const
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)
LowPtClusterShapeSeedComparitor(const edm::ParameterSet &ps, edm::ConsumesCollector &iC)
edm::Handle< SiPixelClusterShapeCache > thePixelClusterShapeCache
virtual void init(const edm::Event &e, const edm::EventSetup &es)
edm::EDGetTokenT< SiPixelClusterShapeCache > thePixelClusterShapeCacheToken
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