20 #include "boost/shared_ptr.hpp"
74 setWhatProduced(
this);
78 m_params.setTowerLsbH(conf.
getParameter<
double>(
"towerLsbH"));
79 m_params.setTowerLsbE(conf.
getParameter<
double>(
"towerLsbE"));
80 m_params.setTowerLsbSum(conf.
getParameter<
double>(
"towerLsbSum"));
81 m_params.setTowerNBitsH(conf.
getParameter<
int>(
"towerNBitsH"));
82 m_params.setTowerNBitsE(conf.
getParameter<
int>(
"towerNBitsE"));
83 m_params.setTowerNBitsSum(conf.
getParameter<
int>(
"towerNBitsSum"));
84 m_params.setTowerNBitsRatio(conf.
getParameter<
int>(
"towerNBitsRatio"));
85 m_params.setTowerEncoding(conf.
getParameter<
bool>(
"towerEncoding"));
88 m_params.setRegionLsb(conf.
getParameter<
double>(
"regionLsb"));
90 m_params.setRegionPUSParams(conf.
getParameter<std::vector<double> >(
"regionPUSParams"));
94 m_params.setEgSeedThreshold(conf.
getParameter<
double>(
"egSeedThreshold"));
95 m_params.setEgNeighbourThreshold(conf.
getParameter<
double>(
"egNeighbourThreshold"));
96 m_params.setEgHcalThreshold(conf.
getParameter<
double>(
"egHcalThreshold"));
97 m_params.setEgMaxHcalEt(conf.
getParameter<
double>(
"egMaxHcalEt"));
98 m_params.setEgEtToRemoveHECut(conf.
getParameter<
double>(
"egEtToRemoveHECut"));
99 m_params.setEgRelativeJetIsolationBarrelCut(conf.
getParameter<
double>(
"egRelativeJetIsolationBarrelCut"));
100 m_params.setEgRelativeJetIsolationEndcapCut(conf.
getParameter<
double>(
"egRelativeJetIsolationEndcapCut"));
103 std::ifstream egMaxHOverELUTStream(egMaxHOverELUTFile.
fullPath());
104 std::shared_ptr<l1t::LUT> egMaxHOverELUT(
new l1t::LUT(egMaxHOverELUTStream) );
105 m_params.setEgMaxHOverELUT(egMaxHOverELUT);
108 std::ifstream egShapeIdLUTStream(egShapeIdLUTFile.
fullPath());
109 std::shared_ptr<l1t::LUT> egShapeIdLUT(
new l1t::LUT(egShapeIdLUTStream) );
110 m_params.setEgShapeIdLUT(egShapeIdLUT);
115 std::ifstream egIsoLUTStream(egIsoLUTFile.
fullPath());
116 std::shared_ptr<l1t::LUT> egIsoLUT(
new l1t::LUT(egIsoLUTStream) );
117 m_params.setEgIsolationLUT(egIsoLUT);
119 m_params.setEgIsoAreaNrTowersEta(conf.
getParameter<
unsigned int>(
"egIsoAreaNrTowersEta"));
120 m_params.setEgIsoAreaNrTowersPhi(conf.
getParameter<
unsigned int>(
"egIsoAreaNrTowersPhi"));
121 m_params.setEgIsoVetoNrTowersPhi(conf.
getParameter<
unsigned int>(
"egIsoVetoNrTowersPhi"));
122 m_params.setEgIsoPUEstTowerGranularity(conf.
getParameter<
unsigned int>(
"egIsoPUEstTowerGranularity"));
123 m_params.setEgIsoMaxEtaAbsForTowerSum(conf.
getParameter<
unsigned int>(
"egIsoMaxEtaAbsForTowerSum"));
124 m_params.setEgIsoMaxEtaAbsForIsoSum(conf.
getParameter<
unsigned int>(
"egIsoMaxEtaAbsForIsoSum"));
127 std::ifstream egCalibrationLUTStream(egCalibrationLUTFile.
fullPath());
128 std::shared_ptr<l1t::LUT> egCalibrationLUT(
new l1t::LUT(egCalibrationLUTStream) );
129 m_params.setEgCalibrationLUT(egCalibrationLUT);
132 m_params.setTauLsb(conf.
getParameter<
double>(
"tauLsb"));
133 m_params.setTauSeedThreshold(conf.
getParameter<
double>(
"tauSeedThreshold"));
134 m_params.setTauNeighbourThreshold(conf.
getParameter<
double>(
"tauNeighbourThreshold"));
135 m_params.setSwitchOffTauVeto(conf.
getParameter<
double>(
"switchOffTauVeto"));
136 m_params.setSwitchOffTauIso(conf.
getParameter<
double>(
"switchOffTauIso"));
138 m_params.setTauRelativeJetIsolationLimit(conf.
getParameter<
double>(
"tauRelativeJetIsolationLimit"));
139 m_params.setTauRelativeJetIsolationCut(conf.
getParameter<
double>(
"tauRelativeJetIsolationCut"));
142 std::ifstream tauIsoLUTStream(tauIsoLUTFile.
fullPath());
143 std::shared_ptr<l1t::LUT> tauIsoLUT(
new l1t::LUT(tauIsoLUTStream) );
144 m_params.setTauIsolationLUT(tauIsoLUT);
153 std::ifstream tauCalibrationLUTStreamBarrelA(tauCalibrationLUTFileBarrelA.
fullPath());
154 std::ifstream tauCalibrationLUTStreamBarrelB(tauCalibrationLUTFileBarrelB.fullPath());
155 std::ifstream tauCalibrationLUTStreamBarrelC(tauCalibrationLUTFileBarrelC.fullPath());
156 std::ifstream tauCalibrationLUTStreamEndcapsA(tauCalibrationLUTFileEndcapsA.fullPath());
157 std::ifstream tauCalibrationLUTStreamEndcapsB(tauCalibrationLUTFileEndcapsB.fullPath());
158 std::ifstream tauCalibrationLUTStreamEndcapsC(tauCalibrationLUTFileEndcapsC.fullPath());
159 std::ifstream tauCalibrationLUTStreamEta(tauCalibrationLUTFileEta.fullPath());
160 std::shared_ptr<l1t::LUT> tauCalibrationLUTBarrelA(
new l1t::LUT(tauCalibrationLUTStreamBarrelA) );
161 std::shared_ptr<l1t::LUT> tauCalibrationLUTBarrelB(
new l1t::LUT(tauCalibrationLUTStreamBarrelB) );
162 std::shared_ptr<l1t::LUT> tauCalibrationLUTBarrelC(
new l1t::LUT(tauCalibrationLUTStreamBarrelC) );
163 std::shared_ptr<l1t::LUT> tauCalibrationLUTEndcapsA(
new l1t::LUT(tauCalibrationLUTStreamEndcapsA) );
164 std::shared_ptr<l1t::LUT> tauCalibrationLUTEndcapsB(
new l1t::LUT(tauCalibrationLUTStreamEndcapsB) );
165 std::shared_ptr<l1t::LUT> tauCalibrationLUTEndcapsC(
new l1t::LUT(tauCalibrationLUTStreamEndcapsC) );
166 std::shared_ptr<l1t::LUT> tauCalibrationLUTEta(
new l1t::LUT(tauCalibrationLUTStreamEta) );
167 m_params.setTauCalibrationLUTBarrelA(tauCalibrationLUTBarrelA);
168 m_params.setTauCalibrationLUTBarrelB(tauCalibrationLUTBarrelB);
169 m_params.setTauCalibrationLUTBarrelC(tauCalibrationLUTBarrelC);
170 m_params.setTauCalibrationLUTEndcapsA(tauCalibrationLUTEndcapsA);
171 m_params.setTauCalibrationLUTEndcapsB(tauCalibrationLUTEndcapsB);
172 m_params.setTauCalibrationLUTEndcapsC(tauCalibrationLUTEndcapsC);
173 m_params.setTauCalibrationLUTEta(tauCalibrationLUTEta);
176 m_params.setJetLsb(conf.
getParameter<
double>(
"jetLsb"));
177 m_params.setJetSeedThreshold(conf.
getParameter<
double>(
"jetSeedThreshold"));
178 m_params.setJetNeighbourThreshold(conf.
getParameter<
double>(
"jetNeighbourThreshold"));
181 m_params.setJetCalibrationParams(conf.
getParameter<std::vector<double> >(
"jetCalibrationParams"));
184 m_params.setEtSumLsb(conf.
getParameter<
double>(
"etSumLsb"));
186 std::vector<int> etSumEtaMin = conf.
getParameter<std::vector<int> >(
"etSumEtaMin");
187 std::vector<int> etSumEtaMax = conf.
getParameter<std::vector<int> >(
"etSumEtaMax");
188 std::vector<double> etSumEtThreshold = conf.
getParameter<std::vector<double> >(
"etSumEtThreshold");
190 if ((etSumEtaMin.size() == etSumEtaMax.size()) && (etSumEtaMin.size() == etSumEtThreshold.size())) {
191 for (
unsigned i=0;
i<etSumEtaMin.size(); ++
i) {
192 m_params.setEtSumEtaMin(
i, etSumEtaMin.at(
i));
193 m_params.setEtSumEtaMax(
i, etSumEtaMax.at(
i));
194 m_params.setEtSumEtThreshold(
i, etSumEtThreshold.at(
i));
198 edm::LogError(
"l1t|calo") <<
"Inconsistent number of EtSum parameters" << std::endl;
204 CaloParamsESProducer::~CaloParamsESProducer()
221 using namespace edm::es;
222 boost::shared_ptr<CaloParams> pCaloParams ;
224 pCaloParams = boost::shared_ptr< CaloParams >(
new CaloParams(m_params));
T getParameter(std::string const &) const
boost::shared_ptr< CaloParams > ReturnType
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
std::string fullPath() const