Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:25:37

0001 /** \class CaloTowersCreator
0002   *  
0003   * Original author: J. Mans - Minnesota
0004   */
0005 
0006 // Now we allow for the creation of towers from
0007 // rejected hists as well: requested by the MET group
0008 // for studies of the effect of noise clean up.
0009 #include "CaloTowersCreationAlgo.h"
0010 #include "EScales.h"
0011 
0012 #include "CommonTools/Utils/interface/StringToEnumValue.h"
0013 #include "DataFormats/Common/interface/Handle.h"
0014 #include "FWCore/Framework/interface/ESHandle.h"
0015 #include "FWCore/Framework/interface/ESWatcher.h"
0016 #include "FWCore/Framework/interface/Event.h"
0017 #include "FWCore/Framework/interface/EventSetup.h"
0018 #include "FWCore/Framework/interface/stream/EDProducer.h"
0019 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0020 #include "FWCore/Utilities/interface/ESGetToken.h"
0021 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
0022 #include "Geometry/CaloTopology/interface/CaloTowerTopology.h"
0023 #include "Geometry/CaloTopology/interface/HcalTopology.h"
0024 #include "Geometry/Records/interface/CaloGeometryRecord.h"
0025 #include "Geometry/Records/interface/IdealGeometryRecord.h"
0026 #include "RecoLocalCalo/EcalRecAlgos/interface/EcalSeverityLevelAlgoRcd.h"
0027 #include "CondFormats/DataRecord/interface/HcalPFCutsRcd.h"
0028 #include "CondTools/Hcal/interface/HcalPFCutsHandler.h"
0029 
0030 class CaloTowersCreator : public edm::stream::EDProducer<> {
0031 public:
0032   explicit CaloTowersCreator(const edm::ParameterSet& ps);
0033   ~CaloTowersCreator() override {}
0034   void produce(edm::Event& e, const edm::EventSetup& c) override;
0035   void beginRun(edm::Run const&, edm::EventSetup const&) override;
0036   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0037   double EBEScale, EEEScale, HBEScale, HESEScale;
0038   double HEDEScale, HOEScale, HF1EScale, HF2EScale;
0039 
0040 private:
0041   static const std::vector<double>& getGridValues();
0042 
0043   CaloTowersCreationAlgo algo_;
0044   edm::EDGetTokenT<HBHERecHitCollection> tok_hbhe_;
0045   edm::EDGetTokenT<HORecHitCollection> tok_ho_;
0046   edm::EDGetTokenT<HFRecHitCollection> tok_hf_;
0047   std::vector<edm::InputTag> ecalLabels_;
0048   std::vector<edm::EDGetTokenT<EcalRecHitCollection> > toks_ecal_;
0049   bool allowMissingInputs_;
0050 
0051   edm::ESGetToken<CaloGeometry, CaloGeometryRecord> tok_geom_;
0052   edm::ESGetToken<HcalTopology, HcalRecNumberingRecord> tok_topo_;
0053   edm::ESGetToken<CaloTowerTopology, HcalRecNumberingRecord> tok_cttopo_;
0054   edm::ESGetToken<CaloTowerConstituentsMap, CaloGeometryRecord> tok_ctmap_;
0055   edm::ESGetToken<EcalChannelStatus, EcalChannelStatusRcd> tok_ecalChStatus_;
0056   edm::ESGetToken<HcalChannelQuality, HcalChannelQualityRcd> tok_hcalChStatus_;
0057   edm::ESGetToken<HcalSeverityLevelComputer, HcalSeverityLevelComputerRcd> tok_hcalSevComputer_;
0058   edm::ESGetToken<EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd> tok_ecalSevAlgo_;
0059 
0060   // more compact flags: all HCAL are combined
0061 
0062   unsigned int theHcalAcceptSeverityLevel_;
0063   std::vector<int> theEcalSeveritiesToBeExcluded_;
0064 
0065   // flag to use recovered hits
0066   bool theRecoveredHcalHitsAreUsed_;
0067   bool theRecoveredEcalHitsAreUsed_;
0068 
0069   // paramaters for creating towers from rejected hits
0070 
0071   bool useRejectedHitsOnly_;
0072   unsigned int theHcalAcceptSeverityLevelForRejectedHit_;
0073   //  for ECAL we have a list of problem flags
0074   std::vector<int> theEcalSeveritiesToBeUsedInBadTowers_;
0075 
0076   // Flags wheteher to use recovered hits for production of
0077   // "bad towers".
0078   // If the recoverd hits were already used for good towers,
0079   // these flags have no effect.
0080   // Note: These flags have no effect on the default tower reconstruction.
0081   bool useRejectedRecoveredHcalHits_;
0082   bool useRejectedRecoveredEcalHits_;
0083 
0084   edm::ESWatcher<HcalSeverityLevelComputerRcd> hcalSevLevelWatcher_;
0085   edm::ESWatcher<HcalChannelQualityRcd> hcalChStatusWatcher_;
0086   edm::ESWatcher<IdealGeometryRecord> caloTowerConstituentsWatcher_;
0087   edm::ESWatcher<EcalSeverityLevelAlgoRcd> ecalSevLevelWatcher_;
0088   EScales eScales_;
0089 
0090   edm::ESGetToken<HcalPFCuts, HcalPFCutsRcd> hcalCutsToken_;
0091   bool cutsFromDB;
0092   HcalPFCuts const* paramPF = nullptr;
0093 };
0094 
0095 #include "FWCore/Framework/interface/MakerMacros.h"
0096 DEFINE_FWK_MODULE(CaloTowersCreator);
0097 
0098 CaloTowersCreator::CaloTowersCreator(const edm::ParameterSet& conf)
0099     : algo_(conf.getParameter<double>("EBThreshold"),
0100             conf.getParameter<double>("EEThreshold"),
0101 
0102             conf.getParameter<bool>("UseEtEBTreshold"),
0103             conf.getParameter<bool>("UseEtEETreshold"),
0104             conf.getParameter<bool>("UseSymEBTreshold"),
0105             conf.getParameter<bool>("UseSymEETreshold"),
0106 
0107             conf.getParameter<double>("HcalThreshold"),
0108             conf.getParameter<double>("HBThreshold"),
0109             conf.getParameter<double>("HBThreshold1"),
0110             conf.getParameter<double>("HBThreshold2"),
0111             conf.getParameter<double>("HESThreshold"),
0112             conf.getParameter<double>("HESThreshold1"),
0113             conf.getParameter<double>("HEDThreshold"),
0114             conf.getParameter<double>("HEDThreshold1"),
0115             conf.getParameter<double>("HOThreshold0"),
0116             conf.getParameter<double>("HOThresholdPlus1"),
0117             conf.getParameter<double>("HOThresholdMinus1"),
0118             conf.getParameter<double>("HOThresholdPlus2"),
0119             conf.getParameter<double>("HOThresholdMinus2"),
0120             conf.getParameter<double>("HF1Threshold"),
0121             conf.getParameter<double>("HF2Threshold"),
0122             conf.getParameter<std::vector<double> >("EBGrid"),
0123             conf.getParameter<std::vector<double> >("EBWeights"),
0124             conf.getParameter<std::vector<double> >("EEGrid"),
0125             conf.getParameter<std::vector<double> >("EEWeights"),
0126             conf.getParameter<std::vector<double> >("HBGrid"),
0127             conf.getParameter<std::vector<double> >("HBWeights"),
0128             conf.getParameter<std::vector<double> >("HESGrid"),
0129             conf.getParameter<std::vector<double> >("HESWeights"),
0130             conf.getParameter<std::vector<double> >("HEDGrid"),
0131             conf.getParameter<std::vector<double> >("HEDWeights"),
0132             conf.getParameter<std::vector<double> >("HOGrid"),
0133             conf.getParameter<std::vector<double> >("HOWeights"),
0134             conf.getParameter<std::vector<double> >("HF1Grid"),
0135             conf.getParameter<std::vector<double> >("HF1Weights"),
0136             conf.getParameter<std::vector<double> >("HF2Grid"),
0137             conf.getParameter<std::vector<double> >("HF2Weights"),
0138             conf.getParameter<double>("EBWeight"),
0139             conf.getParameter<double>("EEWeight"),
0140             conf.getParameter<double>("HBWeight"),
0141             conf.getParameter<double>("HESWeight"),
0142             conf.getParameter<double>("HEDWeight"),
0143             conf.getParameter<double>("HOWeight"),
0144             conf.getParameter<double>("HF1Weight"),
0145             conf.getParameter<double>("HF2Weight"),
0146             conf.getParameter<double>("EcutTower"),
0147             conf.getParameter<double>("EBSumThreshold"),
0148             conf.getParameter<double>("EESumThreshold"),
0149             conf.getParameter<bool>("UseHO"),
0150             // (for momentum reconstruction algorithm)
0151             conf.getParameter<int>("MomConstrMethod"),
0152             conf.getParameter<double>("MomHBDepth"),
0153             conf.getParameter<double>("MomHEDepth"),
0154             conf.getParameter<double>("MomEBDepth"),
0155             conf.getParameter<double>("MomEEDepth"),
0156             conf.getParameter<int>("HcalPhase")),
0157 
0158       ecalLabels_(conf.getParameter<std::vector<edm::InputTag> >("ecalInputs")),
0159       allowMissingInputs_(conf.getParameter<bool>("AllowMissingInputs")),
0160 
0161       theHcalAcceptSeverityLevel_(conf.getParameter<unsigned int>("HcalAcceptSeverityLevel")),
0162 
0163       theRecoveredHcalHitsAreUsed_(conf.getParameter<bool>("UseHcalRecoveredHits")),
0164       theRecoveredEcalHitsAreUsed_(conf.getParameter<bool>("UseEcalRecoveredHits")),
0165 
0166       // paramaters controlling the use of rejected hits
0167 
0168       useRejectedHitsOnly_(conf.getParameter<bool>("UseRejectedHitsOnly")),
0169 
0170       theHcalAcceptSeverityLevelForRejectedHit_(
0171           conf.getParameter<unsigned int>("HcalAcceptSeverityLevelForRejectedHit")),
0172 
0173       useRejectedRecoveredHcalHits_(conf.getParameter<bool>("UseRejectedRecoveredHcalHits")),
0174       useRejectedRecoveredEcalHits_(conf.getParameter<bool>("UseRejectedRecoveredEcalHits")),
0175       cutsFromDB(conf.getParameter<bool>("usePFThresholdsFromDB"))
0176 
0177 {
0178   algo_.setMissingHcalRescaleFactorForEcal(conf.getParameter<double>("missingHcalRescaleFactorForEcal"));
0179 
0180   // register for data access
0181   tok_hbhe_ = consumes<HBHERecHitCollection>(conf.getParameter<edm::InputTag>("hbheInput"));
0182   tok_ho_ = consumes<HORecHitCollection>(conf.getParameter<edm::InputTag>("hoInput"));
0183   tok_hf_ = consumes<HFRecHitCollection>(conf.getParameter<edm::InputTag>("hfInput"));
0184   tok_geom_ = esConsumes<CaloGeometry, CaloGeometryRecord>();
0185   tok_topo_ = esConsumes<HcalTopology, HcalRecNumberingRecord>();
0186   tok_cttopo_ = esConsumes<CaloTowerTopology, HcalRecNumberingRecord>();
0187   tok_ctmap_ = esConsumes<CaloTowerConstituentsMap, CaloGeometryRecord>();
0188   tok_ecalChStatus_ = esConsumes<EcalChannelStatus, EcalChannelStatusRcd>();
0189   tok_hcalChStatus_ = esConsumes<HcalChannelQuality, HcalChannelQualityRcd>(edm::ESInputTag("", "withTopo"));
0190   tok_hcalSevComputer_ = esConsumes<HcalSeverityLevelComputer, HcalSeverityLevelComputerRcd>();
0191   tok_ecalSevAlgo_ = esConsumes<EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd>();
0192 
0193   if (cutsFromDB) {
0194     hcalCutsToken_ = esConsumes<HcalPFCuts, HcalPFCutsRcd, edm::Transition::BeginRun>(edm::ESInputTag("", "withTopo"));
0195   }
0196   const unsigned nLabels = ecalLabels_.size();
0197   for (unsigned i = 0; i != nLabels; i++)
0198     toks_ecal_.push_back(consumes<EcalRecHitCollection>(ecalLabels_[i]));
0199 
0200   EBEScale = eScales_.EBScale;
0201   EEEScale = eScales_.EEScale;
0202   HBEScale = eScales_.HBScale;
0203   HESEScale = eScales_.HESScale;
0204   HEDEScale = eScales_.HEDScale;
0205   HOEScale = eScales_.HOScale;
0206   HF1EScale = eScales_.HF1Scale;
0207   HF2EScale = eScales_.HF2Scale;
0208 
0209   // get the Ecal severities to be excluded
0210   const std::vector<std::string> severitynames =
0211       conf.getParameter<std::vector<std::string> >("EcalRecHitSeveritiesToBeExcluded");
0212 
0213   theEcalSeveritiesToBeExcluded_ = StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynames);
0214 
0215   // get the Ecal severities to be used for bad towers
0216   theEcalSeveritiesToBeUsedInBadTowers_ = StringToEnumValue<EcalSeverityLevel::SeverityLevel>(
0217       conf.getParameter<std::vector<std::string> >("EcalSeveritiesToBeUsedInBadTowers"));
0218 
0219   if (eScales_.instanceLabel.empty())
0220     produces<CaloTowerCollection>();
0221   else
0222     produces<CaloTowerCollection>(eScales_.instanceLabel);
0223 
0224 #ifdef EDM_ML_DEBUG
0225   std::cout << "VI Producer " << (useRejectedHitsOnly_ ? "use rejectOnly " : " ")
0226             << (allowMissingInputs_ ? "allowMissing " : " ") << nLabels << ' ' << severitynames.size() << std::endl;
0227 #endif
0228 }
0229 
0230 void CaloTowersCreator::beginRun(const edm::Run& run, const edm::EventSetup& es) {
0231   if (cutsFromDB) {
0232     paramPF = &es.getData(hcalCutsToken_);
0233   }
0234   algo_.setThresFromDB(paramPF);
0235 }
0236 
0237 void CaloTowersCreator::produce(edm::Event& e, const edm::EventSetup& c) {
0238   // get the necessary event setup objects...
0239   edm::ESHandle<CaloGeometry> pG = c.getHandle(tok_geom_);
0240   edm::ESHandle<HcalTopology> htopo = c.getHandle(tok_topo_);
0241   edm::ESHandle<CaloTowerTopology> cttopo = c.getHandle(tok_cttopo_);
0242   edm::ESHandle<CaloTowerConstituentsMap> ctmap = c.getHandle(tok_ctmap_);
0243 
0244   // ECAL channel status map ****************************************
0245   edm::ESHandle<EcalChannelStatus> ecalChStatus = c.getHandle(tok_ecalChStatus_);
0246   const EcalChannelStatus* dbEcalChStatus = ecalChStatus.product();
0247 
0248   // HCAL channel status map ****************************************
0249   edm::ESHandle<HcalChannelQuality> hcalChStatus = c.getHandle(tok_hcalChStatus_);
0250 
0251   const HcalChannelQuality* dbHcalChStatus = hcalChStatus.product();
0252 
0253   // Assignment of severity levels **********************************
0254   edm::ESHandle<HcalSeverityLevelComputer> hcalSevLvlComputerHndl = c.getHandle(tok_hcalSevComputer_);
0255   const HcalSeverityLevelComputer* hcalSevLvlComputer = hcalSevLvlComputerHndl.product();
0256 
0257   edm::ESHandle<EcalSeverityLevelAlgo> ecalSevLvlAlgoHndl = c.getHandle(tok_ecalSevAlgo_);
0258   const EcalSeverityLevelAlgo* ecalSevLvlAlgo = ecalSevLvlAlgoHndl.product();
0259 
0260   algo_.setEBEScale(EBEScale);
0261   algo_.setEEEScale(EEEScale);
0262   algo_.setHBEScale(HBEScale);
0263   algo_.setHESEScale(HESEScale);
0264   algo_.setHEDEScale(HEDEScale);
0265   algo_.setHOEScale(HOEScale);
0266   algo_.setHF1EScale(HF1EScale);
0267   algo_.setHF2EScale(HF2EScale);
0268   algo_.setGeometry(cttopo.product(), ctmap.product(), htopo.product(), pG.product());
0269 
0270   // for treatment of problematic and anomalous cells
0271 
0272   algo_.setHcalChStatusFromDB(dbHcalChStatus);
0273   algo_.setEcalChStatusFromDB(dbEcalChStatus);
0274 
0275   algo_.setHcalAcceptSeverityLevel(theHcalAcceptSeverityLevel_);
0276   algo_.setEcalSeveritiesToBeExcluded(theEcalSeveritiesToBeExcluded_);
0277 
0278   algo_.setRecoveredHcalHitsAreUsed(theRecoveredHcalHitsAreUsed_);
0279   algo_.setRecoveredEcalHitsAreUsed(theRecoveredEcalHitsAreUsed_);
0280 
0281   algo_.setHcalSevLvlComputer(hcalSevLvlComputer);
0282   algo_.setEcalSevLvlAlgo(ecalSevLvlAlgo);
0283 
0284   algo_.setUseRejectedHitsOnly(useRejectedHitsOnly_);
0285 
0286   algo_.setHcalAcceptSeverityLevelForRejectedHit(theHcalAcceptSeverityLevelForRejectedHit_);
0287   algo_.SetEcalSeveritiesToBeUsedInBadTowers(theEcalSeveritiesToBeUsedInBadTowers_);
0288 
0289   algo_.setUseRejectedRecoveredHcalHits(useRejectedRecoveredHcalHits_);
0290   algo_.setUseRejectedRecoveredEcalHits(useRejectedRecoveredEcalHits_);
0291 
0292 #ifdef EDM_ML_DEBUG
0293   std::cout << "VI Produce: " << (useRejectedHitsOnly_ ? "use rejectOnly " : " ")
0294             << (allowMissingInputs_ ? "allowMissing " : " ")
0295             << (theRecoveredEcalHitsAreUsed_ ? "use RecoveredEcal " : " ") << toks_ecal_.size() << ' '
0296             << theEcalSeveritiesToBeExcluded_.size() << ' ' << theEcalSeveritiesToBeUsedInBadTowers_.size()
0297             << std::endl;
0298 #endif
0299 
0300   algo_.begin();  // clear the internal buffer
0301 
0302   // can't chain these in a big OR statement, or else it'll
0303   // get triggered for each of the first three events
0304   bool check1 = hcalSevLevelWatcher_.check(c);
0305   bool check2 = hcalChStatusWatcher_.check(c);
0306   bool check3 = caloTowerConstituentsWatcher_.check(c);
0307   if (check1 || check2 || check3) {
0308     algo_.makeHcalDropChMap();
0309   }
0310 
0311   // check ecal SevLev
0312   if (ecalSevLevelWatcher_.check(c))
0313     algo_.makeEcalBadChs();
0314 
0315   // ----------------------------------------------------------
0316   // For ecal error handling need to
0317   // have access to the EB and EE collections at the end of
0318   // tower reconstruction.
0319 
0320   edm::Handle<EcalRecHitCollection> ebHandle;
0321   edm::Handle<EcalRecHitCollection> eeHandle;
0322 
0323   for (std::vector<edm::EDGetTokenT<EcalRecHitCollection> >::const_iterator i = toks_ecal_.begin();
0324        i != toks_ecal_.end();
0325        i++) {
0326     edm::Handle<EcalRecHitCollection> ec_tmp;
0327 
0328     if (!e.getByToken(*i, ec_tmp))
0329       continue;
0330     if (ec_tmp->empty())
0331       continue;
0332 
0333     // check if this is EB or EE
0334     if ((ec_tmp->begin()->detid()).subdetId() == EcalBarrel) {
0335       ebHandle = ec_tmp;
0336     } else if ((ec_tmp->begin()->detid()).subdetId() == EcalEndcap) {
0337       eeHandle = ec_tmp;
0338     }
0339   }
0340 
0341   algo_.setEbHandle(ebHandle);
0342   algo_.setEeHandle(eeHandle);
0343 
0344   //-----------------------------------------------------------
0345 
0346   bool present;
0347 
0348   // Step A/C: Get Inputs and process (repeatedly)
0349   edm::Handle<HBHERecHitCollection> hbhe;
0350   present = e.getByToken(tok_hbhe_, hbhe);
0351   if (present || !allowMissingInputs_)
0352     algo_.process(*hbhe);
0353 
0354   edm::Handle<HORecHitCollection> ho;
0355   present = e.getByToken(tok_ho_, ho);
0356   if (present || !allowMissingInputs_)
0357     algo_.process(*ho);
0358 
0359   edm::Handle<HFRecHitCollection> hf;
0360   present = e.getByToken(tok_hf_, hf);
0361   if (present || !allowMissingInputs_)
0362     algo_.process(*hf);
0363 
0364   std::vector<edm::EDGetTokenT<EcalRecHitCollection> >::const_iterator i;
0365   for (i = toks_ecal_.begin(); i != toks_ecal_.end(); i++) {
0366     edm::Handle<EcalRecHitCollection> ec;
0367     present = e.getByToken(*i, ec);
0368     if (present || !allowMissingInputs_)
0369       algo_.process(*ec);
0370   }
0371 
0372   // Step B: Create empty output
0373   auto prod = std::make_unique<CaloTowerCollection>();
0374 
0375   // Step C: Process
0376   algo_.finish(*prod);
0377 
0378 #ifdef EDM_ML_DEBUG
0379   int totc = 0;
0380   float totE = 0;
0381   reco::LeafCandidate::LorentzVector totP4;
0382   for (auto const& tw : (*prod)) {
0383     totc += tw.constituents().size();
0384     totE += tw.energy();
0385     totP4 += tw.p4();
0386     std::cout << "CaloTowerCreator: " << tw.id() << " with E " << tw.energy() << " and " << tw.constituents().size()
0387               << " constituents\n";
0388   }
0389   std::cout << "VI " << (*prod).size() << " " << totc << " " << totE << " " << totP4 << std::endl;
0390 #endif
0391 
0392   // Step D: Put into the event
0393   if (eScales_.instanceLabel.empty())
0394     e.put(std::move(prod));
0395   else
0396     e.put(std::move(prod), eScales_.instanceLabel);
0397 }
0398 
0399 void CaloTowersCreator::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
0400   edm::ParameterSetDescription desc;
0401   desc.add<double>("EBSumThreshold", 0.2);
0402   desc.add<double>("HF2Weight", 1.0);
0403   desc.add<double>("EBWeight", 1.0);
0404   desc.add<double>("EESumThreshold", 0.45);
0405   desc.add<double>("HOThreshold0", 1.1);
0406   desc.add<double>("HOThresholdPlus1", 3.5);
0407   desc.add<double>("HOThresholdMinus1", 3.5);
0408   desc.add<double>("HOThresholdPlus2", 3.5);
0409   desc.add<double>("HOThresholdMinus2", 3.5);
0410   desc.add<double>("HBThreshold", 0.7);
0411   desc.add<double>("HBThreshold1", 0.7);
0412   desc.add<double>("HBThreshold2", 0.7);
0413   desc.add<double>("HF1Threshold", 0.5);
0414   desc.add<double>("HEDWeight", 1.0);
0415   desc.add<double>("EEWeight", 1.0);
0416   desc.add<double>("HESWeight", 1.0);
0417   desc.add<double>("HF1Weight", 1.0);
0418   desc.add<double>("HOWeight", 1.0);
0419   desc.add<double>("EBThreshold", 0.07);
0420   desc.add<double>("EEThreshold", 0.3);
0421   desc.add<double>("HcalThreshold", -1000.0);
0422   desc.add<double>("HF2Threshold", 0.85);
0423   desc.add<double>("HESThreshold", 0.8);
0424   desc.add<double>("HESThreshold1", 0.8);
0425   desc.add<double>("HEDThreshold", 0.8);
0426   desc.add<double>("HEDThreshold1", 0.8);
0427   desc.add<double>("EcutTower", -1000.0);
0428   desc.add<double>("HBWeight", 1.0);
0429   desc.add<double>("MomHBDepth", 0.2);
0430   desc.add<double>("MomHEDepth", 0.4);
0431   desc.add<double>("MomEBDepth", 0.3);
0432   desc.add<double>("MomEEDepth", 0.0);
0433   desc.add<bool>("UseHO", true);
0434   desc.add<bool>("UseEtEBTreshold", false);
0435   desc.add<bool>("UseSymEBTreshold", true);
0436   desc.add<bool>("UseEtEETreshold", false);
0437   desc.add<bool>("UseSymEETreshold", true);
0438   desc.add<bool>("UseHcalRecoveredHits", true);
0439   desc.add<bool>("UseEcalRecoveredHits", false);
0440   desc.add<bool>("UseRejectedHitsOnly", false);
0441   desc.add<bool>("UseRejectedRecoveredHcalHits", true);
0442   desc.add<bool>("UseRejectedRecoveredEcalHits", false);
0443   desc.add<double>("missingHcalRescaleFactorForEcal", 0.0);
0444   desc.add<bool>("AllowMissingInputs", false);
0445   desc.add<std::vector<double> >("HBGrid", {-1.0, 1.0, 10.0, 100.0, 1000.0});
0446   desc.add<std::vector<double> >("EEWeights", {1.0, 1.0, 1.0, 1.0, 1.0});
0447   desc.add<std::vector<double> >("HF2Weights", {1.0, 1.0, 1.0, 1.0, 1.0});
0448   desc.add<std::vector<double> >("HOWeights", {1.0, 1.0, 1.0, 1.0, 1.0});
0449   desc.add<std::vector<double> >("EEGrid", {-1.0, 1.0, 10.0, 100.0, 1000.0});
0450   desc.add<std::vector<double> >("HBWeights", {1.0, 1.0, 1.0, 1.0, 1.0});
0451   desc.add<std::vector<double> >("HF2Grid", {-1.0, 1.0, 10.0, 100.0, 1000.0});
0452   desc.add<std::vector<double> >("HEDWeights", {1.0, 1.0, 1.0, 1.0, 1.0});
0453   desc.add<std::vector<double> >("HF1Grid", {-1.0, 1.0, 10.0, 100.0, 1000.0});
0454   desc.add<std::vector<double> >("EBWeights", {1.0, 1.0, 1.0, 1.0, 1.0});
0455   desc.add<std::vector<double> >("HF1Weights", {1.0, 1.0, 1.0, 1.0, 1.0});
0456   desc.add<std::vector<double> >("HESGrid", {-1.0, 1.0, 10.0, 100.0, 1000.0});
0457   desc.add<std::vector<double> >("HESWeights", {1.0, 1.0, 1.0, 1.0, 1.0});
0458   desc.add<std::vector<double> >("HEDGrid", {-1.0, 1.0, 10.0, 100.0, 1000.0});
0459   desc.add<std::vector<double> >("HOGrid", {-1.0, 1.0, 10.0, 100.0, 1000.0});
0460   desc.add<std::vector<double> >("EBGrid", {-1.0, 1.0, 10.0, 100.0, 1000.0});
0461   desc.add<edm::InputTag>("hfInput", edm::InputTag("hfreco"));
0462   desc.add<edm::InputTag>("hbheInput", edm::InputTag("hbhereco"));
0463   desc.add<edm::InputTag>("hoInput", edm::InputTag("horeco"));
0464   desc.add<std::vector<edm::InputTag> >(
0465       "ecalInputs", {edm::InputTag("ecalRecHit", "EcalRecHitsEB"), edm::InputTag("ecalRecHit", "EcalRecHitsEE")});
0466   desc.add<int>("MomConstrMethod", 1);
0467   desc.add<unsigned int>("HcalAcceptSeverityLevel", 9);
0468   desc.add<std::vector<std::string> >("EcalRecHitSeveritiesToBeExcluded", {"kTime", "kWeird", "kBad"});
0469   desc.add<unsigned int>("HcalAcceptSeverityLevelForRejectedHit", 9999);
0470   desc.add<std::vector<std::string> >("EcalSeveritiesToBeUsedInBadTowers", {});
0471   desc.add<int>("HcalPhase", 0);
0472   desc.add<bool>("usePFThresholdsFromDB", true);
0473 
0474   descriptions.addDefault(desc);
0475 }