18 inputTag_ (config.getParameter<
edm::InputTag>(
"inputTag")),
19 min_asym_ (config.getParameter<double>(
"MinAsym")),
20 max_asym_ (config.getParameter<double>(
"MaxAsym")),
21 clus_thresh_ (config.getParameter<double>(
"MinCharge")),
22 bmincharge_ (config.getParameter<double>(
"MinBarrel"))
27 LogDebug(
"") <<
"Mean cluster charge in the barrel should be higher than" <<
bmincharge_ <<
" electrons ";
28 LogDebug(
"") <<
"Only clusters with a charge larger than " <<
clus_thresh_ <<
" electrons will be used ";
38 desc.
add<
double>(
"MinAsym",0.);
39 desc.
add<
double>(
"MaxAsym",1.);
40 desc.
add<
double>(
"MinCharge",4000.);
41 desc.
add<
double>(
"MinBarrel",10000.);
42 descriptions.
add(
"hltPixelAsymmetryFilter",desc);
63 unsigned int clusterSize = clusterColl->dataSize();
64 LogDebug(
"") <<
"Number of clusters accepted: " << clusterSize;
66 bool accept = (clusterSize >= 2);
68 if (!accept)
return accept;
70 double asym_pix_1 = -1;
71 double asym_pix_2 = -1;
73 int n_clus[3] = {0,0,0};
74 double e_clus[3] = {0.,0.,0.};
80 uint32_t detid = DSViter->id();
104 if (detpos<0)
continue;
111 e_clus[detpos]+=iter->charge();
116 for (
int i=0;
i<3;++
i)
119 e_clus[
i] /= n_clus[
i];
125 if (e_clus[0]+e_clus[2] != 0)
127 asym_pix_1 = e_clus[0]/(e_clus[0]+e_clus[2]);
128 asym_pix_2 = e_clus[2]/(e_clus[0]+e_clus[2]);
135 bool pkam_1 = (asym_pix_1 <= max_asym_ && asym_pix_1 >=
min_asym_);
136 bool pkam_2 = (asym_pix_2 <= max_asym_ && asym_pix_2 >=
min_asym_);
138 if (pkam_1 || pkam_2)
return accept;
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
bool hltFilter(edm::Event &, const edm::EventSetup &, trigger::TriggerFilterObjectWithRefs &filterproduct) const override
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > inputToken_
HLTPixelAsymmetryFilter(const edm::ParameterSet &)
data_type const * const_iterator
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
#define DEFINE_FWK_MODULE(type)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void makeHLTFilterDescription(edm::ParameterSetDescription &desc)
void addCollectionTag(const edm::InputTag &collectionTag)
collectionTags
void add(std::string const &label, ParameterSetDescription const &psetDescription)
~HLTPixelAsymmetryFilter() override
static int position[264][3]
HalfCylinder halfCylinder() const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)