33 std::pair<Partition,int> hpdId (
HcalDetId fId) {
34 int hpd = fId.
iphi ();
37 partition = fId.
ieta() > 0 ? HBP : HBM;
40 partition = fId.
ieta() > 0 ? HEP : HEM;
41 if ((fId.
iphi ()-1) % 4 < 2) {
50 if (fId.
depth () == 1 || fId.
depth () == 3) hpd += 1;
65 if (fId.
depth () == 2) hpd += 1;
72 return std::pair<Partition,int> (partition, hpd);
77 mInputTag (iConfig.getParameter <
edm::InputTag> (
"inputTag")),
78 mEnergyThreshold (iConfig.getParameter <double> (
"energy")),
79 mHPDSpikeEnergyThreshold (iConfig.getParameter <double> (
"hpdSpikeEnergy")),
80 mHPDSpikeIsolationEnergyThreshold (iConfig.getParameter <double> (
"hpdSpikeIsolationEnergy")),
81 mRBXSpikeEnergyThreshold (iConfig.getParameter <double> (
"rbxSpikeEnergy")),
82 mRBXSpikeUnbalanceThreshold (iConfig.getParameter <double> (
"rbxSpikeUnbalance"))
93 desc.
add<
double>(
"energy",-99.0);
94 desc.
add<
double>(
"hpdSpikeEnergy",10.0);
95 desc.
add<
double>(
"hpdSpikeIsolationEnergy",1.0);
96 desc.
add<
double>(
"rbxSpikeEnergy",50.0);
97 desc.
add<
double>(
"rbxSpikeUnbalance",0.2);
98 descriptions.
add(
"hltHPDFilter",desc);
109 float hpdEnergy[4][73];
110 for (
auto &
i : hpdEnergy)
for (
size_t j = 0; j < 73; ++j)
i[j] = 0;
113 for (
unsigned i = 0;
i < hbhe->
size(); ++
i) {
115 std::pair<Partition,int> hpd = hpdId ((*hbhe)[
i].
id());
116 hpdEnergy[
int (hpd.first)][hpd.second] += (*hbhe)[
i].energy ();
122 for (
auto & partition : hpdEnergy) {
123 for (
size_t i = 1;
i < 73; ++
i) {
126 if (hpdPlus == 73) hpdPlus = 1;
127 int hpdMinus =
i - 1;
128 if (hpdMinus == 0) hpdMinus = 72;
129 double maxNeighborEnergy = fmax (partition[hpdPlus], partition[hpdMinus]);
138 for (
auto & partition : hpdEnergy) {
139 for (
size_t rbx = 1; rbx < 19; ++rbx) {
140 int ifirst = (rbx-1)*4-1;
141 int iend = (rbx-1)*4+3;
144 double totalEnergy = 0;
145 for (
int irm = ifirst; irm < iend; ++irm) {
147 if (hpd <= 0) hpd = 72 + hpd;
148 totalEnergy += partition[hpd];
149 if (minEnergy > maxEnergy) {
150 minEnergy = maxEnergy = partition[hpd];
153 if (partition[hpd] < minEnergy) minEnergy = partition[hpd];
154 if (partition[hpd] > maxEnergy) maxEnergy = partition[hpd];
HcalSubdetector subdet() const
get the subdetector
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< HBHERecHitCollection > m_theRecHitCollectionToken
bool filter(edm::Event &, const edm::EventSetup &) override
HLTHPDFilter(const edm::ParameterSet &)
double mRBXSpikeEnergyThreshold
int depth() const
get the tower depth
int ieta() const
get the cell ieta
double mHPDSpikeIsolationEnergyThreshold
ParameterDescriptionBase * add(U const &iLabel, T const &value)
double mRBXSpikeUnbalanceThreshold
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
int iphi() const
get the cell iphi
double mHPDSpikeEnergyThreshold
void add(std::string const &label, ParameterSetDescription const &psetDescription)