13 const std::vector<l1t::Jet> *
input,
14 std::vector<l1t::Jet> *
output) {
15 for (std::vector<l1t::Jet>::const_iterator itJet = input->begin(); itJet != input->end(); ++itJet) {
16 unsigned int pt = itJet->hwPt();
17 if (pt > ((1 << 10) - 1))
19 unsigned int eta = itJet->hwEta();
21 int offset = 2 * (eta - 10) - 1;
24 unsigned int lutAddress = (eta << 10) + pt;
28 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0, 0, 0, 0);
29 l1t::Jet outJet(*&ldummy, rank, itJet->hwEta(), itJet->hwPhi(), itJet->hwQual());
30 output->push_back(outJet);
35 const std::vector<l1t::Tau> *
input,
36 std::vector<l1t::Tau> *
output) {
37 for (std::vector<l1t::Tau>::const_iterator itTau = input->begin(); itTau != input->end(); ++itTau) {
38 unsigned int pt = itTau->hwPt();
39 if (pt > ((1 << 10) - 1))
41 unsigned int eta = itTau->hwEta();
42 unsigned int lutAddress = (eta << 10) + pt;
46 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0, 0, 0, 0);
47 l1t::Tau outTau(*&ldummy, rank, itTau->hwEta(), itTau->hwPhi(), itTau->hwQual());
48 output->push_back(outTau);
53 const std::vector<l1t::Jet> *
input,
54 std::vector<l1t::Jet> *
output) {
55 for (std::vector<l1t::Jet>::const_iterator itJet = input->begin(); itJet != input->end(); ++itJet) {
56 unsigned newPhi = itJet->hwPhi();
57 unsigned newEta =
gtEta(itJet->hwEta());
61 if ((itJet->hwQual() & 0x10) == 0x10) {
66 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0, 0, 0, 0);
68 l1t::Jet gtJet(*&ldummy, itJet->hwPt(), newEta, newPhi, itJet->hwQual());
69 output->push_back(
gtJet);
74 const std::vector<l1t::Jet> *
input,
75 std::vector<l1t::Jet> *
output) {
76 for (std::vector<l1t::Jet>::const_iterator itJet = input->begin(); itJet != input->end(); ++itJet) {
77 uint16_t linPt = (uint16_t)itJet->hwPt();
82 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0, 0, 0, 0);
84 l1t::Jet gtJet(*&ldummy, rankPt, itJet->hwEta(), itJet->hwPhi(), itJet->hwQual());
85 output->push_back(
gtJet);
90 const std::vector<l1t::EGamma> *
input,
91 std::vector<l1t::EGamma> *
output) {
92 for (std::vector<l1t::EGamma>::const_iterator itEGamma = input->begin(); itEGamma != input->end(); ++itEGamma) {
93 unsigned newEta =
gtEta(itEGamma->hwEta());
94 unsigned newPhi = itEGamma->hwPhi();
95 const uint16_t rankPt = (uint16_t)itEGamma->hwPt();
98 if ((itEGamma->hwQual() & 0x10) == 0x10) {
103 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0, 0, 0, 0);
105 l1t::EGamma gtEGamma(*&ldummy, rankPt, newEta, newPhi, itEGamma->hwQual(), itEGamma->hwIso());
106 output->push_back(gtEGamma);
111 const std::vector<l1t::Tau> *
input,
112 std::vector<l1t::Tau> *
output) {
113 for (std::vector<l1t::Tau>::const_iterator itTau = input->begin(); itTau != input->end(); ++itTau) {
114 unsigned newPhi = itTau->hwPhi();
115 unsigned newEta =
gtEta(itTau->hwEta());
119 if ((itTau->hwQual() & 0x10) == 0x10) {
124 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0, 0, 0, 0);
126 l1t::Tau gtTau(*&ldummy, itTau->hwPt(), newEta, newPhi, itTau->hwQual(), itTau->hwIso());
127 output->push_back(
gtTau);
132 const std::vector<l1t::Tau> *
input,
133 std::vector<l1t::Tau> *
output) {
134 for (std::vector<l1t::Tau>::const_iterator itTau = input->begin(); itTau != input->end(); ++itTau) {
135 uint16_t linPt = (uint16_t)itTau->hwPt();
140 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0, 0, 0, 0);
142 l1t::Tau gtTau(*&ldummy, rankPt, itTau->hwEta(), itTau->hwPhi(), itTau->hwQual(), itTau->hwIso());
143 output->push_back(
gtTau);
148 const std::vector<l1t::EtSum> *
input,
149 std::vector<l1t::EtSum> *
output) {
150 for (std::vector<l1t::EtSum>::const_iterator itEtSum = input->begin(); itEtSum != input->end(); ++itEtSum) {
154 rankPt = (uint16_t)itEtSum->hwPt();
164 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0, 0, 0, 0);
166 l1t::EtSum gtEtSum(*&ldummy, itEtSum->getType(), rankPt, 0, itEtSum->hwPhi(), itEtSum->hwQual());
168 output->push_back(gtEtSum);
172 const unsigned int gtEta(
const unsigned int iEta) {
173 unsigned rctEta = (iEta < 11 ? 10 - iEta : iEta - 11);
174 return (((rctEta % 7) & 0x7) | (iEta < 11 ? 0x8 : 0));
L1CaloEtScale jetScale() const
l1t::LUT * jetCalibrationLUT()
void calibrateAndRankTaus(CaloParamsHelper const *params, const std::vector< l1t::Tau > *input, std::vector< l1t::Tau > *output)
const unsigned int gtEta(const unsigned int iEta)
uint16_t rank(const uint16_t linear) const
convert from linear Et scale to rank scale
static std::string const input
void calibrateAndRankJets(CaloParamsHelper const *params, const std::vector< l1t::Jet > *input, std::vector< l1t::Jet > *output)
void EtSumToGtScales(CaloParamsHelper const *params, const std::vector< l1t::EtSum > *input, std::vector< l1t::EtSum > *output)
void JetToGtEtaScales(CaloParamsHelper const *params, const std::vector< l1t::Jet > *input, std::vector< l1t::Jet > *output)
void JetToGtPtScales(CaloParamsHelper const *params, const std::vector< l1t::Jet > *input, std::vector< l1t::Jet > *output)
void TauToGtEtaScales(CaloParamsHelper const *params, const std::vector< l1t::Tau > *input, std::vector< l1t::Tau > *output)
void TauToGtPtScales(CaloParamsHelper const *params, const std::vector< l1t::Tau > *input, std::vector< l1t::Tau > *output)
l1t::LUT * tauCalibrationLUT()
unsigned linScaleMax() const
int data(unsigned int address) const
void EGammaToGtScales(CaloParamsHelper const *params, const std::vector< l1t::EGamma > *input, std::vector< l1t::EGamma > *output)