Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-09-21 04:25:50

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