38 HcalNoiseRBXCollectionTag_(iConfig.getParameter<
edm::
InputTag>(
"HcalNoiseRBXCollection")),
39 TowerCollectionTag_(iConfig.getParameter<
edm::
InputTag>(
"CaloTowerCollection")),
40 severity_(iConfig.getParameter<
int>(
"severity")),
41 maxNumRBXs_(iConfig.getParameter<
int>(
"maxNumRBXs")),
42 numRBXsToConsider_(iConfig.getParameter<
int>(
"numRBXsToConsider")),
43 needEMFCoincidence_(iConfig.getParameter<
bool>(
"needEMFCoincidence")),
44 minRBXEnergy_(iConfig.getParameter<double>(
"minRBXEnergy")),
45 minRatio_(iConfig.getParameter<double>(
"minRatio")),
46 maxRatio_(iConfig.getParameter<double>(
"maxRatio")),
47 minHPDHits_(iConfig.getParameter<
int>(
"minHPDHits")),
48 minRBXHits_(iConfig.getParameter<
int>(
"minRBXHits")),
49 minHPDNoOtherHits_(iConfig.getParameter<
int>(
"minHPDNoOtherHits")),
50 minZeros_(iConfig.getParameter<
int>(
"minZeros")),
51 minHighEHitTime_(iConfig.getParameter<double>(
"minHighEHitTime")),
52 maxHighEHitTime_(iConfig.getParameter<double>(
"maxHighEHitTime")),
53 maxRBXEMF_(iConfig.getParameter<double>(
"maxRBXEMF")),
54 minRecHitE_(iConfig.getParameter<double>(
"minRecHitE")),
55 minLowHitE_(iConfig.getParameter<double>(
"minLowHitE")),
56 minHighHitE_(iConfig.getParameter<double>(
"minHighHitE")),
58 TS4TS5EnergyThreshold_(iConfig.getParameter<double>(
"TS4TS5EnergyThreshold")) {
60 std::vector<double> TS4TS5UpperThresholdTemp = iConfig.
getParameter<std::vector<double> >(
"TS4TS5UpperThreshold");
61 std::vector<double> TS4TS5UpperCutTemp = iConfig.
getParameter<std::vector<double> >(
"TS4TS5UpperCut");
62 std::vector<double> TS4TS5LowerThresholdTemp = iConfig.
getParameter<std::vector<double> >(
"TS4TS5LowerThreshold");
63 std::vector<double> TS4TS5LowerCutTemp = iConfig.
getParameter<std::vector<double> >(
"TS4TS5LowerCut");
65 for (
int i = 0;
i < (
int)TS4TS5UpperThresholdTemp.size() &&
i < (
int)TS4TS5UpperCutTemp.size();
i++)
66 TS4TS5UpperCut_.push_back(std::pair<double, double>(TS4TS5UpperThresholdTemp[
i], TS4TS5UpperCutTemp[
i]));
69 for (
int i = 0;
i < (
int)TS4TS5LowerThresholdTemp.size() &&
i < (
int)TS4TS5LowerCutTemp.size();
i++)
70 TS4TS5LowerCut_.push_back(std::pair<double, double>(TS4TS5LowerThresholdTemp[
i], TS4TS5LowerCutTemp[
i]));
76 if (iConfig.
existsAs<
double>(
"minR45HitE"))
79 produces<CaloTowerCollection>();
88 desc.add<
double>(
"maxTowerNoiseEnergyFraction", 0.5);
89 desc.add<
int>(
"severity", 1);
90 desc.add<
int>(
"maxNumRBXs", 2);
91 desc.add<
int>(
"numRBXsToConsider", 2);
92 desc.add<
bool>(
"needEMFCoincidence",
true);
93 desc.add<
double>(
"minRBXEnergy", 50.0);
94 desc.add<
double>(
"minRatio", -999.);
95 desc.add<
double>(
"maxRatio", 999.);
96 desc.add<
int>(
"minHPDHits", 17);
97 desc.add<
int>(
"minRBXHits", 999);
98 desc.add<
int>(
"minHPDNoOtherHits", 10);
99 desc.add<
int>(
"minZeros", 10);
100 desc.add<
double>(
"minHighEHitTime", -9999.0);
101 desc.add<
double>(
"maxHighEHitTime", 9999.0);
102 desc.add<
double>(
"maxRBXEMF", 0.02);
103 desc.add<
double>(
"minRecHitE", 1.5);
104 desc.add<
double>(
"minLowHitE", 10.0);
105 desc.add<
double>(
"minHighHitE", 25.0);
106 desc.add<
double>(
"minR45HitE", 5.0);
107 desc.add<
double>(
"TS4TS5EnergyThreshold", 50.0);
109 double TS4TS5UpperThresholdArray[5] = {70, 90, 100, 400, 4000};
110 double TS4TS5UpperCutArray[5] = {1, 0.8, 0.75, 0.72, 0.72};
111 double TS4TS5LowerThresholdArray[7] = {100, 120, 150, 200, 300, 400, 500};
112 double TS4TS5LowerCutArray[7] = {-1, -0.7, -0.4, -0.2, -0.08, 0, 0.1};
113 double hltRBXRecHitR45CutsArray[8] = {0.0, 1.0, 0.0, -1.0, 0.0, 0.0, 1.0, -1.0};
114 std::vector<double>
TS4TS5UpperThreshold(TS4TS5UpperThresholdArray, TS4TS5UpperThresholdArray + 5);
115 std::vector<double>
TS4TS5UpperCut(TS4TS5UpperCutArray, TS4TS5UpperCutArray + 5);
116 std::vector<double>
TS4TS5LowerThreshold(TS4TS5LowerThresholdArray, TS4TS5LowerThresholdArray + 7);
117 std::vector<double>
TS4TS5LowerCut(TS4TS5LowerCutArray, TS4TS5LowerCutArray + 7);
118 std::vector<double> hltRBXRecHitR45Cuts(hltRBXRecHitR45CutsArray, hltRBXRecHitR45CutsArray + 8);
124 desc.add<std::vector<double> >(
"hltRBXRecHitR45Cuts", hltRBXRecHitR45Cuts);
125 descriptions.
add(
"hltHcalTowerNoiseCleanerWithrechit",
desc);
133 using namespace reco;
141 std::set<unsigned int> noisyTowers;
144 edm::LogError(
"HLTHcalTowerNoiseCleanerWithrechit") <<
"Input Tower Collection is not Valid";
159 for (
auto const& rbx : *rbxs_h) {
174 for (
auto const& it :
data) {
177 bool passRechitr45 =
true;
178 int r45Count = it.r45Count();
179 double r45Fraction = it.r45Fraction();
180 double r45EnergyFraction = it.r45EnergyFraction();
185 passRechitr45 =
false;
188 bool passFilter =
true;
191 if (it.validRatio() && it.ratio() <
minRatio_)
193 else if (it.validRatio() && it.ratio() >
maxRatio_)
207 else if (passRechitr45 ==
false)
216 LogDebug(
"") <<
"HLTHcalTowerNoiseCleanerWithrechit debug: Found a noisy RBX: "
217 <<
"energy=" << it.energy() <<
"; "
218 <<
"ratio=" << it.ratio() <<
"; "
219 <<
"# RBX hits=" << it.numRBXHits() <<
"; "
220 <<
"# HPD hits=" << it.numHPDHits() <<
"; "
221 <<
"# Zeros=" << it.numZeros() <<
"; "
222 <<
"min time=" << it.minHighEHitTime() <<
"; "
223 <<
"max time=" << it.maxHighEHitTime() <<
"; "
224 <<
"RBX EMF=" << it.RBXEMF() << std::endl;
229 for (noiseTowersIt = noiseTowers.
begin(); noiseTowersIt != noiseTowers.
end(); noiseTowersIt++) {
232 noisyTowers.insert(caloTowerTopology->denseIndex(
id));
243 for (inTowersIt = tower_h->
begin(); inTowersIt != tower_h->
end(); inTowersIt++) {
247 if (noisyTowers.find(caloTowerTopology->denseIndex(
id)) == noisyTowers.end()) {
248 OutputTowers->push_back(*inTowersIt);