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();
22 unsigned int lutAddress = (eta<<10)+pt;
26 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0,0,0,0);
27 l1t::Jet outJet(*&ldummy, rank, itJet->hwEta(), itJet->hwPhi(), itJet->hwQual());
28 output->push_back(outJet);
33 const std::vector<l1t::Tau> *
input,
34 std::vector<l1t::Tau> *
output){
36 for(std::vector<l1t::Tau>::const_iterator itTau = input->begin();
37 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);
54 const std::vector<l1t::Jet> *
input,
55 std::vector<l1t::Jet> *
output){
57 for(std::vector<l1t::Jet>::const_iterator itJet = input->begin();
58 itJet != input->end(); ++itJet){
59 unsigned newPhi = itJet->hwPhi();
60 unsigned newEta =
gtEta(itJet->hwEta());
64 if((itJet->hwQual() & 0x10) == 0x10)
70 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0,0,0,0);
72 l1t::Jet gtJet(*&ldummy, itJet->hwPt(), newEta, newPhi, itJet->hwQual());
73 output->push_back(gtJet);
78 const std::vector<l1t::Jet> *
input,
79 std::vector<l1t::Jet> *
output){
81 for(std::vector<l1t::Jet>::const_iterator itJet = input->begin();
82 itJet != input->end(); ++itJet){
83 uint16_t linPt = (uint16_t)itJet->hwPt();
87 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0,0,0,0);
89 l1t::Jet gtJet(*&ldummy, rankPt, itJet->hwEta(), itJet->hwPhi(), itJet->hwQual());
90 output->push_back(gtJet);
96 const std::vector<l1t::EGamma> *
input,
97 std::vector<l1t::EGamma> *
output){
99 for(std::vector<l1t::EGamma>::const_iterator itEGamma = input->begin();
100 itEGamma != input->end(); ++itEGamma){
101 unsigned newEta =
gtEta(itEGamma->hwEta());
102 unsigned newPhi = itEGamma->hwPhi();
103 const uint16_t rankPt = (uint16_t)itEGamma->hwPt();
106 if((itEGamma->hwQual() & 0x10) == 0x10)
112 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0,0,0,0);
114 l1t::EGamma gtEGamma(*&ldummy, rankPt, newEta, newPhi,
115 itEGamma->hwQual(), itEGamma->hwIso());
116 output->push_back(gtEGamma);
121 const std::vector<l1t::Tau> *
input,
122 std::vector<l1t::Tau> *
output){
123 for(std::vector<l1t::Tau>::const_iterator itTau = input->begin();
124 itTau != input->end(); ++itTau){
125 unsigned newPhi = itTau->hwPhi();
126 unsigned newEta =
gtEta(itTau->hwEta());
130 if((itTau->hwQual() & 0x10) == 0x10)
137 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0,0,0,0);
139 l1t::Tau gtTau(*&ldummy, itTau->hwPt(), newEta, newPhi, itTau->hwQual(), itTau->hwIso());
140 output->push_back(gtTau);
145 const std::vector<l1t::Tau> *
input,
146 std::vector<l1t::Tau> *
output){
147 for(std::vector<l1t::Tau>::const_iterator itTau = input->begin();
148 itTau != input->end(); ++itTau){
149 uint16_t linPt = (uint16_t)itTau->hwPt();
153 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0,0,0,0);
155 l1t::Tau gtTau(*&ldummy, rankPt, itTau->hwEta(), itTau->hwPhi(), itTau->hwQual(), itTau->hwIso());
156 output->push_back(gtTau);
162 const std::vector<l1t::EtSum> *
input,
163 std::vector<l1t::EtSum> *
output){
164 for(std::vector<l1t::EtSum>::const_iterator itEtSum = input->begin();
165 itEtSum != input->end(); ++itEtSum){
170 rankPt = (uint16_t)itEtSum->hwPt();
171 if (EtSum::EtSumType::kMissingHt == itEtSum->getType())
181 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double> > ldummy(0,0,0,0);
183 l1t::EtSum gtEtSum(*&ldummy, itEtSum->getType(), rankPt, 0,
184 itEtSum->hwPhi(), itEtSum->hwQual());
186 output->push_back(gtEtSum);
190 const unsigned int gtEta(
const unsigned int iEta)
192 unsigned rctEta = (iEta<11 ? 10-iEta : iEta-11);
193 return (((rctEta % 7) & 0x7) | (iEta<11 ? 0x8 : 0));
void JetToGtEtaScales(CaloParamsStage1 *params, const std::vector< l1t::Jet > *input, std::vector< l1t::Jet > *output)
const unsigned int gtEta(const unsigned int iEta)
void TauToGtEtaScales(CaloParamsStage1 *params, const std::vector< l1t::Tau > *input, std::vector< l1t::Tau > *output)
uint16_t rank(const uint16_t linear) const
convert from linear Et scale to rank scale
void JetToGtPtScales(CaloParamsStage1 *params, const std::vector< l1t::Jet > *input, std::vector< l1t::Jet > *output)
static std::string const input
void TauToGtPtScales(CaloParamsStage1 *params, const std::vector< l1t::Tau > *input, std::vector< l1t::Tau > *output)
void calibrateAndRankTaus(CaloParamsStage1 *params, const std::vector< l1t::Tau > *input, std::vector< l1t::Tau > *output)
l1t::LUT * tauCalibrationLUT()
l1t::LUT * jetCalibrationLUT()
void EGammaToGtScales(CaloParamsStage1 *params, const std::vector< l1t::EGamma > *input, std::vector< l1t::EGamma > *output)
unsigned linScaleMax() const
int data(unsigned int address) const
void calibrateAndRankJets(CaloParamsStage1 *params, const std::vector< l1t::Jet > *input, std::vector< l1t::Jet > *output)
void EtSumToGtScales(CaloParamsStage1 *params, const std::vector< l1t::EtSum > *input, std::vector< l1t::EtSum > *output)