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"));
99 std::ifstream egTrimmingLUTStream(egTrimmingLUTFile.
fullPath());
100 std::shared_ptr<LUT> egTrimmingLUT(
new LUT(egTrimmingLUTStream) );
101 m_params.setEgTrimmingLUT(*egTrimmingLUT);
103 m_params.setEgMaxHcalEt(conf.
getParameter<
double>(
"egMaxHcalEt"));
104 m_params.setEgMaxPtHOverE(conf.
getParameter<
double>(
"egMaxPtHOverE"));
105 m_params.setEgMinPtJetIsolation(conf.
getParameter<
int>(
"egMinPtJetIsolation"));
106 m_params.setEgMaxPtJetIsolation(conf.
getParameter<
int>(
"egMaxPtJetIsolation"));
107 m_params.setEgMinPtHOverEIsolation(conf.
getParameter<
int>(
"egMinPtHOverEIsolation"));
108 m_params.setEgMaxPtHOverEIsolation(conf.
getParameter<
int>(
"egMaxPtHOverEIsolation"));
112 std::ifstream egMaxHOverELUTStream(egMaxHOverELUTFile.
fullPath());
113 std::shared_ptr<LUT> egMaxHOverELUT(
new LUT(egMaxHOverELUTStream) );
114 m_params.setEgMaxHOverELUT(*egMaxHOverELUT);
117 std::ifstream egCompressShapesLUTStream(egCompressShapesLUTFile.
fullPath());
118 std::shared_ptr<LUT> egCompressShapesLUT(
new LUT(egCompressShapesLUTStream) );
119 m_params.setEgCompressShapesLUT(*egCompressShapesLUT);
122 std::ifstream egShapeIdLUTStream(egShapeIdLUTFile.
fullPath());
123 std::shared_ptr<LUT> egShapeIdLUT(
new LUT(egShapeIdLUTStream) );
124 m_params.setEgShapeIdLUT(*egShapeIdLUT);
129 std::ifstream egIsoLUTStream(egIsoLUTFile.
fullPath());
130 std::shared_ptr<LUT> egIsoLUT(
new LUT(egIsoLUTStream) );
131 m_params.setEgIsolationLUT(*egIsoLUT);
144 m_params.setEgIsoAreaNrTowersEta(conf.
getParameter<
unsigned int>(
"egIsoAreaNrTowersEta"));
145 m_params.setEgIsoAreaNrTowersPhi(conf.
getParameter<
unsigned int>(
"egIsoAreaNrTowersPhi"));
146 m_params.setEgIsoVetoNrTowersPhi(conf.
getParameter<
unsigned int>(
"egIsoVetoNrTowersPhi"));
150 m_params.setEgPUSParams(conf.
getParameter<std::vector<double>>(
"egPUSParams"));
153 std::ifstream egCalibrationLUTStream(egCalibrationLUTFile.
fullPath());
154 std::shared_ptr<LUT> egCalibrationLUT(
new LUT(egCalibrationLUTStream) );
155 m_params.setEgCalibrationLUT(*egCalibrationLUT);
158 m_params.setTauLsb(conf.
getParameter<
double>(
"tauLsb"));
159 m_params.setTauSeedThreshold(conf.
getParameter<
double>(
"tauSeedThreshold"));
160 m_params.setTauNeighbourThreshold(conf.
getParameter<
double>(
"tauNeighbourThreshold"));
161 m_params.setTauMaxPtTauVeto(conf.
getParameter<
double>(
"tauMaxPtTauVeto"));
162 m_params.setTauMinPtJetIsolationB(conf.
getParameter<
double>(
"tauMinPtJetIsolationB"));
164 m_params.setTauMaxJetIsolationB(conf.
getParameter<
double>(
"tauMaxJetIsolationB"));
165 m_params.setTauMaxJetIsolationA(conf.
getParameter<
double>(
"tauMaxJetIsolationA"));
166 m_params.setTauIsoAreaNrTowersEta(conf.
getParameter<
unsigned int>(
"tauIsoAreaNrTowersEta"));
167 m_params.setTauIsoAreaNrTowersPhi(conf.
getParameter<
unsigned int>(
"tauIsoAreaNrTowersPhi"));
168 m_params.setTauIsoVetoNrTowersPhi(conf.
getParameter<
unsigned int>(
"tauIsoVetoNrTowersPhi"));
171 std::ifstream tauIsoLUTStream(tauIsoLUTFile.
fullPath());
172 std::shared_ptr<LUT> tauIsoLUT(
new LUT(tauIsoLUTStream) );
173 m_params.setTauIsolationLUT(*tauIsoLUT);
176 std::ifstream tauCalibrationLUTStream(tauCalibrationLUTFile.
fullPath());
177 std::shared_ptr<LUT> tauCalibrationLUT(
new LUT(tauCalibrationLUTStream) );
178 m_params.setTauCalibrationLUT(*tauCalibrationLUT);
180 m_params.setIsoTauEtaMin(conf.
getParameter<
int> (
"isoTauEtaMin"));
181 m_params.setIsoTauEtaMax(conf.
getParameter<
int> (
"isoTauEtaMax"));
183 m_params.setTauPUSParams(conf.
getParameter<std::vector<double>>(
"tauPUSParams"));
186 m_params.setJetLsb(conf.
getParameter<
double>(
"jetLsb"));
187 m_params.setJetSeedThreshold(conf.
getParameter<
double>(
"jetSeedThreshold"));
188 m_params.setJetNeighbourThreshold(conf.
getParameter<
double>(
"jetNeighbourThreshold"));
191 m_params.setJetCalibrationParams(conf.
getParameter<std::vector<double> >(
"jetCalibrationParams"));
194 m_params.setEtSumLsb(conf.
getParameter<
double>(
"etSumLsb"));
196 std::vector<int> etSumEtaMin = conf.
getParameter<std::vector<int> >(
"etSumEtaMin");
197 std::vector<int> etSumEtaMax = conf.
getParameter<std::vector<int> >(
"etSumEtaMax");
198 std::vector<double> etSumEtThreshold = conf.
getParameter<std::vector<double> >(
"etSumEtThreshold");
200 if ((etSumEtaMin.size() == etSumEtaMax.size()) && (etSumEtaMin.size() == etSumEtThreshold.size())) {
201 for (
unsigned i=0;
i<etSumEtaMin.size(); ++
i) {
202 m_params.setEtSumEtaMin(
i, etSumEtaMin.at(
i));
203 m_params.setEtSumEtaMax(
i, etSumEtaMax.at(
i));
204 m_params.setEtSumEtThreshold(
i, etSumEtThreshold.at(
i));
208 edm::LogError(
"l1t|calo") <<
"Inconsistent number of EtSum parameters" << std::endl;
213 std::ifstream centralityLUTStream(centralityLUTFile.
fullPath());
214 std::shared_ptr<LUT> centralityLUT(
new LUT(centralityLUTStream) );
215 m_params.setCentralityLUT(*centralityLUT);
219 std::ifstream q2LUTStream(q2LUTFile.
fullPath());
220 std::shared_ptr<LUT> q2LUT(
new LUT(q2LUTStream) );
221 m_params.setQ2LUT(*q2LUT);
244 using namespace edm::es;
245 boost::shared_ptr<CaloParams> pCaloParams ;
247 pCaloParams = boost::shared_ptr< CaloParams >(
new CaloParams(m_params));
T getParameter(std::string const &) const
boost::shared_ptr< CaloParams > ReturnType
~L1TCaloParamsESProducer()
L1TCaloParamsESProducer(const edm::ParameterSet &)
ReturnType produce(const L1TCaloParamsRcd &)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
std::string fullPath() const
std::vector< unsigned short int > LUT