37 HcalNoiseRBXCollectionTag_(iConfig.getParameter<
edm::
InputTag>(
"HcalNoiseRBXCollection")),
38 TowerCollectionTag_(iConfig.getParameter<
edm::
InputTag>(
"CaloTowerCollection")),
39 severity_(iConfig.getParameter<
int>(
"severity")),
40 maxNumRBXs_(iConfig.getParameter<
int>(
"maxNumRBXs")),
41 numRBXsToConsider_(iConfig.getParameter<
int>(
"numRBXsToConsider")),
42 needEMFCoincidence_(iConfig.getParameter<
bool>(
"needEMFCoincidence")),
43 minRBXEnergy_(iConfig.getParameter<double>(
"minRBXEnergy")),
44 minRatio_(iConfig.getParameter<double>(
"minRatio")),
45 maxRatio_(iConfig.getParameter<double>(
"maxRatio")),
46 minHPDHits_(iConfig.getParameter<
int>(
"minHPDHits")),
47 minRBXHits_(iConfig.getParameter<
int>(
"minRBXHits")),
48 minHPDNoOtherHits_(iConfig.getParameter<
int>(
"minHPDNoOtherHits")),
49 minZeros_(iConfig.getParameter<
int>(
"minZeros")),
50 minHighEHitTime_(iConfig.getParameter<double>(
"minHighEHitTime")),
51 maxHighEHitTime_(iConfig.getParameter<double>(
"maxHighEHitTime")),
52 maxRBXEMF_(iConfig.getParameter<double>(
"maxRBXEMF")),
53 minRecHitE_(iConfig.getParameter<double>(
"minRecHitE")),
54 minLowHitE_(iConfig.getParameter<double>(
"minLowHitE")),
55 minHighHitE_(iConfig.getParameter<double>(
"minHighHitE")),
57 TS4TS5EnergyThreshold_(iConfig.getParameter<double>(
"TS4TS5EnergyThreshold")) {
58 std::vector<double> TS4TS5UpperThresholdTemp = iConfig.
getParameter<std::vector<double> >(
"TS4TS5UpperThreshold");
59 std::vector<double> TS4TS5UpperCutTemp = iConfig.
getParameter<std::vector<double> >(
"TS4TS5UpperCut");
60 std::vector<double> TS4TS5LowerThresholdTemp = iConfig.
getParameter<std::vector<double> >(
"TS4TS5LowerThreshold");
61 std::vector<double> TS4TS5LowerCutTemp = iConfig.
getParameter<std::vector<double> >(
"TS4TS5LowerCut");
63 for (
int i = 0;
i < (
int)TS4TS5UpperThresholdTemp.size() &&
i < (
int)TS4TS5UpperCutTemp.size();
i++)
64 TS4TS5UpperCut_.push_back(std::pair<double, double>(TS4TS5UpperThresholdTemp[
i], TS4TS5UpperCutTemp[
i]));
67 for (
int i = 0;
i < (
int)TS4TS5LowerThresholdTemp.size() &&
i < (
int)TS4TS5LowerCutTemp.size();
i++)
68 TS4TS5LowerCut_.push_back(std::pair<double, double>(TS4TS5LowerThresholdTemp[
i], TS4TS5LowerCutTemp[
i]));
74 if (iConfig.
existsAs<
double>(
"minR45HitE"))
77 produces<CaloTowerCollection>();
86 desc.add<
double>(
"maxTowerNoiseEnergyFraction", 0.5);
87 desc.add<
int>(
"severity", 1);
88 desc.add<
int>(
"maxNumRBXs", 2);
89 desc.add<
int>(
"numRBXsToConsider", 2);
90 desc.add<
bool>(
"needEMFCoincidence",
true);
91 desc.add<
double>(
"minRBXEnergy", 50.0);
92 desc.add<
double>(
"minRatio", -999.);
93 desc.add<
double>(
"maxRatio", 999.);
94 desc.add<
int>(
"minHPDHits", 17);
95 desc.add<
int>(
"minRBXHits", 999);
96 desc.add<
int>(
"minHPDNoOtherHits", 10);
97 desc.add<
int>(
"minZeros", 10);
98 desc.add<
double>(
"minHighEHitTime", -9999.0);
99 desc.add<
double>(
"maxHighEHitTime", 9999.0);
100 desc.add<
double>(
"maxRBXEMF", 0.02);
101 desc.add<
double>(
"minRecHitE", 1.5);
102 desc.add<
double>(
"minLowHitE", 10.0);
103 desc.add<
double>(
"minHighHitE", 25.0);
104 desc.add<
double>(
"minR45HitE", 5.0);
105 desc.add<
double>(
"TS4TS5EnergyThreshold", 50.0);
107 double TS4TS5UpperThresholdArray[5] = {70, 90, 100, 400, 4000};
108 double TS4TS5UpperCutArray[5] = {1, 0.8, 0.75, 0.72, 0.72};
109 double TS4TS5LowerThresholdArray[7] = {100, 120, 150, 200, 300, 400, 500};
110 double TS4TS5LowerCutArray[7] = {-1, -0.7, -0.4, -0.2, -0.08, 0, 0.1};
111 std::vector<double>
TS4TS5UpperThreshold(TS4TS5UpperThresholdArray, TS4TS5UpperThresholdArray + 5);
112 std::vector<double>
TS4TS5UpperCut(TS4TS5UpperCutArray, TS4TS5UpperCutArray + 5);
113 std::vector<double>
TS4TS5LowerThreshold(TS4TS5LowerThresholdArray, TS4TS5LowerThresholdArray + 7);
114 std::vector<double>
TS4TS5LowerCut(TS4TS5LowerCutArray, TS4TS5LowerCutArray + 7);
120 descriptions.
add(
"hltHcalTowerNoiseCleaner",
desc);
128 using namespace reco;
134 std::set<unsigned int> noisyTowers;
137 edm::LogError(
"HLTHcalTowerNoiseCleaner") <<
"Input Tower Collection is not Valid";
155 for (
auto const& rbx : *rbxs_h) {
170 for (
auto const& it :
data) {
171 bool passFilter =
true;
174 if (it.validRatio() && it.ratio() <
minRatio_)
176 else if (it.validRatio() && it.ratio() >
maxRatio_)
190 else if (!it.PassTS4TS5())
200 LogDebug(
"") <<
"HLTHcalTowerNoiseCleaner debug: Found a noisy RBX: "
201 <<
"energy=" << it.energy() <<
"; "
202 <<
"ratio=" << it.ratio() <<
"; "
203 <<
"# RBX hits=" << it.numRBXHits() <<
"; "
204 <<
"# HPD hits=" << it.numHPDHits() <<
"; "
205 <<
"# Zeros=" << it.numZeros() <<
"; "
206 <<
"min time=" << it.minHighEHitTime() <<
"; "
207 <<
"max time=" << it.maxHighEHitTime() <<
"; "
208 <<
"passTS4TS5=" << it.PassTS4TS5() <<
"; "
209 <<
"RBX EMF=" << it.RBXEMF() << std::endl;
214 for (noiseTowersIt = noiseTowers.
begin(); noiseTowersIt != noiseTowers.
end(); noiseTowersIt++) {
217 noisyTowers.insert(caloTowerTopology->denseIndex(
id));
228 for (inTowersIt = tower_h->
begin(); inTowersIt != tower_h->
end(); inTowersIt++) {
231 if (noisyTowers.find(caloTowerTopology->denseIndex(
id)) == noisyTowers.end()) {
232 OutputTowers->push_back(*inTowersIt);