13 : algo_(conf.getParameter<double>(
"EBThreshold"),
14 conf.getParameter<double>(
"EEThreshold"),
16 conf.getParameter<
bool>(
"UseEtEBTreshold"),
17 conf.getParameter<
bool>(
"UseEtEETreshold"),
18 conf.getParameter<
bool>(
"UseSymEBTreshold"),
19 conf.getParameter<
bool>(
"UseSymEETreshold"),
21 conf.getParameter<double>(
"HcalThreshold"),
22 conf.getParameter<double>(
"HBThreshold"),
23 conf.getParameter<double>(
"HBThreshold1"),
24 conf.getParameter<double>(
"HBThreshold2"),
25 conf.getParameter<double>(
"HESThreshold"),
26 conf.getParameter<double>(
"HESThreshold1"),
27 conf.getParameter<double>(
"HEDThreshold"),
28 conf.getParameter<double>(
"HEDThreshold1"),
29 conf.getParameter<double>(
"HOThreshold0"),
30 conf.getParameter<double>(
"HOThresholdPlus1"),
31 conf.getParameter<double>(
"HOThresholdMinus1"),
32 conf.getParameter<double>(
"HOThresholdPlus2"),
33 conf.getParameter<double>(
"HOThresholdMinus2"),
34 conf.getParameter<double>(
"HF1Threshold"),
35 conf.getParameter<double>(
"HF2Threshold"),
36 conf.getParameter<
std::
vector<double> >(
"EBGrid"),
37 conf.getParameter<
std::
vector<double> >(
"EBWeights"),
38 conf.getParameter<
std::
vector<double> >(
"EEGrid"),
39 conf.getParameter<
std::
vector<double> >(
"EEWeights"),
40 conf.getParameter<
std::
vector<double> >(
"HBGrid"),
41 conf.getParameter<
std::
vector<double> >(
"HBWeights"),
42 conf.getParameter<
std::
vector<double> >(
"HESGrid"),
43 conf.getParameter<
std::
vector<double> >(
"HESWeights"),
44 conf.getParameter<
std::
vector<double> >(
"HEDGrid"),
45 conf.getParameter<
std::
vector<double> >(
"HEDWeights"),
46 conf.getParameter<
std::
vector<double> >(
"HOGrid"),
47 conf.getParameter<
std::
vector<double> >(
"HOWeights"),
48 conf.getParameter<
std::
vector<double> >(
"HF1Grid"),
49 conf.getParameter<
std::
vector<double> >(
"HF1Weights"),
50 conf.getParameter<
std::
vector<double> >(
"HF2Grid"),
51 conf.getParameter<
std::
vector<double> >(
"HF2Weights"),
52 conf.getParameter<double>(
"EBWeight"),
53 conf.getParameter<double>(
"EEWeight"),
54 conf.getParameter<double>(
"HBWeight"),
55 conf.getParameter<double>(
"HESWeight"),
56 conf.getParameter<double>(
"HEDWeight"),
57 conf.getParameter<double>(
"HOWeight"),
58 conf.getParameter<double>(
"HF1Weight"),
59 conf.getParameter<double>(
"HF2Weight"),
60 conf.getParameter<double>(
"EcutTower"),
61 conf.getParameter<double>(
"EBSumThreshold"),
62 conf.getParameter<double>(
"EESumThreshold"),
63 conf.getParameter<
bool>(
"UseHO"),
65 conf.getParameter<
int>(
"MomConstrMethod"),
66 conf.getParameter<double>(
"MomHBDepth"),
67 conf.getParameter<double>(
"MomHEDepth"),
68 conf.getParameter<double>(
"MomEBDepth"),
69 conf.getParameter<double>(
"MomEEDepth"),
70 conf.getParameter<
int>(
"HcalPhase")),
73 allowMissingInputs_(conf.getParameter<
bool>(
"AllowMissingInputs")),
75 theHcalAcceptSeverityLevel_(conf.getParameter<unsigned
int>(
"HcalAcceptSeverityLevel")),
77 theRecoveredHcalHitsAreUsed_(conf.getParameter<
bool>(
"UseHcalRecoveredHits")),
78 theRecoveredEcalHitsAreUsed_(conf.getParameter<
bool>(
"UseEcalRecoveredHits")),
82 useRejectedHitsOnly_(conf.getParameter<
bool>(
"UseRejectedHitsOnly")),
84 theHcalAcceptSeverityLevelForRejectedHit_(
85 conf.getParameter<unsigned
int>(
"HcalAcceptSeverityLevelForRejectedHit")),
87 useRejectedRecoveredHcalHits_(conf.getParameter<
bool>(
"UseRejectedRecoveredHcalHits")),
88 useRejectedRecoveredEcalHits_(conf.getParameter<
bool>(
"UseRejectedRecoveredEcalHits"))
97 tok_geom_ = esConsumes<CaloGeometry, CaloGeometryRecord>();
98 tok_topo_ = esConsumes<HcalTopology, HcalRecNumberingRecord>();
99 tok_cttopo_ = esConsumes<CaloTowerTopology, HcalRecNumberingRecord>();
100 tok_ctmap_ = esConsumes<CaloTowerConstituentsMap, CaloGeometryRecord>();
104 tok_ecalSevAlgo_ = esConsumes<EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd>();
107 for (
unsigned i = 0;
i != nLabels;
i++)
120 const std::vector<std::string> severitynames =
121 conf.
getParameter<std::vector<std::string> >(
"EcalRecHitSeveritiesToBeExcluded");
127 conf.
getParameter<std::vector<std::string> >(
"EcalSeveritiesToBeUsedInBadTowers"));
130 produces<CaloTowerCollection>();
136 << (
allowMissingInputs_ ?
"allowMissing " :
" ") << nLabels <<
' ' << severitynames.size() << std::endl;
210 if (check1 || check2 || check3) {
231 if (!
e.getByToken(*
i, ec_tmp))
267 std::vector<edm::EDGetTokenT<EcalRecHitCollection> >::const_iterator
i;
270 present =
e.getByToken(*
i, ec);
276 auto prod = std::make_unique<CaloTowerCollection>();
285 for (
auto const& tw : (*
prod)) {
286 totc += tw.constituents().size();
289 std::cout <<
"CaloTowerCreator: " << tw.id() <<
" with E " << tw.energy() <<
" and " << tw.constituents().size()
290 <<
" constituents\n";
292 std::cout <<
"VI " << (*prod).size() <<
" " << totc <<
" " << totE <<
" " << totP4 << std::endl;
304 desc.add<
double>(
"EBSumThreshold", 0.2);
305 desc.add<
double>(
"HF2Weight", 1.0);
306 desc.add<
double>(
"EBWeight", 1.0);
307 desc.add<
double>(
"EESumThreshold", 0.45);
308 desc.add<
double>(
"HOThreshold0", 1.1);
309 desc.add<
double>(
"HOThresholdPlus1", 3.5);
310 desc.add<
double>(
"HOThresholdMinus1", 3.5);
311 desc.add<
double>(
"HOThresholdPlus2", 3.5);
312 desc.add<
double>(
"HOThresholdMinus2", 3.5);
313 desc.add<
double>(
"HBThreshold", 0.7);
314 desc.add<
double>(
"HBThreshold1", 0.7);
315 desc.add<
double>(
"HBThreshold2", 0.7);
316 desc.add<
double>(
"HF1Threshold", 0.5);
317 desc.add<
double>(
"HEDWeight", 1.0);
318 desc.add<
double>(
"EEWeight", 1.0);
319 desc.add<
double>(
"HESWeight", 1.0);
320 desc.add<
double>(
"HF1Weight", 1.0);
321 desc.add<
double>(
"HOWeight", 1.0);
322 desc.add<
double>(
"EBThreshold", 0.07);
323 desc.add<
double>(
"EEThreshold", 0.3);
324 desc.add<
double>(
"HcalThreshold", -1000.0);
325 desc.add<
double>(
"HF2Threshold", 0.85);
326 desc.add<
double>(
"HESThreshold", 0.8);
327 desc.add<
double>(
"HESThreshold1", 0.8);
328 desc.add<
double>(
"HEDThreshold", 0.8);
329 desc.add<
double>(
"HEDThreshold1", 0.8);
330 desc.add<
double>(
"EcutTower", -1000.0);
331 desc.add<
double>(
"HBWeight", 1.0);
332 desc.add<
double>(
"MomHBDepth", 0.2);
333 desc.add<
double>(
"MomHEDepth", 0.4);
334 desc.add<
double>(
"MomEBDepth", 0.3);
335 desc.add<
double>(
"MomEEDepth", 0.0);
336 desc.add<
bool>(
"UseHO",
true);
337 desc.add<
bool>(
"UseEtEBTreshold",
false);
338 desc.add<
bool>(
"UseSymEBTreshold",
true);
339 desc.add<
bool>(
"UseEtEETreshold",
false);
340 desc.add<
bool>(
"UseSymEETreshold",
true);
341 desc.add<
bool>(
"UseHcalRecoveredHits",
true);
342 desc.add<
bool>(
"UseEcalRecoveredHits",
false);
343 desc.add<
bool>(
"UseRejectedHitsOnly",
false);
344 desc.add<
bool>(
"UseRejectedRecoveredHcalHits",
true);
345 desc.add<
bool>(
"UseRejectedRecoveredEcalHits",
false);
346 desc.add<
double>(
"missingHcalRescaleFactorForEcal", 0.0);
347 desc.add<
bool>(
"AllowMissingInputs",
false);
348 desc.add<std::vector<double> >(
"HBGrid", {-1.0, 1.0, 10.0, 100.0, 1000.0});
349 desc.add<std::vector<double> >(
"EEWeights", {1.0, 1.0, 1.0, 1.0, 1.0});
350 desc.add<std::vector<double> >(
"HF2Weights", {1.0, 1.0, 1.0, 1.0, 1.0});
351 desc.add<std::vector<double> >(
"HOWeights", {1.0, 1.0, 1.0, 1.0, 1.0});
352 desc.add<std::vector<double> >(
"EEGrid", {-1.0, 1.0, 10.0, 100.0, 1000.0});
353 desc.add<std::vector<double> >(
"HBWeights", {1.0, 1.0, 1.0, 1.0, 1.0});
354 desc.add<std::vector<double> >(
"HF2Grid", {-1.0, 1.0, 10.0, 100.0, 1000.0});
355 desc.add<std::vector<double> >(
"HEDWeights", {1.0, 1.0, 1.0, 1.0, 1.0});
356 desc.add<std::vector<double> >(
"HF1Grid", {-1.0, 1.0, 10.0, 100.0, 1000.0});
357 desc.add<std::vector<double> >(
"EBWeights", {1.0, 1.0, 1.0, 1.0, 1.0});
358 desc.add<std::vector<double> >(
"HF1Weights", {1.0, 1.0, 1.0, 1.0, 1.0});
359 desc.add<std::vector<double> >(
"HESGrid", {-1.0, 1.0, 10.0, 100.0, 1000.0});
360 desc.add<std::vector<double> >(
"HESWeights", {1.0, 1.0, 1.0, 1.0, 1.0});
361 desc.add<std::vector<double> >(
"HEDGrid", {-1.0, 1.0, 10.0, 100.0, 1000.0});
362 desc.add<std::vector<double> >(
"HOGrid", {-1.0, 1.0, 10.0, 100.0, 1000.0});
363 desc.add<std::vector<double> >(
"EBGrid", {-1.0, 1.0, 10.0, 100.0, 1000.0});
367 desc.add<std::vector<edm::InputTag> >(
369 desc.add<
int>(
"MomConstrMethod", 1);
370 desc.add<
unsigned int>(
"HcalAcceptSeverityLevel", 9);
371 desc.add<std::vector<std::string> >(
"EcalRecHitSeveritiesToBeExcluded", {
"kTime",
"kWeird",
"kBad"});
372 desc.add<
unsigned int>(
"HcalAcceptSeverityLevelForRejectedHit", 9999);
373 desc.add<std::vector<std::string> >(
"EcalSeveritiesToBeUsedInBadTowers", {});
374 desc.add<
int>(
"HcalPhase", 0);