14 : algo_(conf.getParameter<double>(
"EBThreshold"),
15 conf.getParameter<double>(
"EEThreshold"),
17 conf.getParameter<
bool>(
"UseEtEBTreshold"),
18 conf.getParameter<
bool>(
"UseEtEETreshold"),
19 conf.getParameter<
bool>(
"UseSymEBTreshold"),
20 conf.getParameter<
bool>(
"UseSymEETreshold"),
22 conf.getParameter<double>(
"HcalThreshold"),
23 conf.getParameter<double>(
"HBThreshold"),
24 conf.getParameter<double>(
"HBThreshold1"),
25 conf.getParameter<double>(
"HBThreshold2"),
26 conf.getParameter<double>(
"HESThreshold"),
27 conf.getParameter<double>(
"HESThreshold1"),
28 conf.getParameter<double>(
"HEDThreshold"),
29 conf.getParameter<double>(
"HEDThreshold1"),
30 conf.getParameter<double>(
"HOThreshold0"),
31 conf.getParameter<double>(
"HOThresholdPlus1"),
32 conf.getParameter<double>(
"HOThresholdMinus1"),
33 conf.getParameter<double>(
"HOThresholdPlus2"),
34 conf.getParameter<double>(
"HOThresholdMinus2"),
35 conf.getParameter<double>(
"HF1Threshold"),
36 conf.getParameter<double>(
"HF2Threshold"),
37 conf.getParameter<
std::vector<double> >(
"EBGrid"),
38 conf.getParameter<
std::vector<double> >(
"EBWeights"),
39 conf.getParameter<
std::vector<double> >(
"EEGrid"),
40 conf.getParameter<
std::vector<double> >(
"EEWeights"),
41 conf.getParameter<
std::vector<double> >(
"HBGrid"),
42 conf.getParameter<
std::vector<double> >(
"HBWeights"),
43 conf.getParameter<
std::vector<double> >(
"HESGrid"),
44 conf.getParameter<
std::vector<double> >(
"HESWeights"),
45 conf.getParameter<
std::vector<double> >(
"HEDGrid"),
46 conf.getParameter<
std::vector<double> >(
"HEDWeights"),
47 conf.getParameter<
std::vector<double> >(
"HOGrid"),
48 conf.getParameter<
std::vector<double> >(
"HOWeights"),
49 conf.getParameter<
std::vector<double> >(
"HF1Grid"),
50 conf.getParameter<
std::vector<double> >(
"HF1Weights"),
51 conf.getParameter<
std::vector<double> >(
"HF2Grid"),
52 conf.getParameter<
std::vector<double> >(
"HF2Weights"),
53 conf.getParameter<double>(
"EBWeight"),
54 conf.getParameter<double>(
"EEWeight"),
55 conf.getParameter<double>(
"HBWeight"),
56 conf.getParameter<double>(
"HESWeight"),
57 conf.getParameter<double>(
"HEDWeight"),
58 conf.getParameter<double>(
"HOWeight"),
59 conf.getParameter<double>(
"HF1Weight"),
60 conf.getParameter<double>(
"HF2Weight"),
61 conf.getParameter<double>(
"EcutTower"),
62 conf.getParameter<double>(
"EBSumThreshold"),
63 conf.getParameter<double>(
"EESumThreshold"),
64 conf.getParameter<
bool>(
"UseHO"),
66 conf.getParameter<
int>(
"MomConstrMethod"),
67 conf.getParameter<double>(
"MomHBDepth"),
68 conf.getParameter<double>(
"MomHEDepth"),
69 conf.getParameter<double>(
"MomEBDepth"),
70 conf.getParameter<double>(
"MomEEDepth"),
71 conf.getParameter<
int>(
"HcalPhase")),
73 ecalLabels_(conf.getParameter<
std::vector<
edm::
InputTag> >(
"ecalInputs")),
74 allowMissingInputs_(conf.getParameter<
bool>(
"AllowMissingInputs")),
76 theHcalAcceptSeverityLevel_(conf.getParameter<unsigned
int>(
"HcalAcceptSeverityLevel")),
78 theRecoveredHcalHitsAreUsed_(conf.getParameter<
bool>(
"UseHcalRecoveredHits")),
79 theRecoveredEcalHitsAreUsed_(conf.getParameter<
bool>(
"UseEcalRecoveredHits")),
83 useRejectedHitsOnly_(conf.getParameter<
bool>(
"UseRejectedHitsOnly")),
85 theHcalAcceptSeverityLevelForRejectedHit_(
86 conf.getParameter<unsigned
int>(
"HcalAcceptSeverityLevelForRejectedHit")),
88 useRejectedRecoveredHcalHits_(conf.getParameter<
bool>(
"UseRejectedRecoveredHcalHits")),
89 useRejectedRecoveredEcalHits_(conf.getParameter<
bool>(
"UseRejectedRecoveredEcalHits"))
100 for (
unsigned i = 0;
i != nLabels;
i++)
113 const std::vector<std::string> severitynames =
114 conf.
getParameter<std::vector<std::string> >(
"EcalRecHitSeveritiesToBeExcluded");
120 conf.
getParameter<std::vector<std::string> >(
"EcalSeveritiesToBeUsedInBadTowers"));
123 produces<CaloTowerCollection>();
129 << (
allowMissingInputs_ ?
"allowMissing " :
" ") << nLabels <<
' ' << severitynames.size() << std::endl;
211 if (check1 || check2 || check3) {
268 std::vector<edm::EDGetTokenT<EcalRecHitCollection> >::const_iterator
i;
277 auto prod = std::make_unique<CaloTowerCollection>();
286 for (
auto const& tw : (*
prod)) {
287 totc += tw.constituents().size();
290 std::cout <<
"CaloTowerCreator: " << tw.id() <<
" with E " << tw.energy() <<
" and " << tw.constituents().size()
291 <<
" constituents\n";
293 std::cout <<
"VI " << (*prod).size() <<
" " << totc <<
" " << totE <<
" " << totP4 << std::endl;
305 desc.
add<
double>(
"EBSumThreshold", 0.2);
306 desc.
add<
double>(
"HF2Weight", 1.0);
307 desc.
add<
double>(
"EBWeight", 1.0);
308 desc.
add<
double>(
"EESumThreshold", 0.45);
309 desc.
add<
double>(
"HOThreshold0", 1.1);
310 desc.
add<
double>(
"HOThresholdPlus1", 3.5);
311 desc.
add<
double>(
"HOThresholdMinus1", 3.5);
312 desc.
add<
double>(
"HOThresholdPlus2", 3.5);
313 desc.
add<
double>(
"HOThresholdMinus2", 3.5);
314 desc.
add<
double>(
"HBThreshold", 0.7);
315 desc.
add<
double>(
"HBThreshold1", 0.7);
316 desc.
add<
double>(
"HBThreshold2", 0.7);
317 desc.
add<
double>(
"HF1Threshold", 0.5);
318 desc.
add<
double>(
"HEDWeight", 1.0);
319 desc.
add<
double>(
"EEWeight", 1.0);
320 desc.
add<
double>(
"HESWeight", 1.0);
321 desc.
add<
double>(
"HF1Weight", 1.0);
322 desc.
add<
double>(
"HOWeight", 1.0);
323 desc.
add<
double>(
"EBThreshold", 0.07);
324 desc.
add<
double>(
"EEThreshold", 0.3);
325 desc.
add<
double>(
"HcalThreshold", -1000.0);
326 desc.
add<
double>(
"HF2Threshold", 0.85);
327 desc.
add<
double>(
"HESThreshold", 0.8);
328 desc.
add<
double>(
"HESThreshold1", 0.8);
329 desc.
add<
double>(
"HEDThreshold", 0.8);
330 desc.
add<
double>(
"HEDThreshold1", 0.8);
331 desc.
add<
double>(
"EcutTower", -1000.0);
332 desc.
add<
double>(
"HBWeight", 1.0);
333 desc.
add<
double>(
"MomHBDepth", 0.2);
334 desc.
add<
double>(
"MomHEDepth", 0.4);
335 desc.
add<
double>(
"MomEBDepth", 0.3);
336 desc.
add<
double>(
"MomEEDepth", 0.0);
337 desc.
add<
bool>(
"UseHO",
true);
338 desc.
add<
bool>(
"UseEtEBTreshold",
false);
339 desc.
add<
bool>(
"UseSymEBTreshold",
true);
340 desc.
add<
bool>(
"UseEtEETreshold",
false);
341 desc.
add<
bool>(
"UseSymEETreshold",
true);
342 desc.
add<
bool>(
"UseHcalRecoveredHits",
true);
343 desc.
add<
bool>(
"UseEcalRecoveredHits",
false);
344 desc.
add<
bool>(
"UseRejectedHitsOnly",
false);
345 desc.
add<
bool>(
"UseRejectedRecoveredHcalHits",
true);
346 desc.
add<
bool>(
"UseRejectedRecoveredEcalHits",
false);
347 desc.
add<
double>(
"missingHcalRescaleFactorForEcal", 0.0);
348 desc.
add<
bool>(
"AllowMissingInputs",
false);
349 desc.
add<std::vector<double> >(
"HBGrid", {-1.0, 1.0, 10.0, 100.0, 1000.0});
350 desc.
add<std::vector<double> >(
"EEWeights", {1.0, 1.0, 1.0, 1.0, 1.0});
351 desc.
add<std::vector<double> >(
"HF2Weights", {1.0, 1.0, 1.0, 1.0, 1.0});
352 desc.
add<std::vector<double> >(
"HOWeights", {1.0, 1.0, 1.0, 1.0, 1.0});
353 desc.
add<std::vector<double> >(
"EEGrid", {-1.0, 1.0, 10.0, 100.0, 1000.0});
354 desc.
add<std::vector<double> >(
"HBWeights", {1.0, 1.0, 1.0, 1.0, 1.0});
355 desc.
add<std::vector<double> >(
"HF2Grid", {-1.0, 1.0, 10.0, 100.0, 1000.0});
356 desc.
add<std::vector<double> >(
"HEDWeights", {1.0, 1.0, 1.0, 1.0, 1.0});
357 desc.
add<std::vector<double> >(
"HF1Grid", {-1.0, 1.0, 10.0, 100.0, 1000.0});
358 desc.
add<std::vector<double> >(
"EBWeights", {1.0, 1.0, 1.0, 1.0, 1.0});
359 desc.
add<std::vector<double> >(
"HF1Weights", {1.0, 1.0, 1.0, 1.0, 1.0});
360 desc.
add<std::vector<double> >(
"HESGrid", {-1.0, 1.0, 10.0, 100.0, 1000.0});
361 desc.
add<std::vector<double> >(
"HESWeights", {1.0, 1.0, 1.0, 1.0, 1.0});
362 desc.
add<std::vector<double> >(
"HEDGrid", {-1.0, 1.0, 10.0, 100.0, 1000.0});
363 desc.
add<std::vector<double> >(
"HOGrid", {-1.0, 1.0, 10.0, 100.0, 1000.0});
364 desc.
add<std::vector<double> >(
"EBGrid", {-1.0, 1.0, 10.0, 100.0, 1000.0});
368 desc.
add<std::vector<edm::InputTag> >(
370 desc.
add<
int>(
"MomConstrMethod", 1);
371 desc.
add<
unsigned int>(
"HcalAcceptSeverityLevel", 9);
372 desc.
add<std::vector<std::string> >(
"EcalRecHitSeveritiesToBeExcluded", {
"kTime",
"kWeird",
"kBad"});
373 desc.
add<
unsigned int>(
"HcalAcceptSeverityLevelForRejectedHit", 9999);
374 desc.
add<std::vector<std::string> >(
"EcalSeveritiesToBeUsedInBadTowers", {});
375 desc.
add<
int>(
"HcalPhase", 0);
CaloTowersCreator(const edm::ParameterSet &ps)
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void setEcalChStatusFromDB(const EcalChannelStatus *s)
CaloTowersCreationAlgo algo_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void setHF1EScale(double scale)
void produce(edm::Event &e, const edm::EventSetup &c) override
bool theRecoveredHcalHitsAreUsed_
void setHcalChStatusFromDB(const HcalChannelQuality *s)
void setHF2EScale(double scale)
void finish(CaloTowerCollection &destCollection)
void setEeHandle(const edm::Handle< EcalRecHitCollection > ee)
std::vector< int > theEcalSeveritiesToBeExcluded_
void setHBEScale(double scale)
bool useRejectedHitsOnly_
edm::EDGetTokenT< HORecHitCollection > tok_ho_
void setGeometry(const CaloTowerTopology *cttopo, const CaloTowerConstituentsMap *ctmap, const HcalTopology *htopo, const CaloGeometry *geo)
void setEbHandle(const edm::Handle< EcalRecHitCollection > eb)
void setUseRejectedRecoveredEcalHits(bool flag)
void addDefault(ParameterSetDescription const &psetDescription)
void setEcalSeveritiesToBeExcluded(const std::vector< int > &ecalSev)
void setHcalAcceptSeverityLevelForRejectedHit(unsigned int level)
void setHcalSevLvlComputer(const HcalSeverityLevelComputer *c)
std::vector< edm::EDGetTokenT< EcalRecHitCollection > > toks_ecal_
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
void SetEcalSeveritiesToBeUsedInBadTowers(const std::vector< int > &ecalSev)
void setRecoveredEcalHitsAreUsed(bool flag)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::ESWatcher< HcalChannelQualityRcd > hcalChStatusWatcher_
void process(const HBHERecHitCollection &hbhe)
void setHESEScale(double scale)
void setHEDEScale(double scale)
void setEEEScale(double scale)
std::string instanceLabel
unsigned int theHcalAcceptSeverityLevelForRejectedHit_
void setRecoveredHcalHitsAreUsed(bool flag)
void setUseRejectedHitsOnly(bool flag)
bool check(const edm::EventSetup &iSetup)
void setMissingHcalRescaleFactorForEcal(float factor)
void setHOEScale(double scale)
unsigned int theHcalAcceptSeverityLevel_
bool theRecoveredEcalHitsAreUsed_
void setHcalAcceptSeverityLevel(unsigned int level)
bool useRejectedRecoveredHcalHits_
std::vector< edm::InputTag > ecalLabels_
edm::ESWatcher< HcalSeverityLevelComputerRcd > hcalSevLevelWatcher_
void setEcalSevLvlAlgo(const EcalSeverityLevelAlgo *a)
void setUseRejectedRecoveredHcalHits(bool flag)
edm::ESWatcher< IdealGeometryRecord > caloTowerConstituentsWatcher_
void setEBEScale(double scale)
T const * product() const
std::vector< int > theEcalSeveritiesToBeUsedInBadTowers_
math::XYZTLorentzVector LorentzVector
Lorentz vector.
edm::EDGetTokenT< HFRecHitCollection > tok_hf_
const_iterator begin() const
edm::ESWatcher< EcalSeverityLevelAlgoRcd > ecalSevLevelWatcher_
bool useRejectedRecoveredEcalHits_