|
|
Go to the documentation of this file.
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")
void init(const edm::Event &e, const edm::EventSetup &es) override
edm::Handle< SiPixelClusterShapeCache > thePixelClusterShapeCache
Global3DVector GlobalVector
T curvature(T InversePt, const edm::EventSetup &iSetup)
std::string theShapeFilterLabel_
edm::ESHandle< TrackerTopology > theTTopo
edm::EDGetTokenT< SiPixelClusterShapeCache > thePixelClusterShapeCacheToken
Basic2DVector< double >::MathVector Vector2D
edm::ESHandle< ClusterShapeHitFilter > theShapeFilter
something
Log< level::Error, false > LogError
bool compatible(const SeedingHitSet &hits) const override
Abs< T >::type abs(const T &t)
static const double slope[3]
LowPtClusterShapeSeedComparitor(const edm::ParameterSet &ps, edm::ConsumesCollector &iC)
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
static std::string getInfo(const DetId &id, const TrackerTopology *tTopo)