13 const std::vector<l1t::Jet> *
input,
14 std::vector<l1t::Jet> *
output){
16 for(std::vector<l1t::Jet>::const_iterator itJet = input->begin();
17 itJet != input->end(); ++itJet){
18 unsigned int pt = itJet->hwPt();
19 if(pt > ((1<<10) -1) )
21 unsigned int eta = itJet->hwEta();
26 unsigned int lutAddress = (eta<<10)+pt;
30 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0,0,0,0);
31 l1t::Jet outJet(*&ldummy, rank, itJet->hwEta(), itJet->hwPhi(), itJet->hwQual());
32 output->push_back(outJet);
37 const std::vector<l1t::Tau> *
input,
38 std::vector<l1t::Tau> *
output){
40 for(std::vector<l1t::Tau>::const_iterator itTau = input->begin();
41 itTau != input->end(); ++itTau){
42 unsigned int pt = itTau->hwPt();
43 if(pt > ((1<<10) -1) )
45 unsigned int eta = itTau->hwEta();
46 unsigned int lutAddress = (eta<<10)+pt;
50 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0,0,0,0);
51 l1t::Tau outTau(*&ldummy, rank, itTau->hwEta(), itTau->hwPhi(), itTau->hwQual());
52 output->push_back(outTau);
58 const std::vector<l1t::Jet> *
input,
59 std::vector<l1t::Jet> *
output){
61 for(std::vector<l1t::Jet>::const_iterator itJet = input->begin();
62 itJet != input->end(); ++itJet){
63 unsigned newPhi = itJet->hwPhi();
64 unsigned newEta =
gtEta(itJet->hwEta());
68 if((itJet->hwQual() & 0x10) == 0x10)
74 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0,0,0,0);
76 l1t::Jet gtJet(*&ldummy, itJet->hwPt(), newEta, newPhi, itJet->hwQual());
77 output->push_back(gtJet);
82 const std::vector<l1t::Jet> *
input,
83 std::vector<l1t::Jet> *
output){
85 for(std::vector<l1t::Jet>::const_iterator itJet = input->begin();
86 itJet != input->end(); ++itJet){
87 uint16_t linPt = (uint16_t)itJet->hwPt();
91 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0,0,0,0);
93 l1t::Jet gtJet(*&ldummy, rankPt, itJet->hwEta(), itJet->hwPhi(), itJet->hwQual());
94 output->push_back(gtJet);
100 const std::vector<l1t::EGamma> *
input,
101 std::vector<l1t::EGamma> *
output){
103 for(std::vector<l1t::EGamma>::const_iterator itEGamma = input->begin();
104 itEGamma != input->end(); ++itEGamma){
105 unsigned newEta =
gtEta(itEGamma->hwEta());
106 unsigned newPhi = itEGamma->hwPhi();
107 const uint16_t rankPt = (uint16_t)itEGamma->hwPt();
110 if((itEGamma->hwQual() & 0x10) == 0x10)
116 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0,0,0,0);
118 l1t::EGamma gtEGamma(*&ldummy, rankPt, newEta, newPhi,
119 itEGamma->hwQual(), itEGamma->hwIso());
120 output->push_back(gtEGamma);
125 const std::vector<l1t::Tau> *
input,
126 std::vector<l1t::Tau> *
output){
127 for(std::vector<l1t::Tau>::const_iterator itTau = input->begin();
128 itTau != input->end(); ++itTau){
129 unsigned newPhi = itTau->hwPhi();
130 unsigned newEta =
gtEta(itTau->hwEta());
134 if((itTau->hwQual() & 0x10) == 0x10)
141 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0,0,0,0);
143 l1t::Tau gtTau(*&ldummy, itTau->hwPt(), newEta, newPhi, itTau->hwQual(), itTau->hwIso());
144 output->push_back(gtTau);
149 const std::vector<l1t::Tau> *
input,
150 std::vector<l1t::Tau> *
output){
151 for(std::vector<l1t::Tau>::const_iterator itTau = input->begin();
152 itTau != input->end(); ++itTau){
153 uint16_t linPt = (uint16_t)itTau->hwPt();
157 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0,0,0,0);
159 l1t::Tau gtTau(*&ldummy, rankPt, itTau->hwEta(), itTau->hwPhi(), itTau->hwQual(), itTau->hwIso());
160 output->push_back(gtTau);
166 const std::vector<l1t::EtSum> *
input,
167 std::vector<l1t::EtSum> *
output){
168 for(std::vector<l1t::EtSum>::const_iterator itEtSum = input->begin();
169 itEtSum != input->end(); ++itEtSum){
174 rankPt = (uint16_t)itEtSum->hwPt();
185 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0,0,0,0);
187 l1t::EtSum gtEtSum(*&ldummy, itEtSum->getType(), rankPt, 0,
188 itEtSum->hwPhi(), itEtSum->hwQual());
190 output->push_back(gtEtSum);
194 const unsigned int gtEta(
const unsigned int iEta)
196 unsigned rctEta = (iEta<11 ? 10-iEta : iEta-11);
197 return (((rctEta % 7) & 0x7) | (iEta<11 ? 0x8 : 0));
void TauToGtEtaScales(CaloParamsHelper *params, const std::vector< l1t::Tau > *input, std::vector< l1t::Tau > *output)
l1t::LUT * jetCalibrationLUT()
const unsigned int gtEta(const unsigned int iEta)
void EGammaToGtScales(CaloParamsHelper *params, const std::vector< l1t::EGamma > *input, std::vector< l1t::EGamma > *output)
void calibrateAndRankTaus(CaloParamsHelper *params, const std::vector< l1t::Tau > *input, std::vector< l1t::Tau > *output)
void EtSumToGtScales(CaloParamsHelper *params, const std::vector< l1t::EtSum > *input, std::vector< l1t::EtSum > *output)
uint16_t rank(const uint16_t linear) const
convert from linear Et scale to rank scale
static std::string const input
void calibrateAndRankJets(CaloParamsHelper *params, const std::vector< l1t::Jet > *input, std::vector< l1t::Jet > *output)
void JetToGtEtaScales(CaloParamsHelper *params, const std::vector< l1t::Jet > *input, std::vector< l1t::Jet > *output)
void JetToGtPtScales(CaloParamsHelper *params, const std::vector< l1t::Jet > *input, std::vector< l1t::Jet > *output)
l1t::LUT * tauCalibrationLUT()
unsigned linScaleMax() const
int data(unsigned int address) const
void TauToGtPtScales(CaloParamsHelper *params, const std::vector< l1t::Tau > *input, std::vector< l1t::Tau > *output)