65 inputTag_ (config.getParameter<
edm::InputTag>(
"inputTag")),
66 minZ_ (config.getParameter<double>(
"minZ")),
67 maxZ_ (config.getParameter<double>(
"maxZ")),
68 zStep_ (config.getParameter<double>(
"zStep")),
69 clusterPars_ (config.getParameter<
std::vector<double> >(
"clusterPars")),
84 desc.
add<
double>(
"minZ",-20.0);
85 desc.
add<
double>(
"maxZ",20.05);
86 desc.
add<
double>(
"zStep",0.2);
87 std::vector<double>
temp; temp.push_back(0.0); temp.push_back(0.0045);
88 desc.
add<std::vector<double> >(
"clusterPars",
temp);
89 desc.
add<
int>(
"nhitsTrunc",150.);
90 desc.
add<
double>(
"clusterTrunc",2.0);
91 descriptions.
add(
"hltPixelClusterShapeFilter",desc);
122 std::vector<VertexHit> vhits;
123 for(
auto const &
hit : hits->
data()) {
133 std::vector<SiPixelCluster::Pixel> pixels(
hit.cluster()->pixels());
134 bool pixelOnEdge =
false;
135 for(std::vector<SiPixelCluster::Pixel>::const_iterator
pixel = pixels.begin();
137 int pixelX =
pixel->x;
138 int pixelY =
pixel->y;
149 hit.localPosition().
y(),
150 hit.localPosition().
z());
155 vh.
w =
hit.cluster()->sizeY();
161 int nhits = 0, nhits_max = 0;
162 double chi = 0, chi_max = 1
e+9;
167 if(nhits > nhits_max) {
171 if(nhits >= nhits_max && chi < chi_max) {
178 int nbest=0, nminus=0, nplus=0;
183 double clusVtxQual=0.0;
184 if ((nminus+nplus)> 0)
185 clusVtxQual = (2.0*nbest)/(nminus+nplus);
187 clusVtxQual = 1000.0;
201 if (clusVtxQual < polyCut) accept =
false;
214 for(
auto hit : hits) {
215 double p = 2 * fabs(
hit.
z - z0)/
hit.r + 0.5;
216 if(fabs(p -
hit.w) <= 1.) {
217 chi += fabs(p -
hit.w);
Point3DBase< Scalar, LocalTag > LocalPoint
virtual bool isItEdgePixelInX(int ixbin) const =0
~HLTPixelClusterShapeFilter() override
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
virtual bool isItEdgePixelInY(int iybin) const =0
int getContainedHits(const std::vector< VertexHit > &hits, double z0, double &chi) const
bool hltFilter(edm::Event &, const edm::EventSetup &, trigger::TriggerFilterObjectWithRefs &filterproduct) const override
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
edm::EDGetTokenT< SiPixelRecHitCollection > inputToken_
#define DEFINE_FWK_MODULE(type)
std::vector< double > clusterPars_
data_type const * data(size_t cell) const
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void makeHLTFilterDescription(edm::ParameterSetDescription &desc)
T const * product() const
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
void addCollectionTag(const edm::InputTag &collectionTag)
collectionTags
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const TrackerGeomDet * idToDet(DetId) const override
HLTPixelClusterShapeFilter(const edm::ParameterSet &)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
T const * product() const
Power< A, B >::type pow(const A &a, const B &b)