90 : inputJetCollectionTag_{consumes<std::vector<reco::CaloJet> >(
92 sinPhi_(iConfig.getParameter<std::vector<double> >(
"sinPhi")),
93 cosPhi_(iConfig.getParameter<std::vector<double> >(
"cosPhi")),
94 nBinsPhi_(iConfig.getParameter<
unsigned int>(
"nBinsPhi")),
95 phiLow_(iConfig.getParameter<
double>(
"phiLow")),
96 phiUp_(iConfig.getParameter<
double>(
"phiUp")),
97 htPtThreshold_(iConfig.getParameter<
double>(
"htPtThreshold")),
98 mhtPtThreshold_(iConfig.getParameter<
double>(
"mhtPtThreshold")),
99 htAbsEtaCut_(iConfig.getParameter<
double>(
"htAbsEtaCut")),
100 mhtAbsEtaCut_(iConfig.getParameter<
double>(
"mhtAbsEtaCut")),
101 ptlsb_(iConfig.getParameter<
double>(
"ptlsb")),
102 outputCollectionName_(iConfig.getParameter<
std::string>(
"outputCollectionName")) {
103 phiStep_ = (phiUp_ - phiLow_) / nBinsPhi_;
104 produces<std::vector<l1t::EtSum> >(outputCollectionName_).setBranchAlias(outputCollectionName_);
118 std::unique_ptr<std::vector<l1t::EtSum> > lSumVectorPtr(
new std::vector<l1t::EtSum>(0));
119 lSumVectorPtr->push_back(lHT);
120 lSumVectorPtr->push_back(lMHT);
129 double lJetPt =
jet.pt();
130 double lJetPhi =
jet.phi();
131 double lJetEta =
jet.eta();
139 lHTVector.SetPt(lHT);
150 std::vector<unsigned int> jetPtInPhiBins(
nBinsPhi_, 0);
153 double lJetPhi =
jet.phi();
161 unsigned int digiJetPt = floor(
jet.pt() /
ptlsb_);
162 jetPtInPhiBins[iPhi] += digiJetPt;
166 for (
unsigned int iPhi = 0; iPhi < jetPtInPhiBins.size(); ++iPhi) {
167 unsigned int digiJetPtSum = jetPtInPhiBins[iPhi];
170 double lSinPhi =
sinPhi_[iPhi];
171 double lCosPhi =
cosPhi_[iPhi];
174 lTotalJetPx +=
trunc(digiJetPtSum * lCosPhi);
175 lTotalJetPy +=
trunc(digiJetPtSum * lSinPhi);
178 double lMHT = floor(
sqrt(lTotalJetPx * lTotalJetPx + lTotalJetPy * lTotalJetPy)) *
ptlsb_;
188 edm::InputTag(
"Phase1L1TJetCalibrator",
"Phase1L1TJetFromPfCandidates"));
189 desc.add<std::vector<double> >(
"sinPhi");
190 desc.add<std::vector<double> >(
"cosPhi");
191 desc.add<
unsigned int>(
"nBinsPhi", 72);
194 desc.add<
double>(
"htPtThreshold", 30);
195 desc.add<
double>(
"mhtPtThreshold", 30);
196 desc.add<
double>(
"htAbsEtaCut", 3);
197 desc.add<
double>(
"mhtAbsEtaCut", 3);
198 desc.add<
double>(
"ptlsb", 0.25),
desc.add<
string>(
"outputCollectionName",
"Sums");
199 descriptions.
add(
"Phase1L1TJetSumsProducer",
desc);